@aaravpos/appointment-booking-plugin 8.0.3 → 8.0.5

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.
Files changed (37) hide show
  1. package/dist/{src/components → components}/AppointmentBookingPlugin.d.ts +1 -1
  2. package/dist/{src/components → components}/BookingPluginContainer.d.ts +1 -1
  3. package/dist/components/common/Breadcrumb.d.ts +1 -0
  4. package/dist/{src/components → components}/common/ChooseYourOutlet.d.ts +2 -2
  5. package/dist/{src/components → components}/common/MainLayout.d.ts +2 -2
  6. package/dist/components/modals/ConsentModal.d.ts +3 -0
  7. package/dist/{src/components → components}/modals/PaymentModal.d.ts +1 -1
  8. package/dist/{src/components → components}/sidebar/ProfessionalSidebar.d.ts +2 -2
  9. package/dist/{src/components → components}/sidebar/ServiceSidebar.d.ts +2 -2
  10. package/dist/components/steps/ProfessionalServicePage.d.ts +1 -0
  11. package/dist/components/steps/Professionals.d.ts +1 -0
  12. package/dist/components/steps/ServiceProfessionalPage.d.ts +1 -0
  13. package/dist/components/steps/ServicesPage.d.ts +1 -0
  14. package/dist/index.cjs +32 -29
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +3465 -3399
  17. package/dist/styles.css +53 -19
  18. package/package.json +1 -1
  19. package/dist/src/components/common/Breadcrumb.d.ts +0 -1
  20. package/dist/src/components/modals/ConsentModal.d.ts +0 -3
  21. package/dist/src/components/steps/ProfessionalServicePage.d.ts +0 -1
  22. package/dist/src/components/steps/Professionals.d.ts +0 -1
  23. package/dist/src/components/steps/ServiceProfessionalPage.d.ts +0 -1
  24. package/dist/src/components/steps/ServicesPage.d.ts +0 -1
  25. package/dist/src/index.d.ts +0 -2
  26. /package/dist/{src/components → components}/common/CalendarOverlay.d.ts +0 -0
  27. /package/dist/{src/components → components}/common/ProfessionalSkeletonCard.d.ts +0 -0
  28. /package/dist/{src/components → components}/common/ServiceSidebarSkeleton.d.ts +0 -0
  29. /package/dist/{src/components → components}/common/ServiceSkeleton.d.ts +0 -0
  30. /package/dist/{src/components → components}/common/SlotSkeleton.d.ts +0 -0
  31. /package/dist/{src/components → components}/common/Spinner.d.ts +0 -0
  32. /package/dist/{src/components → components}/sidebar/OrderSidebar.d.ts +0 -0
  33. /package/dist/{src/components → components}/steps/ConfirmPage.d.ts +0 -0
  34. /package/dist/{src/components → components}/steps/DetailsPage.d.ts +0 -0
  35. /package/dist/{src/components → components}/steps/SuccessPage.d.ts +0 -0
  36. /package/dist/{src/components → components}/steps/TimePage.d.ts +0 -0
  37. /package/dist/{src/components → components}/steps/index.d.ts +0 -0
package/dist/index.cjs CHANGED
@@ -1,35 +1,38 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Oc=Object.create,Br=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Tc=Object.getOwnPropertyNames,Ac=Object.getPrototypeOf,Ic=Object.prototype.hasOwnProperty,Te=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Ds=(e,t)=>{let r={};for(var n in e)Br(r,n,{get:e[n],enumerable:!0});return t||Br(r,Symbol.toStringTag,{value:"Module"}),r},na=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Tc(t),i=0,s=a.length,l;i<s;i++)l=a[i],!Ic.call(e,l)&&l!==r&&Br(e,l,{get:(d=>t[d]).bind(null,l),enumerable:!(n=jc(t,l))||n.enumerable});return e},kc=(e,t,r)=>(na(e,t,"default"),r&&na(r,t,"default")),Qt=(e,t,r)=>(r=e!=null?Oc(Ac(e)):{},na(t||!e||!e.__esModule?Br(r,"default",{value:e,enumerable:!0}):r,e));let Ur=require("react"),N=Qt(Ur,1);Ur=Qt(Ur);let L=require("react-redux"),Se=require("redux"),He=require("redux-persist"),o=require("react/jsx-runtime"),he=require("luxon"),ee=require("react-toastify"),Ue=require("react-hook-form"),Rc=require("lodash");function xr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xr=function(r){return typeof r}:xr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xr(e)}function Dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mc(e,t,r){return t&&Bi(e.prototype,t),r&&Bi(e,r),e}function Lc(e,t){return t&&(xr(t)==="object"||typeof t=="function")?t:Cr(e)}function aa(e){return aa=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},aa(e)}function Cr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ia(e,t)}function ia(e,t){return ia=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},ia(e,t)}function _r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ms=(function(e){Fc(t,e);function t(){var r,n;Dc(this,t);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=Lc(this,(r=aa(t)).call.apply(r,[this].concat(i))),_r(Cr(n),"state",{bootstrapped:!1}),_r(Cr(n),"_unsubscribe",void 0),_r(Cr(n),"handlePersistorState",function(){n.props.persistor.getState().bootstrapped&&(n.props.onBeforeLift?Promise.resolve(n.props.onBeforeLift()).finally(function(){return n.setState({bootstrapped:!0})}):n.setState({bootstrapped:!0}),n._unsubscribe&&n._unsubscribe())}),n}return Mc(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return process.env.NODE_ENV!=="production"&&typeof this.props.children=="function"&&this.props.loading&&console.error("redux-persist: PersistGate expects either a function child or loading prop, but not both. The loading prop will be ignored."),typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t})(Ur.PureComponent);_r(Ms,"defaultProps",{children:null,loading:null});var Ls=Symbol.for("immer-nothing"),Ui=Symbol.for("immer-draftable"),me=Symbol.for("immer-state"),Bc=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function xe(e,...t){if(process.env.NODE_ENV!=="production"){const r=Bc[e],n=Qe(r)?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ee=Object,yt=Ee.getPrototypeOf,Vr="constructor",fn="prototype",oa="configurable",zr="enumerable",wr="writable",Dt="value",_e=e=>!!e&&!!e[me];function De(e){return e?Fs(e)||hn(e)||!!e[Ui]||!!e[Vr]?.[Ui]||mn(e)||vn(e):!1}var Uc=Ee[fn][Vr].toString(),Vi=new WeakMap;function Fs(e){if(!e||!Wa(e))return!1;const t=yt(e);if(t===null||t===Ee[fn])return!0;const r=Ee.hasOwnProperty.call(t,Vr)&&t[Vr];if(r===Object)return!0;if(!Qe(r))return!1;let n=Vi.get(r);return n===void 0&&(n=Function.toString.call(r),Vi.set(r,n)),n===Uc}function Vc(e){return _e(e)||xe(15,e),e[me].base_}function pn(e,t,r=!0){er(e)===0?(r?Reflect.ownKeys(e):Ee.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,a)=>t(a,n,e))}function er(e){const t=e[me];return t?t.type_:hn(e)?1:mn(e)?2:vn(e)?3:0}var zi=(e,t,r=er(e))=>r===2?e.has(t):Ee[fn].hasOwnProperty.call(e,t),sa=(e,t,r=er(e))=>r===2?e.get(t):e[t],qr=(e,t,r,n=er(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function zc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var hn=Array.isArray,mn=e=>e instanceof Map,vn=e=>e instanceof Set,Wa=e=>typeof e=="object",Qe=e=>typeof e=="function",zn=e=>typeof e=="boolean";function qc(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Fe=e=>e.copy_||e.base_,Ga=e=>e.modified_?e.copy_:e.base_;function la(e,t){if(mn(e))return new Map(e);if(vn(e))return new Set(e);if(hn(e))return Array[fn].slice.call(e);const r=Fs(e);if(t===!0||t==="class_only"&&!r){const n=Ee.getOwnPropertyDescriptors(e);delete n[me];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){const s=a[i],l=n[s];l[wr]===!1&&(l[wr]=!0,l[oa]=!0),(l.get||l.set)&&(n[s]={[oa]:!0,[wr]:!0,[zr]:l[zr],[Dt]:e[s]})}return Ee.create(yt(e),n)}else{const n=yt(e);if(n!==null&&r)return{...e};const a=Ee.create(n);return Ee.assign(a,e)}}function yn(e,t=!1){return gn(e)||_e(e)||!De(e)||(er(e)>1&&Ee.defineProperties(e,{set:sr,add:sr,clear:sr,delete:sr}),Ee.freeze(e),t&&pn(e,(r,n)=>{yn(n,!0)},!1)),e}function Wc(){xe(2)}var sr={[Dt]:Wc};function gn(e){return e===null||!Wa(e)?!0:Ee.isFrozen(e)}var Wr="MapSet",da="Patches",qi="ArrayMethods",Bs={};function nt(e){const t=Bs[e];return t||xe(0,e),t}var Wi=e=>!!Bs[e],Mt,Us=()=>Mt,Gc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wi(Wr)?nt(Wr):void 0,arrayMethodsPlugin_:Wi(qi)?nt(qi):void 0});function Gi(e,t){t&&(e.patchPlugin_=nt(da),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ca(e){ua(e),e.drafts_.forEach(Hc),e.drafts_=null}function ua(e){e===Mt&&(Mt=e.parent_)}var Hi=e=>Mt=Gc(Mt,e);function Hc(e){const t=e[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ki(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[me].modified_&&(ca(t),xe(4)),De(e)&&(e=Yi(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[me].base_,e,t)}else e=Yi(t,r);return Kc(t,e,!0),ca(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ls?e:void 0}function Yi(e,t){if(gn(t))return t;const r=t[me];if(!r)return Gr(t,e.handledSet_,e);if(!$n(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);qs(r,e)}return r.copy_}function Kc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yn(t,r)}function Vs(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var $n=(e,t)=>e.scope_===t,Yc=[];function zs(e,t,r,n){const a=Fe(e),i=e.type_;if(n!==void 0&&sa(a,n,i)===t){qr(a,n,r,i);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;pn(a,(d,c)=>{if(_e(c)){const u=l.get(c)||[];u.push(d),l.set(c,u)}})}const s=e.draftLocations_.get(t)??Yc;for(const l of s)qr(a,l,r,i)}function Xc(e,t,r){e.callbacks_.push(function(a){const i=t;if(!i||!$n(i,a))return;a.mapSetPlugin_?.fixSetContents(i);const s=Ga(i);zs(e,i.draft_??i,s,r),qs(i,a)})}function qs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const n=r.getPath(e);n&&r.generatePatches_(e,n,t)}Vs(e)}}function Zc(e,t,r){const{scope_:n}=e;if(_e(r)){const a=r[me];$n(a,n)&&a.callbacks_.push(function(){Er(e),zs(e,r,Ga(a),t)})}else De(r)&&e.callbacks_.push(function(){const i=Fe(e);e.type_===3?i.has(r)&&Gr(r,n.handledSet_,n):sa(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Gr(sa(e.copy_,t,e.type_),n.handledSet_,n)})}function Gr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||_e(e)||t.has(e)||!De(e)||gn(e)||(t.add(e),pn(e,(n,a)=>{if(_e(a)){const i=a[me];$n(i,r)&&(qr(e,n,Ga(i),e.type_),Vs(i))}else De(a)&&Gr(a,t,r)})),e}function Jc(e,t){const r=hn(e),n={type_:r?1:0,scope_:t?t.scope_:Us(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,i=Hr;r&&(a=[n],i=Lt);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Hr={get(e,t){if(t===me)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Fe(e);if(!zi(a,t,e.type_))return Qc(e,a,t);const i=a[t];if(e.finalized_||!De(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&qc(t))return i;if(i===qn(e.base_,t)){Er(e);const s=e.type_===1?+t:t,l=pa(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Fe(e)},ownKeys(e){return Reflect.ownKeys(Fe(e))},set(e,t,r){const n=Ws(Fe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=qn(Fe(e),t),i=a?.[me];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(zc(r,a)&&(r!==void 0||zi(e.base_,t,e.type_)))return!0;Er(e),fa(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Zc(e,t,r)),!0},deleteProperty(e,t){return Er(e),qn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),fa(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Fe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[wr]:!0,[oa]:e.type_!==1||t!=="length",[zr]:n[zr],[Dt]:r[t]}},defineProperty(){xe(11)},getPrototypeOf(e){return yt(e.base_)},setPrototypeOf(){xe(12)}},Lt={};for(let e in Hr){let t=Hr[e];Lt[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Lt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&xe(13),Lt.set.call(this,e,t,void 0)};Lt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&xe(14),Hr.set.call(this,e[0],t,r,e[0])};function qn(e,t){const r=e[me];return(r?Fe(r):e)[t]}function Qc(e,t,r){const n=Ws(t,r);return n?Dt in n?n[Dt]:n.get?.call(e.draft_):void 0}function Ws(e,t){if(!(t in e))return;let r=yt(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=yt(r)}}function fa(e){e.modified_||(e.modified_=!0,e.parent_&&fa(e.parent_))}function Er(e){e.copy_||(e.assigned_=new Map,e.copy_=la(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Qe(t)&&!Qe(r)){const i=r;r=t;const s=this;return function(d=i,...c){return s.produce(d,u=>r.call(this,u,...c))}}Qe(r)||xe(6),n!==void 0&&!Qe(n)&&xe(7);let a;if(De(t)){const i=Hi(this),s=pa(i,t,void 0);let l=!0;try{a=r(s),l=!1}finally{l?ca(i):ua(i)}return Gi(i,n),Ki(a,i)}else if(!t||!Wa(t)){if(a=r(t),a===void 0&&(a=t),a===Ls&&(a=void 0),this.autoFreeze_&&yn(a,!0),n){const i=[],s=[];nt(da).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else xe(1,t)},this.produceWithPatches=(t,r)=>{if(Qe(t))return(i,...s)=>this.produceWithPatches(i,l=>t(l,...s));let n,a;return[this.produce(t,r,(i,s)=>{n=i,a=s}),n,a]},zn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),zn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),zn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){De(e)||xe(8),_e(e)&&(e=bn(e));const t=Hi(this),r=pa(t,e,void 0);return r[me].isManual_=!0,ua(t),r}finishDraft(e,t){const r=e&&e[me];(!r||!r.isManual_)&&xe(9);const{scope_:n}=r;return Gi(n,t),Ki(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=nt(da).applyPatches_;return _e(e)?n(e,t):this.produce(e,a=>n(a,t))}};function pa(e,t,r,n){const[a,i]=mn(t)?nt(Wr).proxyMap_(t,r):vn(t)?nt(Wr).proxySet_(t,r):Jc(t,r);return(r?.scope_??Us()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Xc(r,i,n):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:d}=l;i.modified_&&d&&d.generatePatches_(i,[],l)}),a}function bn(e){return _e(e)||xe(10,e),Gs(e)}function Gs(e){if(!De(e)||gn(e))return e;const t=e[me];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=la(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=la(e,!0);return pn(r,(a,i)=>{qr(r,a,Gs(i))},n),t&&(t.finalized_=!1),r}var tu=new eu,Nn=tu.produce,ru=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(i){({stack:a}=i)}console.warn(`The result function returned its own inputs without modification. e.g
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var jd=Object.create,Vr=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,Id=Object.getPrototypeOf,Ds=Object.prototype.hasOwnProperty,Ae=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Ms=(e,t)=>{let r={};for(var n in e)Vr(r,n,{get:e[n],enumerable:!0});return t||Vr(r,Symbol.toStringTag,{value:"Module"}),r},ia=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Ad(t),i=0,s=a.length,l;i<s;i++)l=a[i],!Ds.call(e,l)&&l!==r&&Vr(e,l,{get:(c=>t[c]).bind(null,l),enumerable:!(n=Td(t,l))||n.enumerable});return e},kd=(e,t,r)=>(ia(e,t,"default"),r&&ia(r,t,"default")),tr=(e,t,r)=>(r=e!=null?jd(Id(e)):{},ia(t||!e||!e.__esModule||!Ds.call(e,"default")?Vr(r,"default",{value:e,enumerable:!0}):r,e));let zr=require("react"),S=tr(zr,1);zr=tr(zr);let L=require("react-redux"),xe=require("redux"),Ke=require("redux-persist"),o=require("react/jsx-runtime"),he=require("luxon"),ee=require("react-toastify"),Ue=require("react-hook-form"),Rd=require("lodash");function Cr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cr=function(r){return typeof r}:Cr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Cr(e)}function Dd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Md(e,t,r){return t&&zi(e.prototype,t),r&&zi(e,r),e}function Ld(e,t){return t&&(Cr(t)==="object"||typeof t=="function")?t:_r(e)}function oa(e){return oa=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},oa(e)}function _r(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fd(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sa(e,t)}function sa(e,t){return sa=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},sa(e,t)}function wr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ls=(function(e){Fd(t,e);function t(){var r,n;Dd(this,t);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=Ld(this,(r=oa(t)).call.apply(r,[this].concat(i))),wr(_r(n),"state",{bootstrapped:!1}),wr(_r(n),"_unsubscribe",void 0),wr(_r(n),"handlePersistorState",function(){n.props.persistor.getState().bootstrapped&&(n.props.onBeforeLift?Promise.resolve(n.props.onBeforeLift()).finally(function(){return n.setState({bootstrapped:!0})}):n.setState({bootstrapped:!0}),n._unsubscribe&&n._unsubscribe())}),n}return Md(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return process.env.NODE_ENV!=="production"&&typeof this.props.children=="function"&&this.props.loading&&console.error("redux-persist: PersistGate expects either a function child or loading prop, but not both. The loading prop will be ignored."),typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t})(zr.PureComponent);wr(Ls,"defaultProps",{children:null,loading:null});var Fs=Symbol.for("immer-nothing"),qi=Symbol.for("immer-draftable"),me=Symbol.for("immer-state"),Bd=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Ce(e,...t){if(process.env.NODE_ENV!=="production"){const r=Bd[e],n=et(r)?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ee=Object,gt=Ee.getPrototypeOf,qr="constructor",pn="prototype",la="configurable",Wr="enumerable",Er="writable",Lt="value",we=e=>!!e&&!!e[me];function Te(e){return e?Bs(e)||mn(e)||!!e[qi]||!!e[qr]?.[qi]||vn(e)||yn(e):!1}var Ud=Ee[pn][qr].toString(),Wi=new WeakMap;function Bs(e){if(!e||!Ha(e))return!1;const t=gt(e);if(t===null||t===Ee[pn])return!0;const r=Ee.hasOwnProperty.call(t,qr)&&t[qr];if(r===Object)return!0;if(!et(r))return!1;let n=Wi.get(r);return n===void 0&&(n=Function.toString.call(r),Wi.set(r,n)),n===Ud}function Vd(e){return we(e)||Ce(15,e),e[me].base_}function hn(e,t,r=!0){rr(e)===0?(r?Reflect.ownKeys(e):Ee.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,a)=>t(a,n,e))}function rr(e){const t=e[me];return t?t.type_:mn(e)?1:vn(e)?2:yn(e)?3:0}var qn=(e,t,r=rr(e))=>r===2?e.has(t):Ee[pn].hasOwnProperty.call(e,t),ca=(e,t,r=rr(e))=>r===2?e.get(t):e[t],Gr=(e,t,r,n=rr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function zd(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var mn=Array.isArray,vn=e=>e instanceof Map,yn=e=>e instanceof Set,Ha=e=>typeof e=="object",et=e=>typeof e=="function",Wn=e=>typeof e=="boolean";function qd(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Fe=e=>e.copy_||e.base_,Ka=e=>e.modified_?e.copy_:e.base_;function da(e,t){if(vn(e))return new Map(e);if(yn(e))return new Set(e);if(mn(e))return Array[pn].slice.call(e);const r=Bs(e);if(t===!0||t==="class_only"&&!r){const n=Ee.getOwnPropertyDescriptors(e);delete n[me];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){const s=a[i],l=n[s];l[Er]===!1&&(l[Er]=!0,l[la]=!0),(l.get||l.set)&&(n[s]={[la]:!0,[Er]:!0,[Wr]:l[Wr],[Lt]:e[s]})}return Ee.create(gt(e),n)}else{const n=gt(e);if(n!==null&&r)return{...e};const a=Ee.create(n);return Ee.assign(a,e)}}function gn(e,t=!1){return $n(e)||we(e)||!Te(e)||(rr(e)>1&&Ee.defineProperties(e,{set:lr,add:lr,clear:lr,delete:lr}),Ee.freeze(e),t&&hn(e,(r,n)=>{gn(n,!0)},!1)),e}function Wd(){Ce(2)}var lr={[Lt]:Wd};function $n(e){return e===null||!Ha(e)?!0:Ee.isFrozen(e)}var Hr="MapSet",ua="Patches",Gi="ArrayMethods",Us={};function at(e){const t=Us[e];return t||Ce(0,e),t}var Hi=e=>!!Us[e],Ft,Vs=()=>Ft,Gd=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hi(Hr)?at(Hr):void 0,arrayMethodsPlugin_:Hi(Gi)?at(Gi):void 0});function Ki(e,t){t&&(e.patchPlugin_=at(ua),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fa(e){pa(e),e.drafts_.forEach(Hd),e.drafts_=null}function pa(e){e===Ft&&(Ft=e.parent_)}var Yi=e=>Ft=Gd(Ft,e);function Hd(e){const t=e[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xi(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[me].modified_&&(fa(t),Ce(4)),Te(e)&&(e=Zi(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[me].base_,e,t)}else e=Zi(t,r);return Kd(t,e,!0),fa(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fs?e:void 0}function Zi(e,t){if($n(t))return t;const r=t[me];if(!r)return Kr(t,e.handledSet_,e);if(!bn(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Ws(r,e)}return r.copy_}function Kd(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gn(t,r)}function zs(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bn=(e,t)=>e.scope_===t,Yd=[];function qs(e,t,r,n){const a=Fe(e),i=e.type_;if(n!==void 0&&ca(a,n,i)===t){Gr(a,n,r,i);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;hn(a,(c,d)=>{if(we(d)){const u=l.get(d)||[];u.push(c),l.set(d,u)}})}const s=e.draftLocations_.get(t)??Yd;for(const l of s)Gr(a,l,r,i)}function Xd(e,t,r){e.callbacks_.push(function(a){const i=t;if(!i||!bn(i,a))return;a.mapSetPlugin_?.fixSetContents(i);const s=Ka(i);qs(e,i.draft_??i,s,r),Ws(i,a)})}function Ws(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const n=r.getPath(e);n&&r.generatePatches_(e,n,t)}zs(e)}}function Zd(e,t,r){const{scope_:n}=e;if(we(r)){const a=r[me];bn(a,n)&&a.callbacks_.push(function(){Pr(e),qs(e,r,Ka(a),t)})}else Te(r)&&e.callbacks_.push(function(){const i=Fe(e);e.type_===3?i.has(r)&&Kr(r,n.handledSet_,n):ca(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Kr(ca(e.copy_,t,e.type_),n.handledSet_,n)})}function Kr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||we(e)||t.has(e)||!Te(e)||$n(e)||(t.add(e),hn(e,(n,a)=>{if(we(a)){const i=a[me];bn(i,r)&&(Gr(e,n,Ka(i),e.type_),zs(i))}else Te(a)&&Kr(a,t,r)})),e}function Jd(e,t){const r=mn(e),n={type_:r?1:0,scope_:t?t.scope_:Vs(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,i=Yr;r&&(a=[n],i=Bt);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Yr={get(e,t){if(t===me)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Fe(e);if(!qn(a,t,e.type_))return eu(e,a,t);const i=a[t];if(e.finalized_||!Te(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&qd(t))return i;if(i===Gn(e.base_,t)||Qd(e,t,i)){Pr(e);const s=e.type_===1?+t:t,l=ma(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Fe(e)},ownKeys(e){return Reflect.ownKeys(Fe(e))},set(e,t,r){const n=Gs(Fe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=Gn(Fe(e),t),i=a?.[me];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(zd(r,a)&&(r!==void 0||qn(e.base_,t,e.type_)))return!0;Pr(e),ha(e)}return e.copy_[t]===r&&(r!==void 0||qn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Zd(e,t,r)),!0},deleteProperty(e,t){return Pr(e),Gn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ha(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Fe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Er]:!0,[la]:e.type_!==1||t!=="length",[Wr]:n[Wr],[Lt]:r[t]}},defineProperty(){Ce(11)},getPrototypeOf(e){return gt(e.base_)},setPrototypeOf(){Ce(12)}},Bt={};for(let e in Yr){let t=Yr[e];Bt[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Bt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Ce(13),Bt.set.call(this,e,t,void 0)};Bt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Ce(14),Yr.set.call(this,e[0],t,r,e[0])};function Gn(e,t){const r=e[me];return(r?Fe(r):e)[t]}function Qd(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Te(r)||r[me]?!1:e.baseRefs_.has(r)}function eu(e,t,r){const n=Gs(t,r);return n?Lt in n?n[Lt]:n.get?.call(e.draft_):void 0}function Gs(e,t){if(!(t in e))return;let r=gt(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=gt(r)}}function ha(e){e.modified_||(e.modified_=!0,e.parent_&&ha(e.parent_))}function Pr(e){e.copy_||(e.assigned_=new Map,e.copy_=da(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(et(t)&&!et(r)){const i=r;r=t;const s=this;return function(c=i,...d){return s.produce(c,u=>r.call(this,u,...d))}}et(r)||Ce(6),n!==void 0&&!et(n)&&Ce(7);let a;if(Te(t)){const i=Yi(this),s=ma(i,t,void 0);let l=!0;try{a=r(s),l=!1}finally{l?fa(i):pa(i)}return Ki(i,n),Xi(a,i)}else if(!t||!Ha(t)){if(a=r(t),a===void 0&&(a=t),a===Fs&&(a=void 0),this.autoFreeze_&&gn(a,!0),n){const i=[],s=[];at(ua).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else Ce(1,t)},this.produceWithPatches=(t,r)=>{if(et(t))return(i,...s)=>this.produceWithPatches(i,l=>t(l,...s));let n,a;return[this.produce(t,r,(i,s)=>{n=i,a=s}),n,a]},Wn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Wn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Wn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Te(e)||Ce(8),we(e)&&(e=Nn(e));const t=Yi(this),r=ma(t,e,void 0);return r[me].isManual_=!0,pa(t),r}finishDraft(e,t){const r=e&&e[me];(!r||!r.isManual_)&&Ce(9);const{scope_:n}=r;return Ki(n,t),Xi(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=at(ua).applyPatches_;return we(e)?n(e,t):this.produce(e,a=>n(a,t))}};function ma(e,t,r,n){const[a,i]=vn(t)?at(Hr).proxyMap_(t,r):yn(t)?at(Hr).proxySet_(t,r):Jd(t,r);return(r?.scope_??Vs()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Xd(r,i,n):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:c}=l;i.modified_&&c&&c.generatePatches_(i,[],l)}),a}function Nn(e){return we(e)||Ce(10,e),Hs(e)}function Hs(e){if(!Te(e)||$n(e))return e;const t=e[me];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=da(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=da(e,!0);return hn(r,(a,i)=>{Gr(r,a,Hs(i))},n),t&&(t.finalized_=!1),r}var ru=globalThis.Iterator,Ng=typeof ru?.from=="function",nu=new tu,Sn=nu.produce,au=1e3,iu=(e,t)=>{let r;try{throw new Error}catch(n){({stack:r}=n)}console.warn(`A function memoized with weakMapMemoize${t?` (\`${t}\`)`:""} has seen over ${e} distinct values for the same primitive argument position.
2
+ Results keyed by primitive arguments are held strongly and are only released by \`clearCache()\`, so this cache will keep growing for as long as the function keeps seeing new values.
3
+ If it is called with ever-changing primitives (ids, offsets, timestamps), pass the \`maxSize\` option to bound the cache, switch to \`lruMemoize\`, or call \`.clearCache()\` at a suitable point.
4
+ See https://reselect.js.org/api/development-only-checks#cachesizecheck for details.`,{stack:r})},va={inputStabilityCheck:"once",identityFunctionCheck:"once",cacheSizeCheck:"once"},ou=class{constructor(e){this.value=e}deref(){return this.value}},su=()=>typeof WeakRef>"u"?ou:WeakRef,Ks=su(),lu=0,cr=1;function It(){return{s:lu,v:void 0,o:null,p:null}}function cu(e){return e instanceof Ks?e.deref():e}function xn(e,t={}){let r=It();const{resultEqualityCheck:n,maxSize:a}=t,i=a!==void 0;if(i&&(!Number.isInteger(a)||a<1))throw new TypeError(`maxSize must be a positive integer, received: ${a}`);let s=null,l=0,c,d=0,u=!1;function f(){l>=a&&(s=r,r=It(),l=0)}function v(){let h=r;const{length:m}=arguments;for(let p=0,b=m;p<b;p++){const C=arguments[p];if(typeof C=="function"||typeof C=="object"&&C!==null){let x=h.o;x===null&&(h.o=x=new WeakMap);const N=x.get(C);N===void 0?(h=It(),x.set(C,h)):h=N}else{let x=h.p;x===null&&(h.p=x=new Map);const N=x.get(C);if(N===void 0){if(h=It(),x.set(C,h),l++,process.env.NODE_ENV!=="production"&&x.size>au){const{cacheSizeCheck:$}=va;($==="always"||$==="once"&&!u)&&(u=!0,iu(x.size,e.name))}}else h=N}}if(h.s===cr)return h.v;if(s!==null){let p=s;for(let b=0,C=m;b<C;b++){const x=arguments[b];let N;if(typeof x=="function"||typeof x=="object"&&x!==null){const $=p.o;N=$!==null?$.get(x):void 0}else{const $=p.p;N=$!==null?$.get(x):void 0}if(N===void 0){p=null;break}p=N}if(p!==null&&p.s===cr){const b=h;return b.s=cr,b.v=p.v,f(),p.v}}const y=h;let g=e.apply(null,arguments);if(d++,n){const p=cu(c);p!=null&&n(p,g)&&(g=p,d!==0&&d--),c=typeof g=="object"&&g!==null||typeof g=="function"?new Ks(g):g}return y.s=cr,y.v=g,i&&f(),g}return v.clearCache=()=>{r=It(),s=null,l=0,v.resetResultsCount(),process.env.NODE_ENV!=="production"&&(u=!1)},v.resultsCount=()=>d,v.resetResultsCount=()=>{d=0},v}var du=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(i){({stack:a}=i)}console.warn(`The result function returned its own inputs without modification. e.g
2
5
  \`createSelector([state => state.todos], todos => todos)\`
3
6
  This could lead to inefficient memoization and unnecessary re-renders.
4
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},nu=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,l=n(()=>({}),...a);if(l.apply(null,i)!==l.apply(null,s)){let d;try{throw new Error}catch(c){({stack:d}=c)}console.warn(`An input selector returned a different result when passed same arguments.
7
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},uu=e=>{if(e===null||typeof e!="object"||!("resultEqualityCheck"in e))return e;const t={...e};return delete t.resultEqualityCheck,t},fu=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,l=[],{length:c}=a;for(let u=0;u<c;u++)l.push(uu(a[u]));const d=n(()=>({}),...l);if(d.apply(null,i)!==d.apply(null,s)){let u;try{throw new Error}catch(f){({stack:u}=f)}console.warn(`An input selector returned a different result when passed same arguments.
5
8
  This means your output selector will likely run more frequently than intended.
6
9
  Avoid returning a new reference inside your input selector, e.g.
7
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:i,secondInputs:s,stack:d})}},au={inputStabilityCheck:"once",identityFunctionCheck:"once"},Kr=Symbol("NOT_FOUND");function iu(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ou(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Xi=e=>Array.isArray(e)?e:[e];function su(e){const t=Array.isArray(e[0])?e[0]:e;return ou(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Zi(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var lu=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...au,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:ru},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:nu}}};function du(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Kr},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function cu(e,t){let r=[];function n(l){const d=r.findIndex(c=>t(l,c.key));if(d>-1){const c=r[d];return d>0&&(r.splice(d,1),r.unshift(c)),c.value}return Kr}function a(l,d){n(l)===Kr&&(r.unshift({key:l,value:d}),r.length>e&&r.pop())}function i(){return r}function s(){r=[]}return{get:n,put:a,getEntries:i,clear:s}}var uu=(e,t)=>e===t;function fu(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let i=0;i<a;i++)if(!e(r[i],n[i]))return!1;return!0}}function pu(e,t){const{equalityCheck:r=uu,maxSize:n=1,resultEqualityCheck:a}=typeof t=="object"?t:{equalityCheck:t},i=fu(r);let s=0;const l=n<=1?du(i):cu(n,i);function d(){let c=l.get(arguments);if(c===Kr){if(c=e.apply(null,arguments),s++,a){const u=l.getEntries().find(f=>a(f.value,c));u&&(c=u.value,s!==0&&s--)}l.put(arguments,c)}return c}return d.clearCache=()=>{l.clear(),d.resetResultsCount()},d.resultsCount=()=>s,d.resetResultsCount=()=>{s=0},d}var hu=class{constructor(e){this.value=e}deref(){return this.value}},mu=()=>typeof WeakRef>"u"?hu:WeakRef,Hs=mu(),vu=0,Ji=1;function lr(){return{s:vu,v:void 0,o:null,p:null}}function yu(e){return e instanceof Hs?e.deref():e}function Sn(e,t={}){let r=lr();const{resultEqualityCheck:n}=t;let a,i=0;function s(){let l=r;const{length:d}=arguments;for(let f=0,v=d;f<v;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=l.o;h===null&&(l.o=h=new WeakMap);const y=h.get(m);y===void 0?(l=lr(),h.set(m,l)):l=y}else{let h=l.p;h===null&&(l.p=h=new Map);const y=h.get(m);y===void 0?(l=lr(),h.set(m,l)):l=y}}const c=l;let u;if(l.s===Ji)u=l.v;else if(u=e.apply(null,arguments),i++,n){const f=yu(a);f!=null&&n(f,u)&&(u=f,i!==0&&i--),a=typeof u=="object"&&u!==null||typeof u=="function"?new Hs(u):u}return c.s=Ji,c.v=u,u}return s.clearCache=()=>{r=lr(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Ha(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let i=0,s=0,l,d={},c=a.pop();typeof c=="object"&&(d=c,c=a.pop()),iu(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...d},{memoize:f,memoizeOptions:v=[],argsMemoize:m=Sn,argsMemoizeOptions:h=[]}=u,y=Xi(v),g=Xi(h),p=su(a),b=f(function(){return i++,c.apply(null,arguments)},...y);let C=!0;const x=m(function(){s++;const $=Zi(p,arguments);if(l=b.apply(null,$),process.env.NODE_ENV!=="production"){const{devModeChecks:T={}}=u,{identityFunctionCheck:D,inputStabilityCheck:G}=lu(C,T);if(D.shouldRun&&D.run(c,$,l),G.shouldRun){const Y=Zi(p,arguments);G.run({inputSelectorResults:$,inputSelectorResultsCopy:Y},{memoize:f,memoizeOptions:y},arguments)}C&&(C=!1)}return l},...g);return Object.assign(x,{resultFunc:c,memoizedResultFunc:b,dependencies:p,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var gu=Ha(Sn);function Ks(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var $u=Ks(),bu=Ks,ha=Ds({ReducerType:()=>bl,SHOULD_AUTOBATCH:()=>Xa,TaskAbortError:()=>nr,Tuple:()=>Ka,addListener:()=>Qa,asyncThunkCreator:()=>Au,autoBatchEnhancer:()=>ll,buildCreateSlice:()=>Nl,clearAllListeners:()=>Al,combineSlices:()=>yf,configureStore:()=>dl,createAction:()=>ke,createActionCreatorInvariantMiddleware:()=>el,createAsyncThunk:()=>Cn,createDraftSafeSelector:()=>Xs,createDraftSafeSelectorCreator:()=>Ys,createDynamicMiddleware:()=>lf,createEntityAdapter:()=>Ku,createImmutableStateInvariantMiddleware:()=>il,createListenerMiddleware:()=>af,createNextState:()=>Nn,createReducer:()=>ul,createSelector:()=>gu,createSelectorCreator:()=>Ha,createSerializableStateInvariantMiddleware:()=>sl,createSlice:()=>Ye,current:()=>bn,findNonSerializableValue:()=>Yr,formatProdErrorMessage:()=>K,freeze:()=>yn,isActionCreator:()=>Js,isAllOf:()=>Xr,isAnyOf:()=>Ct,isAsyncThunkAction:()=>vl,isDraft:()=>_e,isFluxStandardAction:()=>Qs,isFulfilled:()=>ml,isImmutableDefault:()=>rl,isPending:()=>pl,isPlain:()=>Ya,isRejected:()=>Zr,isRejectedWithValue:()=>hl,lruMemoize:()=>pu,miniSerializeError:()=>yl,nanoid:()=>rr,original:()=>Vc,prepareAutoBatched:()=>wu,removeListener:()=>ei,unwrapResult:()=>gl,weakMapMemoize:()=>Sn});kc(ha,require("redux"));var Ys=(...e)=>{const t=Ha(...e),r=Object.assign((...n)=>{const a=t(...n),i=(s,...l)=>a(_e(s)?bn(s):s,...l);return Object.assign(i,a),i},{withTypes:()=>r});return r},Xs=Ys(Sn),Nu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Se.compose:Se.compose.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Zs=e=>e&&typeof e.match=="function";function ke(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(process.env.NODE_ENV==="production"?K(0):"prepareAction did not return an object");return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>(0,Se.isAction)(n)&&n.type===e,r}function Js(e){return typeof e=="function"&&"type"in e&&Zs(e)}function Qs(e){return(0,Se.isAction)(e)&&Object.keys(e).every(Su)}function Su(e){return["type","payload","error","meta"].indexOf(e)>-1}function xu(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
8
- Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function el(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=Js}=e;return()=>r=>n=>(t(n)&&console.warn(xu(n.type)),r(n))}function tl(e,t){let r=0;return{measureTime(n){const a=Date.now();try{return n()}finally{r+=Date.now()-a}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
10
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:i,secondInputs:s,stack:u})}},Ya=Symbol("NOT_FOUND");function pu(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function hu(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Ji=e=>Array.isArray(e)?e:[e];function mu(e){const t=Array.isArray(e[0])?e[0]:e;return hu(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function vu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}function Xa(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let i=0,s=0,l,c={},d=a.pop();typeof d=="object"&&(c=d,d=a.pop()),pu(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const u={...r,...c},{memoize:f,memoizeOptions:v=[],argsMemoize:h=xn,argsMemoizeOptions:m=[]}=u,y=Ji(v),g=Ji(m),p=mu(a),b=f(function(){return i++,d.apply(null,arguments)},...y);let C=!0;const x=h(function(){s++;const{length:$}=p,T=new Array($);for(let R=0;R<$;R++)T[R]=p[R].apply(null,arguments);if(l=b.apply(null,T),process.env.NODE_ENV!=="production"){const{devModeChecks:R}=u,G=R!==void 0&&Object.prototype.hasOwnProperty.call(R,"identityFunctionCheck")?R.identityFunctionCheck:va.identityFunctionCheck,Y=R!==void 0&&Object.prototype.hasOwnProperty.call(R,"inputStabilityCheck")?R.inputStabilityCheck:va.inputStabilityCheck;(G==="always"||G==="once"&&C)&&du(d,T,l),(Y==="always"||Y==="once"&&C)&&fu({inputSelectorResults:T,inputSelectorResultsCopy:vu(p,arguments)},{memoize:f,memoizeOptions:y},arguments),C&&(C=!1)}return l},...g);return Object.assign(x,{resultFunc:d,memoizedResultFunc:b,dependencies:p,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var yu=Xa(xn);function gu(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Ya},put(r,n){t={key:r,value:n}},findMatchingEntry(r,n){const a=t;return a!==void 0&&n(a.value,r)?a:void 0},clear(){t=void 0}}}function $u(e,t){let r=[];function n(l){const c=r.findIndex(d=>t(d.key,l));if(c>-1){const d=r[c];return c>0&&(r.splice(c,1),r.unshift(d)),d.value}return Ya}function a(l,c){r.unshift({key:l,value:c}),r.length>e&&r.pop()}function i(l,c){const d=r,{length:u}=d;for(let f=0;f<u;f++){const v=d[f];if(c(v.value,l))return v}}function s(){r=[]}return{get:n,put:a,findMatchingEntry:i,clear:s}}var bu=(e,t)=>e===t;function Nu(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let i=0;i<a;i++)if(!e(r[i],n[i]))return!1;return!0}}function Su(e,t){const{equalityCheck:r=bu,maxSize:n=1,resultEqualityCheck:a}=typeof t=="object"?t:{equalityCheck:t},i=Nu(r);let s=0;const l=n<=1?gu(i):$u(n,i);function c(){let d=l.get(arguments);if(d===Ya){if(d=e.apply(null,arguments),s++,a){const u=l.findMatchingEntry(d,a);u&&(d=u.value,s!==0&&s--)}l.put(arguments,d)}return d}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}function Ys(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var xu=Ys(),Cu=Ys,ya=Ms({ReducerType:()=>Nl,SHOULD_AUTOBATCH:()=>Qa,TaskAbortError:()=>ir,Tuple:()=>Za,addListener:()=>ri,asyncThunkCreator:()=>Du,autoBatchEnhancer:()=>cl,buildCreateSlice:()=>Sl,clearAllListeners:()=>Il,combineSlices:()=>Nf,configureStore:()=>dl,createAction:()=>Re,createActionCreatorInvariantMiddleware:()=>tl,createAsyncThunk:()=>_n,createDraftSafeSelector:()=>Zs,createDraftSafeSelectorCreator:()=>Xs,createDynamicMiddleware:()=>ff,createEntityAdapter:()=>Ju,createImmutableStateInvariantMiddleware:()=>ol,createListenerMiddleware:()=>cf,createNextState:()=>Sn,createReducer:()=>fl,createSelector:()=>yu,createSelectorCreator:()=>Xa,createSerializableStateInvariantMiddleware:()=>ll,createSlice:()=>Xe,current:()=>Nn,findNonSerializableValue:()=>Xr,formatProdErrorMessage:()=>K,freeze:()=>gn,isActionCreator:()=>Qs,isAllOf:()=>Zr,isAnyOf:()=>_t,isAsyncThunkAction:()=>yl,isDraft:()=>we,isFluxStandardAction:()=>el,isFulfilled:()=>vl,isImmutableDefault:()=>nl,isPending:()=>hl,isPlain:()=>Ja,isRejected:()=>Jr,isRejectedWithValue:()=>ml,lruMemoize:()=>Su,miniSerializeError:()=>gl,nanoid:()=>ar,original:()=>Vd,prepareAutoBatched:()=>ju,removeListener:()=>ni,unwrapResult:()=>$l,weakMapMemoize:()=>xn});kd(ya,require("redux"));var Xs=(...e)=>{const t=Xa(...e),r=Object.assign((...n)=>{const a=t(...n),i=(s,...l)=>a(we(s)?Nn(s):s,...l);return Object.assign(i,a),i},{withTypes:()=>r});return r},Zs=Xs(xn),_u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xe.compose:xe.compose.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Js=e=>e&&typeof e.match=="function";function Re(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(process.env.NODE_ENV==="production"?K(0):"prepareAction did not return an object");return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>(0,xe.isAction)(n)&&n.type===e,r}function Qs(e){return typeof e=="function"&&"type"in e&&Js(e)}function el(e){return(0,xe.isAction)(e)&&Object.keys(e).every(wu)}function wu(e){return["type","payload","error","meta"].indexOf(e)>-1}function Eu(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
11
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function tl(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=Qs}=e;return()=>r=>n=>(t(n)&&console.warn(Eu(n.type)),r(n))}function rl(e,t){let r=0;return{measureTime(n){const a=Date.now();try{return n()}finally{r+=Date.now()-a}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
9
12
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
10
- It is disabled in production builds, so you don't need to worry about that.`)}}}var Ka=class It extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,It.prototype)}static get[Symbol.species](){return It}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new It(...t[0].concat(this)):new It(...t.concat(this))}};function Qi(e){return De(e)?Nn(e,()=>{}):e}function et(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function rl(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Cu(e,t,r){const n=nl(e,t,r);return{detectMutations(){return al(e,t,n,r)}}}function nl(e,t=[],r,n="",a=new Set){const i={value:r};if(!e(r)&&!a.has(r)){a.add(r),i.children={};const s=t.length>0;for(const l in r){const d=n?n+"."+l:l;s&&t.some(c=>c instanceof RegExp?c.test(d):d===c)||(i.children[l]=nl(e,t,r[l],d))}}return i}function al(e,t=[],r,n,a=!1,i=""){const s=r?r.value:void 0,l=s===n;if(a&&!l&&!Number.isNaN(n))return{wasMutated:!0,path:i};if(e(s)||e(n))return{wasMutated:!1};const d={};for(let u in r.children)d[u]=!0;for(let u in n)d[u]=!0;const c=t.length>0;for(let u in d){const f=i?i+"."+u:u;if(c&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const v=al(e,t,r.children[u],n[u],l,f);if(v.wasMutated)return v}return{wasMutated:!1}}function il(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(l,d,c,u){return JSON.stringify(l,r(d,u),c)},r=function(l,d){let c=[],u=[];return d||(d=function(f,v){return c[0]===v?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(v)).join(".")+"]"}),function(f,v){if(c.length>0){var m=c.indexOf(this);~m?c.splice(m+1):c.push(this),~m?u.splice(m,1/0,f):u.push(f),~c.indexOf(v)&&(v=d.call(this,f,v))}else c.push(v);return l==null?v:l.call(this,f,v)}},{isImmutable:n=rl,ignoredPaths:a,warnAfter:i=32}=e;const s=Cu.bind(null,n,a);return({getState:l})=>{let d=l(),c=s(d),u;return f=>v=>{const m=tl(i,"ImmutableStateInvariantMiddleware");m.measureTime(()=>{if(d=l(),u=c.detectMutations(),c=s(d),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?K(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const h=f(v);return m.measureTime(()=>{if(d=l(),u=c.detectMutations(),c=s(d),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?K(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(v)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),m.warnIfExceeded(),h}}}}function Ya(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||(0,Se.isPlainObject)(e)}function Yr(e,t="",r=Ya,n,a=[],i){let s;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||i?.has(e))return!1;const l=n!=null?n(e):Object.entries(e),d=a.length>0;for(const[c,u]of l){const f=t?t+"."+c:c;if(!(d&&a.some(v=>v instanceof RegExp?v.test(f):f===v))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=Yr(u,f,r,n,a,i),s))return s}}return i&&ol(e)&&i.add(e),!1}function ol(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!ol(t))return!1;return!0}function sl(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=Ya,getEntries:r,ignoredActions:n=[],ignoredActionPaths:a=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],warnAfter:s=32,ignoreState:l=!1,ignoreActions:d=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return f=>v=>m=>{if(!(0,Se.isAction)(m))return v(m);const h=v(m),y=tl(s,"SerializableStateInvariantMiddleware");return!d&&!(n.length&&n.indexOf(m.type)!==-1)&&y.measureTime(()=>{const g=Yr(m,"",t,r,a,u);if(g){const{keyPath:p,value:b}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${p}\`. Value:`,b,`
11
- Take a look at the logic that dispatched this action: `,m,`
13
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var Za=class Rt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Rt.prototype)}static get[Symbol.species](){return Rt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Rt(...t[0].concat(this)):new Rt(...t.concat(this))}};function Qi(e){return Te(e)?Sn(e,()=>{}):e}function tt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function nl(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Pu(e,t,r){const n=al(e,t,r);return{detectMutations(){return il(e,t,n,r)}}}function al(e,t=[],r,n="",a=new Set){const i={value:r};if(!e(r)&&!a.has(r)){a.add(r),i.children={};const s=t.length>0;for(const l in r){const c=n?n+"."+l:l;s&&t.some(d=>d instanceof RegExp?d.test(c):c===d)||(i.children[l]=al(e,t,r[l],c))}}return i}function il(e,t=[],r,n,a=!1,i=""){const s=r?r.value:void 0,l=s===n;if(a&&!l&&!Number.isNaN(n))return{wasMutated:!0,path:i};if(e(s)||e(n))return{wasMutated:!1};const c={};for(let u in r.children)c[u]=!0;for(let u in n)c[u]=!0;const d=t.length>0;for(let u in c){const f=i?i+"."+u:u;if(d&&t.some(h=>h instanceof RegExp?h.test(f):f===h))continue;const v=il(e,t,r.children[u],n[u],l,f);if(v.wasMutated)return v}return{wasMutated:!1}}function ol(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(l,c,d,u){return JSON.stringify(l,r(c,u),d)},r=function(l,c){let d=[],u=[];return c||(c=function(f,v){return d[0]===v?"[Circular ~]":"[Circular ~."+u.slice(0,d.indexOf(v)).join(".")+"]"}),function(f,v){if(d.length>0){var h=d.indexOf(this);~h?d.splice(h+1):d.push(this),~h?u.splice(h,1/0,f):u.push(f),~d.indexOf(v)&&(v=c.call(this,f,v))}else d.push(v);return l==null?v:l.call(this,f,v)}},{isImmutable:n=nl,ignoredPaths:a,warnAfter:i=32}=e;const s=Pu.bind(null,n,a);return({getState:l})=>{let c=l(),d=s(c),u;return f=>v=>{const h=rl(i,"ImmutableStateInvariantMiddleware");h.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?K(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(v);return h.measureTime(()=>{if(c=l(),u=d.detectMutations(),d=s(c),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?K(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(v)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),h.warnIfExceeded(),m}}}}function Ja(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||(0,xe.isPlainObject)(e)}function Xr(e,t="",r=Ja,n,a=[],i){let s;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||i?.has(e))return!1;const l=n!=null?n(e):Object.entries(e),c=a.length>0;for(const[d,u]of l){const f=t?t+"."+d:d;if(!(c&&a.some(v=>v instanceof RegExp?v.test(f):f===v))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=Xr(u,f,r,n,a,i),s))return s}}return i&&sl(e)&&i.add(e),!1}function sl(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!sl(t))return!1;return!0}function ll(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=Ja,getEntries:r,ignoredActions:n=[],ignoredActionPaths:a=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],warnAfter:s=32,ignoreState:l=!1,ignoreActions:c=!1,disableCache:d=!1}=e,u=!d&&WeakSet?new WeakSet:void 0;return f=>v=>h=>{if(!(0,xe.isAction)(h))return v(h);const m=v(h),y=rl(s,"SerializableStateInvariantMiddleware");return!c&&!(n.length&&n.indexOf(h.type)!==-1)&&y.measureTime(()=>{const g=Xr(h,"",t,r,a,u);if(g){const{keyPath:p,value:b}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${p}\`. Value:`,b,`
14
+ Take a look at the logic that dispatched this action: `,h,`
12
15
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
13
- (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),l||(y.measureTime(()=>{const g=Yr(f.getState(),"",t,r,i,u);if(g){const{keyPath:p,value:b}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${p}\`. Value:`,b,`
14
- Take a look at the reducer(s) handling this action type: ${m.type}.
15
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),y.warnIfExceeded()),h}}}function dr(e){return typeof e=="boolean"}var _u=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new Ka;if(r&&(dr(r)?s.push($u):s.push(bu(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let l={};dr(n)||(l=n),s.unshift(il(l))}if(a){let l={};dr(a)||(l=a),s.push(sl(l))}if(i){let l={};dr(i)||(l=i),s.unshift(el(l))}}return s},Xa="RTK_autoBatch",wu=()=>e=>({payload:e,meta:{[Xa]:!0}}),eo=e=>t=>{setTimeout(t,e)},ll=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,i=!1,s=!1;const l=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:eo(10):e.type==="callback"?e.queueNotification:eo(e.timeout),c=()=>{s=!1,i&&(i=!1,l.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>a&&u(),v=n.subscribe(f);return l.add(u),()=>{v(),l.delete(u)}},dispatch(u){try{return a=!u?.meta?.[Xa],i=!a,i&&(s||(s=!0,d(c))),n.dispatch(u)}finally{a=!0}}})},Eu=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new Ka(e);return n&&a.push(ll(typeof n=="object"?n:void 0)),a};function dl(e){const t=_u(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{};let d;if(typeof r=="function")d=r;else if((0,Se.isPlainObject)(r))d=(0,Se.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?K(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?K(2):"`middleware` field must be a callback");let c;if(typeof n=="function"){if(c=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?K(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?K(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let y=new Set;c.forEach(g=>{if(y.has(g))throw new Error(process.env.NODE_ENV==="production"?K(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");y.add(g)})}let u=Se.compose;a&&(u=Nu({trace:process.env.NODE_ENV!=="production",...typeof a=="object"&&a}));const f=(0,Se.applyMiddleware)(...c),v=Eu(f);if(process.env.NODE_ENV!=="production"&&l&&typeof l!="function")throw new Error(process.env.NODE_ENV==="production"?K(5):"`enhancers` field must be a callback");let m=typeof l=="function"?l(v):v();if(process.env.NODE_ENV!=="production"&&!Array.isArray(m))throw new Error(process.env.NODE_ENV==="production"?K(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&m.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?K(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!m.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const h=u(...m);return(0,Se.createStore)(d,s,h)}function cl(e){const t={},r=[];let n;const a={addCase(i,s){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?K(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?K(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const l=typeof i=="string"?i:i.type;if(!l)throw new Error(process.env.NODE_ENV==="production"?K(28):"`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error(process.env.NODE_ENV==="production"?K(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${l}'`);return t[l]=s,a},addAsyncThunk(i,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(31):"`builder.addDefaultCase` can only be called once");return n=i,a}};return e(a),[t,r,n]}function Pu(e){return typeof e=="function"}function ul(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?K(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,a]=cl(t),i;if(Pu(e))i=()=>Qi(e());else{const l=Qi(e);i=()=>l}function s(l=i(),d){let c=[r[d.type],...n.filter(({matcher:u})=>u(d)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[a]),c.reduce((u,f)=>{if(f)if(_e(u)){const v=f(u,d);return v===void 0?u:v}else{if(De(u))return Nn(u,v=>f(v,d));{const v=f(u,d);if(v===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return u},l)}return s.getInitialState=i,s}var fl=(e,t)=>Zs(e)?e.match(t):e(t);function Ct(...e){return t=>e.some(r=>fl(r,t))}function Xr(...e){return t=>e.every(r=>fl(r,t))}function xn(e,t){if(!e||!e.meta)return!1;const r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function tr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function pl(...e){return e.length===0?t=>xn(t,["pending"]):tr(e)?Ct(...e.map(t=>t.pending)):pl()(e[0])}function Zr(...e){return e.length===0?t=>xn(t,["rejected"]):tr(e)?Ct(...e.map(t=>t.rejected)):Zr()(e[0])}function hl(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Xr(Zr(...e),t):tr(e)?Xr(Zr(...e),t):hl()(e[0])}function ml(...e){return e.length===0?t=>xn(t,["fulfilled"]):tr(e)?Ct(...e.map(t=>t.fulfilled)):ml()(e[0])}function vl(...e){return e.length===0?t=>xn(t,["pending","fulfilled","rejected"]):tr(e)?Ct(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):vl()(e[0])}var Ou="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rr=(e=21)=>{let t="",r=e;for(;r--;)t+=Ou[Math.random()*64|0];return t},ju=["name","message","stack","code"],Wn=class{constructor(e,t){this.payload=e,this.meta=t}_type},to=class{constructor(e,t){this.payload=e,this.meta=t}_type},yl=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of ju)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ro="External signal was aborted",Cn=(()=>{function e(t,r,n){const a=ke(t+"/fulfilled",(d,c,u,f)=>({payload:d,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),i=ke(t+"/pending",(d,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:d,requestStatus:"pending"}})),s=ke(t+"/rejected",(d,c,u,f,v)=>({payload:f,error:(n&&n.serializeError||yl)(d||"Rejected"),meta:{...v||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function l(d,{signal:c}={}){return(u,f,v)=>{const m=n?.idGenerator?n.idGenerator(d):rr(),h=new AbortController;let y,g;function p(C){g=C,h.abort()}c&&(c.aborted?p(ro):c.addEventListener("abort",()=>p(ro),{once:!0}));const b=(async function(){let C;try{let x=n?.condition?.(d,{getState:f,extra:v});if(Tu(x)&&(x=await x),x===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const S=new Promise(($,T)=>{y=()=>{T({name:"AbortError",message:g||"Aborted"})},h.signal.addEventListener("abort",y,{once:!0})});u(i(m,d,n?.getPendingMeta?.({requestId:m,arg:d},{getState:f,extra:v}))),C=await Promise.race([S,Promise.resolve(r(d,{dispatch:u,getState:f,extra:v,requestId:m,signal:h.signal,abort:p,rejectWithValue:($,T)=>new Wn($,T),fulfillWithValue:($,T)=>new to($,T)})).then($=>{if($ instanceof Wn)throw $;return $ instanceof to?a($.payload,m,d,$.meta):a($,m,d)})])}catch(x){C=x instanceof Wn?s(null,m,d,x.payload,x.meta):s(x,m,d)}finally{y&&h.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&s.match(C)&&C.meta.condition||u(C),C})();return Object.assign(b,{abort:p,requestId:m,arg:d,unwrap(){return b.then(gl)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:Ct(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function gl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Tu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $l=Symbol.for("rtk-slice-createasyncthunk"),Au={[$l]:Cn},bl=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(bl||{});function Iu(e,t){return`${e}/${t}`}function Nl({creators:e}={}){const t=e?.asyncThunk?.[$l];return function(n){const{name:a,reducerPath:i=a}=n;if(!a)throw new Error(process.env.NODE_ENV==="production"?K(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof n.reducers=="function"?n.reducers(Ru()):n.reducers)||{},l=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(C,x){const S=typeof C=="string"?C:C.type;if(!S)throw new Error(process.env.NODE_ENV==="production"?K(12):"`context.addCase` cannot be called with an empty action type");if(S in d.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?K(13):"`context.addCase` cannot be called with two reducers for the same action type: "+S);return d.sliceCaseReducersByType[S]=x,c},addMatcher(C,x){return d.sliceMatchers.push({matcher:C,reducer:x}),c},exposeAction(C,x){return d.actionCreators[C]=x,c},exposeCaseReducer(C,x){return d.sliceCaseReducersByName[C]=x,c}};l.forEach(C=>{const x=s[C],S={reducerName:C,type:Iu(a,C),createNotation:typeof n.reducers=="function"};Mu(x)?Fu(S,x,c,t):Du(S,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?K(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},x=[],S=void 0]=typeof n.extraReducers=="function"?cl(n.extraReducers):[n.extraReducers],$={...C,...d.sliceCaseReducersByType};return ul(n.initialState,T=>{for(let D in $)T.addCase(D,$[D]);for(let D of d.sliceMatchers)T.addMatcher(D.matcher,D.reducer);for(let D of x)T.addMatcher(D.matcher,D.reducer);S&&T.addDefaultCase(S)})}const f=C=>C,v=new Map,m=new WeakMap;let h;function y(C,x){return h||(h=u()),h(C,x)}function g(){return h||(h=u()),h.getInitialState()}function p(C,x=!1){function S(T){let D=T[C];if(typeof D>"u"){if(x)D=et(m,S,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?K(15):"selectSlice returned undefined for an uninjected slice reducer")}return D}function $(T=f){return et(et(v,x,()=>new WeakMap),T,()=>{const D={};for(const[G,Y]of Object.entries(n.selectors??{}))D[G]=ku(Y,T,()=>et(m,T,g),x);return D})}return{reducerPath:C,getSelectors:$,get selectors(){return $(S)},selectSlice:S}}const b={name:a,reducer:y,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:g,...p(i),injectInto(C,{reducerPath:x,...S}={}){const $=x??i;return C.inject({reducerPath:$,reducer:y},S),{...b,...p($,!0)}}};return b}}function ku(e,t,r,n){function a(i,...s){let l=t(i);if(typeof l>"u"){if(n)l=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?K(16):"selectState returned undefined for an uninjected slice reducer")}return e(l,...s)}return a.unwrapped=e,a}var Ye=Nl();function Ru(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Du({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!Lu(n))throw new Error(process.env.NODE_ENV==="production"?K(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ke(e,s):ke(e))}function Mu(e){return e._reducerDefinitionType==="asyncThunk"}function Lu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Fu({type:e,reducerName:t},r,n,a){if(!a)throw new Error(process.env.NODE_ENV==="production"?K(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:s,pending:l,rejected:d,settled:c,options:u}=r,f=a(e,i,u);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),d&&n.addCase(f.rejected,d),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:s||cr,pending:l||cr,rejected:d||cr,settled:c||cr})}function cr(){}function Bu(){return{ids:[],entities:{}}}function Uu(e){function t(r={},n){const a=Object.assign(Bu(),r);return n?e.setAll(a,n):a}return{getInitialState:t}}function Vu(){function e(t,r={}){const{createSelector:n=Xs}=r,a=f=>f.ids,i=f=>f.entities,s=n(a,i,(f,v)=>f.map(m=>v[m])),l=(f,v)=>v,d=(f,v)=>f[v],c=n(a,f=>f.length);if(!t)return{selectIds:a,selectEntities:i,selectAll:s,selectTotal:c,selectById:n(i,l,d)};const u=n(t,i);return{selectIds:n(t,a),selectEntities:u,selectAll:n(t,s),selectTotal:n(t,c),selectById:n(u,l,d)}}return{getSelectors:e}}var zu=_e;function qu(e){const t=oe((r,n)=>e(n));return function(n){return t(n,void 0)}}function oe(e){return function(r,n){function a(s){return Qs(s)}const i=s=>{a(n)?e(n.payload,s):e(n,s)};return zu(r)?(i(r),r):Nn(r,i)}}function lt(e,t){const r=t(e);return process.env.NODE_ENV!=="production"&&r===void 0&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),r}function Ke(e){return Array.isArray(e)||(e=Object.values(e)),e}function Pr(e){return _e(e)?bn(e):e}function Sl(e,t,r){e=Ke(e);const n=Pr(r.ids),a=new Set(n),i=[],s=new Set([]),l=[];for(const d of e){const c=lt(d,t);a.has(c)||s.has(c)?l.push({id:c,changes:d}):(s.add(c),i.push(d))}return[i,l,n]}function xl(e){function t(h,y){const g=lt(h,e);g in y.entities||(y.ids.push(g),y.entities[g]=h)}function r(h,y){h=Ke(h);for(const g of h)t(g,y)}function n(h,y){const g=lt(h,e);g in y.entities||y.ids.push(g),y.entities[g]=h}function a(h,y){h=Ke(h);for(const g of h)n(g,y)}function i(h,y){h=Ke(h),y.ids=[],y.entities={},r(h,y)}function s(h,y){return l([h],y)}function l(h,y){let g=!1;h.forEach(p=>{p in y.entities&&(delete y.entities[p],g=!0)}),g&&(y.ids=y.ids.filter(p=>p in y.entities))}function d(h){Object.assign(h,{ids:[],entities:{}})}function c(h,y,g){const p=g.entities[y.id];if(p===void 0)return!1;const b=Object.assign({},p,y.changes),C=lt(b,e),x=C!==y.id;return x&&(h[y.id]=C,delete g.entities[y.id]),g.entities[C]=b,x}function u(h,y){return f([h],y)}function f(h,y){const g={},p={};h.forEach(b=>{b.id in y.entities&&(p[b.id]={id:b.id,changes:{...p[b.id]?.changes,...b.changes}})}),h=Object.values(p),h.length>0&&h.filter(b=>c(g,b,y)).length>0&&(y.ids=Object.values(y.entities).map(b=>lt(b,e)))}function v(h,y){return m([h],y)}function m(h,y){const[g,p]=Sl(h,e,y);r(g,y),f(p,y)}return{removeAll:qu(d),addOne:oe(t),addMany:oe(r),setOne:oe(n),setMany:oe(a),setAll:oe(i),updateOne:oe(u),updateMany:oe(f),upsertOne:oe(v),upsertMany:oe(m),removeOne:oe(s),removeMany:oe(l)}}function Wu(e,t,r){let n=0,a=e.length;for(;n<a;){let i=n+a>>>1;const s=e[i];r(t,s)>=0?n=i+1:a=i}return n}function Gu(e,t,r){const n=Wu(e,t,r);return e.splice(n,0,t),e}function Hu(e,t){const{removeOne:r,removeMany:n,removeAll:a}=xl(e);function i(g,p){return s([g],p)}function s(g,p,b){g=Ke(g);const C=new Set(b??Pr(p.ids)),x=new Set,S=g.filter($=>{const T=lt($,e),D=!x.has(T);return D&&x.add(T),!C.has(T)&&D});S.length!==0&&y(p,S)}function l(g,p){return d([g],p)}function d(g,p){let b={};if(g=Ke(g),g.length!==0){for(const C of g){const x=e(C);b[x]=C,delete p.entities[x]}g=Ke(b),y(p,g)}}function c(g,p){g=Ke(g),p.entities={},p.ids=[],s(g,p,[])}function u(g,p){return f([g],p)}function f(g,p){let b=!1,C=!1;for(let x of g){const S=p.entities[x.id];if(!S)continue;b=!0,Object.assign(S,x.changes);const $=e(S);if(x.id!==$){C=!0,delete p.entities[x.id];const T=p.ids.indexOf(x.id);p.ids[T]=$,p.entities[$]=S}}b&&y(p,[],b,C)}function v(g,p){return m([g],p)}function m(g,p){const[b,C,x]=Sl(g,e,p);b.length&&s(b,p,x),C.length&&f(C,p)}function h(g,p){if(g.length!==p.length)return!1;for(let b=0;b<g.length;b++)if(g[b]!==p[b])return!1;return!0}const y=(g,p,b,C)=>{const x=Pr(g.entities),S=Pr(g.ids),$=g.entities;let T=S;C&&(T=new Set(S));let D=[];for(const se of T){const te=x[se];te&&D.push(te)}const G=D.length===0;for(const se of p)$[e(se)]=se,G||Gu(D,se,t);G?D=p.slice().sort(t):b&&D.sort(t);const Y=D.map(e);h(S,Y)||(g.ids=Y)};return{removeOne:r,removeMany:n,removeAll:a,addOne:oe(i),updateOne:oe(u),upsertOne:oe(v),setOne:oe(l),setMany:oe(d),setAll:oe(c),addMany:oe(s),updateMany:oe(f),upsertMany:oe(m)}}function Ku(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:s=>s.id,...e},n=r?Hu(t,r):xl(t),a=Uu(n),i=Vu();return{selectId:t,sortComparer:r,...a,...i,...n}}var Yu="task",Cl="listener",_l="completed",Za="cancelled",Xu=`task-${Za}`,Zu=`task-${_l}`,ma=`${Cl}-${Za}`,Ju=`${Cl}-${_l}`,nr=class{constructor(e){this.code=e,this.message=`${Yu} ${Za} (reason: ${e})`}name="TaskAbortError";message},Ja=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?K(32):`${t} is not a function`)},Jr=()=>{},wl=(e,t=Jr)=>(e.catch(t),e),El=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),tt=e=>{if(e.aborted)throw new nr(e.reason)};function Pl(e,t){let r=Jr;return new Promise((n,a)=>{const i=()=>a(new nr(e.reason));if(e.aborted){i();return}r=El(e,i),t.finally(()=>r()).then(n,a)}).finally(()=>{r=Jr})}var Qu=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof nr?"cancelled":"rejected",error:r}}finally{t?.()}},Qr=e=>t=>wl(Pl(e,t).then(r=>(tt(e),r))),Ol=e=>{const t=Qr(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ct}=Object,no={},ar="listenerMiddleware",ef=(e,t)=>{const r=n=>El(e,()=>n.abort(e.reason));return(n,a)=>{Ja(n,"taskExecutor");const i=new AbortController;r(i);const s=Qu(async()=>{tt(e),tt(i.signal);const l=await n({pause:Qr(i.signal),delay:Ol(i.signal),signal:i.signal});return tt(i.signal),l},()=>i.abort(Zu));return a?.autoJoin&&t.push(s.catch(Jr)),{result:Qr(e)(s),cancel(){i.abort(Xu)}}}},tf=(e,t)=>{const r=async(n,a)=>{tt(t);let i=()=>{};const s=[new Promise((l,d)=>{let c=e({predicate:n,effect:(u,f)=>{f.unsubscribe(),l([u,f.getState(),f.getOriginalState()])}});i=()=>{c(),d()}})];a!=null&&s.push(new Promise(l=>setTimeout(l,a,null)));try{const l=await Pl(t,Promise.race(s));return tt(t),l}finally{i()}};return(n,a)=>wl(r(n,a))},jl=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:i}=e;if(t)a=ke(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(process.env.NODE_ENV==="production"?K(21):"Creating or removing a listener requires one of the known fields for matching an action");return Ja(i,"options.listener"),{predicate:a,type:t,effect:i}},Tl=ct(e=>{const{type:t,predicate:r,effect:n}=jl(e);return{id:rr(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?K(22):"Unsubscribe not initialized")}}},{withTypes:()=>Tl}),ao=(e,t)=>{const{type:r,effect:n,predicate:a}=jl(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===a)&&i.effect===n)},va=e=>{e.pending.forEach(t=>{t.abort(ma)})},rf=(e,t)=>()=>{for(const r of t.keys())va(r);e.clear()},io=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Qa=ct(ke(`${ar}/add`),{withTypes:()=>Qa}),Al=ke(`${ar}/removeAll`),ei=ct(ke(`${ar}/remove`),{withTypes:()=>ei}),nf=(...e)=>{console.error(`${ar}/error`,...e)},af=(e={})=>{const t=new Map,r=new Map,n=m=>{const h=r.get(m)??0;r.set(m,h+1)},a=m=>{const h=r.get(m)??1;h===1?r.delete(m):r.set(m,h-1)},{extra:i,onError:s=nf}=e;Ja(s,"onError");const l=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),h=>{m.unsubscribe(),h?.cancelActive&&va(m)}),d=m=>l(ao(t,m)??Tl(m));ct(d,{withTypes:()=>d});const c=m=>{const h=ao(t,m);return h&&(h.unsubscribe(),m.cancelActive&&va(h)),!!h};ct(c,{withTypes:()=>c});const u=async(m,h,y,g)=>{const p=new AbortController,b=tf(d,p.signal),C=[];try{m.pending.add(p),n(m),await Promise.resolve(m.effect(h,ct({},y,{getOriginalState:g,condition:(x,S)=>b(x,S).then(Boolean),take:b,delay:Ol(p.signal),pause:Qr(p.signal),extra:i,signal:p.signal,fork:ef(p.signal,C),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((x,S,$)=>{x!==p&&(x.abort(ma),$.delete(x))})},cancel:()=>{p.abort(ma),m.pending.delete(p)},throwIfCancelled:()=>{tt(p.signal)}})))}catch(x){x instanceof nr||io(s,x,{raisedBy:"effect"})}finally{await Promise.all(C),p.abort(Ju),a(m),m.pending.delete(p)}},f=rf(t,r);return{middleware:m=>h=>y=>{if(!(0,Se.isAction)(y))return h(y);if(Qa.match(y))return d(y.payload);if(Al.match(y)){f();return}if(ei.match(y))return c(y.payload);let g=m.getState();const p=()=>{if(g===no)throw new Error(process.env.NODE_ENV==="production"?K(23):`${ar}: getOriginalState can only be called synchronously`);return g};let b;try{if(b=h(y),t.size>0){const C=m.getState(),x=Array.from(t.values());for(const S of x){let $=!1;try{$=S.predicate(y,C,g)}catch(T){$=!1,io(s,T,{raisedBy:"predicate"})}$&&u(S,y,m,p)}}}finally{g=no}return b},startListening:d,stopListening:c,clearListeners:f}},of=e=>({middleware:e,applied:new Map}),sf=e=>t=>t?.meta?.instanceId===e,lf=()=>{const e=rr(),t=new Map,r=Object.assign(ke("dynamicMiddleware/add",(...l)=>({payload:l,meta:{instanceId:e}})),{withTypes:()=>r}),n=Object.assign(function(...d){d.forEach(c=>{et(t,c,of)})},{withTypes:()=>n}),a=l=>(0,Se.compose)(...Array.from(t.values()).map(d=>et(d.applied,l,d.middleware))),i=Xr(r,sf(e));return{middleware:l=>d=>c=>i(c)?(n(...c.payload),l.dispatch):a(l)(d)(c),addMiddleware:n,withMiddleware:r,instanceId:e}},df=e=>"reducerPath"in e&&typeof e.reducerPath=="string",cf=e=>e.flatMap(t=>df(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),ti=Symbol.for("rtk-state-proxy-original"),uf=e=>!!e&&!!e[ti],ff=new WeakMap,pf=(e,t,r)=>et(ff,e,()=>new Proxy(e,{get:(n,a,i)=>{if(a===ti)return n;const s=Reflect.get(n,a,i);if(typeof s>"u"){const l=r[a];if(typeof l<"u")return l;const d=t[a];if(d){const c=d(void 0,{type:rr()});if(typeof c>"u")throw new Error(process.env.NODE_ENV==="production"?K(24):`The slice reducer for key "${a.toString()}" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);return r[a]=c,c}}return s}})),hf=e=>{if(!uf(e))throw new Error(process.env.NODE_ENV==="production"?K(25):"original must be used on state Proxy");return e[ti]},mf={},vf=(e=mf)=>e;function yf(...e){const t=Object.fromEntries(cf(e)),r=()=>Object.keys(t).length?(0,Se.combineReducers)(t):vf;let n=r();function a(d,c){return n(d,c)}a.withLazyLoadedSlices=()=>a;const i={},s=(d,c={})=>{const{reducerPath:u,reducer:f}=d,v=t[u];return!c.overrideExisting&&v&&v!==f?(typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`inject\` to override already-existing reducer ${u} without specifying \`overrideExisting: true\``),a):(c.overrideExisting&&v!==f&&delete i[u],t[u]=f,n=r(),a)},l=Object.assign(function(c,u){return function(v,...m){return c(pf(u?u(v,...m):v,t,i),...m)}},{original:hf});return Object.assign(a,{inject:s,selector:l})}function K(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function Or(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Or=function(r){return typeof r}:Or=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Or(e)}function Gn(){}var gf={getItem:Gn,setItem:Gn,removeItem:Gn};function $f(e){if((typeof self>"u"?"undefined":Or(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return process.env.NODE_ENV!=="production"&&console.warn("redux-persist ".concat(e," test failed, persistence will be disabled.")),!1}return!0}function bf(e){var t="".concat(e,"Storage");return $f(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),gf)}function Nf(e){var t=bf(e);return{getItem:function(n){return new Promise(function(a,i){a(t.getItem(n))})},setItem:function(n,a){return new Promise(function(i,s){i(t.setItem(n,a))})},removeItem:function(n){return new Promise(function(a,i){a(t.removeItem(n))})}}}var ur=e=>e?["services","professionals","time","confirm","success"]:["professionals","services","time","confirm","success"],Sf={currentStep:"services",completedSteps:["services"],isOrder:!0},Il=Ye({name:"breadcrumbs",initialState:Sf,reducers:{setIsOrder:(e,t)=>{e.isOrder=t.payload},goToStep:(e,t)=>{const r=ur(e.isOrder),n=t.payload,a=r.indexOf(e.currentStep),i=r.indexOf(n);if(i<=a){e.currentStep=n;return}const s=r[i-1];e.completedSteps.includes(s)&&(e.currentStep=n)},completeStep:(e,t)=>{const r=t.payload;e.completedSteps.includes(r)||e.completedSteps.push(r)},nextStep:e=>{const t=ur(e.isOrder),r=t[t.indexOf(e.currentStep)+1];r&&(e.completedSteps.includes(e.currentStep)||e.completedSteps.push(e.currentStep),e.currentStep=r)},prevStep:e=>{const t=ur(e.isOrder),r=t[t.indexOf(e.currentStep)-1];r&&(e.currentStep=r)},clearSteps:e=>{e.currentStep="services",e.completedSteps=["services"]},resetCompletedStepsFrom:(e,t)=>{const r=t.payload,n=ur(e.isOrder),a=n.indexOf(r);e.completedSteps=e.completedSteps.filter(i=>n.indexOf(i)<=a)}}}),{setIsOrder:xf,goToStep:ya,completeStep:mg,nextStep:Ce,prevStep:vg,clearSteps:yg,resetCompletedStepsFrom:oo}=Il.actions,Cf=Il.reducer,so={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},kl=Ye({name:"outletDetails",initialState:so,reducers:{clearBooking:()=>so,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:_f,setOutletData:wf,setOutletToken:Ef}=kl.actions,Pf=kl.reducer,Rl=Ye({name:"service",initialState:{superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null,loading:!0},reducers:{setServicePayload:(e,t)=>{e.superCategories=t.payload.superCategories,e.staff=t.payload.staff,e.loading=!1},setServiceLoading:(e,t)=>{e.loading=t.payload},setCategory:(e,t)=>{e.selectedCategory=t.payload},selectPrimaryService:(e,t)=>{const r=t.payload;e.selectedServices[0]?.id!==r.id?(e.selectedServices=[{...r,qty:1}],e.selectedProfessional&&((e.selectedProfessional.assignments??[]).some(n=>String(n.id)===String(r.id)&&!!n.assigned)||(e.selectedProfessional=null))):e.selectedServices.length||(e.selectedServices=[{...r,qty:1}])},toggleService:(e,t)=>{e.selectedServices.some(r=>r.id===t.payload.id)?e.selectedServices=[]:e.selectedServices=[{...t.payload,qty:1}]},toggleAdditionalService:(e,t)=>{const r=e.selectedServices.findIndex(n=>n.id===t.payload.id);r>-1?e.selectedServices.splice(r,1):e.selectedServices.push({...t.payload,qty:1})},toggleProfessional:(e,t)=>{e.selectedProfessional=t.payload},clearSelectedServices:e=>{e.selectedServices=[]},clearSelectedProfessional:e=>{e.selectedProfessional=null}}}),{setServicePayload:Of,setServiceLoading:jf,setCategory:gg,selectPrimaryService:Tf,toggleService:Af,toggleAdditionalService:$g,clearSelectedServices:lo,clearSelectedProfessional:co,toggleProfessional:ri}=Rl.actions,If=Rl.reducer,qe="https://prod.aaravpos.com/api/v1",Xe=()=>({"Content-Type":"application/json",Authorization:`Bearer ${_n.getState()?.booking.outletDetails?.token}`}),uo=async(e,t,r)=>{const n=new URLSearchParams({available_online:"true",is_available_online_category:"true"});t&&n.append("tenantId",t),r&&n.append("outletId",r);const a=`${qe}/integration/service/code/${e}?${n}`,i=await fetch(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok)throw new Error("Failed to fetch services");return await i.json()},kf=async(e,t,r)=>{const n=await fetch(`${qe}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`,{method:"GET",headers:Xe()});if(!n.ok)throw new Error("Failed to fetch services");return await n.json()},Rf=async e=>{const t=await fetch(`${qe}/integration/appointment/create`,{method:"POST",headers:Xe(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to fetch services");return await t.json()},Df=async(e,t)=>{const r=await fetch(`${qe}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`,{method:"GET",headers:Xe()});if(!r.ok)throw new Error("Failed to fetch appointment details");return await r.json()},Mf=async({search:e,tenantId:t})=>{const r=await fetch(`${qe}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e||"")}`,{method:"GET",headers:Xe()});if(!r.ok)throw new Error("Failed to fetch customers");return(await r.json())?.data},Lf=async e=>{try{const t=await fetch(`${qe}/payment/pay/customer/direct`,{method:"POST",headers:Xe(),body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},Ff=async e=>{try{const t=await fetch(`${qe}/payment/orders/${e}/invoicing/finalize`,{method:"POST",headers:Xe()}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},fo=e=>{const t=e?.consent_rule?.frequency??e?.consentFrequency??e?.frequency??"EVERY_VISIT";return t==="EVERY_X_DAYS"||t==="ONCE_PER_CUSTOMER"||t==="EVERY_VISIT"?t:"EVERY_VISIT"},ni=e=>{const t=!!(e?.requires_consent??e?.requiresConsent),r=String(e?.consent_form_id??e?.consentFormId??"").trim();return t&&!!r},po=e=>{const t=e?.consent_rule?.channelRules||e?.consent_rule?.channel_rules||[],r=(Array.isArray(t)?t.find(n=>String(n?.channel||"").toUpperCase()==="ONLINE_BOOKING"):null)?.method||e?.enforcement?.ONLINE_BOOKING||e?.enforcement?.online_booking;return r==="DRAW_SIGNATURE"||r==="TYPED_NAME"||r==="CHECKBOX_ONLY"?r:null},ho=async(e,t,r)=>{const n=await fetch(`${qe}/concent/check/${e}/${t}?serviceId=${r}`,{method:"GET",headers:Xe()});if(!n.ok)throw new Error("Failed to check consent requirement");return n.json()},Bf=async e=>{const{tenantId:t,outletId:r,appointmentId:n,customerId:a,serviceId:i,formId:s,staffId:l,signatureType:d,isChecked:c,typedName:u,imageUrl:f}=e,v={tenantId:t,appointmentId:n,customerId:a,serviceIds:[i],outletId:r,concentFormId:s,signatureType:d,channel:"Online_Web",staffId:l};d==="CHECKBOX_ONLY"&&(v.isChecked=c??!0),u&&(v.typedName=u),f&&(v.imageUrl=f);const m=await fetch(`${qe}/concent/customer-sign`,{method:"POST",headers:Xe(),body:JSON.stringify(v)}),h=await m.json();if(!m.ok)throw h;return h},jr=Cn("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await kf(e,t,r)),Dl=Ye({name:"slots",initialState:{selectedSlotIndexes:[],selectedSlotIds:[],selectedDate:null,selectedTime:null,slots:{morning:[],afternoon:[],evening:[]},loading:!1},reducers:{setSelectedSlots:(e,t)=>{e.selectedSlotIndexes=t.payload.indexes,e.selectedSlotIds=t.payload.ids},setSelectedDate:(e,t)=>{e.selectedDate=t.payload},setSelectedTime:(e,t)=>{e.selectedTime=t.payload},clearSlots:e=>{e.slots={morning:[],afternoon:[],evening:[]},e.selectedSlotIndexes=[],e.selectedSlotIds=[],e.selectedDate=null,e.selectedTime=null}},extraReducers:e=>{e.addCase(jr.pending,t=>{t.loading=!0}).addCase(jr.fulfilled,(t,r)=>{t.loading=!1,t.slots=r.payload?.data?.groups||{morning:[],afternoon:[],evening:[]}}).addCase(jr.rejected,t=>{t.loading=!1})}}),{setSelectedSlots:fr,clearSlots:ut,setSelectedDate:ft,setSelectedTime:pr}=Dl.actions,Uf=Dl.reducer,Vf=()=>{try{const e=localStorage.getItem("isDarkMode");if(e!==null)return JSON.parse(e)}catch(e){console.error("Error reading isDarkMode from localStorage:",e)}return!1},Ml=Ye({name:"theme",initialState:{button:{bg:"#d7263d",text:"#ffffff",bgHover:"#1f2937",textHover:"#ffffff"},colors:{bg:"#fafaf8",link:"#385b5a",text:"#e09898",bgHover:"#4c6f6e",textHover:"#ffffff"},isOpenSidebar:!1,isDarkMode:Vf()},reducers:{setTheme:(e,t)=>{if(t.payload?.button&&(e.button=t.payload.button),t.payload?.colors&&(e.colors=t.payload.colors),t.payload?.isDarkMode!==void 0){e.isDarkMode=t.payload.isDarkMode;try{localStorage.setItem("isDarkMode",JSON.stringify(t.payload.isDarkMode))}catch(r){console.error("Error writing isDarkMode to localStorage:",r)}}},setIsDarkMode:(e,t)=>{e.isDarkMode=t.payload;try{localStorage.setItem("isDarkMode",JSON.stringify(t.payload))}catch(r){console.error("Error writing isDarkMode to localStorage:",r)}},setSidebarOpen:(e,t)=>{e.isOpenSidebar=t.payload}}}),{setTheme:zf,setIsDarkMode:mo,setSidebarOpen:gt}=Ml.actions,qf=Ml.reducer,Tr=Cn("appointment/create",async(e,{rejectWithValue:t})=>{try{return await Rf(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),vo={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking",payType:""},Ll=Ye({name:"appointment",initialState:vo,reducers:{resetAppointment:()=>vo,setBookingMode:(e,t)=>{e.bookingMode=t.payload},setUserDetails:(e,t)=>{e.userDetails=t.payload},setPayType:(e,t)=>{e.payType=t.payload},setTips:(e,t)=>{e.tipPct=t.payload},setAppointmentId:(e,t)=>{e.appointmentId=t.payload},clearUserDetails:e=>{e.userDetails=null}},extraReducers:e=>{e.addCase(Tr.pending,t=>{t.loading=!0,t.error=null}).addCase(Tr.fulfilled,(t,r)=>{t.loading=!1,t.success=!0,t.data=r.payload;const n=r.payload;t.appointmentId=n?.id||null,t.customerId=n?.customerId||n?.customer?.id||null}).addCase(Tr.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:pt,setBookingMode:bg,setUserDetails:yo,setTips:Wf,setAppointmentId:hr,clearUserDetails:Gf,setPayType:Ng}=Ll.actions,Hf=Ll.reducer,Fl=Ye({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:Kf,clearOutletList:Sg}=Fl.actions,Yf=Fl.reducer,Xf=(0,ha.combineReducers)({booking:(0,ha.combineReducers)({breadcrumbs:Cf,outletDetails:Pf,service:If,slots:Uf,appointment:Hf,outletList:Yf,theme:qf})}),Zf=(e,t)=>(t.type==="RESET_ALL"&&(e=void 0),Xf(e,t)),Jf=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),Qf=(0,He.persistReducer)({key:"booking",storage:typeof window<"u"?Nf("session"):Jf()},Zf),_n=dl({reducer:Qf,devTools:process.env.NODE_ENV!=="production",middleware:e=>e({serializableCheck:{ignoredActions:[He.FLUSH,He.REHYDRATE,He.PAUSE,He.PERSIST,He.PURGE,He.REGISTER]}})}),ai=(0,He.persistStore)(_n),xg=_n.getState,Me=Object.create(null);Me.open="0";Me.close="1";Me.ping="2";Me.pong="3";Me.message="4";Me.upgrade="5";Me.noop="6";var Ar=Object.create(null);Object.keys(Me).forEach(e=>{Ar[Me[e]]=e});var ga={type:"error",data:"parser error"},Bl=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ul=typeof ArrayBuffer=="function",Vl=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ii=({type:e,data:t},r,n)=>Bl&&t instanceof Blob?r?n(t):go(t,n):Ul&&(t instanceof ArrayBuffer||Vl(t))?r?n(t):go(new Blob([t]),n):n(Me[e]+(t||"")),go=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function $o(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Hn;function e0(e,t){if(Bl&&e.data instanceof Blob)return e.data.arrayBuffer().then($o).then(t);if(Ul&&(e.data instanceof ArrayBuffer||Vl(e.data)))return t($o(e.data));ii(e,!1,r=>{Hn||(Hn=new TextEncoder),t(Hn.encode(r))})}var t0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<64;e++)kt[t0.charCodeAt(e)]=e;var r0=e=>{let t=e.length*.75,r=e.length,n,a=0,i,s,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(n=0;n<r;n+=4)i=kt[e.charCodeAt(n)],s=kt[e.charCodeAt(n+1)],l=kt[e.charCodeAt(n+2)],d=kt[e.charCodeAt(n+3)],u[a++]=i<<2|s>>4,u[a++]=(s&15)<<4|l>>2,u[a++]=(l&3)<<6|d&63;return c},n0=typeof ArrayBuffer=="function",oi=(e,t)=>{if(typeof e!="string")return{type:"message",data:zl(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:a0(e.substring(1),t)}:Ar[r]?e.length>1?{type:Ar[r],data:e.substring(1)}:{type:Ar[r]}:ga},a0=(e,t)=>n0?zl(r0(e),t):{base64:!0,data:e},zl=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,ql="",i0=(e,t)=>{const r=e.length,n=new Array(r);let a=0;e.forEach((i,s)=>{ii(i,!1,l=>{n[s]=l,++a===r&&t(n.join(ql))})})},o0=(e,t)=>{const r=e.split(ql),n=[];for(let a=0;a<r.length;a++){const i=oi(r[a],t);if(n.push(i),i.type==="error")break}return n};function s0(){return new TransformStream({transform(e,t){e0(e,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const i=new DataView(a.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{a=new Uint8Array(9);const i=new DataView(a.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(r)})}})}var Kn;function mr(e){return e.reduce((t,r)=>t+r.length,0)}function vr(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let a=0;a<t;a++)r[a]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function l0(e,t){Kn||(Kn=new TextDecoder);const r=[];let n=0,a=-1,i=!1;return new TransformStream({transform(s,l){for(r.push(s);;){if(n===0){if(mr(r)<1)break;const d=vr(r,1);i=(d[0]&128)===128,a=d[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(mr(r)<2)break;const d=vr(r,2);a=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),n=3}else if(n===2){if(mr(r)<8)break;const d=vr(r,8),c=new DataView(d.buffer,d.byteOffset,d.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(ga);break}a=u*Math.pow(2,32)+c.getUint32(4),n=3}else{if(mr(r)<a)break;const d=vr(r,a);l.enqueue(oi(i?d:Kn.decode(d),t)),n=0}if(a===0||a>e){l.enqueue(ga);break}}}})}function le(e){if(e)return d0(e)}function d0(e){for(var t in le.prototype)e[t]=le.prototype[t];return e}le.prototype.on=le.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};le.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};le.prototype.off=le.prototype.removeListener=le.prototype.removeAllListeners=le.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===t||n.fn===t){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+e],this};le.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,t)}return this};le.prototype.emitReserved=le.prototype.emit;le.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};le.prototype.hasListeners=function(e){return!!this.listeners(e).length};var wn=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),je=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),c0="arraybuffer";function Wl(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var u0=je.setTimeout,f0=je.clearTimeout;function En(e,t){t.useNativeTimers?(e.setTimeoutFn=u0.bind(je),e.clearTimeoutFn=f0.bind(je)):(e.setTimeoutFn=je.setTimeout.bind(je),e.clearTimeoutFn=je.clearTimeout.bind(je))}var p0=1.33;function h0(e){return typeof e=="string"?m0(e):Math.ceil((e.byteLength||e.size)*p0)}function m0(e){let t=0,r=0;for(let n=0,a=e.length;n<a;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function Gl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function v0(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function y0(e){let t={},r=e.split("&");for(let n=0,a=r.length;n<a;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var g0=class extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}},si=class extends le{constructor(e){super(),this.writable=!1,En(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,r){return super.emitReserved("error",new g0(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=oi(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=v0(e);return t.length?"?"+t:""}},$0=class extends si{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};o0(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,i0(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Gl()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Hl=!1;try{Hl=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var b0=Hl;function N0(){}var S0=class extends $0{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let r=location.port;r||(r=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(n,a)=>{this.onError("xhr post error",n,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}},ht=class Ir extends le{constructor(t,r,n){super(),this.createRequest=t,En(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=Wl(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Ir.requestsCount++,Ir.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=N0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ir.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ht.requestsCount=0;ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bo);else if(typeof addEventListener=="function"){const e="onpagehide"in je?"pagehide":"unload";addEventListener(e,bo,!1)}}function bo(){for(let e in ht.requests)ht.requests.hasOwnProperty(e)&&ht.requests[e].abort()}var x0=(function(){const e=Kl({xdomain:!1});return e&&e.responseType!==null})(),C0=class extends S0{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=x0&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ht(Kl,this.uri(),e)}};function Kl(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||b0))return new XMLHttpRequest}catch{}if(!t)try{return new je[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Yl=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",_0=class extends si{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,r=Yl?{}:Wl(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,r)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;ii(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}n&&wn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Gl()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Yn=je.WebSocket||je.MozWebSocket,w0=class extends _0{createSocket(e,t,r){return Yl?new Yn(e,t,r):t?new Yn(e,t):new Yn(e)}doWrite(e,t){this.ws.send(t)}},E0=class extends si{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=l0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=s0();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();const a=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;this._writer.write(r).then(()=>{n&&wn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}},P0={websocket:w0,webtransport:E0,polling:C0},O0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,j0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $a(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let a=O0.exec(e||""),i={},s=14;for(;s--;)i[j0[s]]=a[s]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=T0(i,i.path),i.queryKey=A0(i,i.query),i}function T0(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function A0(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,i){a&&(r[a]=i)}),r}var ba=typeof addEventListener=="function"&&typeof removeEventListener=="function",kr=[];ba&&addEventListener("offline",()=>{kr.forEach(e=>e())},!1);var Rr=class Dr extends le{constructor(t,r){if(super(),this.binaryType=c0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=$a(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=$a(r.host).host);En(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=y0(this.opts.query)),ba&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},kr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=4,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Dr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Dr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(t+=h0(n)),r>0&&t>this._maxPayload)return this.writeBuffer.slice(0,r);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,wn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Dr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ba&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=kr.indexOf(this._offlineEventListener);n!==-1&&kr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};Rr.protocol=4;var I0=class extends Rr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),r=!1;Rr.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Rr.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=t.name,this.emitReserved("upgradeError",f)}}))};function a(){r||(r=!0,c(),t.close(),t=null)}const i=u=>{const f=new Error("probe error: "+u);f.transport=t.name,a(),this.emitReserved("upgradeError",f)};function s(){i("transport closed")}function l(){i("socket closed")}function d(u){t&&u.name!==t.name&&a()}const c=()=>{t.removeListener("open",n),t.removeListener("error",i),t.removeListener("close",s),this.off("close",l),this.off("upgrading",d)};t.once("open",n),t.once("error",i),t.once("close",s),this.once("close",l),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}},Xl=class extends I0{constructor(e,t={}){const r=typeof e=="object",n=r?{...e}:{...t};(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>P0[a]).filter(a=>!!a)),super(r?n:e,n)}},Cg=Xl.protocol;function k0(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=$a(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}var R0=typeof ArrayBuffer=="function",D0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Zl=Object.prototype.toString,M0=typeof Blob=="function"||typeof Blob<"u"&&Zl.call(Blob)==="[object BlobConstructor]",L0=typeof File=="function"||typeof File<"u"&&Zl.call(File)==="[object FileConstructor]";function li(e){return R0&&(e instanceof ArrayBuffer||D0(e))||M0&&e instanceof Blob||L0&&e instanceof File}function Mr(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(Mr(e[r]))return!0;return!1}if(li(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mr(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Mr(e[r]))return!0;return!1}function F0(e){const t=[],r=e.data,n=e;return n.data=Na(r,t),n.attachments=t.length,{packet:n,buffers:t}}function Na(e,t){if(!e)return e;if(li(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=Na(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Na(e[n],t));return r}return e}function B0(e,t){return e.data=Sa(e.data,t),delete e.attachments,e}function Sa(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Sa(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Sa(e[r],t));return e}var U0=Ds({Decoder:()=>z0,Encoder:()=>V0,PacketType:()=>q,isPacketValid:()=>K0,protocol:()=>5}),Jl=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var q;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(q||(q={}));var V0=class{constructor(e){this.replacer=e}encode(e){return(e.type===q.EVENT||e.type===q.ACK)&&Mr(e)?this.encodeAsBinary({type:e.type===q.EVENT?q.BINARY_EVENT:q.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===q.BINARY_EVENT||e.type===q.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=F0(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}},z0=class Ql extends le{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const n=r.type===q.BINARY_EVENT;n||r.type===q.BINARY_ACK?(r.type=n?q.EVENT:q.ACK,this.reconstructor=new q0(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(li(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const n={type:Number(t.charAt(0))};if(q[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===q.BINARY_EVENT||n.type===q.BINARY_ACK){const i=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const s=t.substring(i,r);if(s!=Number(s)||t.charAt(r)!=="-")throw new Error("Illegal attachments");const l=Number(s);if(!ed(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=l}if(t.charAt(r+1)==="/"){const i=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(i,r)}else n.nsp="/";const a=t.charAt(r+1);if(a!==""&&Number(a)==a){const i=r+1;for(;++r;){const s=t.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===t.length)break}n.id=Number(t.substring(i,r+1))}if(t.charAt(++r)){const i=this.tryParse(t.substr(r));if(Ql.isPayloadValid(n.type,i))n.data=i;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case q.CONNECT:return en(r);case q.DISCONNECT:return r===void 0;case q.CONNECT_ERROR:return typeof r=="string"||en(r);case q.EVENT:case q.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Jl.indexOf(r[0])===-1);case q.ACK:case q.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},q0=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=B0(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function W0(e){return typeof e=="string"}var ed=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function G0(e){return e===void 0||ed(e)}function en(e){return Object.prototype.toString.call(e)==="[object Object]"}function H0(e,t){switch(e){case q.CONNECT:return t===void 0||en(t);case q.DISCONNECT:return t===void 0;case q.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Jl.indexOf(t[0])===-1);case q.ACK:return Array.isArray(t);case q.CONNECT_ERROR:return typeof t=="string"||en(t);default:return!1}}function K0(e){return W0(e.nsp)&&G0(e.id)&&H0(e.type,e.data)}function Ie(e,t,r){return e.on(t,r),function(){e.off(t,r)}}var Y0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),td=class extends le{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Ie(e,"open",this.onopen.bind(this)),Ie(e,"packet",this.onpacket.bind(this)),Ie(e,"error",this.onerror.bind(this)),Ie(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var r,n,a;if(Y0.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:q.EVENT,data:t};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,c=t.pop();this._registerAckCallback(d,c),i.id=d}const s=(n=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||n===void 0?void 0:n.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var r;const n=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);t.call(this,new Error("operation has timed out"))},n),i=(...s)=>{this.io.clearTimeoutFn(a),t.apply(this,s)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((r,n)=>{const a=(i,s)=>i?n(i):r(s);a.withError=!0,t.push(a),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...a)=>(this._queue[0],n!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(n)):(this._queue.shift(),t&&t(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:q.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case q.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case q.EVENT:case q.BINARY_EVENT:this.onevent(e);break;case q.ACK:case q.BINARY_ACK:this.onack(e);break;case q.DISCONNECT:this.ondisconnect();break;case q.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:q.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:q.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}};function _t(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}_t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};_t.prototype.reset=function(){this.attempts=0};_t.prototype.setMin=function(e){this.ms=e};_t.prototype.setMax=function(e){this.max=e};_t.prototype.setJitter=function(e){this.jitter=e};var xa=class extends le{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,En(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _t({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const n=t.parser||U0;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Xl(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Ie(t,"open",function(){r.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},i=Ie(t,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{n(),a(new Error("timeout")),t.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Ie(e,"ping",this.onping.bind(this)),Ie(e,"data",this.ondata.bind(this)),Ie(e,"error",this.onerror.bind(this)),Ie(e,"close",this.onclose.bind(this)),Ie(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){wn(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new td(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}},At={};function Lr(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=k0(e,t.path||"/socket.io"),n=r.source,a=r.id,i=r.path,s=At[a]&&i in At[a].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let d;return l?d=new xa(n,t):(At[a]||(At[a]=new xa(n,t)),d=At[a]),r.query&&!t.query&&(t.query=r.queryKey),d.socket(r.path,t)}Object.assign(Lr,{Manager:xa,Socket:td,io:Lr,connect:Lr});var X0="https://prod.aaravpos.com",rd=(0,N.createContext)(void 0),Z0=({children:e})=>{const{selectedProfessional:t}=(0,L.useSelector)(a=>a.booking.service),[r]=(0,N.useState)(()=>Lr(X0,{path:"/socket.io",transports:["websocket"],autoConnect:!1,reconnection:!0,reconnectionAttempts:5,reconnectionDelay:3e3})),n=a=>{r.connected||r.connect(),r.off("connect"),r.on("connect",()=>{r.emit("joinStaff",a)})};return(0,N.useEffect)(()=>{t?.id&&n({staffId:t.id,roomId:t.id,room:t.id,id:t.id})},[t?.id]),(0,o.jsx)(rd.Provider,{value:{socket:r,connectSocket:n},children:e})},J0=()=>{const e=(0,N.useContext)(rd);if(!e)throw new Error("useSocket must be used within SocketProvider");return e};function Q0({children:e}){return(0,o.jsx)(L.Provider,{store:_n,children:(0,o.jsx)(Ms,{loading:null,persistor:ai,children:(0,o.jsx)(Z0,{children:e})})})}var ep=e=>{if(!e)return;const t=document.documentElement;e.isDarkMode?(t.classList.add("dark"),t.setAttribute("data-theme","dark")):(t.classList.remove("dark"),t.setAttribute("data-theme","light")),e?.button?.bg&&t.style.setProperty("--btn-bg",e.button.bg),e.button?.text&&t.style.setProperty("--btn-text",e.button.text),e.button?.bgHover&&t.style.setProperty("--btn-bg-hover",e.button.bgHover),e.button?.textHover&&t.style.setProperty("--btn-text-hover",e.button.textHover),e.colors?.bg&&t.style.setProperty("--app-bg",e.colors.bg),e.colors?.link&&t.style.setProperty("--app-link",e.colors.link),e.colors?.text&&t.style.setProperty("--app-text",e.colors.text),e.colors?.bgHover&&t.style.setProperty("--app-bg-hover",e.colors.bgHover),e.colors?.textHover&&t.style.setProperty("--app-text-hover",e.colors.textHover)},nd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),tp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),No=e=>{const t=rp(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},np=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ap=(0,N.createContext)({}),ip=()=>(0,N.useContext)(ap),op=(0,N.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...l},d)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:v="currentColor",className:m=""}=ip()??{},h=n??f?Number(r??u)*24/Number(t??c):r??u;return(0,N.createElement)("svg",{ref:d,...Xn,width:t??c??Xn.width,height:t??c??Xn.height,stroke:e??v,strokeWidth:h,className:nd("lucide",m,a),...!i&&!np(l)&&{"aria-hidden":"true"},...l},[...s.map(([y,g])=>(0,N.createElement)(y,g)),...Array.isArray(i)?i:[i]])}),J=(e,t)=>{const r=(0,N.forwardRef)(({className:n,...a},i)=>(0,N.createElement)(op,{ref:i,iconNode:t,className:nd(`lucide-${tp(No(e))}`,`lucide-${e}`,n),...a}));return r.displayName=No(e),r},sp=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],lp=J("calendar-1",sp),dp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],cp=J("calendar-days",dp),up=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],di=J("check",up),fp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ci=J("chevron-down",fp),pp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tn=J("chevron-left",pp),hp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wt=J("chevron-right",hp),mp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ca=J("circle-check",mp),vp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],$t=J("clock-3",vp),yp=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],ad=J("dollar-sign",yp),gp=[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]],$p=J("euro",gp),bp=[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]],Np=J("indian-rupee",bp),Sp=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],xp=J("moon",Sp),Cp=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],So=J("move-left",Cp),_p=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],wp=J("move-right",_p),Ep=[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]],Pp=J("package-2",Ep),Op=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jp=J("plus",Op),Tp=[["path",{d:"M18 7c0-5.333-8-5.333-8 0",key:"1prm2n"}],["path",{d:"M10 7v14",key:"18tmcs"}],["path",{d:"M6 21h12",key:"4dkmi1"}],["path",{d:"M6 13h10",key:"ybwr4a"}]],Ap=J("pound-sterling",Tp),Ip=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],kp=J("rotate-cw",Ip),Rp=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],id=J("scissors",Rp),Dp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ui=J("search",Dp),Mp=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],Lp=J("shopping-cart",Mp),Fp=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],Bp=J("store",Fp),Up=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Vp=J("sun",Up),zp=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],qp=J("sunrise",zp),Wp=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],od=J("user",Wp),Gp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],We=J("x",Gp),Hp=({status:e})=>(0,o.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),Kp=({item:e,onSelect:t,selected:r,isLoading:n,isDisabled:a})=>(0,o.jsxs)("div",{className:`aaravpos-outlet-card ${r?"selected":""} ${e.isOpen?"":"closed"} ${a&&!n?"loading-disabled":""} ${n?"loading-card":""}`,onClick:()=>{a||t(String(e?.id))},children:[(0,o.jsxs)("div",{className:"aaravpos-outlet-card-top",children:[(0,o.jsx)(Hp,{status:e.isOpen}),n&&(0,o.jsx)("div",{className:"aaravpos-outlet-card-loader-corner",children:(0,o.jsx)("div",{className:"aaravpos-loader"})})]}),(0,o.jsx)("div",{className:"aaravpos-outlet-card-content",children:(0,o.jsxs)("div",{className:"aaravpos-outlet-card-inner",children:[(0,o.jsx)("h2",{className:"aaravpos-outlet-card-title",children:e.outletName}),(0,o.jsx)("p",{className:"aaravpos-outlet-card-address",children:e.address})]})})]});function Yp({outlets:e,onSelectOutlet:t,loadingOutletId:r}){const[n,a]=(0,N.useState)(null),[i,s]=(0,N.useState)(""),l=!!r,d=u=>{if(l)return;a(u);const f=e.find(v=>String(v.id)===String(u));f&&t(f)},c=(0,N.useMemo)(()=>{if(!i.trim())return e;const u=i.toLowerCase();return e.filter(f=>f.outletName?.toLowerCase().includes(u)||f.address?.toLowerCase().includes(u))},[e,i]);return(0,o.jsxs)("div",{className:"aaravpos-container",children:[(0,o.jsxs)("div",{className:"aaravpos-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-title",children:"Choose Your Outlet"}),(0,o.jsx)("div",{className:"aaravpos-outlet-divider"})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ui,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,disabled:l,onChange:u=>s(u.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:i&&!l&&(0,o.jsx)("button",{onClick:()=>s(""),className:"aaravpos-search-clear",type:"button",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{className:"aaravpos-outlet-list-wrapper",children:c.length>0?(0,o.jsx)("div",{className:"aaravpos-outlet-grid",children:c.map((u,f)=>(0,o.jsx)("div",{children:(0,o.jsx)(Kp,{item:u,onSelect:d,selected:String(n)===String(u.id)||String(r)===String(u.id),isLoading:String(r)===String(u.id),isDisabled:l})},u.id||f))}):(0,o.jsx)("div",{className:"aaravpos-empty-state",children:(0,o.jsxs)("div",{className:"aaravpos-empty-content",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-title",children:"No outlets found"}),(0,o.jsx)("p",{className:"aaravpos-empty-text",children:"Try searching with a different keyword"})]})})})]})}var Xp={USD:ad,INR:Np,EUR:$p,GBP:Ap},ie=({size:e=20,className:t})=>{const r=(0,L.useSelector)(n=>n.booking.outletDetails?.currency);return(0,o.jsx)(r?Xp[r]:ad,{size:e,className:`aaravpos-currency-icon ${t||""}`.trim()})},it=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},Zp=e=>Number(e.price||e.min_price||0),_a=(e,{perUnit:t=!1}={})=>{const r=Zp(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+(i.taxRate||0)*n:i.taxType==="PERCENTAGE"?a+r*n*(i.taxRate||0)/100:a:a,0)},Zn=async()=>{try{const e=await fetch("https://api.ipify.org?format=json");if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return(await e.json()).ip}catch(e){return console.error("Failed to fetch public IP:",e),null}},yr=e=>{if(!e||typeof e!="string")return!1;const t=e.trim();return t.includes("..")?!1:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9]+(?:\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/.test(t)};function sd(){const[e,t]=(0,N.useState)({width:0,height:0});return(0,N.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var Jp={services:[co,ut,pt],professionals:[co,ut,pt],time:[ut,pt],confirm:[]},Qp={professionals:[ut,lo,pt],services:[lo,ut,pt],time:[ut,pt],confirm:[]},eh=[{label:"Services",page:"services",icon:(0,o.jsx)(id,{size:16})},{label:"Professional",page:"professionals",icon:(0,o.jsx)(od,{size:16})},{label:"Time Slot",page:"time",icon:(0,o.jsx)($t,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,o.jsx)(Ca,{size:16})}],th=[{label:"Professional",page:"professionals",icon:(0,o.jsx)(od,{size:16})},{label:"Service",page:"services",icon:(0,o.jsx)(id,{size:16})},{label:"Time",page:"time",icon:(0,o.jsx)($t,{size:16})},{label:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,o.jsx)(Ca,{size:13})]}),page:"confirm",icon:(0,o.jsx)(Ca,{size:16})}];function Et(){const e=(0,L.useDispatch)(),{width:t}=sd(),{isOpenSidebar:r}=(0,L.useSelector)(C=>C.booking.theme),{isService:n}=(0,L.useSelector)(C=>C.booking.outletDetails),{selectedServices:a}=(0,L.useSelector)(C=>C.booking.service),i=(0,L.useSelector)(C=>C.booking.outletList.outlets),{currentStep:s,completedSteps:l}=(0,L.useSelector)(C=>C.booking.breadcrumbs),d=n?Jp:Qp,c=n?eh:th,u=c.findIndex(C=>C.page===s),f=()=>{ai.purge(),e({type:"RESET_ALL"})},v=()=>{if(u===0&&i.length>1){f(),e(_f());return}if(u<=0)return;const C=c[u-1].page;d[C]?.forEach(x=>{e(x())}),e(oo(C)),e(ya(C))},m=v,h=v,y=c[u],g=t<991,p=a?.length||0,b=Array.isArray(i)&&i.length>1;return(0,o.jsx)(o.Fragment,{children:g?(0,o.jsxs)("div",{className:"aaravpos-mobile-stepper",children:[(0,o.jsx)("button",{type:"button",onClick:m,className:"aaravpos-mobile-back-btn",children:(0,o.jsx)(tn,{size:22})}),(0,o.jsx)("span",{className:"aaravpos-mobile-step-label",children:y?.label})]}):(0,o.jsxs)("div",{className:"aaravpos-desktop-stepper",children:[(0,o.jsx)("button",{type:"button",onClick:b?h:m,className:"aaravpos-desktop-back-btn",children:(0,o.jsx)(tn,{size:20})}),(0,o.jsx)("nav",{className:"aaravpos-step-nav",children:c.map((C,x)=>{const S=s===C.page,$=l?.includes(C.page)||x<=u;return(0,o.jsxs)("button",{type:"button",onClick:()=>{if(!$)return;const T=C.page;c.findIndex(D=>D.page===T)<u&&(d[T]?.forEach(D=>{e(D())}),e(oo(T))),e(ya(T))},className:`aaravpos-step-btn ${$?"clickable":"disabled"} ${S?"active":"inactive"}`,children:[(0,o.jsx)("span",{className:`aaravpos-step-icon ${S?"active":"inactive"}`,children:C.icon}),(0,o.jsx)("span",{children:C.label})]},C.page)})}),!r&&(0,o.jsxs)("button",{type:"button",className:"aaravpos-cart-btn",onClick:()=>e(gt(!0)),children:[(0,o.jsx)("span",{className:"aaravpos-count",children:p}),(0,o.jsx)(Lp,{size:18})]})]})})}function Pt({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:a,isSidebarOpen:i=!1}){const{isOpenSidebar:s}=(0,L.useSelector)(l=>l.booking.theme);return(0,o.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,o.jsxs)("div",{className:s?"aaravpos-layout-wrapper":"",children:[(0,o.jsxs)("main",{className:"aaravpos-main-content",children:[e,(0,o.jsx)("div",{className:"aaravpos-mobile-action-wrapper",children:n?(0,o.jsx)("button",{onClick:a,className:"aaravpos-cta-btn",children:(0,o.jsx)("span",{children:"View Order"})}):r})]}),(0,o.jsx)("aside",{className:`aaravpos-sidebar ${s?"open":""}`,children:t})]}),i&&(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var ld=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:a})=>{const i=(0,L.useDispatch)(),{outletName:s,isService:l}=(0,L.useSelector)(c=>c.booking.outletDetails),{selectedServices:d}=(0,L.useSelector)(c=>c.booking.service);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[s||"-"," Outlet"]}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>i(gt(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",style:{marginBottom:8},children:"Selected Professional"}),(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:e.color||"#111"},children:it(e.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:e.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:e.staff_type})]})]})]}),(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Services"}),(0,o.jsx)("ul",{className:l?l&&e?.id?"aaravpos-pro-order-list":"aaravpos-pro-order-list-single":"aaravpos-pro-order-list-pro",children:t?.length>0?(0,o.jsx)(o.Fragment,{children:t.map(c=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:c.name}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("p",{className:"aaravpos-order-detail center",children:[(0,o.jsx)($t,{size:13}),(0,o.jsxs)("span",{children:[c.min_time||c.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),c.price||c.min_price]})]})]},c.id))}):(0,o.jsx)(o.Fragment,{children:d?.length>0&&d?.map(c=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:c.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)($t,{size:13}),(0,o.jsxs)("span",{children:[c.min_time||c.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),c.price||c.min_price]})]})]},c.id))})})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[l&&e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),r]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Duration"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[n," min"]})]})]}),(0,o.jsx)("button",{disabled:l?!t.length:!e,onClick:()=>a("time"),className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[l?"Choose Time":"Choose Services",(0,o.jsx)(wt,{size:16})]})})]})]})]})]})};function rh(){const e=(0,L.useDispatch)(),{staff:t,selectedProfessional:r}=(0,L.useSelector)(i=>i.booking.service),n=!t||t.length===0,a=i=>{if(!i?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const s=new Date,l=i.futureLeaveDates.find(d=>{if(d.status!=="APPROVED"||d.leaveType!=="FULL_DAY")return!1;const c=new Date(d.startDate),u=new Date(d.endDate);return s>=c&&s<=u});return l?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(l.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Pt,{sidebar:(0,o.jsx)(ld,{pro:r,goToStep:()=>e(Ce())}),children:[(0,o.jsx)(Et,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),n&&(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No staff Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No staff available for selected services"})]}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:t?.map((i,s)=>{const{isOnLeave:l,availableFrom:d}=a(i);return(0,o.jsxs)("div",{onClick:()=>{e(ri(i)),e(ft(null)),e(Ce())},className:`aaravpos-pro-card ${r?.id===i.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[i.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,alt:i.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:i.color||"#111"},children:it(i.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:i.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:i.staff_type})]})]}),l&&d&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",d]})]})]},s)})})})]})]})}function nh(){return(0,o.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,o.jsx)("div",{className:"aaravpos-professional-skeleton",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}function ah(){const{width:e}=sd(),t=(0,L.useDispatch)(),{staff:r,selectedServices:n,selectedProfessional:a,loading:i}=(0,L.useSelector)(p=>p.booking.service),[s,l]=(0,N.useState)(!1),d=e<1024,c=n.map(p=>p.id),u=n.length>0,f=(0,N.useMemo)(()=>c.length?r.filter(p=>c.every(b=>p.assignments?.some(C=>String(C.id)===String(b)&&!!C.assigned))):[],[r,c]);(0,N.useEffect)(()=>{if(!i&&u&&f.length===0){const p=setTimeout(()=>l(!0),300);return()=>clearTimeout(p)}else l(!1)},[i,u,f]);const v=p=>{if(!p?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const b=new Date,C=p.futureLeaveDates.find(x=>{if(x.status!=="APPROVED"||x.leaveType!=="FULL_DAY")return!1;const S=new Date(x.startDate),$=new Date(x.endDate);return b>=S&&b<=$});return C?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(C.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}},m=(0,N.useMemo)(()=>{if(!a?.id)return[];const p=r?.find(b=>b.id===a.id);return p?n.map(b=>{const C=p.assignments?.find(S=>S.id===b.id),x={...b,price:C?.price||b.price||b.min_price||0,duration:C?.duration||b.estimated_time||b.min_time||0,qty:b.qty||1};return{...x,tax:_a(x)}}):[]},[a,r,n]),h=(0,N.useMemo)(()=>m.reduce((p,b)=>p+Number(b.price||b.min_price||0)*b.qty,0),[m]),y=(0,N.useMemo)(()=>m.reduce((p,b)=>p+(b?.duration||0)*b.qty,0),[m]),g=p=>{if(!n||n.length===0)return!0;const b=p.assignments??[];return!n.every(C=>b.some(x=>String(x.id)===String(C.id)&&!!x.assigned))};return(0,o.jsxs)(Pt,{sidebar:(0,o.jsx)(ld,{pro:a,selectedStaffServices:m,totalPrice:h,totalDuration:y,goToStep:()=>t(Ce())}),renderButton:d&&a?(0,o.jsxs)("button",{onClick:()=>t(Ce()),className:"aaravpos-btn",disabled:!n.length,children:[(0,o.jsxs)("span",{children:[n.length," ",n.length===1?"Service":"Services"," Selected"]}),(0,o.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",fontWeight:600},children:["Next ",(0,o.jsx)(wt,{size:16})]})]}):null,children:[(0,o.jsx)(Et,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-page-subtitle",children:"Available based on selected services"}),s&&(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No staff Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No staff available for selected services"})]}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:i?Array.from({length:10}).map((p,b)=>(0,o.jsx)(nh,{},`skeleton-${b}`)):r?.map(p=>{const{isOnLeave:b,availableFrom:C}=v(p),x=g(p)||b||C,S=a?.id===p.id;return(0,o.jsx)("div",{onClick:()=>{x||(t(ri(p)),t(ft(null)),t(Ce()))},className:`booking-pro-card ${x?"disabled":S?"active":""}`,children:(0,o.jsxs)("div",{className:"booking-pro-card-header",children:[(0,o.jsx)("div",{className:"booking-pro-avatar-container",children:p.imageUrl?(0,o.jsx)("img",{src:p.imageUrl,alt:p.name,className:"booking-pro-avatar-img"}):(0,o.jsx)("div",{className:"booking-pro-avatar-circle",style:{background:p.color||"#111"},children:it(p.name)})}),(0,o.jsxs)("div",{className:"booking-pro-info",children:[(0,o.jsx)("p",{className:"booking-pro-name",children:p.name}),(0,o.jsx)("p",{className:"booking-pro-role",children:p.staff_type})]})]})},p.id)})})})]})]})}function ih({selectedServices:e,totalPrice:t,goToStep:r}){const n=(0,L.useDispatch)(),{outletName:a,isService:i}=(0,L.useSelector)(s=>s.booking?.outletDetails);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[a||"-"," Outlet"]}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>n(gt(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"SELECTED SERVICES"}),(0,o.jsx)("ul",{className:"aaravpos-order-list",children:e?.length>0&&e?.map(s=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:s.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(Pp,{size:13}),(0,o.jsx)("span",{children:s.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)($t,{size:13}),(0,o.jsxs)("span",{children:[s.min_time||s.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),s.price||s.min_price]})]})]},s.id))})]}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),t]})]}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[i?"Choose Professional":"Choose Time",(0,o.jsx)(wt,{size:16})]})})})]})]})]})}var gr=({className:e,style:t})=>(0,o.jsx)("div",{className:`aaravpos-skeleton-block ${e||""}`,style:t,children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer"})});function dd(){return(0,o.jsxs)("div",{className:"aaravpos-service-card",style:{cursor:"default",pointerEvents:"none"},children:[(0,o.jsx)(gr,{style:{height:"16px",width:"70%",marginTop:"12px",marginBottom:"4px"}}),(0,o.jsx)(gr,{style:{height:"12px",width:"95%",margin:"8px 0px"}}),(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",marginBottom:"8px"},children:[(0,o.jsx)(gr,{style:{height:"14px",width:"40px"}}),(0,o.jsx)(gr,{style:{height:"14px",width:"50px"}})]})]})}function oh(){const e=(0,L.useDispatch)(),t=(0,N.useRef)(null),r=(0,N.useRef)(null),{superCategories:n,selectedServices:a,selectedProfessional:i,loading:s}=(0,L.useSelector)(S=>S.booking.service),[l,d]=(0,N.useState)(null),[c,u]=(0,N.useState)(null),[f,v]=(0,N.useState)(""),m=new Set(i?i?.assignments?.map(S=>S.id):[]),h=new Set(i?i?.assignments?.map(S=>S.categoryId):[]),y=n?.map(S=>({...S,categories:S.categories?.map($=>({...$,services:$.services?.filter(T=>m.has(T.id))||[]})).filter($=>h.has($.id)&&$.services.length>0)||[]})).filter(S=>S.categories.length>0)||[],g=(0,N.useMemo)(()=>l?c?c?.services||[]:l?.categories?.flatMap(S=>S.services||[])||[]:[],[l,c]),p=(0,N.useMemo)(()=>y?.flatMap(S=>S.categories?.flatMap($=>$.services||[]))||[],[y]),b=(0,N.useMemo)(()=>{const S=f.trim().toLowerCase();return S?p.filter($=>$.name?.toLowerCase().includes(S)||$.description?.toLowerCase().includes(S)):g},[f,p,g]),C=S=>S.taxRows?.some($=>$.isActive)||!1,x=a.reduce((S,$)=>S+Number($.price||$.min_price||0)*$.qty,0);return(0,N.useEffect)(()=>{if(!y?.length)return;const S=y.find($=>$?.categories?.some(T=>T?.services?.length>0));S&&!l&&(d(S),u(null))},[y,l]),(0,o.jsxs)(Pt,{sidebar:(0,o.jsx)(ih,{selectedServices:a,totalPrice:x,goToStep:()=>e(Ce())}),renderButton:b?.length>0?(0,o.jsx)("button",{onClick:()=>e(Ce()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,o.jsx)(wt,{size:16})]})}):null,children:[(0,o.jsx)(Et,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",i?.name,"'s available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ui,{size:14})}),(0,o.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:f,onChange:S=>v(S.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"aaravpos-supercategory-wrapper",children:y?.map(S=>(0,o.jsx)("button",{onClick:()=>{d(S),u(null)},className:`aaravpos-supercategory-btn ${l?.id===S.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:S?.isStandAloneCategory?"Standalone":S.name})},S.id))}),l?.categories?.some(S=>S?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:S=>{r.current&&(r.current.scrollLeft+=S.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",l?.categories?.reduce((S,$)=>S+($?.services?.length||0),0),")"]}),l?.categories?.map(S=>(0,o.jsxs)("button",{onClick:()=>u(S),className:`aaravpos-supercategory-btn ${c?.id===S.id?"active":""}`,children:[S.name," (",S.services.length,")"]},S.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:s?Array.from({length:10}).map((S,$)=>(0,o.jsx)(dd,{},$)):(0,o.jsx)(o.Fragment,{children:b?.length?b?.map((S,$)=>(0,o.jsxs)("div",{onClick:()=>{e(Af(S))},className:`aaravpos-service-card ${a.some(T=>T.id===S.id)?"active":""}`,children:[C(S)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),ni(S)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:S.name}),(0,o.jsx)("div",{className:"aaravpos-service-description-wrapper",children:(0,o.jsx)("p",{className:"aaravpos-service-description",children:S.description})}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:S.estimated_time?`${S.estimated_time} min`:`${S.min_time}-${S.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:S.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",S.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",S.min_price," - ",(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",S.max_price]})})]})]},$)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}var Je=({className:e,style:t})=>(0,o.jsx)("div",{className:`aaravpos-skeleton-block ${e||""}`,style:t,children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer"})});function sh(){const e=(0,L.useDispatch)();return(0,o.jsxs)("div",{className:"aaravpos-sidebar-skeleton",children:[(0,o.jsxs)("div",{className:"skeleton-header",children:[(0,o.jsx)(Je,{className:"aaravpos-skeleton-title"}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>e(gt(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsx)("div",{className:"aaravpos-skeleton-subtitle-wrapper",children:(0,o.jsx)(Je,{className:"aaravpos-skeleton-subtitle"})}),(0,o.jsx)("div",{className:"aaravpos-skeleton-list",children:Array.from({length:3}).map((t,r)=>(0,o.jsxs)("div",{className:`aaravpos-skeleton-item ${r!==2?"aaravpos-skeleton-border":""}`,children:[(0,o.jsx)(Je,{className:"aaravpos-skeleton-item-name"}),(0,o.jsx)(Je,{className:"aaravpos-skeleton-item-price"})]},r))}),(0,o.jsx)("div",{className:"aaravpos-divider aaravpos-skeleton-divider"}),(0,o.jsxs)("div",{className:"aaravpos-skeleton-subtotal-row",children:[(0,o.jsx)(Je,{className:"aaravpos-skeleton-subtotal-label"}),(0,o.jsx)(Je,{className:"aaravpos-skeleton-subtotal-val"})]}),(0,o.jsx)(Je,{className:"aaravpos-skeleton-button"})]})}function lh(){const e=(0,L.useDispatch)(),t=(0,N.useRef)(null),r=(0,N.useRef)(null),{superCategories:n,selectedServices:a,loading:i}=(0,L.useSelector)(p=>p.booking.service),{outletName:s}=(0,L.useSelector)(p=>p.booking?.outletDetails),[l,d]=(0,N.useState)(null),[c,u]=(0,N.useState)(null),[f,v]=(0,N.useState)(""),m=(0,N.useMemo)(()=>l?c?c?.services||[]:l?.categories?.flatMap(p=>p.services||[])||[]:[],[l,c]),h=(0,N.useMemo)(()=>n?.flatMap(p=>p?.categories?.flatMap(b=>b.services||[]))||[],[n]),y=(0,N.useMemo)(()=>{const p=f.trim().toLowerCase();return p?h.filter(b=>b.name?.toLowerCase().includes(p)||b.description?.toLowerCase().includes(p)):m},[f,h,m]),g=p=>p.taxRows?.some(b=>b.isActive)||!1;return(0,N.useEffect)(()=>{if(!n?.length)return;const p=n.find(b=>b?.categories?.some(C=>C?.services?.length>0));p&&!l&&(d(p),u(null))},[n,l]),(0,o.jsxs)(Pt,{sidebar:(0,o.jsx)(sh,{}),children:[(0,o.jsx)(Et,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Book A Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from"," ",(0,o.jsx)("span",{className:"aaravpos-text-bold",children:s})," Outlet's available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ui,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search services...",value:f,onChange:p=>v(p.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:p=>{t.current&&(t.current.scrollLeft+=p.deltaY)},className:"aaravpos-supercategory-wrapper",children:n?.filter(p=>p?.categories?.some(b=>b?.services?.length>0))?.map(p=>(0,o.jsx)("button",{onClick:()=>{d(p),u(null)},className:`aaravpos-supercategory-btn ${l?.id===p.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:p?.isStandAloneCategory?"Standalone":p.name})},p.id))}),l?.categories?.some(p=>p?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:p=>{r.current&&(r.current.scrollLeft+=p.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",l?.categories?.reduce((p,b)=>p+(b?.services?.length||0),0),")"]}),l?.categories?.filter(p=>p?.services?.length>0)?.map(p=>(0,o.jsxs)("button",{onClick:()=>u(p),className:`aaravpos-supercategory-btn ${c?.id===p.id?"active":""}`,children:[p.name," (",p.services.length,")"]},p.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:i?Array.from({length:10}).map((p,b)=>(0,o.jsx)(dd,{},b)):(0,o.jsx)(o.Fragment,{children:y?.length?y?.map((p,b)=>(0,o.jsxs)("div",{onClick:()=>{e(Tf(p)),e(Ce())},className:`aaravpos-service-card ${a[0]?.id===p.id?"active":""}`,children:[g(p)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),ni(p)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:p.name}),(0,o.jsx)("p",{className:"aaravpos-service-description",children:p.description}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:p.estimated_time?`${p.estimated_time} min`:`${p.min_time}-${p.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:p.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.min_price," - ",(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.max_price]})})]})]},b)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var Rt=({dateObj:e,selectedProfessional:t,outletTimeZone:r})=>{if(!t)return!1;const n=he.DateTime.fromObject({year:e.year,month:e.month,day:e.day},{zone:r}),a=n.toISODate();if((t?.futureLeaveDates||[]).some(c=>{if(c.status!=="APPROVED"||c.leaveType!=="FULL_DAY")return!1;const u=c?.leavePeriod?.date;return u?he.DateTime.fromISO(u,{zone:"utc"}).toISODate()===a:!1}))return!0;const i=(t?.dateOverrides||[]).find(c=>he.DateTime.fromISO(c.date,{zone:"utc"}).toISODate()===a);if(i?.type==="CLOSED")return!0;if(i?.type==="TIME")return!1;const s=t?.weeklyHours?.weeklyJson||{},l={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",7:"sun"}[n.weekday],d=s?.[l];return!d||!!d.isClosed},dh=e=>{try{if(!e)throw new Error("Missing timezone");const t=he.DateTime.now().setZone(e);if(!t.isValid)throw new Error("Invalid timezone");return Array.from({length:4},(r,n)=>{const a=t.plus({months:n}).startOf("month");return{label:a.toFormat("LLLL yyyy"),monthIdx:a.month,year:a.year,startDow:a.startOf("month").weekday%7,days:a.daysInMonth||0}})}catch(t){return console.error("generateMonths error:",t),[]}},ch=["S","M","T","W","T","F","S"];function uh({isOpen:e,onClose:t}){const r=(0,L.useDispatch)(),{selectedDate:n}=(0,L.useSelector)(h=>h.booking.slots),{selectedProfessional:a}=(0,L.useSelector)(h=>h.booking.service),{timeZone:i}=(0,L.useSelector)(h=>h.booking.outletDetails),s=(0,N.useMemo)(()=>i?dh(i):[],[i]),l=()=>{if(!n)return 0;const h=s.findIndex(y=>y.monthIdx===n.month&&y.year===n.year);return h>=0?h:0},[d,c]=(0,N.useState)(l());(0,N.useEffect)(()=>{if(!e||!n||!s.length)return;const h=s.findIndex(y=>y.monthIdx===n.month&&y.year===n.year);h>=0&&c(h)},[e,n,s]);const u=s[d];if(!e)return null;const f=he.DateTime.now().setZone(i??"UTC").startOf("day"),v=f.plus({months:3}).minus({days:1}),m=(h,y)=>{const g=he.DateTime.fromObject({year:u.year,month:h,day:y},{zone:i||"UTC"}),p={day:y,month:h,year:u.year,fullDate:g.toISODate()||""},b=g.startOf("day");b<f||b>v||Rt({dateObj:p,selectedProfessional:a,outletTimeZone:i||"UTC"})||(r(ft({month:h,day:y,year:u.year})),t())};return(0,o.jsx)("div",{className:"aaravpos-date-modal-overlay",onClick:h=>h.target===h.currentTarget&&t(),children:(0,o.jsxs)("div",{className:"aaravpos-date-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-date-modal-header",children:[(0,o.jsx)("h2",{className:"aaravpos-date-modal-title",children:"Pick a Date"}),(0,o.jsx)("button",{onClick:t,className:"aaravpos-date-close-btn",children:(0,o.jsx)(We,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-date-modal-body",children:[(0,o.jsxs)("div",{className:"aaravpos-date-nav",children:[(0,o.jsx)("button",{disabled:d===0,onClick:()=>c(h=>Math.max(h-1,0)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(tn,{})}),(0,o.jsx)("div",{className:"aaravpos-date-month-label",children:u?.label}),(0,o.jsx)("button",{disabled:d===s.length-1,onClick:()=>c(h=>Math.min(h+1,s.length-1)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(wt,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-calendar-grid",children:[ch.map((h,y)=>(0,o.jsx)("div",{className:"aaravpos-calendar-weekday",children:h},y)),Array.from({length:u?.startDow||0}).map((h,y)=>(0,o.jsx)("div",{},`e${y}`)),Array.from({length:u?.days||0},(h,y)=>y+1).map(h=>{const y=n?.month===u?.monthIdx&&n?.day===h,g=u?.monthIdx===f.month&&h===f.day,p=he.DateTime.fromObject({year:u.year,month:u.monthIdx,day:h},{zone:i||"UTC"}),b={day:h,month:u.monthIdx,year:u.year,fullDate:p.toISODate()||""},C=p.startOf("day"),x=C<f,S=C>v,$=Rt({dateObj:b,selectedProfessional:a,outletTimeZone:i||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{$||m(u.monthIdx,h)},className:["aaravpos-calendar-day",!y&&!$&&"aaravpos-calendar-day-active",g&&!y&&"aaravpos-calendar-day-today",y&&"aaravpos-calendar-day-selected",$&&"aaravpos-calendar-day-disabled",(x||S)&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:[$&&(0,o.jsx)("div",{className:"aaravpos-calendar-day-slash"}),(0,o.jsx)("span",{className:"aaravpos-calendar-day-text",children:h})]},h)})]})]})]})})}var fh=e=>Number(e.price||e.min_price||0),xo=(e,{perUnit:t=!1}={})=>{const r=fh(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+i.taxRate*n:i.taxType==="PERCENTAGE"?a+r*n*i.taxRate/100:a:a,0)},ph=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function cd({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:a=0,onTipChange:i,consentRequired:s=!1,consentCompleted:l=0,totalConsents:d=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:v}){const{selectedSlotIndexes:m,slots:h,selectedDate:y}=(0,L.useSelector)(I=>I.booking.slots),{staff:g,selectedServices:p,selectedProfessional:b}=(0,L.useSelector)(I=>I.booking.service),{timeZone:C}=(0,L.useSelector)(I=>I.booking.outletDetails),x=he.DateTime.now().setZone(C??"UTC"),[S,$]=(0,N.useState)(""),[T,D]=(0,N.useState)(!1),G=(0,N.useRef)(null),Y=(0,N.useRef)(null),[se,te]=(0,N.useState)(0),ve=[0,5,10,15,20],ce=(0,N.useMemo)(()=>[...h?.morning||[],...h?.afternoon||[],...h?.evening||[]],[h]),Ne=15,re=(0,N.useMemo)(()=>{if(!b?.id)return[];const I=g?.find(w=>w.id===b.id);return I?p.map(w=>{const H=I.assignments?.find(ge=>ge.id===w.id),Q={...w,price:H?.price||w.price||w.min_price||0,duration:H?.duration||w.estimated_time||w.min_time||0};return{...Q,tax:xo(Q),unitTax:xo(Q,{perUnit:!0})}}):[]},[b,g,p]),ue=re.reduce((I,w)=>I+Number(w.price||w.min_price)*(w.qty||1),0),ne=re.reduce((I,w)=>I+Number(w.duration)*(w.qty||1),0),pe=Math.ceil(ne/Ne),Pe=I=>{if(!ce.length)return"";const w=ce[I]?.start_time_12h,H=ce[I+pe-1];return!w||!H?"":`${w} - ${H.end_time_12h??H.start_time_12h}`},ye=y||{day:x.day,month:x.month,year:x.year},j=m?.[0],k=j!==void 0?Pe(j):null,V=ye.month??0,z=k?`${ph[V-1]} ${ye.day} at ${k}`:null,F=re.reduce((I,w)=>I+w.tax,0),U=Number(a)||0,_=n?ue*U/100:0,O=ue+F+_;(0,N.useEffect)(()=>{n&&a==null&&i?.(0)},[n,a,i]);const R=(0,N.useMemo)(()=>u?"Processing...":c?"Checking consents...":s&&l<d?`Sign Consents (${l}/${d})`:(0,o.jsxs)(o.Fragment,{children:[e||"Book Appointment",(0,o.jsx)(wp,{})]}),[u,c,s,l,d,e]),M=f||u||c||!k;return(0,N.useEffect)(()=>{const I=()=>{const H=G.current?.offsetHeight||0,Q=Y.current?.offsetHeight||0,ge=(H+(window.innerWidth<=991?190:205)||0)+Q;te(window.innerHeight-ge)};I();const w=new ResizeObserver(()=>{I()});return Y.current&&w.observe(Y.current),G.current&&w.observe(G.current),window.addEventListener("resize",I),()=>{w.disconnect(),window.removeEventListener("resize",I)}},[re,n,l,d,T]),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsxs)("p",{className:"aaravpos-order-title",children:["Your Order",v&&(0,o.jsx)("button",{type:"button",className:"aaravpos-sidebar-close-btn",onClick:()=>v(),children:(0,o.jsx)(We,{})})]}),b?.id&&(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[b.imageUrl?(0,o.jsx)("img",{src:b.imageUrl,alt:b.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:b.color||"#111"},children:it(b.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:b.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:b.staff_type})]})]}),(0,o.jsxs)("div",{className:"aaravpos-date-time",children:[(0,o.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),z?(0,o.jsx)("span",{className:"aaravpos-date-time-value",children:z}):(0,o.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,o.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${se}px`},children:re?.length>0&&re.map(I=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:I.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)($t,{size:13}),(0,o.jsxs)("span",{children:[I.min_time||I.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),I.price||I.min_price]})]})]},I.id))}),(0,o.jsxs)("div",{className:"third",ref:Y,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-tip-title",children:"Add Tip"}),(0,o.jsx)("div",{className:"aaravpos-tip-options",children:[...ve,"custom"].map((I,w)=>{const H=I==="custom",Q=H?T:U===I,ge=w===0,Le=w===[...ve,"custom"].length-1;return(0,o.jsx)("button",{type:"button",onClick:()=>{H?(D(!0),i?.(Number(S)||0)):(D(!1),$(""),i?.(Number(I)))},className:`aaravpos-tip-btn
16
- ${ge||Le?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${Q?"aaravpos-tip-btn-active":""}`,children:H?"Custom":I===0?"No tip":`${I}%`},I)})}),T&&(0,o.jsx)("div",{className:"aaravpos-tip-input-wrapper",children:(0,o.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:S,onChange:I=>{const w=I.target.value;(w===""||Number(w)>=0&&Number(w)<=100)&&($(w),i?.(Number(w)||0))},className:"aaravpos-tip-input"})})]}),s&&l<d&&(0,o.jsxs)("div",{className:"aaravpos-consent-box",children:[(0,o.jsxs)("p",{className:"aaravpos-consent-text",children:["Consent Required: ",l,"/",d," completed"]}),(0,o.jsx)("div",{className:"aaravpos-consent-progress",children:(0,o.jsx)("div",{className:"aaravpos-consent-progress-bar",style:{width:`${l/d*100}%`}})})]}),(0,o.jsxs)("div",{className:"aaravpos-mt-auto",children:[(0,o.jsx)($r,{label:"Service",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),ue.toFixed(2)]})}),ne>0&&(0,o.jsx)($r,{label:"Total Duration",value:`${ne} min`}),n&&(0,o.jsx)($r,{label:`Tip (${U}%)`,value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),_.toFixed(2)]})}),(!r||k)&&(0,o.jsx)($r,{label:"Taxes",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),F.toFixed(2)]})}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Total"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),O.toFixed(2)]})]}),(0,o.jsx)("button",{type:"button",onClick:t,disabled:M,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,o.jsx)("span",{className:"aaravpos-common-btn-content",children:R})})]})]})]})}function $r({label:e,value:t}){return(0,o.jsxs)("div",{className:"aaravpos-summary-row",children:[(0,o.jsx)("span",{className:"aaravpos-summary-label",children:e}),(0,o.jsx)("span",{className:"aaravpos-summary-value",children:t})]})}function hh(){return(0,o.jsx)("div",{className:"aaravpos-scroll-area",children:Array.from({length:3}).map((e,t)=>(0,o.jsx)("div",{className:"aaravpos-slot-section",children:(0,o.jsxs)("div",{className:"aaravpos-slot-section-header",children:[(0,o.jsx)("div",{className:"aaravpos-slot-skeleton-title shimmer"}),(0,o.jsx)("div",{className:"aaravpos-slot-skeleton-arrow shimmer"})]})},t))})}var Co=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function vh(){const e=(0,L.useDispatch)(),{socket:t}=J0(),[r,n]=(0,N.useState)(11),{staff:a,selectedServices:i,selectedProfessional:s}=(0,L.useSelector)(_=>_.booking.service),{isService:l}=(0,L.useSelector)(_=>_.booking.outletDetails),{tenantId:d,timeZone:c}=(0,L.useSelector)(_=>_?.booking?.outletDetails),{selectedSlotIndexes:u,selectedDate:f,selectedTime:v,slots:m,loading:h}=(0,L.useSelector)(_=>_.booking.slots),[y,g]=(0,N.useState)(!1),[p,b]=(0,N.useState)(0),C=15,x=(0,N.useMemo)(()=>[m.morning,m.afternoon,m.evening].flat(),[m]),S=(0,N.useMemo)(()=>he.DateTime.now().setZone(c).startOf("day"),[c]),$=(0,N.useMemo)(()=>S.plus({months:3}).minus({days:1}),[S]),T=i.map(_=>_.id),D=(0,N.useMemo)(()=>T.length?a.filter(_=>T.every(O=>_?.assignments?.some(R=>R.id===O&&R.assigned)??!1)):[],[a,T]),G=(0,N.useMemo)(()=>D.filter(_=>_.id!==s?.id),[D,s]),Y=_=>{_.id!==s?.id&&(e(ri(_)),e(ft(null)),e(pr(null)),e(fr({indexes:[],ids:[]})))},se=(_,O)=>{try{if(!_.isValid||!O.isValid)throw new Error("Invalid timezone or date range");const R=Math.floor(O.diff(_,"days").days)+1;return Array.from({length:R},(M,I)=>{const w=_.plus({days:I});return{day:w.day,month:w.month,year:w.year,fullDate:w.toISODate()}})}catch(R){return console.error("generateDates error:",R),[]}},te=(0,N.useMemo)(()=>se(S,$),[S,$]),ve=(0,N.useMemo)(()=>{if(!s?.id)return[];const _=a?.find(O=>O.id===s.id);return _?i.map(O=>{const R=_.assignments?.find(M=>M.id===O.id);return{...O,price:R?.price||O.price||O.min_price||0,duration:R?.duration||O.estimated_time||O.min_time||0,qty:R?.qty||1}}):[]},[s,a,i]).reduce((_,O)=>_+Number(O.duration)*(O.qty||1),0),ce=Math.ceil(ve/C),Ne=f?he.DateTime.fromObject(f).toFormat("yyyy-MM-dd"):null,re=(0,N.useCallback)(()=>{!s?.id||!Ne||e(jr({tenantId:d,staffId:s.id,date:Ne}))},[e,d,s?.id,Ne]);(0,N.useEffect)(()=>{re()},[re]),(0,N.useEffect)(()=>{if(!t)return;const _=O=>{O.staffId===s?.id&&re()};return t.on("appointment:updated",_),()=>{t.off("appointment:updated",_)}},[t,s?.id,re]);const ue=_=>{b(O=>Math.max(0,Math.min(te.length-r,O+_*4)))},ne=()=>te.find(_=>!Rt({dateObj:_,selectedProfessional:s,outletTimeZone:c||"UTC"}));(0,N.useEffect)(()=>{if(f||!s)return;const _=ne();_&&e(ft({day:_.day,month:_.month,year:_.year}))},[f,s,te,c,e]),(0,N.useEffect)(()=>{if(!f||!te.length)return;const _=te.findIndex(O=>O.day===f.day&&O.month===f.month&&O.year===f.year);_!==-1&&b(Math.max(0,Math.min(te.length-r,_-Math.floor(r/2))))},[f,te,r]);const pe=_=>{const O=he.DateTime.fromISO(_.fullDate||"",{zone:c||"UTC"}).startOf("day");if(O<S||O>$||Rt({dateObj:_,selectedProfessional:s,outletTimeZone:c||"UTC"})){ee.toast.warning("Staff is unavailable on this date");return}e(ft({day:_.day,month:_.month,year:_.year})),e(pr(null))},Pe=_=>{if(!x.length)return;const O=x.slice(_,_+ce);if(O.length<ce){ee.toast.warning("You don't have sufficient time for selected service");return}if(O.some(M=>M.isBooked||M.status!=="AVAILABLE"||M.disabled)){ee.toast.warning("Selected time range is not fully available");return}e(pr(x[_].start_time));const R=Array.from({length:ce},(M,I)=>_+I);e(fr({indexes:R,ids:R.map(M=>x[M]?.id)})),setTimeout(()=>{e(Ce())},200)};(0,N.useEffect)(()=>{if(!v||!x.length)return;const _=x.findIndex(R=>R.start_time===v);if(_===-1)return;const O=Array.from({length:ce},(R,M)=>_+M);O.length===u.length&&O.every((R,M)=>R===u[M])||e(fr({indexes:O,ids:O.map(R=>x[R]?.id)}))},[v,x,ce,u]),(0,N.useEffect)(()=>{const _=()=>{const O=window.innerWidth;O<350?n(2):O<420?n(3):O<575?n(4):O<680?n(6):O<991?n(8):O<1280?n(10):n(12)};return _(),window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}},[]);const ye=m?.morning||[],j=m?.afternoon||[],k=m?.evening||[],V=_=>_.some(O=>!O.isBooked&&O.status==="AVAILABLE"&&!O.disabled),z=()=>V(ye)?"morning":V(j)?"afternoon":V(k)?"evening":null,[F,U]=(0,N.useState)(z());return(0,N.useEffect)(()=>{const _=x[u[0]];_&&(ye.some(O=>O.id===_.id)?U("morning"):j.some(O=>O.id===_.id)?U("afternoon"):k.some(O=>O.id===_.id)&&U("evening"))},[u,x,ye,j,k]),(0,N.useEffect)(()=>{e(pr(null)),e(fr({indexes:[],ids:[]}))},[f,e]),(0,o.jsxs)(Pt,{sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(cd,{buttonText:"Fill Details",onButtonClick:()=>{if(!v||!u.length){ee.toast.warning("Please select a time slot");return}e(Ce())},showTaxesOnlyIfTime:!0})}),children:[(0,o.jsx)(Et,{}),(0,o.jsx)("div",{style:{marginTop:15},children:(0,o.jsx)("h1",{className:"aaravpos-page-title",style:{marginBottom:10},children:"Choose a Time"})}),(0,o.jsxs)("div",{className:"aaravpos-date-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-date-strip",children:[(0,o.jsx)(_o,{onClick:()=>ue(-1),children:(0,o.jsx)(tn,{size:20})}),te.slice(p,p+r).map(_=>{const O=he.DateTime.fromObject({year:_.year,month:_.month,day:_.day},{zone:c||"UTC"}),R=O.weekday%7,M=he.DateTime.now().setZone(c).startOf("day"),I=O.hasSame(M,"day"),w=f?.day===_.day&&f?.month===_.month&&f?.year===_.year,H=O.startOf("day"),Q=H<S,ge=H>$,Le=Q||ge||Rt({dateObj:_,selectedProfessional:s,outletTimeZone:c||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{Le||pe(_)},className:["aaravpos-date-card",Q||ge||Le?"aaravpos-date-card-disabled":w?"aaravpos-date-card-active":"aaravpos-date-card-default"].filter(Boolean).join(" "),children:[Le&&(0,o.jsx)("div",{className:"aaravpos-date-disabled-slash"}),(0,o.jsx)("span",{className:"aaravpos-date-week",children:mh[R]}),(0,o.jsx)("span",{className:"aaravpos-date-day",children:_.day}),I&&(0,o.jsx)("span",{className:"aaravpos-date-today",children:"TODAY"}),Le&&(0,o.jsx)("span",{className:"aaravpos-date-unavailable",children:"UNAVAILABLE"})]},`${_.day}-${_.month}-${_.year}`)}),(0,o.jsx)(_o,{onClick:()=>ue(1),children:(0,o.jsx)(wt,{size:20})})]}),(0,o.jsxs)("button",{onClick:()=>g(!0),className:"aaravpos-calendar-btn",children:[(0,o.jsx)(lp,{size:16}),f?.month!=null?`${Co[f.month-1]} ${f.year}`:`${Co[S.month-1]} ${S.year}`]})]}),(0,o.jsxs)("div",{className:"aaravpos-professional-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-selected-professional",children:[s?.imageUrl?(0,o.jsx)("img",{src:s.imageUrl,alt:s.name,className:"aaravpos-selected-professional-image"}):(0,o.jsx)("div",{className:"aaravpos-selected-professional-avatar",style:{background:s?.color||"#111"},children:it(s?.name)}),(0,o.jsxs)("div",{className:"aaravpos-selected-professional-content",children:[(0,o.jsx)("p",{className:"aaravpos-selected-professional-name",children:s?.name}),(0,o.jsx)("p",{className:"aaravpos-selected-professional-services",children:s?.staff_type})]})]}),l&&G.length>0&&(0,o.jsx)(yh,{professionals:D,selectedProfessional:s,onSelect:Y})]}),(0,o.jsxs)("div",{className:"aaravpos-scroll-area",style:h?{height:300}:{},children:[h?(0,o.jsx)(hh,{}):(0,o.jsx)(o.Fragment,{children:x?.length?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Jn,{label:"Morning",icon:(0,o.jsx)(qp,{size:18,className:"aaravpos-slot-icon"}),slots:ye,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="morning",onToggle:()=>U(F==="morning"?null:"morning")}),(0,o.jsx)(Jn,{label:"Afternoon",icon:(0,o.jsx)(Vp,{size:18,className:"aaravpos-slot-icon"}),slots:j,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="afternoon",onToggle:()=>U(F==="afternoon"?null:"afternoon")}),(0,o.jsx)(Jn,{label:"Evening",icon:(0,o.jsx)(xp,{size:18,className:"aaravpos-slot-icon"}),slots:k,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="evening",onToggle:()=>U(F==="evening"?null:"evening")})," "]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-supercategory-wrapper"}),(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Slots Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No slots available for selected date. Please choose a different date."})]})]})}),(0,o.jsx)(uh,{isOpen:y,onClose:()=>g(!1)})]})]})}function _o({onClick:e,children:t}){return(0,o.jsx)("button",{onClick:e,className:"aaravpos-date-nav-btn",children:t})}function Jn({icon:e,label:t,slots:r,allSlots:n,selectedSlotIndexes:a,handleSlotSelect:i,isOpen:s,onToggle:l}){return!r||r?.length===0?null:(0,o.jsxs)("div",{className:"aaravpos-slot-section",children:[(0,o.jsxs)("div",{onClick:l,className:"aaravpos-slot-section-header",children:[(0,o.jsxs)("div",{className:"aaravpos-slot-section-title",children:[(0,o.jsx)("span",{children:e})," ",t]}),(0,o.jsx)("span",{className:`aaravpos-slot-section-arrow ${s?"aaravpos-slot-section-arrow-open":""}`,children:(0,o.jsx)(ci,{})})]}),s&&(0,o.jsx)("div",{className:"aaravpos-slot-section-content",children:(0,o.jsx)("div",{className:"aaravpos-slot-grid",children:r.map(d=>{const c=n.findIndex(m=>m.id===d.id),u=a.includes(c),f=d.disabled,v=d.isBooked||d.status!=="AVAILABLE"||f;return(0,o.jsxs)("div",{onClick:()=>{v||i(c)},className:`aaravpos-slot-card ${v?"aaravpos-slot-card-disabled":u?"aaravpos-slot-card-selected":"aaravpos-slot-card-default"}`,children:[(0,o.jsx)("span",{className:"aaravpos-slot-time",children:d.start_time_12h}),(0,o.jsx)("span",{className:"aaravpos-slot-status",children:d.disabled?"":d.isBooked?"Booked":"Available"})]},d.id)})})})]})}function yh({professionals:e,selectedProfessional:t,onSelect:r}){const[n,a]=(0,N.useState)(!1);return(0,o.jsxs)("div",{className:"aaravpos-professional-dropdown",children:[(0,o.jsxs)("button",{onClick:()=>a(i=>!i),className:"aaravpos-professional-dropdown-btn",children:[(0,o.jsx)("span",{className:"aaravpos-professional-dropdown-text",children:"Choose Professional"}),(0,o.jsx)(ci,{size:18,className:`aaravpos-professional-dropdown-icon ${n?"aaravpos-professional-dropdown-icon-open":""}`})]}),n&&(0,o.jsx)("div",{className:"aaravpos-professional-dropdown-menu",children:e.filter(i=>i.id!==t?.id).map((i,s,l)=>(0,o.jsxs)("div",{onClick:()=>{r(i),a(!1)},className:`aaravpos-professional-dropdown-item ${s!==l.length-1?"aaravpos-professional-dropdown-item-border":""}`,children:[i.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,className:"aaravpos-professional-dropdown-avatar",alt:i.name}):(0,o.jsx)("div",{className:"aaravpos-professional-dropdown-avatar-placeholder",style:{background:i.color||"#111"},children:it(i.name)}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"aaravpos-professional-dropdown-name",children:i.name}),(0,o.jsx)("p",{className:"aaravpos-professional-dropdown-type",children:i.staff_type})]})]},i.id))})]})}var gh=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),$h=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},bh=e=>e.replace(/\D/g,"").slice(0,3);function Nh({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,L.useSelector)(u=>u.booking?.outletDetails),{control:a,handleSubmit:i,reset:s,formState:{errors:l,isSubmitting:d}}=(0,Ue.useForm)({defaultValues:{name:"",number:"",expiry:"",cvv:""}}),c=async u=>{await t({name:u.name.trim(),number:u.number.trim(),expiry:u.expiry,cvv:u.cvv})&&e()};return(0,o.jsx)("div",{className:"aaravpos-payment-overlay",children:(0,o.jsx)("form",{onSubmit:i(c),className:"aaravpos-payment-form",children:(0,o.jsxs)("div",{className:"aaravpos-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-payment-header",children:[(0,o.jsx)("h2",{className:"aaravpos-payment-title",children:"Make a payment"}),(0,o.jsxs)("span",{className:"aaravpos-payment-amount",children:[(0,o.jsx)(ie,{size:14}),r?.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-fields",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"name",className:"aaravpos-payment-label",children:["Card Holder Name ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"name",control:a,rules:{required:"Name required",pattern:{value:/^[A-Za-z ]+$/,message:"Only letters allowed"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"name",autoComplete:"cc-name",placeholder:"Card Holder Name",onChange:f=>{const v=f.target.value.replace(/[^A-Za-z ]/g,"");u.onChange(v)},className:"aaravpos-custom-input"})}),l.name&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.name.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"number",className:"aaravpos-payment-label",children:["Card Number ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"number",control:a,rules:{required:"Card number required",validate:u=>u.replace(/\s/g,"").length===16||"Must be 16 digits"},render:({field:u})=>(0,o.jsx)("input",{...u,id:"number",placeholder:"4242 4242 4242 4242",onChange:f=>{u.onChange(gh(f.target.value))},className:"aaravpos-custom-input"})}),l.number&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.number.message})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"expiry",className:"aaravpos-payment-label",children:["Expiry Date ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"expiry",control:a,rules:{required:"Expiry required",validate:u=>{if(!/^\d{2}\/\d{2}$/.test(u))return"Invalid format";const[f,v]=u.split("/").map(Number);if(f<1||f>12)return"Invalid month";const m=he.DateTime.now().setZone(n),h=m.year%100,y=m.month;return v<h||v===h&&f<y?"Card expired":!0}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"expiry",placeholder:"MM/YY",onChange:f=>{u.onChange($h(f.target.value))},className:"aaravpos-custom-input"})}),l.expiry&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.expiry.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"cvv",className:"aaravpos-payment-label",children:["CVV ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"cvv",control:a,rules:{required:"CVV required",minLength:{value:3,message:"3 digits required"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"cvv",placeholder:"CVV",onChange:f=>{u.onChange(bh(f.target.value))},className:"aaravpos-custom-input"})}),l.cvv&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.cvv.message})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-btn-grid",children:[(0,o.jsx)("button",{type:"button",onClick:()=>{s(),e()},className:"aaravpos-payment-cancel-btn",children:"Cancel"}),(0,o.jsx)("button",{type:"submit",disabled:d,className:"aaravpos-payment-submit-btn",children:d?"Processing...":"Proceed"})]})]})})})}function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wa.apply(null,arguments)}function Sh(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function xh(e,t){if(e==null)return{};var r,n,a=Sh(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function bt(e){"@babel/helpers - typeof";return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(e)}function Ch(e,t){if(bt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _h(e){var t=Ch(e,"string");return bt(t)=="symbol"?t:t+""}function wo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_h(n.key),n)}}function wh(e,t,r){return t&&wo(e.prototype,t),r&&wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ea(e,t)}function Ph(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ea(e,t)}function rn(e){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(e)}function ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ud=function(){return!!e})()}function Oh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jh(e,t){if(t&&(bt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oh(e)}function Th(e){var t=ud();return function(){var r,n=rn(e);if(t){var a=rn(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return jh(this,r)}}var Ah=Te((e=>{var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,d=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function x($){if(typeof $=="object"&&$!==null){var T=$.$$typeof;switch(T){case r:switch($=$.type,$){case c:case u:case a:case s:case i:case v:return $;default:switch($=$&&$.$$typeof,$){case d:case f:case y:case h:case l:return $;default:return T}}case n:return T}}}function S($){return x($)===u}e.AsyncMode=c,e.ConcurrentMode=u,e.ContextConsumer=d,e.ContextProvider=l,e.Element=r,e.ForwardRef=f,e.Fragment=a,e.Lazy=y,e.Memo=h,e.Portal=n,e.Profiler=s,e.StrictMode=i,e.Suspense=v,e.isAsyncMode=function($){return S($)||x($)===c},e.isConcurrentMode=S,e.isContextConsumer=function($){return x($)===d},e.isContextProvider=function($){return x($)===l},e.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===r},e.isForwardRef=function($){return x($)===f},e.isFragment=function($){return x($)===a},e.isLazy=function($){return x($)===y},e.isMemo=function($){return x($)===h},e.isPortal=function($){return x($)===n},e.isProfiler=function($){return x($)===s},e.isStrictMode=function($){return x($)===i},e.isSuspense=function($){return x($)===v},e.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===a||$===u||$===s||$===i||$===v||$===m||typeof $=="object"&&$!==null&&($.$$typeof===y||$.$$typeof===h||$.$$typeof===l||$.$$typeof===d||$.$$typeof===f||$.$$typeof===p||$.$$typeof===b||$.$$typeof===C||$.$$typeof===g)},e.typeOf=x})),Ih=Te((e=>{process.env.NODE_ENV!=="production"&&(function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,d=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function x(w){return typeof w=="string"||typeof w=="function"||w===a||w===u||w===s||w===i||w===v||w===m||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===h||w.$$typeof===l||w.$$typeof===d||w.$$typeof===f||w.$$typeof===p||w.$$typeof===b||w.$$typeof===C||w.$$typeof===g)}function S(w){if(typeof w=="object"&&w!==null){var H=w.$$typeof;switch(H){case r:var Q=w.type;switch(Q){case c:case u:case a:case s:case i:case v:return Q;default:var ge=Q&&Q.$$typeof;switch(ge){case d:case f:case y:case h:case l:return ge;default:return H}}case n:return H}}}var $=c,T=u,D=d,G=l,Y=r,se=f,te=a,ve=y,ce=h,Ne=n,re=s,ue=i,ne=v,pe=!1;function Pe(w){return pe||(pe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ye(w)||S(w)===c}function ye(w){return S(w)===u}function j(w){return S(w)===d}function k(w){return S(w)===l}function V(w){return typeof w=="object"&&w!==null&&w.$$typeof===r}function z(w){return S(w)===f}function F(w){return S(w)===a}function U(w){return S(w)===y}function _(w){return S(w)===h}function O(w){return S(w)===n}function R(w){return S(w)===s}function M(w){return S(w)===i}function I(w){return S(w)===v}e.AsyncMode=$,e.ConcurrentMode=T,e.ContextConsumer=D,e.ContextProvider=G,e.Element=Y,e.ForwardRef=se,e.Fragment=te,e.Lazy=ve,e.Memo=ce,e.Portal=Ne,e.Profiler=re,e.StrictMode=ue,e.Suspense=ne,e.isAsyncMode=Pe,e.isConcurrentMode=ye,e.isContextConsumer=j,e.isContextProvider=k,e.isElement=V,e.isForwardRef=z,e.isFragment=F,e.isLazy=U,e.isMemo=_,e.isPortal=O,e.isProfiler=R,e.isStrictMode=M,e.isSuspense=I,e.isValidElementType=x,e.typeOf=S})()})),fd=Te(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=Ah():t.exports=Ih()})),kh=Te(((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function s(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var d={},c=0;c<10;c++)d["_"+String.fromCharCode(c)]=c;if(Object.getOwnPropertyNames(d).map(function(f){return d[f]}).join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=s()?Object.assign:function(l,d){for(var c,u=i(l),f,v=1;v<arguments.length;v++){c=Object(arguments[v]);for(var m in c)n.call(c,m)&&(u[m]=c[m]);if(r){f=r(c);for(var h=0;h<f.length;h++)a.call(c,f[h])&&(u[f[h]]=c[f[h]])}}return u}})),fi=Te(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),pd=Te(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Rh=Te(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=fi(),a={},i=pd();r=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}}}function s(l,d,c,u,f){if(process.env.NODE_ENV!=="production"){for(var v in l)if(i(l,v)){var m;try{if(typeof l[v]!="function"){var h=Error((u||"React class")+": "+c+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}m=l[v](d,v,u,c,null,n)}catch(g){m=g}if(m&&!(m instanceof Error)&&r((u||"React class")+": type specification of "+c+" `"+v+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in a)){a[m.message]=!0;var y=f?f():"";r("Failed "+c+" type: "+m.message+(y??""))}}}}s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},t.exports=s})),Dh=Te(((e,t)=>{var r=fd(),n=kh(),a=fi(),i=pd(),s=Rh(),l=function(){};process.env.NODE_ENV!=="production"&&(l=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function d(){return null}t.exports=function(c,u){var f=typeof Symbol=="function"&&Symbol.iterator,v="@@iterator";function m(j){var k=j&&(f&&j[f]||j[v]);if(typeof k=="function")return k}var h="<<anonymous>>",y={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:x(),arrayOf:S,element:$(),elementType:T(),instanceOf:D,node:te(),objectOf:Y,oneOf:G,oneOfType:se,shape:ce,exact:Ne};function g(j,k){return j===k?j!==0||1/j===1/k:j!==j&&k!==k}function p(j,k){this.message=j,this.data=k&&typeof k=="object"?k:{},this.stack=""}p.prototype=Error.prototype;function b(j){if(process.env.NODE_ENV!=="production")var k={},V=0;function z(U,_,O,R,M,I,w){if(R=R||h,I=I||O,w!==a){if(u){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=R+":"+O;!k[Q]&&V<3&&(l("You are manually calling a React.PropTypes validation function for the `"+I+"` prop on `"+R+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[Q]=!0,V++)}}return _[O]==null?U?_[O]===null?new p("The "+M+" `"+I+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new p("The "+M+" `"+I+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:j(_,O,R,M,I)}var F=z.bind(null,!1);return F.isRequired=z.bind(null,!0),F}function C(j){function k(V,z,F,U,_,O){var R=V[z];if(ne(R)!==j){var M=pe(R);return new p("Invalid "+U+" `"+_+"` of type "+("`"+M+"` supplied to `"+F+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return b(k)}function x(){return b(d)}function S(j){function k(V,z,F,U,_){if(typeof j!="function")return new p("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var O=V[z];if(!Array.isArray(O)){var R=ne(O);return new p("Invalid "+U+" `"+_+"` of type "+("`"+R+"` supplied to `"+F+"`, expected an array."))}for(var M=0;M<O.length;M++){var I=j(O,M,F,U,_+"["+M+"]",a);if(I instanceof Error)return I}return null}return b(k)}function $(){function j(k,V,z,F,U){var _=k[V];if(!c(_)){var O=ne(_);return new p("Invalid "+F+" `"+U+"` of type "+("`"+O+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return b(j)}function T(){function j(k,V,z,F,U){var _=k[V];if(!r.isValidElementType(_)){var O=ne(_);return new p("Invalid "+F+" `"+U+"` of type "+("`"+O+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return b(j)}function D(j){function k(V,z,F,U,_){if(!(V[z]instanceof j)){var O=j.name||h,R=ye(V[z]);return new p("Invalid "+U+" `"+_+"` of type "+("`"+R+"` supplied to `"+F+"`, expected ")+("instance of `"+O+"`."))}return null}return b(k)}function G(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array.")),d;function k(V,z,F,U,_){for(var O=V[z],R=0;R<j.length;R++)if(g(O,j[R]))return null;var M=JSON.stringify(j,function(w,H){return pe(H)==="symbol"?String(H):H});return new p("Invalid "+U+" `"+_+"` of value `"+String(O)+"` "+("supplied to `"+F+"`, expected one of "+M+"."))}return b(k)}function Y(j){function k(V,z,F,U,_){if(typeof j!="function")return new p("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var O=V[z],R=ne(O);if(R!=="object")return new p("Invalid "+U+" `"+_+"` of type "+("`"+R+"` supplied to `"+F+"`, expected an object."));for(var M in O)if(i(O,M)){var I=j(O,M,F,U,_+"."+M,a);if(I instanceof Error)return I}return null}return b(k)}function se(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&l("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var k=0;k<j.length;k++){var V=j[k];if(typeof V!="function")return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Pe(V)+" at index "+k+"."),d}function z(F,U,_,O,R){for(var M=[],I=0;I<j.length;I++){var w=j[I],H=w(F,U,_,O,R,a);if(H==null)return null;H.data&&i(H.data,"expectedType")&&M.push(H.data.expectedType)}var Q=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new p("Invalid "+O+" `"+R+"` supplied to "+("`"+_+"`"+Q+"."))}return b(z)}function te(){function j(k,V,z,F,U){return re(k[V])?null:new p("Invalid "+F+" `"+U+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return b(j)}function ve(j,k,V,z,F){return new p((j||"React class")+": "+k+" type `"+V+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function ce(j){function k(V,z,F,U,_){var O=V[z],R=ne(O);if(R!=="object")return new p("Invalid "+U+" `"+_+"` of type `"+R+"` "+("supplied to `"+F+"`, expected `object`."));for(var M in j){var I=j[M];if(typeof I!="function")return ve(F,U,_,M,pe(I));var w=I(O,M,F,U,_+"."+M,a);if(w)return w}return null}return b(k)}function Ne(j){function k(V,z,F,U,_){var O=V[z],R=ne(O);if(R!=="object")return new p("Invalid "+U+" `"+_+"` of type `"+R+"` "+("supplied to `"+F+"`, expected `object`."));for(var M in n({},V[z],j)){var I=j[M];if(i(j,M)&&typeof I!="function")return ve(F,U,_,M,pe(I));if(!I)return new p("Invalid "+U+" `"+_+"` key `"+M+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(V[z],null," ")+`
17
- Valid keys: `+JSON.stringify(Object.keys(j),null," "));var w=I(O,M,F,U,_+"."+M,a);if(w)return w}return null}return b(k)}function re(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(re);if(j===null||c(j))return!0;var k=m(j);if(k){var V=k.call(j),z;if(k!==j.entries){for(;!(z=V.next()).done;)if(!re(z.value))return!1}else for(;!(z=V.next()).done;){var F=z.value;if(F&&!re(F[1]))return!1}}else return!1;return!0;default:return!1}}function ue(j,k){return j==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function ne(j){var k=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":ue(k,j)?"symbol":k}function pe(j){if(typeof j>"u"||j===null)return""+j;var k=ne(j);if(k==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return k}function Pe(j){var k=pe(j);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ye(j){return!j.constructor||!j.constructor.name?h:j.constructor.name}return y.checkPropTypes=s,y.resetWarningCache=s.resetWarningCache,y.PropTypes=y,y}})),Mh=Te(((e,t)=>{var r=fi();function n(){}function a(){}a.resetWarningCache=n,t.exports=function(){function i(d,c,u,f,v,m){if(m!==r){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}i.isRequired=i;function s(){return i}var l={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:a,resetWarningCache:n};return l.PropTypes=l,l}})),Lh=Te(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=fd(),n=!0;t.exports=Dh()(r.isElement,n)}else t.exports=Mh()()})),P=Qt(Lh(),1);function at(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}at.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1};at.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))};at.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function pi(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}pi.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,a=0;a<=e;a+=1){var i=a/e,s=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),l=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(a>0){var d=s-r,c=l-n;t+=Math.sqrt(d*d+c*c)}r=s,n=l}return t};pi.prototype._point=function(e,t,r,n,a){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+a*e*e*e};function Fh(e,t,r){var n,a,i,s=null,l=0;r||(r={});var d=function(){l=r.leading===!1?0:Date.now(),s=null,i=e.apply(n,a),s||(n=a=null)};return function(){var c=Date.now();!l&&r.leading===!1&&(l=c);var u=t-(c-l);return n=this,a=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),l=c,i=e.apply(n,a),s||(n=a=null)):!s&&r.trailing!==!1&&(s=setTimeout(d,u)),i}}function Z(e,t){var r=this,n=t||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle="throttle"in n?n.throttle:16,this.minDistance="minDistance"in n?n.minDistance:5,this.throttle?this._strokeMoveUpdate=Fh(Z.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Z.prototype._strokeUpdate,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onBegin=n.onBegin,this.onEnd=n.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(a){a.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(a))},this._handleMouseMove=function(a){r._mouseButtonDown&&r._strokeMoveUpdate(a)},this._handleMouseUp=function(a){a.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(a))},this._handleTouchStart=function(a){if(a.targetTouches.length===1){var i=a.changedTouches[0];r._strokeBegin(i)}},this._handleTouchMove=function(a){a.preventDefault();var i=a.targetTouches[0];r._strokeMoveUpdate(i)},this._handleTouchEnd=function(a){a.target===r._canvas&&(a.preventDefault(),r._strokeEnd(a))},this.on()}Z.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0};Z.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,a=r.ratio||window.devicePixelRatio||1,i=r.width||this._canvas.width/a,s=r.height||this._canvas.height/a;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,i,s)},this._isEmpty=!1};Z.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}};Z.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};Z.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)};Z.prototype.isEmpty=function(){return this._isEmpty};Z.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};Z.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),a=this._data[this._data.length-1],i=a&&a[a.length-1],s=i&&n.distanceTo(i)<this.minDistance;if(!(i&&s)){var l=this._addPoint(n),d=l.curve,c=l.widths;d&&c&&this._drawCurve(d,c.start,c.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}};Z.prototype._strokeEnd=function(e){var t=this.points.length>2,r=this.points[0];if(!t&&r&&this._drawDot(r),r){var n=this._data[this._data.length-1],a=n[n.length-1];r.equals(a)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)};Z.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};Z.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)};Z.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};Z.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new at(e-n.left,t-n.top,r||new Date().getTime())};Z.prototype._addPoint=function(e){var t=this.points,r=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),r=this._calculateCurveControlPoints(t[0],t[1],t[2]);var n=r.c2;r=this._calculateCurveControlPoints(t[1],t[2],t[3]);var a=r.c1,i=new pi(t[1],n,a,t[2]),s=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:s}}return{}};Z.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,a=e.y-t.y,i=t.x-r.x,s=t.y-r.y,l={x:(e.x+t.x)/2,y:(e.y+t.y)/2},d={x:(t.x+r.x)/2,y:(t.y+r.y)/2},c=Math.sqrt(n*n+a*a),u=Math.sqrt(i*i+s*s),f=l.x-d.x,v=l.y-d.y,m=u/(c+u),h={x:d.x+f*m,y:d.y+v*m},y=t.x-h.x,g=t.y-h.y;return{c1:new at(l.x+y,l.y+g),c2:new at(d.x+y,d.y+g)}};Z.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},a=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(a);return n.start=this._lastWidth,n.end=i,this._lastVelocity=a,this._lastWidth=i,n};Z.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};Z.prototype._drawPoint=function(e,t,r){var n=this._ctx;n.moveTo(e,t),n.arc(e,t,r,0,2*Math.PI,!1),this._isEmpty=!1};Z.prototype._drawCurve=function(e,t,r){var n=this._ctx,a=r-t,i=Math.floor(e.length());n.beginPath();for(var s=0;s<i;s+=1){var l=s/i,d=l*l,c=d*l,u=1-l,f=u*u,v=f*u,m=v*e.startPoint.x;m+=3*f*l*e.control1.x,m+=3*u*d*e.control2.x,m+=c*e.endPoint.x;var h=v*e.startPoint.y;h+=3*f*l*e.control1.y,h+=3*u*d*e.control2.y,h+=c*e.endPoint.y;var y=t+c*a;this._drawPoint(m,h,y)}n.closePath(),n.fill()};Z.prototype._drawDot=function(e){var t=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,r),t.closePath(),t.fill()};Z.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.length>1)for(var i=0;i<a.length;i+=1){var s=a[i],l=new at(s.x,s.y,s.time),d=s.color;if(i===0)this.penColor=d,this._reset(),this._addPoint(l);else if(i!==a.length-1){var c=this._addPoint(l),u=c.curve,f=c.widths;u&&f&&t(u,f,d)}}else{this._reset();var v=a[0];r(v)}}};Z.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),a=0,i=0,s=r.width/n,l=r.height/n,d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttributeNS(null,"width",r.width),d.setAttributeNS(null,"height",r.height),this._fromData(t,function(g,p,b){var C=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var x="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));C.setAttribute("d",x),C.setAttribute("stroke-width",(p.end*2.25).toFixed(3)),C.setAttribute("stroke",b),C.setAttribute("fill","none"),C.setAttribute("stroke-linecap","round"),d.appendChild(C)}},function(g){var p=document.createElement("circle"),b=typeof e.dotSize=="function"?e.dotSize():e.dotSize;p.setAttribute("r",b),p.setAttribute("cx",g.x),p.setAttribute("cy",g.y),p.setAttribute("fill",g.color),d.appendChild(p)});var c="data:image/svg+xml;base64,",u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+a+" "+i+" "+s+" "+l+'"')+(' width="'+s+'"')+(' height="'+l+'"')+">",f=d.innerHTML;if(f===void 0){var v=document.createElement("dummy"),m=d.childNodes;v.innerHTML="";for(var h=0;h<m.length;h+=1)v.appendChild(m[h].cloneNode(!0));f=v.innerHTML}var y=u+f+"</svg>";return c+btoa(y)};Z.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(r,n){return t._drawCurve(r,n.start,n.end)},function(r){return t._drawDot(r)}),this._data=e};Z.prototype.toData=function(){return this._data};var Bh=Te(((e,t)=>{(function(r,n){typeof e=="object"&&typeof t=="object"?t.exports=n():typeof define=="function"&&define.amd?define([],n):typeof e=="object"?e.trimCanvas=n():r.trimCanvas=n()})(e,function(){return(function(r){function n(i){if(a[i])return a[i].exports;var s=a[i]={exports:{},id:i,loaded:!1};return r[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}var a={};return n.m=r,n.c=a,n.p="",n(0)})([function(r,n){"use strict";function a(c){var u=c.getContext("2d"),f=c.width,v=c.height,m=u.getImageData(0,0,f,v).data,h=l(!0,f,v,m),y=l(!1,f,v,m),g=d(!0,f,v,m),p=d(!1,f,v,m)-g+1,b=y-h+1,C=u.getImageData(g,h,p,b);return c.width=p,c.height=b,u.clearRect(0,0,p,b),u.putImageData(C,0,0),c}function i(c,u,f,v){return{red:v[4*(f*u+c)],green:v[4*(f*u+c)+1],blue:v[4*(f*u+c)+2],alpha:v[4*(f*u+c)+3]}}function s(c,u,f,v){return i(c,u,f,v).alpha}function l(c,u,f,v){for(var m=c?1:-1,h=c?0:f-1;c?h<f:h>-1;h+=m)for(var y=0;y<u;y++)if(s(y,h,u,v))return h;return null}function d(c,u,f,v){for(var m=c?1:-1,h=c?0:u-1;c?h<u:h>-1;h+=m)for(var y=0;y<f;y++)if(s(h,y,u,v))return h;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=a}])})})),Uh=Qt(Bh(),1),Vh=["canvasProps","clearOnResize"],Pn=(function(e){Ph(r,e);var t=Th(r);function r(){var n;Eh(this,r);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=t.call.apply(t,[this].concat(i)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(l){n._canvas=l,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var l=n.props;return l.canvasProps,l.clearOnResize,xh(l,Vh)},n.componentDidMount=function(){var l=n.getCanvas();n._sigPad=new Z(l,n._excludeOurProps()),n._resizeCanvas(),n.on()},n.componentWillUnmount=function(){n.off()},n.componentDidUpdate=function(){Object.assign(n._sigPad,n._excludeOurProps())},n.getCanvas=function(){if(n._canvas===null)throw n.staticThis.refNullError;return n._canvas},n.getTrimmedCanvas=function(){var l=n.getCanvas(),d=document.createElement("canvas");return d.width=l.width,d.height=l.height,d.getContext("2d").drawImage(l,0,0),(0,Uh.default)(d)},n.getSignaturePad=function(){if(n._sigPad===null)throw n.staticThis.refNullError;return n._sigPad},n._checkClearOnResize=function(){n.props.clearOnResize&&n._resizeCanvas()},n._resizeCanvas=function(){var l,d,c=(l=n.props.canvasProps)!==null&&l!==void 0?l:{},u=c.width,f=c.height;if(!(typeof u<"u"&&typeof f<"u")){var v=n.getCanvas(),m=Math.max((d=window.devicePixelRatio)!==null&&d!==void 0?d:1,1);typeof u>"u"&&(v.width=v.offsetWidth*m),typeof f>"u"&&(v.height=v.offsetHeight*m),v.getContext("2d").scale(m,m),n.clear()}},n.render=function(){var l=n.props.canvasProps;return N.default.createElement("canvas",wa({ref:n.setRef},l))},n.on=function(){return window.addEventListener("resize",n._checkClearOnResize),n.getSignaturePad().on()},n.off=function(){return window.removeEventListener("resize",n._checkClearOnResize),n.getSignaturePad().off()},n.clear=function(){return n.getSignaturePad().clear()},n.isEmpty=function(){return n.getSignaturePad().isEmpty()},n.fromDataURL=function(l,d){return n.getSignaturePad().fromDataURL(l,d)},n.toDataURL=function(l,d){return n.getSignaturePad().toDataURL(l,d)},n.fromData=function(l){return n.getSignaturePad().fromData(l)},n.toData=function(){return n.getSignaturePad().toData()},n}return wh(r)})(N.Component);Pn.propTypes={velocityFilterWeight:P.default.number,minWidth:P.default.number,maxWidth:P.default.number,minDistance:P.default.number,dotSize:P.default.oneOfType([P.default.number,P.default.func]),penColor:P.default.string,throttle:P.default.number,onEnd:P.default.func,onBegin:P.default.func,canvasProps:P.default.object,clearOnResize:P.default.bool};Pn.defaultProps={clearOnResize:!0};Pn.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var zh=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:a})=>{const i=(0,N.useRef)(null),{register:s,handleSubmit:l,control:d,reset:c,watch:u,setValue:f,formState:{errors:v,isSubmitting:m}}=(0,Ue.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),h=u("accepted"),y=u("typedName"),g=u("signatureDataUrl"),p=()=>{c(),r==="DRAW_SIGNATURE"&&i.current?.clear()},b=()=>{p(),e()},C=()=>{i.current?.clear(),f("signatureDataUrl","")},x=$=>{let T="";if(r==="DRAW_SIGNATURE"){const D=i.current;if(D&&!D.isEmpty())T=D.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?$.accepted:!1,typedName:r==="TYPED_NAME"?$.typedName.trim():"",signatureDataUrl:T,emailMe:$.emailMe}),p(),e()},S=!m&&(r==="CHECKBOX_ONLY"?h:r==="TYPED_NAME"?y?.trim().length>2:r==="DRAW_SIGNATURE"?!!g:!1);return(0,o.jsxs)("div",{className:"aaravpos-consent-overlay",children:[(0,o.jsx)("div",{className:"aaravpos-consent-backdrop"}),(0,o.jsxs)("div",{className:"aaravpos-consent-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-consent-header",children:[(0,o.jsx)("h3",{className:"aaravpos-consent-title",children:n||"Consent Form"}),(0,o.jsx)("button",{onClick:b,className:"aaravpos-consent-close-btn",children:(0,o.jsx)(We,{})})]}),(0,o.jsx)("div",{className:"aaravpos-consent-content-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-consent-content-box",children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a},className:"aaravpos-consent-content"})})}),(0,o.jsxs)("form",{onSubmit:l(x),children:[r==="CHECKBOX_ONLY"&&(0,o.jsxs)("label",{className:"aaravpos-consent-checkbox-label",htmlFor:"accepted",children:[(0,o.jsx)("input",{type:"checkbox",...s("accepted",{required:"You must accept terms"}),id:"accepted",className:"aaravpos-consent-checkbox"}),(0,o.jsx)("span",{className:"aaravpos-consent-checkbox-text",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,o.jsxs)("div",{className:"aaravpos-consent-typed-wrapper",children:[(0,o.jsxs)("label",{className:"aaravpos-consent-input-label",htmlFor:"typedName",children:["Full Name",(0,o.jsx)("span",{className:"aaravpos-consent-required",children:"*"})]}),(0,o.jsx)("input",{...s("typedName",{required:"Name is required",validate:$=>$.trim().length>2||"Enter full name"}),id:"typedName",placeholder:"Type your full name",className:`aaravpos-consent-input ${v.typedName?"aaravpos-consent-input-error":"aaravpos-consent-input-normal"}`}),(0,o.jsx)("p",{className:"aaravpos-consent-helper-text",children:"By typing your name, you agree to the consent above"}),v.typedName&&(0,o.jsx)("p",{className:"aaravpos-consent-error",children:v.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,o.jsx)(Ue.Controller,{control:d,name:"signatureDataUrl",rules:{validate:()=>i.current&&!i.current.isEmpty()?!0:"Signature required"},render:({field:$})=>(0,o.jsxs)("div",{className:"aaravpos-consent-signature-wrapper",children:[(0,o.jsx)(Pn,{ref:i,canvasProps:{className:"aaravpos-consent-signature-canvas"},onEnd:()=>{const T=i.current;if(!T)return;const D=T.getCanvas().toDataURL("image/png");$.onChange(D)}}),v.signatureDataUrl&&(0,o.jsx)("p",{className:"aaravpos-consent-error aaravpos-consent-error-signature",children:v.signatureDataUrl.message}),(0,o.jsxs)("div",{className:"aaravpos-consent-signature-actions",children:[(0,o.jsxs)("button",{type:"button",onClick:C,className:"aaravpos-consent-clear-btn",children:[(0,o.jsx)(kp,{size:14}),"Clear"]}),(0,o.jsxs)("label",{className:"aaravpos-consent-email-label",htmlFor:"emailme",children:[(0,o.jsx)("input",{type:"checkbox",...s("emailMe"),id:"emailme",className:"aaravpos-consent-email-checkbox"}),(0,o.jsx)("span",{className:"aaravpos-consent-email-text",children:"Email me"})]})]})]})}),(0,o.jsxs)("div",{className:"aaravpos-consent-footer",children:[(0,o.jsx)("button",{type:"button",onClick:b,className:"aaravpos-consent-cancel-btn",children:"Cancel"}),(0,o.jsxs)("button",{type:"submit",disabled:!S,className:`aaravpos-consent-submit-btn ${S?"aaravpos-consent-submit-active":"aaravpos-consent-submit-disabled"}`,children:[(0,o.jsx)(di,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},hd={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},qh=Te(((e,t)=>{(function(){"use strict";var r={}.hasOwnProperty;function n(){for(var s="",l=0;l<arguments.length;l++){var d=arguments[l];d&&(s=i(s,a(d)))}return s}function a(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var d in s)r.call(s,d)&&s[d]&&(l=i(l,d));return l}function i(s,l){return l?s?s+" "+l:s+l:s}typeof t<"u"&&t.exports?(n.default=n,t.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()}));function Wh(e,t,r){switch(r){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1);break}return{value:e,caret:t}}function Gh(e,t,r){for(var n={},a="",i=0,s=0;s<e.length;){var l=r(e[s],a,n);l!==void 0&&(a+=l,t!==void 0&&(t===s?i=a.length-1:t>s&&(i=a.length))),s++}return t===void 0&&(i=a.length),{value:a,caret:i}}function Hh(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Kh(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kh(e,t){if(e){if(typeof e=="string")return Eo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eo(e,t)}}function Eo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pa(e,t){for(var r=0,n=Hh(t.split("")),a;!(a=n()).done;)a.value===e&&r++;return r}function Yh(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"x",n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",a=e.length,i=Pa("(",e)-Pa(")",e);i>0&&a<t.length;)e+=t[a].replace(r,n),t[a]===")"&&i--,a++;return e}function Xh(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Zh(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zh(e,t){if(e){if(typeof e=="string")return Po(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Po(e,t)}}function Po(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",r=arguments.length>2?arguments[2]:void 0;if(!e)return function(a){return{text:a}};var n=Pa(t,e);return function(a){if(!a)return{text:"",template:e};for(var i=0,s="",l=Xh(e.split("")),d;!(d=l()).done;){var c=d.value;if(c!==t){s+=c;continue}if(s+=a[i],i++,i===a.length&&a.length<n)break}return r&&(s=Yh(s,e)),{text:s,template:e}}}function Qh(e,t,r){typeof r=="string"&&(r=Jh(r));var n=r(e)||{},a=n.text,i=n.template;if(a===void 0&&(a=e),i)if(t===void 0)t=a.length;else{for(var s=0,l=!1,d=-1;s<a.length&&s<i.length;){if(a[s]!==i[s]){if(t===0){l=!0,t=s;break}d=s,t--}s++}l||(t=d+1)}return{text:a,caret:t}}function e1(e){return e.hasAttribute("readonly")}function t1(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}var Oo={Backspace:8,Delete:46};function r1(e){switch(e.keyCode){case Oo.Backspace:return"Backspace";case Oo.Delete:return"Delete"}}function n1(e){return e.selectionStart}function md(e,t){t!==void 0&&(a1()?setTimeout(function(){return e.setSelectionRange(t,t)},0):e.setSelectionRange(t,t))}function a1(){if(typeof navigator<"u")return i1.test(navigator.userAgent)}var i1=/Android/i;function o1(e,t,r,n,a){Oa(t,r,n,void 0,a)}function s1(e,t,r,n,a){if(!e1(t)){var i=r1(e);switch(i){case"Delete":case"Backspace":e.preventDefault();var s=t1(t);return s?(l1(t,s),Oa(t,r,n,void 0,a)):Oa(t,r,n,i,a);default:}}}function l1(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,md(e,t.start)}function Oa(e,t,r,n,a){var i=Gh(e.value,n1(e),t),s=i.value,l=i.caret;if(n){var d=Wh(s,l,n);s=d.value,l=d.caret}var c=Qh(s,l,r),u=c.text;l=c.caret,e.value=u,md(e,l),a&&a(s)}var d1=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function jo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jo(Object(r),!0).forEach(function(n){c1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u1(e,t){if(e==null)return{};var r=f1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f1(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function p1(e){var t=e.ref,r=e.parse,n=e.format,a=e.value,i=e.defaultValue,s=e.controlled,l=s===void 0?!0:s,d=e.onChange,c=e.onKeyDown,u=u1(e,d1),f=(0,N.useRef)(),v=(0,N.useCallback)(function(g){f.current=g,t&&(typeof t=="function"?t(g):t.current=g)},[t]),m=(0,N.useCallback)(function(g){return o1(g,f.current,r,n,d)},[f,r,n,d]),h=(0,N.useCallback)(function(g){if(c&&c(g),!g.defaultPrevented)return s1(g,f.current,r,n,d)},[f,r,n,d,c]),y=ot(ot({},u),{},{ref:v,onChange:m,onKeyDown:h});return l?ot(ot({},y),{},{value:n(To(a)?"":a).text}):ot(ot({},y),{},{defaultValue:n(To(i)?"":i).text})}function To(e){return e==null}var h1=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function m1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(r),!0).forEach(function(n){v1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y1(e,t){if(e==null)return{};var r=g1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g1(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function nn(e,t){var r=e.inputComponent,n=r===void 0?"input":r,a=e.parse,i=e.format,s=e.value,l=e.defaultValue,d=e.onChange,c=e.controlled,u=e.onKeyDown,f=e.type,v=f===void 0?"text":f,m=y1(e,h1),h=p1(m1({ref:t,parse:a,format:i,value:s,defaultValue:l,onChange:d,controlled:c,onKeyDown:u,type:v},m));return N.default.createElement(n,h)}nn=N.default.forwardRef(nn);nn.propTypes={parse:P.default.func.isRequired,format:P.default.func.isRequired,inputComponent:P.default.elementType,type:P.default.string,value:P.default.string,defaultValue:P.default.string,onChange:P.default.func,controlled:P.default.bool,onKeyDown:P.default.func,onCut:P.default.func,onPaste:P.default.func};var $1=nn;function Io(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),a=0;a<3;a++){var i=Number(r[a]),s=Number(n[a]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var b1={}.constructor;function rt(e){return e!=null&&e.constructor===b1}function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,N1(n.key),n)}}function jn(e,t,r){return t&&ko(e.prototype,t),r&&ko(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N1(e){var t=S1(e,"string");return Nt(t)=="symbol"?t:t+""}function S1(e,t){if(Nt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x1="1.2.0",C1="1.7.35",Ro=" ext. ",_1=/^\d+$/,de=(function(){function e(t){On(this,e),vd(t),this.metadata=t,gd.call(this,t)}return jn(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(r){return r!=="001"})}},{key:"getCountryMetadata",value:function(r){return this.metadata.countries[r]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(r){return this.getCountryMetadata(r)!==void 0}},{key:"hasCallingCode",value:function(r){if(this.getCountryCodesForCallingCode(r))return!0;if(this.nonGeographic()){if(this.nonGeographic()[r])return!0}else{var n=this.countryCallingCodes()[r];if(n&&n.length===1&&n[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(r){return this.nonGeographic()?!!this.nonGeographic()[r]:!this.getCountryCodesForCallingCode(r)}},{key:"country",value:function(r){return this.selectNumberingPlan(r)}},{key:"selectNumberingPlan",value:function(r,n){if(r&&_1.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Do(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Do(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(r){var n=this.countryCallingCodes()[r];if(n)return n.length===1&&n[0].length===3?void 0:n}},{key:"getCountryCodeForCallingCode",value:function(r){var n=this.getCountryCodesForCallingCode(r);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(r){var n=this.getCountryCodeForCallingCode(r);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var a=this.nonGeographic()[r];if(a)return a}else{var i=this.countryCallingCodes()[r];if(i&&i.length===1&&i[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(r){return this.numberingPlan.type(r)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(r){return this.selectNumberingPlan(r)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}])})(),Do=(function(){function e(t,r){On(this,e),this.globalMetadataObject=r,this.metadata=t,gd.call(this,r.metadata)}return jn(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(r){return r[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var r=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(n){return new w1(n,r)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(r){return r[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(r){if(this.hasTypes()&&Mo(this.types(),r))return new P1(Mo(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?Ro:this.metadata[13]||Ro}}])})(),w1=(function(){function e(t,r){On(this,e),this._format=t,this.metadata=r}return jn(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!E1.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),E1=/^\(?\$1\)?$/,P1=(function(){function e(t,r){On(this,e),this.type=t,this.metadata=r}return jn(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])})();function Mo(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function vd(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!rt(e)||!rt(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(rt(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+O1(e)+": "+e,"."))}var O1=function(t){return Nt(t)};function Ze(e,t){if(t=new de(t),t.hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function yd(e,t){return t.countries.hasOwnProperty(e)}function gd(e){var t=e.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?Io(t,x1)===-1?this.v2=!0:Io(t,C1)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function j1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=T1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T1(e,t){if(e){if(typeof e=="string")return Lo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lo(e,t):void 0}}function Lo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function A1(e,t){for(var r=e.slice(),n=j1(t),a;!(a=n()).done;){var i=a.value;e.indexOf(i)<0&&r.push(i)}return r.sort(function(s,l){return s-l})}function Tn(e,t,r){return $d(e,t,void 0,r)}function $d(e,t,r,n){t&&(n=new de(n.metadata),n.selectNumberingPlan(t));var a=n.type(r),i=a&&a.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(r==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return $d(e,t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=A1(i,s.possibleLengths()))}else if(r&&!a)return"INVALID_LENGTH";var l=e.length,d=i[0];return d===l?"IS_POSSIBLE":d>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function I1(e,t,r){if(t===void 0&&(t={}),r=new de(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return bd(e.phone||e.nationalNumber,e.country,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function bd(e,t,r){return Tn(e,t,r)==="IS_POSSIBLE"}function ze(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function k1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=R1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R1(e,t){if(e){if(typeof e=="string")return Fo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fo(e,t):void 0}}function Fo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var D1=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function hi(e,t,r){if(t=t||{},!(!e.country&&!e.countryCallingCode)){r=new de(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(ze(n,r.nationalNumberPattern())){if(Qn(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||Qn(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=k1(D1),i;!(i=a()).done;){var s=i.value;if(Qn(n,s,r))return s}}}}function Qn(e,t,r){var n=r.type(t);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0?!1:ze(e,n.pattern())}function M1(e,t,r){return t=t||{},r=new de(r),r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?hi(e,t,r.metadata)!==void 0:ze(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}function L1(e,t,r){var n=new de(r).getCountryCodesForCallingCode(e);return n?n.filter(function(a){return F1(t,a,r)}):[]}function F1(e,t,r){var n=new de(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}var be="0-90-9٠-٩۰-۹",B1="-‐-―−ー-",U1="//",V1="..",z1="  ­​⁠ ",q1="()()[]\\[\\]",W1="~⁓∼~",Re="".concat(B1).concat(U1).concat(V1).concat(z1).concat(q1).concat(W1),An="++",G1=new RegExp("(["+be+"])");function Nd(e,t,r,n){if(t){var a=new de(n);a.selectNumberingPlan(t,r);var i=new RegExp(a.IDDPrefix());if(e.search(i)===0){e=e.slice(e.match(i)[0].length);var s=e.match(G1);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return e}}}function ja(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var a,i,s=n.length-1,l=s>0&&n[s];if(t.nationalPrefixTransformRule()&&l)a=e.replace(r,t.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{var d=n[0];a=e.slice(d.length),l&&(i=n[1])}var c;if(l){var u=e.indexOf(n[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(c=t.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:a,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:e}}function H1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=K1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K1(e,t){if(e){if(typeof e=="string")return Bo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bo(e,t):void 0}}function Bo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sd(e,t){var r=t.countries,n=t.metadata;n=new de(n);for(var a=H1(r),i;!(i=a()).done;){var s=i.value;if(n.selectNumberingPlan(s),n.leadingDigits()){if(e&&e.search(n.leadingDigits())===0)return s}else if(hi({phone:e,country:s},void 0,n.metadata))return s}}var Y1=!1;function mi(e,t){var r=t.nationalNumber,n=t.metadata;if(Y1&&n.isNonGeographicCallingCode(e))return"001";var a=n.getCountryCodesForCallingCode(e);if(a)return a.length===1?a[0]:Sd(r,{countries:a,metadata:n.metadata})}function Ta(e,t,r){var n=ja(e,r),a=n.carrierCode,i=n.nationalNumber;if(i!==e){if(!X1(e,i,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=mi(r.numberingPlan.callingCode(),{nationalNumber:i,metadata:r})),!Z1(i,t,r)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:a}}function X1(e,t,r){return!(ze(e,r.nationalNumberPattern())&&!ze(t,r.nationalNumberPattern()))}function Z1(e,t,r){switch(Tn(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function xd(e,t,r,n,a){var i=t||r?Ze(t||r,a):n;if(e.indexOf(i)===0){a=new de(a),a.selectNumberingPlan(t||r,i);var s=e.slice(i.length),l=Ta(s,t,a).nationalNumber,d=Ta(e,t,a).nationalNumber;if(!ze(d,a.nationalNumberPattern())&&ze(l,a.nationalNumberPattern())||Tn(d,t,a)==="TOO_LONG")return{countryCallingCode:i,number:s}}return{number:e}}function vi(e,t,r,n,a){if(!e)return{};var i;if(e[0]!=="+"){var s=Nd(e,t||r,n,a);if(s&&s!==e)i=!0,e="+"+s;else{if(t||r||n){var l=xd(e,t,r,n,a),d=l.countryCallingCode,c=l.number;if(d)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:d,number:c}}return{number:e}}}if(e[1]==="0")return{};a=new de(a);for(var u=2;u-1<=3&&u<=e.length;){var f=e.slice(1,u);if(a.hasCallingCode(f))return a.selectNumberingPlan(f),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:f,number:e.slice(u)};u++}return{}}function Cd(e){return e.replace(new RegExp("[".concat(Re,"]+"),"g")," ").trim()}var _d=/(\$\d)/;function wd(e,t,r){var n=r.useInternationalFormat,a=r.withNationalPrefix;r.carrierCode,r.metadata;var i=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(_d,t.nationalPrefixFormattingRule()):t.format());return n?Cd(i):i}var J1=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Q1(e,t,r){var n=new de(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(J1.test(n.IDDPrefix()))return n.IDDPrefix()}var em=";ext=",st=function(t){return"([".concat(be,"]{1,").concat(t,"})")};function Ed(e){var t="20",r="15",n="9",a="6",i="[  \\t,]*",s="[:\\..]?[  \\t,-]*",l="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",v="(?:,{2}|;)",m=em+st(t),h=i+d+s+st(t)+l,y=i+c+s+st(n)+l,g=u+st(a)+"#",p=f+v+s+st(r)+l,b=f+"(?:,)+"+s+st(n)+l;return m+"|"+h+"|"+y+"|"+g+"|"+p+"|"+b}var tm="["+be+"]{2}",rm="["+An+"]{0,1}(?:["+Re+"]*["+be+"]){3,}["+Re+be+"]*",nm=new RegExp("^["+An+"]{0,1}(?:["+Re+"]*["+be+"]){1,2}$","i"),am=rm+"(?:"+Ed()+")?",im=new RegExp("^"+tm+"$|^"+am+"$","i");function om(e){return e.length>=2&&im.test(e)}function sm(e){return nm.test(e)}function lm(e){var t=e.number,r=e.ext;if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(r?";ext="+r:"")}var Uo={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function dm(e,t,r,n){if(r?r=fm({},Uo,r):r=Uo,n=new de(n),e.country&&e.country!=="001"){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else if(e.countryCallingCode)n.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var a=n.countryCallingCode(),i=r.v2?e.nationalNumber:e.phone,s;switch(t){case"NATIONAL":return i?(s=an(i,e.carrierCode,"NATIONAL",n,r),ea(s,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return i?(s=an(i,null,"INTERNATIONAL",n,r),s="+".concat(a," ").concat(s),ea(s,e.ext,n,r.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(i);case"RFC3966":return lm({number:"+".concat(a).concat(i),ext:e.ext});case"IDD":if(!r.fromCountry)return;var l=um(i,e.carrierCode,a,r.fromCountry,n);return l?ea(l,e.ext,n,r.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function an(e,t,r,n,a){var i=cm(n.formats(),e);return i?wd(e,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&a&&a.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function cm(e,t){return pm(e,function(r){if(r.leadingDigitsPatterns().length>0){var n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(t.search(n)!==0)return!1}return ze(t,r.pattern())})}function ea(e,t,r,n){return t?n(e,t,r):e}function um(e,t,r,n,a){if(Ze(n,a.metadata)===r){var i=an(e,t,"NATIONAL",a);return r==="1"?r+" "+i:i}var s=Q1(n,void 0,a.metadata);if(s)return"".concat(s," ").concat(r," ").concat(an(e,null,"INTERNATIONAL",a))}function fm(){for(var e=1,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(;e<r.length;){if(r[e])for(var a in r[e])r[0][a]=r[e][a];e++}return r[0]}function pm(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}function Ft(e){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(e)}function Vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vo(Object(r),!0).forEach(function(n){hm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hm(e,t,r){return(t=Pd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pd(n.key),n)}}function vm(e,t,r){return t&&qo(e.prototype,t),r&&qo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pd(e){var t=ym(e,"string");return Ft(t)=="symbol"?t:t+""}function ym(e,t){if(Ft(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gm=!1,Od=(function(){function e(t,r,n){if(mm(this,e),!t)throw new TypeError("First argument is required");if(typeof t!="string")throw new TypeError("First argument must be a string");if(t[0]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(rt(r)&&rt(r.countries)){n=r;var a=t;if(!Nm.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=vi(a,void 0,void 0,void 0,n),s=i.countryCallingCode;if(r=i.number,t=s,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");vd(n);var l=bm(t,n),d=l.country,c=l.countryCallingCode;this.country=d,this.countryCallingCode=c,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}return vm(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:L1(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return I1(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return M1(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new de(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return hi(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return dm(this,r,n?zo(zo({},n),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(r){return this.format("NATIONAL",r)}},{key:"formatInternational",value:function(r){return this.format("INTERNATIONAL",r)}},{key:"getURI",value:function(r){return this.format("RFC3966",r)}}])})(),$m=function(t){return/^[A-Z]{2}$/.test(t)};function bm(e,t){var r,n,a=new de(t);return $m(e)?(r=e,a.selectNumberingPlan(r),n=a.countryCallingCode()):(n=e,gm&&a.isNonGeographicCallingCode(n)&&(r="001")),{country:r,countryCallingCode:n}}var Nm=/^\+\d+$/;function St(e){"@babel/helpers - typeof";return St=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(e)}function Wo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xm(n.key),n)}}function Sm(e,t,r){return t&&Wo(e.prototype,t),r&&Wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xm(e){var t=Cm(e,"string");return St(t)=="symbol"?t:t+""}function Cm(e,t){if(St(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(St(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t,r){return t=Ut(t),Em(e,yi()?Reflect.construct(t,r||[],Ut(e).constructor):t.apply(e,r))}function Em(e,t){if(t&&(St(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pm(e)}function Pm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Om(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bt(e,t)}function Aa(e){var t=typeof Map=="function"?new Map:void 0;return Aa=function(n){if(n===null||!Tm(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return jm(n,arguments,Ut(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Bt(a,n)},Aa(e)}function jm(e,t,r){if(yi())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&Bt(a,r.prototype),a}function yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yi=function(){return!!e})()}function Tm(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Bt(e,t){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Bt(e,t)}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(e)}var Be=(function(e){function t(r){var n;return _m(this,t),n=wm(this,t,[r]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return Om(t,e),Sm(t)})(Aa(Error)),Go=new RegExp("(?:"+Ed()+")$","i");function Am(e){var t=e.search(Go);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Go),a=1;a<n.length;){if(n[a])return{number:r,ext:n[a]};a++}}function Im(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=km(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function km(e,t){if(e){if(typeof e=="string")return Ho(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ho(e,t):void 0}}function Ho(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Rm={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function jd(e){return Rm[e]}function on(e){for(var t="",r=Im(e.split("")),n;!(n=r()).done;){var a=n.value,i=jd(a);i&&(t+=i)}return t}function Dm(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Mm(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
24
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mm(e,t){if(e){if(typeof e=="string")return Ko(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ko(e,t):void 0}}function Ko(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ia(e){for(var t="",r=Dm(e.split("")),n;!(n=r()).done;){var a=n.value;t+=Td(a,t)||""}return t}function Td(e,t,r){if(e==="+"){if(t){typeof r=="function"&&r("end");return}return"+"}return jd(e)}var Yo="(["+be+"]|[\\-\\.\\(\\)]?)",Lm="^\\+"+Yo+"*["+be+"]"+Yo+"*$",Fm=new RegExp(Lm,"g"),ka=be,Bm="["+ka+"]+((\\-)*["+ka+"])*",Um="[a-zA-Z]+((\\-)*["+ka+"])*",Vm="^("+Bm+"\\.)*"+Um+"\\.?$",zm=new RegExp(Vm,"g"),Xo="tel:",Ra=";phone-context=",qm=";isub=";function Wm(e){var t=e.indexOf(Ra);if(t<0)return null;var r=t+Ra.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}function Gm(e){return e===null?!0:e.length===0?!1:Fm.test(e)||zm.test(e)}function Hm(e,t){var r=t.extractFormattedPhoneNumber,n=Wm(e);if(!Gm(n))throw new Be("NOT_A_NUMBER");var a;if(n===null)a=r(e)||"";else{a="",n.charAt(0)==="+"&&(a+=n);var i=e.indexOf(Xo),s;i>=0?s=i+Xo.length:s=0;var l=e.indexOf(Ra);a+=e.substring(s,l)}var d=a.indexOf(qm);if(d>0&&(a=a.substring(0,d)),a!=="")return a}var Km=250,Ym=new RegExp("["+An+be+"]"),Xm=new RegExp("[^"+be+"#]+$"),Zm=!1;function Jm(e,t,r){if(t=t||{},r=new de(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new Be("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=e2(e,t.v2,t.extract),a=n.number,i=n.ext,s=n.error;if(!a){if(t.v2)throw s==="TOO_SHORT"?new Be("TOO_SHORT"):new Be("NOT_A_NUMBER");return{}}var l=r2(a,t.defaultCountry,t.defaultCallingCode,r),d=l.country,c=l.nationalNumber,u=l.countryCallingCode,f=l.countryCallingCodeSource,v=l.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new Be("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new Be("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new Be("TOO_LONG");return{}}if(t.v2){var m=new Od(u,c,r.metadata);return d&&(m.country=d),v&&(m.carrierCode=v),i&&(m.ext=i),m.__countryCallingCodeSource=f,m}var h=(t.extended?r.hasSelectedNumberingPlan():d)?ze(c,r.nationalNumberPattern()):!1;return t.extended?{country:d,countryCallingCode:u,carrierCode:v,valid:h,possible:h?!0:!!(t.extended===!0&&r.possibleLengths()&&bd(c,d,r)),phone:c,ext:i}:h?t2(d,c,i):{}}function Qm(e,t,r){if(e){if(e.length>Km){if(r)throw new Be("TOO_LONG");return}if(t===!1)return e;var n=e.search(Ym);if(!(n<0))return e.slice(n).replace(Xm,"")}}function e2(e,t,r){var n=Hm(e,{extractFormattedPhoneNumber:function(s){return Qm(s,r,t)}});if(!n)return{};if(!om(n))return sm(n)?{error:"TOO_SHORT"}:{};var a=Am(n);return a.ext?a:{number:n}}function t2(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function r2(e,t,r,n){var a=vi(Ia(e),void 0,t,r,n.metadata),i=a.countryCallingCodeSource,s=a.countryCallingCode,l=a.number,d;if(s)n.selectNumberingPlan(s);else if(l&&(t||r))n.selectNumberingPlan(t,r),t?d=t:Zm&&n.isNonGeographicCallingCode(r)&&(d="001"),s=r||Ze(t,n.metadata);else return{};if(!l)return{countryCallingCodeSource:i,countryCallingCode:s};var c=Ta(Ia(l),d,n),u=c.nationalNumber,f=c.carrierCode,v=mi(s,{nationalNumber:u,metadata:n});return v&&(d=v,v==="001"||n.selectNumberingPlan(d)),{country:d,countryCallingCode:s,countryCallingCodeSource:i,nationalNumber:u,carrierCode:f}}function Vt(e){"@babel/helpers - typeof";return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(e)}function Zo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zo(Object(r),!0).forEach(function(n){n2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n2(e,t,r){return(t=a2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a2(e){var t=i2(e,"string");return Vt(t)=="symbol"?t:t+""}function i2(e,t){if(Vt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o2(e,t,r){return Jm(e,Jo(Jo({},t),{},{v2:!0}),r)}function zt(e){"@babel/helpers - typeof";return zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(e)}function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qo(Object(r),!0).forEach(function(n){l2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l2(e,t,r){return(t=d2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d2(e){var t=c2(e,"string");return zt(t)=="symbol"?t:t+""}function c2(e,t){if(zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u2(e,t){return m2(e)||h2(e,t)||p2(e,t)||f2()}function f2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p2(e,t){if(e){if(typeof e=="string")return es(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?es(e,t):void 0}}function es(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],d=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(u){c=!0,a=u}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return l}}function m2(e){if(Array.isArray(e))return e}function Ad(e){var t=u2(Array.prototype.slice.call(e),4),r=t[0],n=t[1],a=t[2],i=t[3],s,l,d;if(typeof r=="string")s=r;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")i?(l=a,d=i):(l=void 0,d=a),n&&(l=s2({defaultCountry:n},l));else if(rt(n))a?(l=n,d=a):d=n;else throw new Error("Invalid second argument: ".concat(n));return{text:s,options:l,metadata:d}}function qt(e){"@babel/helpers - typeof";return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(e)}function ts(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ts(Object(r),!0).forEach(function(n){v2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ts(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v2(e,t,r){return(t=y2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y2(e){var t=g2(e,"string");return qt(t)=="symbol"?t:t+""}function g2(e,t){if(qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Id(e,t,r){t&&t.defaultCountry&&!yd(t.defaultCountry,r)&&(t=rs(rs({},t),{},{defaultCountry:void 0}));try{return o2(e,t,r)}catch(n){if(!(n instanceof Be))throw n}}function $2(){var e=Ad(arguments),t=e.text,r=e.options,n=e.metadata;return Id(t,r,n)}function Wt(e){"@babel/helpers - typeof";return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(e)}function ns(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function as(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ns(Object(r),!0).forEach(function(n){b2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ns(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b2(e,t,r){return(t=N2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N2(e){var t=S2(e,"string");return Wt(t)=="symbol"?t:t+""}function S2(e,t){if(Wt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x2(){var e=Ad(arguments),t=e.text,r=e.options,n=e.metadata;r=as(as({},r),{},{extract:!1});var a=Id(t,r,n);return a&&a.isValid()||!1}function Gt(e){"@babel/helpers - typeof";return Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(e)}function C2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w2(n.key),n)}}function _2(e,t,r){return t&&is(e.prototype,t),r&&is(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function w2(e){var t=E2(e,"string");return Gt(t)=="symbol"?t:t+""}function E2(e,t){if(Gt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P2=(function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;C2(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return _2(e,[{key:"reset",value:function(r){var n=r.country,a=r.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(n,a)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(r){for(var n=0,a=Object.keys(r);n<a.length;n++){var i=a[n];this[i]=r[i]}}},{key:"initCountryAndCallingCode",value:function(r,n){this.setCountry(r),this.setCallingCode(n)}},{key:"setCountry",value:function(r){this.country=r,this.onCountryChange(r)}},{key:"setCallingCode",value:function(r){this.callingCode=r,this.onCallingCodeChange(r,this.country)}},{key:"startInternationalNumber",value:function(r,n){this.international=!0,this.initCountryAndCallingCode(r,n)}},{key:"appendDigits",value:function(r){this.digits+=r}},{key:"appendNationalSignificantNumberDigits",value:function(r){this.nationalSignificantNumber+=r}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])})();function O2(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=j2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j2(e,t){if(e){if(typeof e=="string")return os(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?os(e,t):void 0}}function os(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ta=new RegExp("x");function Fr(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function ss(e,t){return e[t]===")"&&t++,T2(e.slice(0,t))}function T2(e){for(var t=[],r=0;r<e.length;)e[r]==="("?t.push(r):e[r]===")"&&t.pop(),r++;var n=0,a="";t.push(e.length);for(var i=0,s=t;i<s.length;i++){var l=s[i];a+=e.slice(n,l),n=l+1}return a}function A2(e,t,r){for(var n=O2(r.split("")),a;!(a=n()).done;){var i=a.value;if(e.slice(t+1).search(ta)<0)return;t=e.search(ta),e=e.replace(ta,i)}return[e,t]}function I2(e,t,r){var n=r.metadata,a=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return R2(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:i})}function k2(e,t,r){return Tn(e,t,r)==="IS_POSSIBLE"}function R2(e,t,r){var n=r.metadata,a=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,a(t)){var s=ls(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:i,metadata:n});if(s)return s}return ls(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:i,metadata:n})}function ls(e,t,r){var n=r.metadata,a=r.useNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix,s=wd(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:n});if(a||(e.nationalPrefix?s=e.nationalPrefix+i(t)+s:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(s=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+s)),D2(s,e))return s}function D2(e,t){return on(e)===t.getNationalDigits()}function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(e)}function M2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ds(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F2(n.key),n)}}function L2(e,t,r){return t&&ds(e.prototype,t),r&&ds(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function F2(e){var t=B2(e,"string");return Ht(t)=="symbol"?t:t+""}function B2(e,t){if(Ht(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ht(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U2=(function(){function e(){M2(this,e)}return L2(e,[{key:"parse",value:function(r){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(r),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var n=this.context[0],a=n.branches,i=n.instructions;if(a)return{op:"|",args:a.concat([ra(i)])};if(i.length===0)throw new Error("Pattern is required");return i.length===1?i[0]:i}},{key:"startContext",value:function(r){this.context.push(r)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(r){if(!r)throw new Error("Pattern is required");var n=r.match(q2);if(!n){if(z2.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var a=n[1],i=r.slice(0,n.index),s=r.slice(n.index+a.length);switch(a){case"(?:":i&&this.parsePattern(i),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(i&&this.parsePattern(i),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var l=this.getContext().branches;l.push(ra(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:l});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(i&&this.parsePattern(i),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(ra(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":i&&this.parsePattern(i),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:V2(i)});break;default:throw new Error("Unknown operator: ".concat(a))}s&&this.parsePattern(s)}}])})();function V2(e){for(var t=[],r=0;r<e.length;){if(e[r]==="-"){if(r===0||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,a=e[r+1].charCodeAt(0)-1,i=n;i<=a;)t.push(String.fromCharCode(i)),i++}else t.push(e[r]);r++}return t}var z2=/[\(\)\[\]\?\:\|]/,q2=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function ra(e){return e.length===1?e[0]:e}function cs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=W2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W2(e,t){if(e){if(typeof e=="string")return us(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?us(e,t):void 0}}function us(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Kt(e){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kt(e)}function G2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,K2(n.key),n)}}function H2(e,t,r){return t&&fs(e.prototype,t),r&&fs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function K2(e){var t=Y2(e,"string");return Kt(t)=="symbol"?t:t+""}function Y2(e,t){if(Kt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X2=(function(){function e(t){G2(this,e),this.matchTree=new U2().parse(t)}return H2(e,[{key:"match",value:function(r){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).allowOverflow;if(!r)throw new Error("String is required");var a=Da(r.split(""),this.matchTree,!0);if(a&&a.match&&delete a.matchedChars,!(a&&a.overflow&&!n))return a}}])})();function Da(e,t,r){if(typeof t=="string"){var n=e.join("");return t.indexOf(n)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:n.indexOf(t)===0?r&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var a=e.slice(),i=0;i<t.length;){var s=t[i],l=Da(a,s,r&&i===t.length-1);if(l){if(l.overflow)return l;if(l.match){if(a=a.slice(l.matchedChars.length),a.length===0)return i===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(l.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
28
- `.concat(JSON.stringify(l,null,2)))}}else return;i++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-a.length)}}switch(t.op){case"|":for(var d,c=cs(t.args),u;!(u=c()).done;){var f=u.value,v=Da(e,f,r);if(v){if(v.overflow)return v;if(v.match)return{match:!0,matchedChars:v.matchedChars};if(v.partialMatch)d=!0;else throw new Error(`Unsupported match result:
29
- `.concat(JSON.stringify(v,null,2)))}}return d?{partialMatch:!0}:void 0;case"[]":for(var m=cs(t.args),h;!(h=m()).done;){var y=h.value;if(e[0]===y)return e.length===1?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[y]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function Yt(e){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(e)}function ps(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Z2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z2(e,t){if(e){if(typeof e=="string")return hs(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hs(e,t):void 0}}function hs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function J2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ev(n.key),n)}}function Q2(e,t,r){return t&&ms(e.prototype,t),r&&ms(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ev(e){var t=tv(e,"string");return Yt(t)=="symbol"?t:t+""}function tv(e,t){if(Yt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ma="9",rv=Fr(Ma,15),nv=/[- ]/,sn=!0,av=sn&&function(){return/\[([^\[\]])*\]/g},iv=sn&&function(){return/\d(?=[^,}][^,}])/g},ov=new RegExp("["+Re+"]*\\$1["+Re+"]*(\\$\\d["+Re+"]*)*$"),vs=3,sv=(function(){function e(t){t.state;var r=t.metadata;J2(this,e),this.metadata=r,this.resetFormat()}return Q2(e,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(r,n){this.resetFormat(),r?(this.isNANP=r.callingCode()==="1",this.matchingFormats=r.formats(),n.nationalSignificantNumber&&this.narrowDownMatchingFormats(n)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(r,n){var a=this;if(k2(n.nationalSignificantNumber,n.country,this.metadata))for(var i=ps(this.matchingFormats),s;!(s=i()).done;){var l=s.value,d=I2(n,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return a.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return a.getSeparatorAfterNationalPrefix(u)}});if(d)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(d.replace(/\d/g,"x"),n),this.populatedNationalNumberTemplate=d,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),d}return this.formatNationalNumberWithNextDigits(r,n)}},{key:"formatNationalNumberWithNextDigits",value:function(r,n){var a=this.chosenFormat,i=this.chooseFormat(n);if(i)return i===a?this.formatNextNationalNumberDigits(r):this.formatNextNationalNumberDigits(n.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(r){var n=this,a=r.nationalSignificantNumber,i=r.nationalPrefix,s=r.international,l=a,d=l.length-vs;d<0&&(d=0),this.matchingFormats=this.matchingFormats.filter(function(c){return n.formatSuits(c,s,i)&&n.formatMatches(c,l,d)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(r,n,a){return!(a&&!r.usesNationalPrefix()&&!r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!n&&!a&&r.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(r,n,a){var i=r.leadingDigitsPatterns().length;if(i===0)return!0;a=Math.min(a,i-1);var s=r.leadingDigitsPatterns()[a];if(n.length<vs)try{return new X2(s).match(n,{allowOverflow:!0})!==void 0}catch(l){return console.error(l),!0}return new RegExp("^(".concat(s,")")).test(n)}},{key:"getFormatFormat",value:function(r,n){return n?r.internationalFormat():r.format()}},{key:"chooseFormat",value:function(r){for(var n=this,a=function(){var c=l.value;return n.chosenFormat===c?0:ov.test(n.getFormatFormat(c,r.international))?n.createTemplateForFormat(c,r)?(n.chosenFormat=c,0):(n.matchingFormats=n.matchingFormats.filter(function(u){return u!==c}),1):1},i,s=ps(this.matchingFormats.slice()),l;!(l=s()).done&&(i=a(),i!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(sn&&r.pattern().indexOf("|")>=0)){var a=this.getTemplateForFormat(r,n);if(a)return this.setNationalNumberTemplate(a,n),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(r){return this.isNANP||r&&r.nationalPrefixFormattingRule()&&nv.test(r.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(r,n){var a=r.IDDPrefix,i=r.missingPlus;return a?n&&n.spacing===!1?a:a+" ":i?"":"+"}},{key:"getTemplate",value:function(r){if(this.template){for(var n=-1,a=0,i=r.international?this.getInternationalPrefixBeforeCountryCallingCode(r,{spacing:!1}):"";a<i.length+r.getDigitsWithoutInternationalPrefix().length;)n=this.template.indexOf("x",n+1),a++;return ss(this.template,n+1)}}},{key:"setNationalNumberTemplate",value:function(r,n){this.nationalNumberTemplate=r,this.populatedNationalNumberTemplate=r,this.populatedNationalNumberTemplatePosition=-1,n.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,"x")+Fr("x",n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var a=n.nationalSignificantNumber,i=n.international,s=n.nationalPrefix,l=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,d=r.pattern();sn&&(d=d.replace(av(),"\\d").replace(iv(),"\\d"));var c=rv.match(d)[0];if(!(a.length>c.length)){var u=new RegExp("^"+d+"$"),f=a.replace(/\d/g,Ma);u.test(f)&&(c=f);var v=this.getFormatFormat(r,i),m;if(this.shouldTryNationalPrefixFormattingRule(r,{international:i,nationalPrefix:s})){var h=v.replace(_d,r.nationalPrefixFormattingRule());if(on(r.nationalPrefixFormattingRule())===(s||"")+on("$1")&&(v=h,m=!0,s))for(var y=s.length;y>0;)v=v.replace(/\d/,"x"),y--}var g=c.replace(new RegExp(d),v).replace(new RegExp(Ma,"g"),"x");return m||(l?g=Fr("x",l.length)+" "+g:s&&(g=Fr("x",s.length)+this.getSeparatorAfterNationalPrefix(r)+g)),i&&(g=Cd(g)),g}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=A2(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],ss(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(r,n){var a=n.international,i=n.nationalPrefix;if(r.nationalPrefixFormattingRule()){var s=r.usesNationalPrefix();if(s&&i||!s&&!a)return!0}}}])})();function Xt(e){"@babel/helpers - typeof";return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(e)}function kd(e,t){return uv(e)||cv(e,t)||dv(e,t)||lv()}function lv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dv(e,t){if(e){if(typeof e=="string")return ys(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ys(e,t):void 0}}function ys(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],d=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(u){c=!0,a=u}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return l}}function uv(e){if(Array.isArray(e))return e}function fv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hv(n.key),n)}}function pv(e,t,r){return t&&gs(e.prototype,t),r&&gs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hv(e){var t=mv(e,"string");return Xt(t)=="symbol"?t:t+""}function mv(e,t){if(Xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vv="["+Re+be+"]+",yv=new RegExp("^"+vv+"$","i"),gv="(?:["+An+"]["+Re+be+"]*|["+Re+be+"]+)",$v=new RegExp("[^"+Re+be+"]+.*$"),bv=/[^\d\[\]]/,Nv=(function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,a=t.metadata,i=t.onNationalSignificantNumberChange;fv(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=a,this.onNationalSignificantNumberChange=i}return pv(e,[{key:"input",value:function(r,n){var a=kd(Cv(r),2),i=a[0],s=a[1],l=on(i),d;return s&&(n.digits||(n.startInternationalNumber(void 0,void 0),l||(d=!0))),l&&this.inputDigits(l,n),{digits:l,justLeadingPlus:d}}},{key:"inputDigits",value:function(r,n){var a=n.digits,i=a.length<3&&a.length+r.length>=3;if(n.appendDigits(r),i&&this.extractIddPrefix(n),this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n))return}else n.appendNationalSignificantNumberDigits(r);n.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(n.getNationalDigits(),function(s){return n.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(r){var n=r.international,a=r.callingCode;return n&&!a}},{key:"extractCountryCallingCode",value:function(r){var n=vi("+"+r.getDigitsWithoutInternationalPrefix(),r.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),a=n.countryCallingCode,i=n.number;if(a)return r.setCallingCode(a),r.update({nationalSignificantNumber:i}),!0}},{key:"reset",value:function(r){if(r){this.hasSelectedNumberingPlan=!0;var n=r._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&bv.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(this.hasSelectedNumberingPlan){var a=ja(r,this.metadata),i=a.nationalPrefix,s=a.nationalNumber,l=a.carrierCode;if(s!==r)return this.onExtractedNationalNumber(i,l,s,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,a){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,a);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var i=ja(r,this.metadata),s=i.nationalPrefix,l=i.nationalNumber,d=i.carrierCode;if(l!==n)return this.onExtractedNationalNumber(s,d,l,r,a),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,a,i,s){var l=!1,d,c=i.lastIndexOf(a);if(c<0||c!==i.length-a.length)l=!0;else{var u=i.slice(0,c);u&&u!==r&&(d=u)}s({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:a,nationalSignificantNumberIsModified:l,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:d}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(r){if(this.extractAnotherNationalSignificantNumber(r.getNationalDigits(),r.nationalSignificantNumber,function(n){return r.update(n)}))return!0;if(this.extractIddPrefix(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0;if(this.fixMissingPlus(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0}},{key:"extractIddPrefix",value:function(r){var n=r.international,a=r.IDDPrefix,i=r.digits;if(r.nationalSignificantNumber,!(n||a)){var s=Nd(i,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==i)return r.update({IDDPrefix:i.slice(0,i.length-s.length)}),this.startInternationalNumber(r,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(r){if(!r.international){var n=xd(r.digits,r.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(n)return r.update({missingPlus:!0}),this.startInternationalNumber(r,{country:r.country,callingCode:n}),!0}}},{key:"startInternationalNumber",value:function(r,n){var a=n.country,i=n.callingCode;r.startInternationalNumber(a,i),r.nationalSignificantNumber&&(r.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(r){this.extractCountryCallingCode(r)&&this.extractNationalSignificantNumber(r.getNationalDigits(),function(n){return r.update(n)})}}])})();function Sv(e){var t=e.search(gv);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace($v,""),r&&(e="+"+e),e}}function xv(e){var t=Sv(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function Cv(e){var t=kd(xv(e),2),r=t[0],n=t[1];return yv.test(r)||(r=""),[r,n]}function Zt(e){"@babel/helpers - typeof";return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(e)}function _v(e,t){return Ov(e)||Pv(e,t)||Ev(e,t)||wv()}function wv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ev(e,t){if(e){if(typeof e=="string")return $s(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$s(e,t):void 0}}function $s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Pv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],d=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(u){c=!0,a=u}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return l}}function Ov(e){if(Array.isArray(e))return e}function jv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Av(n.key),n)}}function Tv(e,t,r){return t&&bs(e.prototype,t),r&&bs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Av(e){var t=Iv(e,"string");return Zt(t)=="symbol"?t:t+""}function Iv(e,t){if(Zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ns=!1,Ot=(function(){function e(t,r){jv(this,e),this.metadata=new de(r);var n=_v(this.getCountryAndCallingCode(t),2),a=n[0],i=n[1];this.defaultCountry=a,this.defaultCallingCode=i,this.reset()}return Tv(e,[{key:"getCountryAndCallingCode",value:function(r){var n,a;return r&&(rt(r)?(n=r.defaultCountry,a=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),a&&Ns&&this.metadata.isNonGeographicCallingCode(a)&&(n="001"),[n,a]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),a=n.digits;if(n.justLeadingPlus)this.formattedOutput="+";else if(a){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var i;if(this.metadata.hasSelectedNumberingPlan()&&(i=this.formatter.format(a,this.state)),i===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var s=this.state.getNationalDigits();s&&(i=this.formatter.format(s,this.state))}this.formattedOutput=i?this.getFullNumber(i):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new P2({onCountryChange:function(a){r.country=a},onCallingCodeChange:function(a,i){r.metadata.selectNumberingPlan(i,a),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new sv({state:this.state,metadata:this.metadata}),this.parser=new Nv({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){r.determineTheCountryIfNeeded(),r.formatter.reset(r.metadata.numberingPlan,r.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){var r=this.state.country;if(!(Ns&&r==="001"))return r}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(r){var n=this;if(this.isInternational()){var a=function(l){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!l})+l},i=this.state.callingCode;return a(i?r?"".concat(i," ").concat(r):i:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,a=r.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,i=r.nationalPrefix,s=n,l=a||i;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var r=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(r?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var r=this.getNonFormattedNumber();if(r)return r.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var r=this.state.callingCode,n=this.metadata.getCountryCodesForCallingCode(r);return n&&n.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(mi(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var r=this.state,n=r.digits,a=r.callingCode,i=r.country,s=r.nationalSignificantNumber;if(n){if(this.isInternational())return a?"+"+a+s:"+"+n;if(i||a)return"+"+(i?this.metadata.countryCallingCode():a)+s}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,a=r.carrierCode,i=r.callingCode,s=this._getCountry();if(n&&!(!s&&!i)){if(s&&s===this.defaultCountry){var l=new de(this.metadata.metadata);l.selectNumberingPlan(s);var d=l.numberingPlan.callingCode(),c=this.metadata.getCountryCodesForCallingCode(d);if(c.length>1){var u=Sd(n,{countries:c,metadata:this.metadata.metadata});u&&(s=u)}}var f=new Od(s||i,n,this.metadata.metadata);return a&&(f.carrierCode=a),f}}},{key:"isPossible",value:function(){var r=this.getNumber();return r?r.isPossible():!1}},{key:"isValid",value:function(){var r=this.getNumber();return r?r.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])})();function Ss(e){return new de(e).getCountries()}function kv(e,t,r){return r||(r=t,t=void 0),new Ot(t,r).input(e)}var ln=Qt(qh(),1);function Rd(e){var t=e.inputFormat,r=e.country,n=e.metadata;return t==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(Ze(r,n)):""}function La(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}function Rv(e,t,r){if(!(r&&r.ignoreRest))return Td(e,t,function(a){r&&a==="end"&&(r.ignoreRest=!0)})}function Dd(e){var t=e.onKeyDown,r=e.inputFormat;return(0,N.useCallback)(function(n){if(n.keyCode===Mv&&r==="INTERNATIONAL"&&n.target instanceof HTMLInputElement&&Dv(n.target)===Lv.length){n.preventDefault();return}t&&t(n)},[t,r])}function Dv(e){return e.selectionStart}var Mv=8,Lv="+",Fv=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fa.apply(this,arguments)}function Bv(e,t){if(e==null)return{};var r=Uv(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uv(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Vv(e){function t(r,n){var a=r.onKeyDown,i=r.country,s=r.inputFormat,l=r.metadata,d=l===void 0?e:l;r.international,r.withCountryCallingCode;var c=Bv(r,Fv),u=(0,N.useCallback)(function(v){var m=new Ot(i,d),h=Rd({inputFormat:s,country:i,metadata:d}),y=m.input(h+v),g=m.getTemplate();return h&&(y=La(y,h),g&&(g=La(g,h))),{text:y,template:g}},[i,d]),f=Dd({onKeyDown:a,inputFormat:s});return N.default.createElement($1,Fa({},c,{ref:n,parse:Rv,format:u,onKeyDown:f}))}return t=N.default.forwardRef(t),t.propTypes={value:P.default.string.isRequired,onChange:P.default.func.isRequired,onKeyDown:P.default.func,country:P.default.string,inputFormat:P.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:P.default.object},t}var zv=Vv(),qv=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ba.apply(this,arguments)}function Wv(e,t){if(e==null)return{};var r=Gv(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gv(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Hv(e){function t(r,n){var a=r.value,i=r.onChange,s=r.onKeyDown,l=r.country,d=r.inputFormat,c=r.metadata,u=c===void 0?e:c,f=r.inputComponent,v=f===void 0?"input":f;r.international,r.withCountryCallingCode;var m=Wv(r,qv),h=Rd({inputFormat:d,country:l,metadata:u}),y=(0,N.useCallback)(function(p){var b=Ia(p.target.value);b===a&&xs(h,b,l,u).indexOf(p.target.value)===0&&(b=b.slice(0,-1)),i(b)},[h,a,i,l,u]),g=Dd({onKeyDown:s,inputFormat:d});return N.default.createElement(v,Ba({},m,{ref:n,value:xs(h,a,l,u),onChange:y,onKeyDown:g}))}return t=N.default.forwardRef(t),t.propTypes={value:P.default.string.isRequired,onChange:P.default.func.isRequired,onKeyDown:P.default.func,country:P.default.string,inputFormat:P.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:P.default.object,inputComponent:P.default.elementType},t}var Kv=Hv();function xs(e,t,r,n){return La(kv(e+t,r,n),e)}function Yv(e){return Cs(e[0])+Cs(e[1])}function Cs(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var Xv=["value","onChange","options","disabled","readOnly"],Zv=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function Jv(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Qv(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qv(e,t){if(e){if(typeof e=="string")return _s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _s(e,t)}}function _s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dn.apply(this,arguments)}function Md(e,t){if(e==null)return{};var r=ey(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ey(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Ld(e){var t=e.value,r=e.onChange,n=e.options,a=e.disabled,i=e.readOnly,s=Md(e,Xv),l=(0,N.useCallback)(function(d){var c=d.target.value;r(c==="ZZ"?void 0:c)},[r]);return(0,N.useMemo)(function(){return Bd(n,t)},[n,t]),N.default.createElement("select",dn({},s,{disabled:a||i,readOnly:i,value:t||"ZZ",onChange:l}),n.map(function(d){var c=d.value,u=d.label,f=d.divider;return N.default.createElement("option",{key:f?"|":c||"ZZ",value:f?"|":c||"ZZ",disabled:!!f,style:f?ty:void 0},u)}))}Ld.propTypes={value:P.default.string,onChange:P.default.func.isRequired,options:P.default.arrayOf(P.default.shape({value:P.default.string,label:P.default.string,divider:P.default.bool})).isRequired,disabled:P.default.bool,readOnly:P.default.bool};var ty={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function Fd(e){var t=e.value,r=e.options,n=e.className,a=e.iconComponent;e.getIconAspectRatio;var i=e.arrowComponent,s=i===void 0?ry:i,l=e.unicodeFlags,d=Md(e,Zv),c=(0,N.useMemo)(function(){return Bd(r,t)},[r,t]);return N.default.createElement("div",{className:"PhoneInputCountry"},N.default.createElement(Ld,dn({},d,{value:t,options:r,className:(0,ln.default)("PhoneInputCountrySelect",n)})),c&&(l&&t?N.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},Yv(t)):N.default.createElement(a,{"aria-hidden":!0,country:t,label:c.label,aspectRatio:l?1:void 0})),N.default.createElement(s,null))}Fd.propTypes={iconComponent:P.default.elementType,arrowComponent:P.default.elementType,unicodeFlags:P.default.bool};function ry(){return N.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function Bd(e,t){for(var r=Jv(e),n;!(n=r()).done;){var a=n.value;if(!a.divider&&ny(a.value,t))return a}}function ny(e,t){return e==null?t==null:e===t}var ay=["country","countryName","flags","flagUrl"];function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ua.apply(this,arguments)}function iy(e,t){if(e==null)return{};var r=oy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function gi(e){var t=e.country,r=e.countryName,n=e.flags,a=e.flagUrl,i=iy(e,ay);return n&&n[t]?n[t]({title:r}):N.default.createElement("img",Ua({},i,{alt:r,role:r?void 0:"presentation",src:a.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}gi.propTypes={country:P.default.string.isRequired,countryName:P.default.string.isRequired,flags:P.default.objectOf(P.default.elementType),flagUrl:P.default.string.isRequired};var sy=["aspectRatio"],ly=["title"],dy=["title"];function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cn.apply(this,arguments)}function $i(e,t){if(e==null)return{};var r=cy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function In(e){var t=e.aspectRatio,r=$i(e,sy);return t===1?N.default.createElement(Vd,r):N.default.createElement(Ud,r)}In.propTypes={title:P.default.string.isRequired,aspectRatio:P.default.number};function Ud(e){var t=e.title,r=$i(e,ly);return N.default.createElement("svg",cn({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),N.default.createElement("title",null,t),N.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},N.default.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),N.default.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),N.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),N.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),N.default.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),N.default.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),N.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}Ud.propTypes={title:P.default.string.isRequired};function Vd(e){var t=e.title,r=$i(e,dy);return N.default.createElement("svg",cn({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),N.default.createElement("title",null,t),N.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},N.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),N.default.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),N.default.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),N.default.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),N.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),N.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),N.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}Vd.propTypes={title:P.default.string.isRequired};function uy(e){if(e.length<2||e[0]!=="+")return!1;for(var t=1;t<e.length;){var r=e.charCodeAt(t);if(!(r>=48&&r<=57))return!1;t++}return!0}function zd(e){uy(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function fy(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=py(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
34
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function py(e,t){if(e){if(typeof e=="string")return ws(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ws(e,t)}}function ws(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hy(e,t){if(!t)return e;for(var r=[],n=[],a=r,i=function(){var c=l.value;if(c==="|")a.push({divider:!0});else if(c==="..."||c==="…")a=n;else{var u;c==="🌐"?u=void 0:u=c;var f=e.indexOf(e.filter(function(m){return m.value===u})[0]),v=e[f];e.splice(f,1),a.push(v)}},s=fy(t),l;!(l=s()).done;)i();return r.concat(e).concat(n)}function my(e,t){if(e&&(e=e.filter(function(r){switch(r){case"🌐":case"|":case"...":case"…":return!0;default:return kn(r,t)}}),e.length>0))return e}function kn(e,t){return yd(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function qd(e,t){return e&&(e=e.filter(function(r){return kn(r,t)}),e.length===0&&(e=void 0)),e}var vy=["country","label","aspectRatio"];function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}function yy(e,t){if(e==null)return{};var r=gy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Wd(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,a=e.internationalIcon;function i(s){var l=s.country,d=s.label,c=s.aspectRatio,u=yy(s,vy),f=a===In?c:void 0;return N.default.createElement("div",Va({},u,{className:(0,ln.default)("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":f===1,"PhoneInputCountryIcon--border":l})}),l?N.default.createElement(n,{country:l,countryName:d,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):N.default.createElement(a,{title:d,aspectRatio:f,className:"PhoneInputCountryIconImg"}))}return i.propTypes={country:P.default.string,label:P.default.string.isRequired,aspectRatio:P.default.number},i}var _g=Wd({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:gi,internationalIcon:In});function $y(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=by(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
35
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function by(e,t){if(e){if(typeof e=="string")return Es(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Es(e,t)}}function Es(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ny(e,t){for(var r=$y(e),n;!(n=r()).done;){var a=n.value;a&&Sy(a,t)}}function Sy(e,t){typeof e=="function"?e(t):e.current=t}var Gd=P.default.shape({country_calling_codes:P.default.object.isRequired,countries:P.default.object.isRequired}),Hd=P.default.objectOf(P.default.string);function Ve(e,t){return"+"+Ze(e,t)}function xy(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,a=e.getAnyCountry,i=e.countries,s=e.required,l=e.metadata,d;return r&&r.country?d=r.country:n&&(!t||mt(t,n,l))&&(d=n),i&&i.indexOf(d)<0&&(d=void 0),!d&&s&&i&&i.length>0&&(d=a()),d}function Cy(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,a=e.compareStringsLocales,i=e.compareStrings;i||(i=Ty);var s=t.map(function(l){return{value:l,label:r[l]||l}});return s.sort(function(l,d){return i(l.label,d.label,a)}),n&&s.unshift({label:r.ZZ}),s}function Kd(e,t){return $2(e||"",t)}function _y(e){return e.formatNational().replace(/\D/g,"")}function wy(e,t){var r=t.prevCountry,n=t.newCountry,a=t.metadata,i=t.useNationalFormat;if(r===n)return e;if(!e)return i?"":n?Ve(n,a):"";if(n){if(e[0]==="+"){if(i)return e.indexOf("+"+Ze(n,a))===0?Ay(e,n,a):"";if(r){var s=Ve(n,a);return e.indexOf(s)===0?e:s}else{var l=Ve(n,a);return e.indexOf(l)===0?e:l}}}else if(e[0]!=="+")return dt(e,r,a)||"";return e}function dt(e,t,r){if(e){if(e[0]==="+"){if(e==="+")return;var n=new Ot(t,r);return n.input(e),n.getNumberValue()}if(t){var a=Xd(e,t,r);return"+".concat(Ze(t,r)).concat(a||"")}}}function Ey(e,t,r){var n=Xd(e,t,r);if(n){var a=n.length-Py(t,r);if(a>0)return e.slice(0,e.length-a)}return e}function Py(e,t){return t=new de(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Yd(e,t){var r=t.country,n=t.countries,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.required,l=t.metadata;if(e==="+")return r;var d=jy(e,l);if(d)return!n||n.indexOf(d)>=0?d:void 0;if(r){if(mt(e,r,l)){if(i&&mt(e,i,l))return i;if(a&&mt(e,a,l))return a;if(!s)return}else if(!s)return}return r}function Oy(e,t){var r=t.prevPhoneDigits,n=t.country,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.countryRequired,l=t.getAnyCountry,d=t.countries,c=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,v=t.metadata;if(c&&f===!1&&n){var m=Ve(n,v);if(e.indexOf(m)!==0){var h;return e&&e[0]!=="+"?(e=m+e,h=dt(e,n,v)):e=m,{phoneDigits:e,value:h,country:n}}}c===!1&&n&&e&&e[0]==="+"&&(e=Ps(e,n,v)),e&&n&&u&&(e=Ey(e,n,v)),e&&e[0]!=="+"&&(!n||c)&&(e="+"+e),!e&&r&&r[0]==="+"&&(c?n=void 0:n=a),e==="+"&&r&&r[0]==="+"&&r.length>1&&(n=void 0);var y;return e&&(e[0]==="+"&&(e==="+"||n&&Ve(n,v).indexOf(e)===0)?y=void 0:y=dt(e,n,v)),y&&(n=Yd(y,{country:n,countries:d,defaultCountry:a,latestCountrySelectedByUser:i,required:!1,metadata:v}),c===!1&&n&&e&&e[0]==="+"&&(e=Ps(e,n,v),y=dt(e,n,v))),!n&&s&&(n=a||l()),{phoneDigits:e,country:n,value:y}}function Ps(e,t,r){if(e.indexOf(Ve(t,r))===0){var n=new Ot(t,r);n.input(e);var a=n.getNumber();return a?a.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function jy(e,t){var r=new Ot(null,t);return r.input(e),r.getCountry()}function Ty(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function Ay(e,t,r){if(t){var n="+"+Ze(t,r);if(e.length<n.length){if(n.indexOf(e)===0)return""}else if(e.indexOf(n)===0)return e.slice(n.length)}for(var a=0,i=Object.keys(r.country_calling_codes);a<i.length;a++){var s=i[a];if(e.indexOf(s)===1)return e.slice(1+s.length)}return""}function Xd(e,t,r){var n=new Ot(t,r);n.input(e);var a=n.getNumber();return a&&a.nationalNumber}function mt(e,t,r){for(var n=Ve(t,r),a=0;a<e.length&&a<n.length;){if(e[a]!==n[a])return!1;a++}return!0}function Zd(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,a=e.international,i=e.useNationalFormat,s=e.metadata;return(a===!1||i)&&r&&r.country?_y(r):!t&&a&&n?Ve(n,s):t}function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function Os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Os(Object(r),!0).forEach(function(n){Iy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iy(e,t,r){return t=ky(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ky(e){var t=Ry(e,"string");return Jt(t)=="symbol"?t:t+""}function Ry(e,t){if(Jt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dy(e,t,r){var n=e.metadata,a=e.countries,i=e.defaultCountry,s=e.value,l=e.reset,d=e.international,c=e.displayInitialValueAsLocalNumber,u=e.initialValueFormat,f=t.defaultCountry,v=t.value,m=t.reset;r.country;var h=r.value,y=r.hasUserSelectedACountry,g=r.latestCountrySelectedByUser,p=function(G){return Zd(br(br({},G),{},{international:d,useNationalFormat:c||u==="national",metadata:n}))};if(l!==m)return{phoneDigits:p({value:void 0,defaultCountry:i}),value:void 0,country:i,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(i!==f){var b=!i||kn(i,n),C=!h||d&&h===p({value:void 0,defaultCountry:f});if(!y&&b&&!s&&C)return{country:i,phoneDigits:p({value:void 0,defaultCountry:i}),value:void 0}}if(!js(s,v)&&!js(s,h)){var x,S;if(s){s&&zd(s),x=Kd(s,n);var $=qd(a,n);x&&x.country?(!$||$.indexOf(x.country)>=0)&&(S=x.country):(S=Yd(s,{country:void 0,countries:$,metadata:n}),S||i&&s.indexOf(Ve(i,n))===0&&(S=i))}var T;return s?g&&((S?g===S:mt(s,g,n))?S||(S=g):T={latestCountrySelectedByUser:void 0}):T={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},br(br({},T),{},{phoneDigits:p({phoneNumber:x,value:s,defaultCountry:i}),value:s,country:s?S:i})}}function js(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}var My=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function xt(e){"@babel/helpers - typeof";return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}function Ts(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ts(Object(r),!0).forEach(function(n){Ae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ts(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vt.apply(this,arguments)}function Ly(e,t){if(e==null)return{};var r=Fy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function As(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ec(n.key),n)}}function Uy(e,t,r){return t&&As(e.prototype,t),r&&As(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vy(e,t,r){return t=un(t),zy(e,Qd()?Reflect.construct(t,r||[],un(e).constructor):t.apply(e,r))}function zy(e,t){if(t&&(xt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qy(e)}function qy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qd=function(){return!!e})()}function un(e){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},un(e)}function Wy(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&za(e,t)}function za(e,t){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},za(e,t)}function Ae(e,t,r){return t=ec(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ec(e){var t=Gy(e,"string");return xt(t)=="symbol"?t:t+""}function Gy(e,t){if(xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hy=(function(e){function t(r){var n;By(this,t),n=Vy(this,t,[r]),Ae(n,"setInputRef",function(g){Ny([n.props.inputRef,n.inputRef],g)}),Ae(n,"isCountrySupportedWithError",function(g){var p=n.props.metadata;return kn(g,p)}),Ae(n,"onCountryChange",function(g){var p=n.props,b=p.international,C=p.metadata,x=p.onChange,S=p.focusInputOnCountrySelection,$=n.state,T=$.phoneDigits,D=$.country,G=wy(T,{prevCountry:D,newCountry:g,metadata:C,useNationalFormat:!b}),Y=dt(G,g,C);S&&n.inputRef.current.focus(),n.setState({country:g,latestCountrySelectedByUser:g,hasUserSelectedACountry:!0,phoneDigits:G,value:Y},function(){x(Y)})}),Ae(n,"onChange",function(g){var p=n.props,b=p.defaultCountry,C=p.onChange,x=p.addInternationalOption,S=p.international,$=p.limitMaxLength,T=p.countryCallingCodeEditable,D=p.metadata,G=n.state,Y=G.countries,se=G.phoneDigits,te=G.country,ve=G.latestCountrySelectedByUser,ce=Oy(g,{prevPhoneDigits:se,country:te,countryRequired:!x,defaultCountry:b,latestCountrySelectedByUser:ve,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:Y})},countries:Y,international:S,limitMaxLength:$,countryCallingCodeEditable:T,metadata:D}),Ne=ce.phoneDigits,re=ce.country,ue=ce.value,ne={phoneDigits:Ne,value:ue,country:re};ve&&ue&&!mt(ue,ve,D)&&(ne.latestCountrySelectedByUser=void 0),T===!1&&!ue&&Ne===n.state.phoneDigits&&(ne.forceRerender={}),n.setState(ne,function(){return C(ue)})}),Ae(n,"_onFocus",function(){return n.setState({isFocused:!0})}),Ae(n,"_onBlur",function(){return n.setState({isFocused:!1})}),Ae(n,"onFocus",function(g){n._onFocus();var p=n.props.onFocus;p&&p(g)}),Ae(n,"onBlur",function(g){var p=n.props.onBlur;n._onBlur(),p&&p(g)}),Ae(n,"onCountryFocus",function(g){n._onFocus();var p=n.props.countrySelectProps;if(p){var b=p.onFocus;b&&b(g)}}),Ae(n,"onCountryBlur",function(g){n._onBlur();var p=n.props.countrySelectProps;if(p){var b=p.onBlur;b&&b(g)}}),n.inputRef=N.default.createRef();var a=n.props,i=a.value;a.labels;var s=a.international,l=a.addInternationalOption,d=a.displayInitialValueAsLocalNumber,c=a.initialValueFormat,u=a.metadata,f=n.props,v=f.defaultCountry,m=f.countries;v&&(n.isCountrySupportedWithError(v)||(v=void 0)),i&&zd(i),m=qd(m,u);var h=Kd(i,u);n.CountryIcon=Wd(n.props);var y=xy({value:i,phoneNumber:h,defaultCountry:v,required:!l,countries:m||Ss(u),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:m})},metadata:u});return n.state={props:n.props,country:y,countries:m,phoneDigits:Zd({value:i,phoneNumber:h,defaultCountry:v,international:s,useNationalFormat:d||c==="national",metadata:u}),value:i},n}return Wy(t,e),Uy(t,[{key:"componentDidMount",value:function(){var n=this.props.onCountryChange,a=this.props.defaultCountry,i=this.state.country;n&&(a&&(this.isCountrySupportedWithError(a)||(a=void 0)),i!==a&&n(i))}},{key:"componentDidUpdate",value:function(n,a){var i=this.props.onCountryChange,s=this.state.country;i&&s!==a.country&&i(s)}},{key:"getCountrySelectOptions",value:function(n){var a=n.countries,i=this.props,s=i.international,l=i.countryCallingCodeEditable,d=i.countryOptionsOrder,c=i.addInternationalOption,u=i.labels,f=i.locales,v=i.metadata;return this.useMemoCountrySelectOptions(function(){return hy(Cy({countries:a||Ss(v),countryNames:u,addInternationalOption:s&&l===!1?!1:c,compareStringsLocales:f}),my(d,v))},[a,d,c,u,v])}},{key:"useMemoCountrySelectOptions",value:function(n,a){return(!this.countrySelectOptionsMemoDependencies||!Yy(a,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=n(),this.countrySelectOptionsMemoDependencies=a),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(n){var a=n.countries;return this.getCountrySelectOptions({countries:a})[0].value}},{key:"render",value:function(){var n=this.props,a=n.name,i=n.disabled,s=n.readOnly,l=n.autoComplete,d=n.style,c=n.className;n.inputRef;var u=n.inputComponent,f=n.numberInputProps,v=n.smartCaret,m=n.countrySelectComponent,h=n.countrySelectProps,y=n.containerComponent,g=n.containerComponentProps;n.defaultCountry,n.countries,n.countryOptionsOrder;var p=n.labels;n.flags,n.flagComponent,n.flagUrl,n.addInternationalOption,n.internationalIcon,n.displayInitialValueAsLocalNumber,n.initialValueFormat,n.onCountryChange,n.limitMaxLength,n.countryCallingCodeEditable,n.focusInputOnCountrySelection,n.reset;var b=n.metadata,C=n.international;n.locales;var x=Ly(n,My),S=this.state,$=S.country,T=S.countries,D=S.phoneDigits,G=S.isFocused,Y=v?zv:Kv,se=this.getCountrySelectOptions({countries:T});return N.default.createElement(y,vt({style:d,className:(0,ln.default)(c,"PhoneInput",{"PhoneInput--focus":G,"PhoneInput--disabled":i,"PhoneInput--readOnly":s})},g),N.default.createElement(m,vt({name:a?"".concat(a,"Country"):void 0,"aria-label":p.country},h,{value:$,options:se,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:i||h&&h.disabled,readOnly:s||h&&h.readOnly,iconComponent:this.CountryIcon})),N.default.createElement(Y,vt({ref:this.setInputRef,type:"tel",autoComplete:l},f,x,{inputFormat:C===!0?"INTERNATIONAL":C===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:C?!0:void 0,withCountryCallingCode:C?!0:void 0,name:a,metadata:b,country:$,value:D||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:i,readOnly:s,inputComponent:u,className:(0,ln.default)("PhoneInputInput",f&&f.className,x.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return Jd({props:n},Dy(n,a.props,a))}}])})(N.default.PureComponent),tc=N.default.forwardRef(function(e,t){return N.default.createElement(Hy,vt({},Ky(e),{inputRef:t}))});tc.propTypes={value:P.default.string,onChange:P.default.func.isRequired,onFocus:P.default.func,onBlur:P.default.func,disabled:P.default.bool,readOnly:P.default.bool,autoComplete:P.default.string,initialValueFormat:P.default.oneOf(["national"]),displayInitialValueAsLocalNumber:P.default.bool,defaultCountry:P.default.string,countries:P.default.arrayOf(P.default.string),labels:Hd,locales:P.default.oneOfType([P.default.string,P.default.arrayOf(P.default.string)]),flagUrl:P.default.string,flags:P.default.objectOf(P.default.elementType),flagComponent:P.default.elementType,addInternationalOption:P.default.bool,internationalIcon:P.default.elementType,countryOptionsOrder:P.default.arrayOf(P.default.string),style:P.default.object,className:P.default.string,countrySelectComponent:P.default.elementType,countrySelectProps:P.default.object,inputComponent:P.default.elementType,numberInputProps:P.default.object,containerComponent:P.default.elementType,containerComponentProps:P.default.object,smartCaret:P.default.bool,international:P.default.bool,limitMaxLength:P.default.bool,countryCallingCodeEditable:P.default.bool,metadata:Gd,onCountryChange:P.default.func,focusInputOnCountrySelection:P.default.bool};var Is={autoComplete:"tel",countrySelectComponent:Fd,flagComponent:gi,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:In,inputComponent:"input",containerComponent:"div",reset:P.default.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function Ky(e){e=Jd({},e);for(var t in Is)e[t]===void 0&&(e[t]=Is[t]);return e}function Yy(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;){if(e[r]!==t[r])return!1;r++}return!0}var Xy={ext:"ext.",country:"Phone number country",phone:"Phone",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XA:"Abkhazia",XK:"Kosovo",XO:"South Ossetia",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"},Zy=["metadata","labels"];function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(this,arguments)}function Jy(e,t){if(e==null)return{};var r=Qy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function rc(e){var t=N.default.forwardRef(function(r,n){var a=r.metadata,i=a===void 0?e:a,s=r.labels,l=s===void 0?Xy:s,d=Jy(r,Zy);return N.default.createElement(tc,qa({},d,{ref:n,metadata:i,labels:l}))});return t.propTypes={metadata:Gd,labels:Hd},t}var wg=rc();function eg(e,t){var r=Array.prototype.slice.call(t);return r.push(hd),e.apply(this,r)}var tg=rc(hd);function Nr(){return eg(x2,arguments)}var rg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Sr="consentDraftByService",ng=15,ag=["IN","US","CA","PH","NZ","AU","CN"],ks=e=>{if(!e)return!0;const t=e.replace(/\D/g,"");return["91","1","63","64","61","86"].includes(t)||t.length===0},ig=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function og(){const e=(0,L.useDispatch)(),{tenantId:t,id:r}=(0,L.useSelector)(E=>E.booking.outletDetails),{timeZone:n,image:a,outletName:i,address:s}=(0,L.useSelector)(E=>E.booking.outletDetails),{staff:l,selectedServices:d,selectedProfessional:c}=(0,L.useSelector)(E=>E.booking.service),{selectedSlotIds:u,selectedDate:f,selectedTime:v}=(0,L.useSelector)(E=>E.booking.slots),{userDetails:m,bookingMode:h,tipPct:y}=(0,L.useSelector)(E=>E.booking.appointment),g=Array.isArray(d)?d:[d],{selectedSlotIndexes:p,slots:b}=(0,L.useSelector)(E=>E.booking.slots),[C,x]=(0,N.useState)(!1),[S,$]=(0,N.useState)(!1),[T,D]=(0,N.useState)(null),[G,Y]=(0,N.useState)("person"),[se,te]=(0,N.useState)(!1),[ve,ce]=(0,N.useState)(""),[Ne,re]=(0,N.useState)(""),[ue,ne]=(0,N.useState)(null),[pe,Pe]=(0,N.useState)(null),[ye,j]=(0,N.useState)({}),[k,V]=(0,N.useState)({}),[z,F]=(0,N.useState)(!1),U=(0,N.useRef)(!1),_=(0,N.useRef)(""),O=he.DateTime.now().setZone(n??"UTC"),[R,M]=(0,N.useState)(null),[I,w]=(0,N.useState)(!1),H=(0,N.useRef)(""),Q=(0,N.useRef)(null),{register:ge,handleSubmit:Le,control:nc,watch:jt,reset:Rn,trigger:bi,setValue:Tt,formState:{errors:Ge,isSubmitted:Ni}}=(0,Ue.useForm)({defaultValues:{firstName:m?.firstName||"",lastName:m?.lastName||"",phone:m?.phone||"",email:m?.email||""},mode:"onChange",reValidateMode:"onChange"}),ir=jt("phone"),Dn=jt("email"),Si=ir?Nr(ir):!1,xi=yr(Dn),ac=!xi||Si,ic=!Si||xi,oc=E=>E?.replace(/\s+/g,"")||"",Mn=g.map(E=>{const A=l?.find(W=>W.id===c?.id)?.assignments?.find(W=>W.id===E.id),B={...E,price:A?.price??E.price??E.min_price??0,duration:A?.duration??E.estimated_time??E.min_time??0};return{...B,duration:A?.duration??E.estimated_time??E.min_time??0,tax:_a(B),unitTax:_a(B,{perUnit:!0})}}),Ln=[...b?.morning??[],...b?.afternoon??[],...b?.evening??[]],sc=Mn.reduce((E,A)=>E+Number(A.duration??0),0),lc=Math.ceil(sc/ng),dc=E=>{if(!Ln.length)return"";const A=Ln[E]?.start_time_12h,B=Ln[E+lc-1];return!A||!B?"":`${A} - ${B.end_time_12h??B.start_time_12h}`},Ci={day:Number(f?.day??O.day),month:Number(f?.month??O.month),year:Number(f?.year??O.year)},_i=p?.[0],wi=_i!==void 0?dc(_i):null,cc=wi?`${rg[Ci.month-1]} ${Ci.day} at ${wi}`:null,Fn=Mn.reduce((E,A)=>E+Number(A.price)*(A.qty??1),0),Ei=Mn.reduce((E,A)=>E+A.tax,0),uc=Math.round(Ei*100),Pi=Fn*y/100,fc=Math.round(Pi*100),Oi=Fn+Pi+Ei,Oe=(0,N.useMemo)(()=>g.filter(E=>!(!ni(E)||(E?.consent_rule?.enforcementMode??E?.enforcementMode)==="FIXED")),[g]),pc=(0,N.useMemo)(()=>Oe.map(E=>String(E.id)).filter(Boolean),[Oe]),hc=E=>{const A=E?.consent_template??E?.consentTemplate??null;return{heading:String(A?.heading??"").trim(),consent:String(A?.consent??"").trim()}},Bn=E=>{j(A=>({...A,[String(E)]:!0}))};(0,N.useEffect)(()=>{m&&Oe?.length>0&&vc()},[m,Oe?.length]),(0,N.useEffect)(()=>{Rn({...m,phone:m?.phone||""},{keepErrors:!0,keepDirty:!1})},[m,Rn]),(0,N.useEffect)(()=>{Ni&&bi(["phone","email"])},[ir,Dn,Ni,bi]);const ji=(0,N.useCallback)(async({value:E,type:A})=>{if(!E)return;let B="";if(A==="phone"){if(!Nr(E))return;B=oc(E)}if(A==="email"){if(!yr(E))return;B=E.trim()}if(B&&!(H.current===B&&I)){H.current=B,x(!0),M(A);try{const W=(await Mf({search:B,tenantId:t}))?.data?.[0];W?(Tt("firstName",W.first_name||"",{shouldValidate:!0}),Tt("lastName",W.last_name||""),W.phone&&Nr(W.phone)&&Tt("phone",W.phone),W.email&&Tt("email",W.email),e(yo({email:W.email,firstName:W.first_name,lastName:W.last_name,phone:W.phone})),w(!0)):w(!1)}catch(W){console.error(W)}finally{x(!1),M(null)}}},[e,Tt,t,I]);(0,N.useEffect)(()=>(Q.current=(0,Rc.debounce)(ji,800),()=>{Q.current?.cancel?.()}),[ji]);const Ti=(E,A,B)=>{if(A&&A(E),!E){Q.current?.cancel?.(),H.current="",w(!1),M(null);return}M(B),Q.current?.({value:E,type:B})},mc=()=>{Rn({firstName:"",lastName:"",email:"",phone:""}),w(!1),H.current="",e(Gf())},vc=async()=>{const E=m?.id;if(E){F(!0);try{const A={};for(const B of Oe){const W=String(B.id),ae=String(B.consent_form_id??"");if(!W||!ae)continue;const X=fo(B);if(!(X==="EVERY_X_DAYS"||X==="ONCE_PER_CUSTOMER")){A[W]={data:{checked:!0,needsSignature:!0}};continue}const we=!!(await ho(E,ae,W))?.data?.needsSignature;A[W]={data:{checked:!0,needsSignature:we}},we||Bn(W)}V(A)}catch(A){console.error(A)}finally{F(!1)}}},Un=(0,N.useMemo)(()=>Oe.filter(E=>{const A=String(E.id);if(ye[A])return!1;const B=k[A];return!(B?.data?.checked&&B?.data?.needsSignature===!1)}),[Oe,ye,k]),Ai=pc.length,Ii=Ai-Un.length,ki=Un.length===0,Ri=async()=>{if(!U.current){U.current=!0;try{if(!m?.firstName){ee.toast.warn("Please enter First Name before signing consent.");return}if(!m?.email&&!m?.phone){ee.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const E=Un[0];if(!E){await Vn();return}const A=String(E.id);if(_.current===A&&se)return;_.current=A;const B=String(E.consent_form_id??"");if(!B){ee.toast.error("Consent form missing.");return}const W=po(E);if(!W){ee.toast.error("Consent enforcement method not found.");return}const ae=m?.id;if(fo(E)!=="EVERY_VISIT"&&ae){const $e=!!(await ho(ae,B,A))?.data?.needsSignature;if(V(or=>({...or,[A]:{data:{checked:!0,needsSignature:$e}}})),!$e){Bn(A),ee.toast.success("Consent already signed for this service."),setTimeout(()=>Ri(),250);return}}else V(we=>({...we,[A]:{data:{checked:!0,needsSignature:!0}}}));const{heading:X,consent:fe}=hc(E);if(!X||!fe){ee.toast.error("Consent template missing.");return}ce(X),re(fe),ne(W),Pe(A),te(!0)}catch(E){console.error(E),ee.toast.error(E?.message??"Consent check failed")}finally{U.current=!1}}},yc=(E,A)=>{try{const B=localStorage.getItem(Sr),W=B?JSON.parse(B):{};W[String(E)]=A,localStorage.setItem(Sr,JSON.stringify(W))}catch(B){console.error("Failed to save consent draft",B)}},gc=()=>{try{return JSON.parse(localStorage.getItem(Sr)??"{}")}catch{return{}}},$c=E=>{const A=String(pe);if(!A)return;const B=Oe.find(fe=>String(fe.id)===A);if(!B)return;const W=String(B.consent_form_id??""),ae=po(B);if(!W||!ae){ee.toast.error("Consent form/method missing.");return}let X="CHECKBOX_ONLY";ae==="TYPED_NAME"?X="TYPED_NAME":ae==="DRAW_SIGNATURE"&&(X="SIGNATURE_IMAGE"),yc(A,{serviceId:A,concentFormId:W,signatureType:X,typedName:E?.typedName,isChecked:E?.accepted,signatureDataUrl:E?.signatureDataUrl,emailMe:E?.emailMe}),Bn(A),te(!1),_.current="",ee.toast.success("Consent captured.")},bc=()=>{te(!1),Pe(null)},Nc=async(E,A,B)=>{const W=gc(),ae=Object.entries(W).map(([X,fe])=>({serviceId:X,concentFormId:fe.concentFormId,captured:fe})).filter(X=>X.serviceId&&X.concentFormId);for(const X of ae){const{serviceId:fe,concentFormId:we,captured:$e}=X,or=$e.signatureType||($e.typedName?"TYPED_NAME":$e.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Fi={tenantId:t,outletId:r,appointmentId:E,customerId:A,serviceId:fe,formId:we,staffId:B,signatureType:or,typedName:$e.typedName,imageUrl:$e.signatureDataUrl};or==="CHECKBOX_ONLY"&&(Fi.isChecked=$e.isChecked??!0),await Bf(Fi)}localStorage.removeItem(Sr)};let Di="";f&&(Di=`${f?.year}-${String(f?.month).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const Vn=async E=>{const A=E||m,B={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Zn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},W={tenantId:t,outletId:r,staffId:c?.id,date:Di,startTime:v,serviceIds:g.map(ae=>ae.id),slotIds:u,isWalkIn:!1,requiresConsent:Oe.length>0,customer:{first_name:A?.firstName,last_name:A?.lastName,email:A?.email,phone:A?.phone},tracking:B};if(Oe.length&&!ki){ee.toast.warn("Please complete all consent forms first");return}try{x(!0);const ae=await e(Tr(W)).unwrap(),X=ae?.data??ae,fe=X.id||"",we=X.customerId||X.customer?.id||"",$e=X.staffId||c?.id||"";h==="booking"&&Ii>0&&await Nc(fe,we,$e),G==="card"?(D({appointmentId:fe,customerId:we}),$(!0)):(e(hr(String(fe))),e(Ce()))}catch(ae){const X=ae?.payload?.message||ae?.data?.message||ae?.message||"Staff not working on this day";ee.toast.error(X)}finally{x(!1)}},Mi=async E=>{const A={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Zn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},B={...E,phone:E?.phone??"",tracking:A};if(!G){ee.toast.error("Select payment method");return}if(!v&&h==="booking"){ee.toast.error("Select time");return}e(yo(B)),Oe.length>0?ki?await Vn(B):await Ri():await Vn(B)},Sc=E=>{const A=E.replace(/\s/g,"");return/^4/.test(A)?"VISA":/^5[1-5]/.test(A)?"MASTERCARD":/^3[47]/.test(A)?"AMEX":/^6/.test(A)?"DISCOVER":"UNKNOWN"},xc=async E=>{try{x(!0);const A=T?.appointmentId,B=String(T?.customerId);if(!A||!r)return ee.toast.error("Something went wrong."),!1;const W=Sc(E.number),ae={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Zn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},X=await Lf({appointmentId:A,customerId:B,outletId:r,referenceNo:A,currency:"USD",amountCents:Math.round(Oi*100),tipAmountCents:G==="card"?fc:0,taxAmountCents:G==="card"?uc:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:E.name,cardNumber:E.number.replace(/\s/g,""),cardType:W,cardExpiry:ig(E.expiry),cvData:E.cvv},billingContact:{name:{firstName:m?.firstName??"",lastName:m?.lastName??""},email:m?.email??""}},tracking:ae}),fe=X?.data?.data??X?.data??X??{},we=fe?.orderId;if(String(fe?.mappedStatus).toLowerCase()==="succeeded"||String(fe?.reasonMessage).toLowerCase()==="success"){if(ee.toast.success("Payment successful!"),we)try{await Ff(we)}catch($e){ee.toast.warning($e instanceof Error?$e.message:String($e??"Payment done, but finalize failed"))}}else ee.toast.warning("Payment pending");return $(!1),e(hr(String(T?.appointmentId))),e(Ce()),!0}catch(A){return ee.toast.warning(A instanceof Error?A.message:"Payment failed, but appointment is booked"),$(!1),e(hr(String(T?.appointmentId))),e(Ce()),!0}finally{x(!1)}},Cc=()=>{$(!1),ee.toast.warning("Appointment booked. Payment was cancelled."),e(hr(String(T?.appointmentId))),e(Ce())},_c=()=>!c?.id||!v&&h==="booking"||!jt("firstName")||!jt("email")&&!jt("phone"),[wc,Li]=(0,N.useState)(!1),Ec=()=>{Li(!1),e(gt(!1))},Pc=()=>{Li(E=>{const A=!E;return e(gt(A)),A})};return(0,o.jsxs)(Pt,{isSidebarOpen:wc,handleSidebarOpen:Pc,sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(cd,{buttonText:"Book Appointment",onButtonClick:Le(Mi),showTip:G==="card",tipPct:y,onTipChange:E=>e(Wf(E??0)),consentRequired:Oe?.length>0,consentCompleted:Ii,totalConsents:Ai,checkingConsent:z,loading:C,isBookingDisabled:_c(),handleSidebarOpen:Ec})}),isConfirm:!0,children:[(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Et,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Confirm Booking"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Review your appointment details before booking"}),(0,o.jsxs)("div",{className:"aaravpos-booking-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-outlet-info",children:[a&&(0,o.jsx)("div",{className:"aaravpos-outlet-logo",children:(0,o.jsx)("img",{src:a??"/logo.svg",alt:"Logo",className:"aaravpos-outlet-logo-img"})}),(0,o.jsxs)("div",{className:"aaravpos-outlet-content",children:[(0,o.jsx)("p",{className:"aaravpos-outlet-name",children:i??"-"}),(0,o.jsxs)("p",{className:"aaravpos-outlet-address",children:[s??"-",(0,o.jsx)("br",{})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-booking-scroll",children:[(0,o.jsxs)("div",{className:"aaravpos-booking-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-booking-column",children:[(0,o.jsx)(Rs,{children:"Appointment"}),(0,o.jsxs)(sg,{children:[(0,o.jsxs)("div",{className:"aaravpos-appointment-header",children:[(0,o.jsx)(lg,{pro:c}),(0,o.jsxs)("div",{className:"aaravpos-appointment-content",children:[(0,o.jsx)("p",{className:"aaravpos-appointment-name",children:c?.name}),(0,o.jsx)("p",{className:"aaravpos-appointment-services",children:c?.staff_type})]}),(0,o.jsxs)("span",{className:"aaravpos-appointment-price",children:[(0,o.jsx)(ie,{size:14}),Fn]})]}),(0,o.jsxs)("div",{className:"aaravpos-appointment-date",children:[(0,o.jsx)(cp,{size:18}),(0,o.jsx)("span",{className:"aaravpos-appointment-date-text",children:cc??"No time selected"})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-booking-column",children:[(0,o.jsx)(Rs,{children:"Payment Method"}),(0,o.jsx)(dg,{icon:(0,o.jsx)(Bp,{size:18}),label:"Pay in person",selected:G==="person",onClick:()=>Y("person")})]})]}),G&&(0,o.jsx)("div",{className:"booking-confirm-scroll-container",children:(0,o.jsxs)("form",{onSubmit:Le(Mi),children:[(0,o.jsx)("h4",{className:"booking-confirm-form-title",children:"Your information"}),(0,o.jsx)("div",{className:"booking-confirm-info-box",children:(0,o.jsxs)("div",{className:"booking-confirm-form-grid",children:[(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{className:"booking-confirm-field-label",htmlFor:"phone",children:["Phone ",ac&&(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{control:nc,name:"phone",rules:{validate:E=>{const A=!ks(E),B=yr(Dn);return!A&&!B?"Enter phone or email":A&&!Nr(E)?"Enter valid phone number":!0}},render:({field:E})=>(0,o.jsxs)("div",{className:"booking-confirm-input-wrapper",children:[(0,o.jsx)(tg,{...E,id:"phone",international:!0,countries:ag,defaultCountry:"US",value:E.value||"",onChange:A=>Ti(A??"",E.onChange,"phone"),countryCallingCodeEditable:!1,className:"booking-confirm-input"}),C&&R==="phone"&&(0,o.jsx)("div",{className:"booking-confirm-phone-loader",children:(0,o.jsx)("div",{className:"booking-confirm-phone-spinner"})})]})}),Ge.phone&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.phone.message}),I&&(0,o.jsxs)("div",{className:"booking-confirm-autofill-info",children:["Using existing customer",(0,o.jsx)("span",{onClick:mc,className:"booking-confirm-clear-action",children:"Clear"})]})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{className:"booking-confirm-field-label",htmlFor:"email",children:["Email ",ic&&(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsxs)("div",{className:"booking-confirm-input-wrapper",children:[(0,o.jsx)("input",{id:"email",minLength:10,maxLength:50,...ge("email",{minLength:{value:10,message:"Minimum 2 characters required"},maxLength:{value:50,message:"Email must be maximum 50 characters"},validate:E=>{const A=!!E?.trim(),B=!ks(ir);return!A&&!B?"Enter phone or email":A&&!yr(E)?"Invalid email":!0},onChange:E=>{Ti(E.target.value,null,"email")}}),autoComplete:"email",placeholder:"Email address",className:"booking-confirm-input"}),C&&R==="email"&&(0,o.jsx)("div",{className:"booking-confirm-phone-loader",children:(0,o.jsx)("div",{className:"booking-confirm-phone-spinner"})})]}),Ge.email&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.email.message})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{htmlFor:"firstName",className:"booking-confirm-field-label",children:["First Name ",(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsx)("input",{id:"firstName",minLength:2,maxLength:30,...ge("firstName",{required:"First name required",pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"},minLength:{value:2,message:"Minimum 2 characters required"},maxLength:{value:30,message:"Maximum 30 characters allowed"}}),autoComplete:"given-name",placeholder:"First Name",className:"booking-confirm-input"}),Ge.firstName&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.firstName.message})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsx)("label",{htmlFor:"lastName",className:"booking-confirm-field-label",children:"Last Name"}),(0,o.jsx)("input",{minLength:2,maxLength:20,id:"lastName",autoComplete:"family-name",...ge("lastName",{minLength:{value:2,message:"Last name must be at least 2 characters"},maxLength:{value:30,message:"Last name cannot exceed 30 characters"},pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"}}),placeholder:"Last Name",className:"booking-confirm-input"}),Ge.lastName&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.lastName.message})]})]})})]})})]})]})]})]}),S&&(0,o.jsx)(Nh,{onClose:Cc,onPay:xc,amount:Oi}),se&&pe&&(0,o.jsx)(zh,{enforcement:ue,heading:ve,consent:Ne,onClose:bc,onConfirm:$c},pe??"consent")]})}function sg({children:e}){return(0,o.jsx)("div",{className:"aaravpos-card-box",children:e})}function lg({pro:e}){return(0,o.jsx)(o.Fragment,{children:e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-profile-image"}):(0,o.jsx)("div",{className:"aaravpos-profile-avatar",style:{background:e.color??"#111"},children:it(e.name)})})}function Rs({children:e}){return(0,o.jsx)("p",{className:"aaravpos-section-label",children:e})}function dg({icon:e,label:t,selected:r,onClick:n}){return(0,o.jsx)("div",{className:"aaravpos-paymentcard-wrapper",onClick:n,children:(0,o.jsx)("div",{className:"aaravpos-paymentcard-container",children:(0,o.jsx)("div",{className:`${r?"aaravpos-paymentcard-card active":"aaravpos-paymentcard-card"}`,children:(0,o.jsxs)("div",{className:"aaravpos-paymentcard-content",children:[(0,o.jsx)("div",{className:"aaravpos-paymentcard-icon",children:e}),(0,o.jsx)("div",{className:"aaravpos-paymentcard-info",children:(0,o.jsxs)("div",{className:"aaravpos-paymentcard-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"aaravpos-paymentcard-title",children:t}),(0,o.jsx)("p",{className:"aaravpos-paymentcard-description",children:"Payment will be collected at the outlet during your appointment."})]}),r&&(0,o.jsx)("div",{className:"aaravpos-paymentcard-check",children:(0,o.jsx)(di,{size:18})})]})})]})})})})}function cg(){const e=(0,L.useDispatch)(),t=(0,L.useSelector)($=>$.booking.appointment.appointmentId),{tenantId:r}=(0,L.useSelector)($=>$.booking.outletDetails),[n,a]=(0,N.useState)(null),[i,s]=(0,N.useState)(!0),[l,d]=(0,N.useState)(null),[c,u]=(0,N.useState)(!1);console.log("appointment",n),(0,N.useEffect)(()=>{if(!t){d("No appointment ID provided"),s(!1);return}(async()=>{try{const T=await Df(t,r);T.success?a(T?.data?.appointment):d("Failed to load appointment details")}catch(T){console.error(T),d("An error occurred while fetching appointment details")}finally{s(!1)}})()},[t]);const f=()=>{ai.purge(),e({type:"RESET_ALL"})};if(i)return(0,o.jsx)("div",{className:"aaravpos-loading-container",children:(0,o.jsx)("p",{className:"aaravpos-loading-text",children:"Loading appointment details..."})});if(l||!n)return(0,o.jsxs)("div",{className:"aaravpos-error-container",children:[(0,o.jsx)("p",{className:"aaravpos-error-text",children:l||"Appointment not found"}),(0,o.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,o.jsx)(So,{}),"Book Another Appointment"]})]});const{staff:v,outlet:m,services:h}=n,y=h?.reduce(($,T)=>$+Number(T.price||T.min_price||0),0),g=(n.tipsCents||0)/100,p=(n.taxCents||0)/100,b=(n.totalCents||0)/100;console.log("taxAmt",p);const C=b>0?b.toFixed(2):(y+g+p).toFixed(2),x=c?h:h.slice(0,5),S=h.length-5;return(0,o.jsx)("div",{className:"aaravpos-success-wrapper",children:(0,o.jsxs)("div",{className:"aaravpos-success-motion",children:[(0,o.jsx)("div",{className:"aaravpos-success-icon success-pulse",children:(0,o.jsx)(di,{})}),(0,o.jsx)("h1",{className:"aaravpos-success-title",children:"You're Booked!"}),(0,o.jsxs)("p",{className:"aaravpos-success-description",children:["Your appointment has been confirmed.",(0,o.jsx)("br",{}),"A confirmation has been sent to your email."]}),(0,o.jsxs)("div",{className:"aaravpos-success-content",children:[(0,o.jsxs)("div",{className:"aaravpos-success-card",children:[(0,o.jsxs)("div",{className:"aaravpos-success-row aaravpos-success-row-first",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Outlet Name"}),(0,o.jsx)("span",{className:"aaravpos-value",children:m?.outletName||"-"})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Professional"}),(0,o.jsx)("span",{className:"aaravpos-value",children:v?`${v?.firstName} ${v?.lastName}`:"-"})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row aaravpos-services-header",children:[(0,o.jsxs)("span",{className:"aaravpos-services-label",children:["Services (",h.length,")"]}),h.length>5&&(0,o.jsx)("button",{onClick:()=>u($=>!$),className:"aaravpos-show-btn",children:c?"Hide":(0,o.jsxs)("span",{className:"aaravpos-show-btn-inner",children:["Show",(0,o.jsx)(ci,{size:16})]})})]}),(0,o.jsxs)("div",{className:"aaravpos-services-list",children:[x?.map($=>(0,o.jsxs)("div",{className:"aaravpos-service-row",children:[(0,o.jsx)("span",{className:"aaravpos-service-name",children:$.serviceName}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),Number($.price).toFixed(2)]})]},$.id)),!c&&S>0&&(0,o.jsxs)("div",{className:"aaravpos-more-services",children:[(0,o.jsx)(jp,{size:14}),S," more services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Date & Time"}),(0,o.jsxs)("span",{className:"aaravpos-value",children:[n.appointmentDate," at"," ",n.start_time_12h]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Tip"}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),g.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Tax"}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),p.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-total-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Total Amount"}),(0,o.jsxs)("span",{className:"aaravpos-total-price",children:[(0,o.jsx)(ie,{size:14}),C]})]})]}),(0,o.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,o.jsx)(So,{}),"Book Another Appointment"]})]})]})})}function ug(){const{currentStep:e}=(0,L.useSelector)(n=>n.booking.breadcrumbs),{isService:t}=(0,L.useSelector)(n=>n.booking.outletDetails),r={services:t?lh:oh,professionals:t?ah:rh,time:vh,confirm:og,success:cg}[e];return(0,o.jsx)("div",{className:"aaravpos-layout",children:(0,o.jsx)("div",{className:"aaravpos-layout-content",children:(0,o.jsx)("div",{className:"aaravpos-layout-page",children:(0,o.jsx)(r,{})},e)})})}function fg(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ug,{}),(0,o.jsx)(ee.ToastContainer,{position:"top-right",autoClose:3e3})]})}var pg=({bookingCode:e,isDarkMode:t=!1})=>{const r=(0,L.useDispatch)(),n=(0,L.useSelector)(y=>y.booking.outletList.outlets),a=(0,L.useSelector)(y=>y.booking.theme),[i,s]=(0,N.useState)(!1),[l,d]=(0,N.useState)(null),{id:c}=(0,L.useSelector)(y=>y.booking.outletDetails);(0,N.useEffect)(()=>{const y=localStorage.getItem("isDarkMode");if(y!==null)try{r(mo(JSON.parse(y)));return}catch(g){console.error("Error parsing isDarkMode from localStorage:",g)}r(mo(t))},[t,r]);const u=(0,N.useCallback)(async()=>{try{s(!0),d(null);const y=await uo(e);if(y?.success){const g=y?.data?.data?.outlets||[];r(Kf(g)),r(zf(y?.data?.result)),g.length===1&&h(g[0])}else d(y?.message||"Failed to fetch data")}catch(y){console.error(y),d(y?.message||"Something went wrong")}finally{s(!1)}},[e,r]),f=async(y,g)=>{try{r(jf(!0));const p=await uo(e,y,g);p?.success||d(p?.message||"Failed to fetch outlet data"),r(Ef(p?.data?.token)),r(xf(p?.data?.data?.outlets[0]?.isService)),r(Of({superCategories:p?.data?.data?.superCategories,staff:p?.data?.data?.staff}))}catch(p){console.error(p),d(p?.message||"Something went wrong")}finally{s(!1)}},[v,m]=(0,N.useState)(null),h=async y=>{if(!(!y||v)){m(String(y.id));try{await f(String(y?.tenantId),String(y?.id)),r(wf({...y,tenantId:y.tenantId??"",currency:y.currency??"",outletTimeZoneDate:he.DateTime.now().setZone(y?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:he.DateTime.fromISO(y?.createdAt,{zone:"utc"}).setZone(y?.timeZone).year})),r(ya(y?.isService?"services":"professionals"))}catch(g){console.error("fetchOutletData error:",g)}finally{m(null)}}};return(0,N.useEffect)(()=>{Array.isArray(n)&&n.length===0&&u()},[n?.length,u]),(0,N.useEffect)(()=>{a&&ep(a)},[a]),l?(0,o.jsx)("div",{className:"aaravpos-error-box",children:l}):!n.length&&i?(0,o.jsx)("div",{className:`aaravpos-loader-wrapper ${a?.isDarkMode?"dark":"light"}`,style:{height:700},children:(0,o.jsx)("div",{className:"aaravpos-loader"})}):(0,o.jsx)("div",{className:`aaravpos-overflow-hidden ${a?.isDarkMode?"dark":"light"}`,"data-theme":a?.isDarkMode?"dark":"light",children:n.length>1&&!c?(0,o.jsx)(Yp,{outlets:n,onSelectOutlet:y=>{y?.id&&h(y)},loadingOutletId:v}):(0,o.jsx)(fg,{})})},hg=({...e})=>(0,o.jsx)(Q0,{children:(0,o.jsx)(pg,{...e})});exports.AppointmentBookingPlugin=hg;
16
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),l||(y.measureTime(()=>{const g=Xr(f.getState(),"",t,r,i,u);if(g){const{keyPath:p,value:b}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${p}\`. Value:`,b,`
17
+ Take a look at the reducer(s) handling this action type: ${h.type}.
18
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),y.warnIfExceeded()),m}}}function dr(e){return typeof e=="boolean"}var Ou=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new Za;if(r&&(dr(r)?s.push(xu):s.push(Cu(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let l={};dr(n)||(l=n),s.unshift(ol(l))}if(a){let l={};dr(a)||(l=a),s.push(ll(l))}if(i){let l={};dr(i)||(l=i),s.unshift(tl(l))}}return s},Qa="RTK_autoBatch",ju=()=>e=>({payload:e,meta:{[Qa]:!0}}),eo=e=>t=>{setTimeout(t,e)},cl=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,i=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:eo(10):e.type==="callback"?e.queueNotification:eo(e.timeout),d=()=>{s=!1,i&&(i=!1,l.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>a&&u(),v=n.subscribe(f);return l.add(u),()=>{v(),l.delete(u)}},dispatch(u){try{return a=!u?.meta?.[Qa],i=!a,i&&(s||(s=!0,c(d))),n.dispatch(u)}finally{a=!0}}})},Tu=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new Za(e);return n&&a.push(cl(typeof n=="object"?n:void 0)),a};function dl(e){const t=Ou(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{};let c;if(typeof r=="function")c=r;else if((0,xe.isPlainObject)(r))c=(0,xe.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?K(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?K(2):"`middleware` field must be a callback");let d;if(typeof n=="function"){if(d=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?K(3):"when using a middleware builder function, an array of middleware must be returned")}else d=t();if(process.env.NODE_ENV!=="production"&&d.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?K(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let y=new Set;d.forEach(g=>{if(y.has(g))throw new Error(process.env.NODE_ENV==="production"?K(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");y.add(g)})}let u=xe.compose;a&&(u=_u({trace:process.env.NODE_ENV!=="production",...typeof a=="object"&&a}));const f=(0,xe.applyMiddleware)(...d),v=Tu(f);if(process.env.NODE_ENV!=="production"&&l&&typeof l!="function")throw new Error(process.env.NODE_ENV==="production"?K(5):"`enhancers` field must be a callback");let h=typeof l=="function"?l(v):v();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?K(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?K(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!h.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...h);return(0,xe.createStore)(c,s,m)}function ul(e){const t={},r=[];let n;const a={addCase(i,s){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?K(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?K(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const l=typeof i=="string"?i:i.type;if(!l)throw new Error(process.env.NODE_ENV==="production"?K(28):"`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error(process.env.NODE_ENV==="production"?K(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${l}'`);return t[l]=s,a},addAsyncThunk(i,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?K(31):"`builder.addDefaultCase` can only be called once");return n=i,a}};return e(a),[t,r,n]}function Au(e){return typeof e=="function"}function fl(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?K(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,a]=ul(t),i;if(Au(e))i=()=>Qi(e());else{const l=Qi(e);i=()=>l}function s(l=i(),c){let d=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[a]),d.reduce((u,f)=>{if(f)if(we(u)){const v=f(u,c);return v===void 0?u:v}else{if(Te(u))return Sn(u,v=>f(v,c));{const v=f(u,c);if(v===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return u},l)}return s.getInitialState=i,s}var pl=(e,t)=>Js(e)?e.match(t):e(t);function _t(...e){return t=>e.some(r=>pl(r,t))}function Zr(...e){return t=>e.every(r=>pl(r,t))}function Cn(e,t){if(!e||!e.meta)return!1;const r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function nr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function hl(...e){return e.length===0?t=>Cn(t,["pending"]):nr(e)?_t(...e.map(t=>t.pending)):hl()(e[0])}function Jr(...e){return e.length===0?t=>Cn(t,["rejected"]):nr(e)?_t(...e.map(t=>t.rejected)):Jr()(e[0])}function ml(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Zr(Jr(...e),t):nr(e)?Zr(Jr(...e),t):ml()(e[0])}function vl(...e){return e.length===0?t=>Cn(t,["fulfilled"]):nr(e)?_t(...e.map(t=>t.fulfilled)):vl()(e[0])}function yl(...e){return e.length===0?t=>Cn(t,["pending","fulfilled","rejected"]):nr(e)?_t(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):yl()(e[0])}var Iu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ar=(e=21)=>{let t="",r=e;for(;r--;)t+=Iu[Math.random()*64|0];return t},ku=["name","message","stack","code"],Hn=class{constructor(e,t){this.payload=e,this.meta=t}_type},to=class{constructor(e,t){this.payload=e,this.meta=t}_type},gl=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of ku)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ro="External signal was aborted",_n=(()=>{function e(t,r,n){const a=Re(t+"/fulfilled",(c,d,u,f)=>({payload:c,meta:{...f||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),i=Re(t+"/pending",(c,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:c,requestStatus:"pending"}})),s=Re(t+"/rejected",(c,d,u,f,v)=>({payload:f,error:(n&&n.serializeError||gl)(c||"Rejected"),meta:{...v||{},arg:u,requestId:d,rejectedWithValue:!!f,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function l(c,{signal:d}={}){return(u,f,v)=>{const h=n?.idGenerator?n.idGenerator(c):ar(),m=new AbortController;let y,g;function p(C){g=C,m.abort()}d&&(d.aborted?p(ro):d.addEventListener("abort",()=>p(ro),{once:!0}));const b=(async function(){let C;try{let x=n?.condition?.(c,{getState:f,extra:v});if(Ru(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const N=new Promise(($,T)=>{y=()=>{T({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",y,{once:!0})});u(i(h,c,n?.getPendingMeta?.({requestId:h,arg:c},{getState:f,extra:v}))),C=await Promise.race([N,Promise.resolve(r(c,{dispatch:u,getState:f,extra:v,requestId:h,signal:m.signal,abort:p,rejectWithValue:($,T)=>new Hn($,T),fulfillWithValue:($,T)=>new to($,T)})).then($=>{if($ instanceof Hn)throw $;return $ instanceof to?a($.payload,h,c,$.meta):a($,h,c)})])}catch(x){C=x instanceof Hn?s(null,h,c,x.payload,x.meta):s(x,h,c)}finally{y&&m.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&s.match(C)&&C.meta.condition||u(C),C})();return Object.assign(b,{abort:p,requestId:h,arg:c,unwrap(){return b.then($l)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:_t(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function $l(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ru(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var bl=Symbol.for("rtk-slice-createasyncthunk"),Du={[bl]:_n},Nl=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Nl||{});function Mu(e,t){return`${e}/${t}`}function Sl({creators:e}={}){const t=e?.asyncThunk?.[bl];return function(n){const{name:a,reducerPath:i=a}=n;if(!a)throw new Error(process.env.NODE_ENV==="production"?K(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof n.reducers=="function"?n.reducers(Fu()):n.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(C,x){const N=typeof C=="string"?C:C.type;if(!N)throw new Error(process.env.NODE_ENV==="production"?K(12):"`context.addCase` cannot be called with an empty action type");if(N in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?K(13):"`context.addCase` cannot be called with two reducers for the same action type: "+N);return c.sliceCaseReducersByType[N]=x,d},addMatcher(C,x){return c.sliceMatchers.push({matcher:C,reducer:x}),d},exposeAction(C,x){return c.actionCreators[C]=x,d},exposeCaseReducer(C,x){return c.sliceCaseReducersByName[C]=x,d}};l.forEach(C=>{const x=s[C],N={reducerName:C,type:Mu(a,C),createNotation:typeof n.reducers=="function"};Uu(x)?zu(N,x,d,t):Bu(N,x,d)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?K(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},x=[],N=void 0]=typeof n.extraReducers=="function"?ul(n.extraReducers):[n.extraReducers],$={...C,...c.sliceCaseReducersByType};return fl(n.initialState,T=>{for(let R in $)T.addCase(R,$[R]);for(let R of c.sliceMatchers)T.addMatcher(R.matcher,R.reducer);for(let R of x)T.addMatcher(R.matcher,R.reducer);N&&T.addDefaultCase(N)})}const f=C=>C,v=new Map,h=new WeakMap;let m;function y(C,x){return m||(m=u()),m(C,x)}function g(){return m||(m=u()),m.getInitialState()}function p(C,x=!1){function N(T){let R=T[C];if(typeof R>"u"){if(x)R=tt(h,N,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?K(15):"selectSlice returned undefined for an uninjected slice reducer")}return R}function $(T=f){return tt(tt(v,x,()=>new WeakMap),T,()=>{const R={};for(const[G,Y]of Object.entries(n.selectors??{}))R[G]=Lu(Y,T,()=>tt(h,T,g),x);return R})}return{reducerPath:C,getSelectors:$,get selectors(){return $(N)},selectSlice:N}}const b={name:a,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:g,...p(i),injectInto(C,{reducerPath:x,...N}={}){const $=x??i;return C.inject({reducerPath:$,reducer:y},N),{...b,...p($,!0)}}};return b}}function Lu(e,t,r,n){function a(i,...s){let l=t(i);if(typeof l>"u"){if(n)l=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?K(16):"selectState returned undefined for an uninjected slice reducer")}return e(l,...s)}return a.unwrapped=e,a}var Xe=Sl();function Fu(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Bu({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!Vu(n))throw new Error(process.env.NODE_ENV==="production"?K(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Re(e,s):Re(e))}function Uu(e){return e._reducerDefinitionType==="asyncThunk"}function Vu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function zu({type:e,reducerName:t},r,n,a){if(!a)throw new Error(process.env.NODE_ENV==="production"?K(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:s,pending:l,rejected:c,settled:d,options:u}=r,f=a(e,i,u);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),c&&n.addCase(f.rejected,c),d&&n.addMatcher(f.settled,d),n.exposeCaseReducer(t,{fulfilled:s||ur,pending:l||ur,rejected:c||ur,settled:d||ur})}function ur(){}function qu(){return{ids:[],entities:{}}}function Wu(e){function t(r={},n){const a=Object.assign(qu(),r);return n?e.setAll(a,n):a}return{getInitialState:t}}function Gu(){function e(t,r={}){const{createSelector:n=Zs}=r,a=f=>f.ids,i=f=>f.entities,s=n(a,i,(f,v)=>f.map(h=>v[h])),l=(f,v)=>v,c=(f,v)=>f[v],d=n(a,f=>f.length);if(!t)return{selectIds:a,selectEntities:i,selectAll:s,selectTotal:d,selectById:n(i,l,c)};const u=n(t,i);return{selectIds:n(t,a),selectEntities:u,selectAll:n(t,s),selectTotal:n(t,d),selectById:n(u,l,c)}}return{getSelectors:e}}var Hu=we;function Ku(e){const t=oe((r,n)=>e(n));return function(n){return t(n,void 0)}}function oe(e){return function(r,n){function a(s){return el(s)}const i=s=>{a(n)?e(n.payload,s):e(n,s)};return Hu(r)?(i(r),r):Sn(r,i)}}function ct(e,t){const r=t(e);return process.env.NODE_ENV!=="production"&&r===void 0&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),r}function Ye(e){return Array.isArray(e)||(e=Object.values(e)),e}function Or(e){return we(e)?Nn(e):e}function xl(e,t,r){e=Ye(e);const n=Or(r.ids),a=new Set(n),i=[],s=new Set([]),l=[];for(const c of e){const d=ct(c,t);a.has(d)||s.has(d)?l.push({id:d,changes:c}):(s.add(d),i.push(c))}return[i,l,n]}function Cl(e){function t(m,y){const g=ct(m,e);g in y.entities||(y.ids.push(g),y.entities[g]=m)}function r(m,y){m=Ye(m);for(const g of m)t(g,y)}function n(m,y){const g=ct(m,e);g in y.entities||y.ids.push(g),y.entities[g]=m}function a(m,y){m=Ye(m);for(const g of m)n(g,y)}function i(m,y){m=Ye(m),y.ids=[],y.entities={},r(m,y)}function s(m,y){return l([m],y)}function l(m,y){let g=!1;m.forEach(p=>{p in y.entities&&(delete y.entities[p],g=!0)}),g&&(y.ids=y.ids.filter(p=>p in y.entities))}function c(m){Object.assign(m,{ids:[],entities:{}})}function d(m,y,g){const p=g.entities[y.id];if(p===void 0)return!1;const b=Object.assign({},p,y.changes),C=ct(b,e),x=C!==y.id;return x&&(m[y.id]=C,delete g.entities[y.id]),g.entities[C]=b,x}function u(m,y){return f([m],y)}function f(m,y){const g={},p={};m.forEach(b=>{b.id in y.entities&&(p[b.id]={id:b.id,changes:{...p[b.id]?.changes,...b.changes}})}),m=Object.values(p),m.length>0&&m.filter(b=>d(g,b,y)).length>0&&(y.ids=Object.values(y.entities).map(b=>ct(b,e)))}function v(m,y){return h([m],y)}function h(m,y){const[g,p]=xl(m,e,y);r(g,y),f(p,y)}return{removeAll:Ku(c),addOne:oe(t),addMany:oe(r),setOne:oe(n),setMany:oe(a),setAll:oe(i),updateOne:oe(u),updateMany:oe(f),upsertOne:oe(v),upsertMany:oe(h),removeOne:oe(s),removeMany:oe(l)}}function Yu(e,t,r){let n=0,a=e.length;for(;n<a;){let i=n+a>>>1;const s=e[i];r(t,s)>=0?n=i+1:a=i}return n}function Xu(e,t,r){const n=Yu(e,t,r);return e.splice(n,0,t),e}function Zu(e,t){const{removeOne:r,removeMany:n,removeAll:a}=Cl(e);function i(g,p){return s([g],p)}function s(g,p,b){g=Ye(g);const C=new Set(b??Or(p.ids)),x=new Set,N=g.filter($=>{const T=ct($,e),R=!x.has(T);return R&&x.add(T),!C.has(T)&&R});N.length!==0&&y(p,N)}function l(g,p){return c([g],p)}function c(g,p){let b={};if(g=Ye(g),g.length!==0){for(const C of g){const x=e(C);b[x]=C,delete p.entities[x]}g=Ye(b),y(p,g)}}function d(g,p){g=Ye(g),p.entities={},p.ids=[],s(g,p,[])}function u(g,p){return f([g],p)}function f(g,p){let b=!1,C=!1;for(let x of g){const N=p.entities[x.id];if(!N)continue;b=!0,Object.assign(N,x.changes);const $=e(N);if(x.id!==$){C=!0,delete p.entities[x.id];const T=p.ids.indexOf(x.id);p.ids[T]=$,p.entities[$]=N}}b&&y(p,[],b,C)}function v(g,p){return h([g],p)}function h(g,p){const[b,C,x]=xl(g,e,p);b.length&&s(b,p,x),C.length&&f(C,p)}function m(g,p){if(g.length!==p.length)return!1;for(let b=0;b<g.length;b++)if(g[b]!==p[b])return!1;return!0}const y=(g,p,b,C)=>{const x=Or(g.entities),N=Or(g.ids),$=g.entities;let T=N;C&&(T=new Set(N));let R=[];for(const se of T){const te=x[se];te&&R.push(te)}const G=R.length===0;for(const se of p)$[e(se)]=se,G||Xu(R,se,t);G?R=p.slice().sort(t):b&&R.sort(t);const Y=R.map(e);m(N,Y)||(g.ids=Y)};return{removeOne:r,removeMany:n,removeAll:a,addOne:oe(i),updateOne:oe(u),upsertOne:oe(v),setOne:oe(l),setMany:oe(c),setAll:oe(d),addMany:oe(s),updateMany:oe(f),upsertMany:oe(h)}}function Ju(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:s=>s.id,...e},n=r?Zu(t,r):Cl(t),a=Wu(n),i=Gu();return{selectId:t,sortComparer:r,...a,...i,...n}}var Qu="task",_l="listener",wl="completed",ei="cancelled",ef=`task-${ei}`,tf=`task-${wl}`,ga=`${_l}-${ei}`,rf=`${_l}-${wl}`,ir=class{constructor(e){this.code=e,this.message=`${Qu} ${ei} (reason: ${e})`}name="TaskAbortError";message},ti=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?K(32):`${t} is not a function`)},Qr=()=>{},El=(e,t=Qr)=>(e.catch(t),e),Pl=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),rt=e=>{if(e.aborted)throw new ir(e.reason)};function Ol(e,t){let r=Qr;return new Promise((n,a)=>{const i=()=>a(new ir(e.reason));if(e.aborted){i();return}r=Pl(e,i),t.finally(()=>r()).then(n,a)}).finally(()=>{r=Qr})}var nf=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof ir?"cancelled":"rejected",error:r}}finally{t?.()}},en=e=>t=>El(Ol(e,t).then(r=>(rt(e),r))),jl=e=>{const t=en(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ut}=Object,no={},or="listenerMiddleware",af=(e,t)=>{const r=n=>Pl(e,()=>n.abort(e.reason));return(n,a)=>{ti(n,"taskExecutor");const i=new AbortController;r(i);const s=nf(async()=>{rt(e),rt(i.signal);const l=await n({pause:en(i.signal),delay:jl(i.signal),signal:i.signal});return rt(i.signal),l},()=>i.abort(tf));return a?.autoJoin&&t.push(s.catch(Qr)),{result:en(e)(s),cancel(){i.abort(ef)}}}},of=(e,t)=>{const r=async(n,a)=>{rt(t);let i=()=>{};const s=[new Promise((l,c)=>{let d=e({predicate:n,effect:(u,f)=>{f.unsubscribe(),l([u,f.getState(),f.getOriginalState()])}});i=()=>{d(),c()}})];a!=null&&s.push(new Promise(l=>setTimeout(l,a,null)));try{const l=await Ol(t,Promise.race(s));return rt(t),l}finally{i()}};return(n,a)=>El(r(n,a))},Tl=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:i}=e;if(t)a=Re(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(process.env.NODE_ENV==="production"?K(21):"Creating or removing a listener requires one of the known fields for matching an action");return ti(i,"options.listener"),{predicate:a,type:t,effect:i}},Al=ut(e=>{const{type:t,predicate:r,effect:n}=Tl(e);return{id:ar(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?K(22):"Unsubscribe not initialized")}}},{withTypes:()=>Al}),ao=(e,t)=>{const{type:r,effect:n,predicate:a}=Tl(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===a)&&i.effect===n)},$a=e=>{e.pending.forEach(t=>{t.abort(ga)})},sf=(e,t)=>()=>{for(const r of t.keys())$a(r);e.clear()},io=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},ri=ut(Re(`${or}/add`),{withTypes:()=>ri}),Il=Re(`${or}/removeAll`),ni=ut(Re(`${or}/remove`),{withTypes:()=>ni}),lf=(...e)=>{console.error(`${or}/error`,...e)},cf=(e={})=>{const t=new Map,r=new Map,n=h=>{const m=r.get(h)??0;r.set(h,m+1)},a=h=>{const m=r.get(h)??1;m===1?r.delete(h):r.set(h,m-1)},{extra:i,onError:s=lf}=e;ti(s,"onError");const l=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),m=>{h.unsubscribe(),m?.cancelActive&&$a(h)}),c=h=>{const m=ao(t,h)??Al(h);return l(m)};ut(c,{withTypes:()=>c});const d=h=>{const m=ao(t,h);return m&&(m.unsubscribe(),h.cancelActive&&$a(m)),!!m};ut(d,{withTypes:()=>d});const u=async(h,m,y,g)=>{const p=new AbortController,b=of(c,p.signal),C=[];try{h.pending.add(p),n(h),await Promise.resolve(h.effect(m,ut({},y,{getOriginalState:g,condition:(x,N)=>b(x,N).then(Boolean),take:b,delay:jl(p.signal),pause:en(p.signal),extra:i,signal:p.signal,fork:af(p.signal,C),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((x,N,$)=>{x!==p&&(x.abort(ga),$.delete(x))})},cancel:()=>{p.abort(ga),h.pending.delete(p)},throwIfCancelled:()=>{rt(p.signal)}})))}catch(x){x instanceof ir||io(s,x,{raisedBy:"effect"})}finally{await Promise.all(C),p.abort(rf),a(h),h.pending.delete(p)}},f=sf(t,r);return{middleware:h=>m=>y=>{if(!(0,xe.isAction)(y))return m(y);if(ri.match(y))return c(y.payload);if(Il.match(y)){f();return}if(ni.match(y))return d(y.payload);let g=h.getState();const p=()=>{if(g===no)throw new Error(process.env.NODE_ENV==="production"?K(23):`${or}: getOriginalState can only be called synchronously`);return g};let b;try{if(b=m(y),t.size>0){const C=h.getState(),x=Array.from(t.values());for(const N of x){let $=!1;try{$=N.predicate(y,C,g)}catch(T){$=!1,io(s,T,{raisedBy:"predicate"})}$&&u(N,y,h,p)}}}finally{g=no}return b},startListening:c,stopListening:d,clearListeners:f}},df=e=>({middleware:e,applied:new Map}),uf=e=>t=>t?.meta?.instanceId===e,ff=()=>{const e=ar(),t=new Map,r=Object.assign(Re("dynamicMiddleware/add",(...l)=>({payload:l,meta:{instanceId:e}})),{withTypes:()=>r}),n=Object.assign(function(...c){c.forEach(d=>{tt(t,d,df)})},{withTypes:()=>n}),a=l=>{const c=Array.from(t.values()).map(d=>tt(d.applied,l,d.middleware));return(0,xe.compose)(...c)},i=Zr(r,uf(e));return{middleware:l=>c=>d=>i(d)?(n(...d.payload),l.dispatch):a(l)(c)(d),addMiddleware:n,withMiddleware:r,instanceId:e}},pf=e=>"reducerPath"in e&&typeof e.reducerPath=="string",hf=e=>e.flatMap(t=>pf(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),ai=Symbol.for("rtk-state-proxy-original"),mf=e=>!!e&&!!e[ai],vf=new WeakMap,yf=(e,t,r)=>tt(vf,e,()=>new Proxy(e,{get:(n,a,i)=>{if(a===ai)return n;const s=Reflect.get(n,a,i);if(typeof s>"u"){const l=r[a];if(typeof l<"u")return l;const c=t[a];if(c){const d=c(void 0,{type:ar()});if(typeof d>"u")throw new Error(process.env.NODE_ENV==="production"?K(24):`The slice reducer for key "${a.toString()}" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);return r[a]=d,d}}return s}})),gf=e=>{if(!mf(e))throw new Error(process.env.NODE_ENV==="production"?K(25):"original must be used on state Proxy");return e[ai]},$f={},bf=(e=$f)=>e;function Nf(...e){const t=Object.fromEntries(hf(e)),r=()=>Object.keys(t).length?(0,xe.combineReducers)(t):bf;let n=r();function a(c,d){return n(c,d)}a.withLazyLoadedSlices=()=>a;const i={},s=(c,d={})=>{const{reducerPath:u,reducer:f}=c,v=t[u];return!d.overrideExisting&&v&&v!==f?(typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`inject\` to override already-existing reducer ${u} without specifying \`overrideExisting: true\``),a):(d.overrideExisting&&v!==f&&delete i[u],t[u]=f,n=r(),a)},l=Object.assign(function(d,u){return function(v,...h){return d(yf(u?u(v,...h):v,t,i),...h)}},{original:gf});return Object.assign(a,{inject:s,selector:l})}function K(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function jr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jr=function(r){return typeof r}:jr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jr(e)}function Kn(){}var Sf={getItem:Kn,setItem:Kn,removeItem:Kn};function xf(e){if((typeof self>"u"?"undefined":jr(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return process.env.NODE_ENV!=="production"&&console.warn("redux-persist ".concat(e," test failed, persistence will be disabled.")),!1}return!0}function Cf(e){var t="".concat(e,"Storage");return xf(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),Sf)}function _f(e){var t=Cf(e);return{getItem:function(n){return new Promise(function(a,i){a(t.getItem(n))})},setItem:function(n,a){return new Promise(function(i,s){i(t.setItem(n,a))})},removeItem:function(n){return new Promise(function(a,i){a(t.removeItem(n))})}}}var fr=e=>e?["services","professionals","time","confirm","success"]:["professionals","services","time","confirm","success"],wf={currentStep:"services",completedSteps:["services"],isOrder:!0},kl=Xe({name:"breadcrumbs",initialState:wf,reducers:{setIsOrder:(e,t)=>{e.isOrder=t.payload},goToStep:(e,t)=>{const r=fr(e.isOrder),n=t.payload,a=r.indexOf(e.currentStep),i=r.indexOf(n);if(i<=a){e.currentStep=n;return}const s=r[i-1];e.completedSteps.includes(s)&&(e.currentStep=n)},completeStep:(e,t)=>{const r=t.payload;e.completedSteps.includes(r)||e.completedSteps.push(r)},nextStep:e=>{const t=fr(e.isOrder),r=t[t.indexOf(e.currentStep)+1];r&&(e.completedSteps.includes(e.currentStep)||e.completedSteps.push(e.currentStep),e.currentStep=r)},prevStep:e=>{const t=fr(e.isOrder),r=t[t.indexOf(e.currentStep)-1];r&&(e.currentStep=r)},clearSteps:e=>{e.currentStep="services",e.completedSteps=["services"]},resetCompletedStepsFrom:(e,t)=>{const r=t.payload,n=fr(e.isOrder),a=n.indexOf(r);e.completedSteps=e.completedSteps.filter(i=>n.indexOf(i)<=a)}}}),{setIsOrder:Ef,goToStep:ba,completeStep:Sg,nextStep:_e,prevStep:xg,clearSteps:Cg,resetCompletedStepsFrom:oo}=kl.actions,Pf=kl.reducer,so={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},Rl=Xe({name:"outletDetails",initialState:so,reducers:{clearBooking:()=>so,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:Of,setOutletData:jf,setOutletToken:Tf}=Rl.actions,Af=Rl.reducer,Dl=Xe({name:"service",initialState:{superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null,loading:!0},reducers:{setServicePayload:(e,t)=>{e.superCategories=t.payload.superCategories,e.staff=t.payload.staff,e.loading=!1},setServiceLoading:(e,t)=>{e.loading=t.payload},setCategory:(e,t)=>{e.selectedCategory=t.payload},selectPrimaryService:(e,t)=>{const r=t.payload;e.selectedServices[0]?.id!==r.id?(e.selectedServices=[{...r,qty:1}],e.selectedProfessional&&((e.selectedProfessional.assignments??[]).some(n=>String(n.id)===String(r.id)&&!!n.assigned)||(e.selectedProfessional=null))):e.selectedServices.length||(e.selectedServices=[{...r,qty:1}])},toggleService:(e,t)=>{e.selectedServices.some(r=>r.id===t.payload.id)?e.selectedServices=[]:e.selectedServices=[{...t.payload,qty:1}]},toggleAdditionalService:(e,t)=>{const r=e.selectedServices.findIndex(n=>n.id===t.payload.id);r>-1?e.selectedServices.splice(r,1):e.selectedServices.push({...t.payload,qty:1})},toggleProfessional:(e,t)=>{e.selectedProfessional=t.payload},clearSelectedServices:e=>{e.selectedServices=[]},clearSelectedProfessional:e=>{e.selectedProfessional=null}}}),{setServicePayload:If,setServiceLoading:kf,setCategory:_g,selectPrimaryService:Rf,toggleService:Df,toggleAdditionalService:wg,clearSelectedServices:lo,clearSelectedProfessional:co,toggleProfessional:ii}=Dl.actions,Mf=Dl.reducer,qe="https://prod.aaravpos.com/api/v1",Ze=()=>({"Content-Type":"application/json",Authorization:`Bearer ${wn.getState()?.booking.outletDetails?.token}`}),uo=async(e,t,r)=>{const n=new URLSearchParams({available_online:"true",is_available_online_category:"true"});t&&n.append("tenantId",t),r&&n.append("outletId",r);const a=`${qe}/integration/service/code/${e}?${n}`,i=await fetch(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok)throw new Error("Failed to fetch services");return await i.json()},Lf=async(e,t,r)=>{const n=await fetch(`${qe}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`,{method:"GET",headers:Ze()});if(!n.ok)throw new Error("Failed to fetch services");return await n.json()},Ff=async e=>{const t=await fetch(`${qe}/integration/appointment/create`,{method:"POST",headers:Ze(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to fetch services");return await t.json()},Bf=async(e,t)=>{const r=await fetch(`${qe}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`,{method:"GET",headers:Ze()});if(!r.ok)throw new Error("Failed to fetch appointment details");return await r.json()},Uf=async({search:e,tenantId:t})=>{const r=await fetch(`${qe}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e||"")}`,{method:"GET",headers:Ze()});if(!r.ok)throw new Error("Failed to fetch customers");return(await r.json())?.data},Vf=async e=>{try{const t=await fetch(`${qe}/payment/pay/customer/direct`,{method:"POST",headers:Ze(),body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},zf=async e=>{try{const t=await fetch(`${qe}/payment/orders/${e}/invoicing/finalize`,{method:"POST",headers:Ze()}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},fo=e=>{const t=e?.consent_rule?.frequency??e?.consentFrequency??e?.frequency??"EVERY_VISIT";return t==="EVERY_X_DAYS"||t==="ONCE_PER_CUSTOMER"||t==="EVERY_VISIT"?t:"EVERY_VISIT"},oi=e=>{const t=!!(e?.requires_consent??e?.requiresConsent),r=String(e?.consent_form_id??e?.consentFormId??"").trim();return t&&!!r},po=e=>{const t=e?.consent_rule?.channelRules||e?.consent_rule?.channel_rules||[],r=(Array.isArray(t)?t.find(n=>String(n?.channel||"").toUpperCase()==="ONLINE_BOOKING"):null)?.method||e?.enforcement?.ONLINE_BOOKING||e?.enforcement?.online_booking;return r==="DRAW_SIGNATURE"||r==="TYPED_NAME"||r==="CHECKBOX_ONLY"?r:null},ho=async(e,t,r)=>{const n=await fetch(`${qe}/concent/check/${e}/${t}?serviceId=${r}`,{method:"GET",headers:Ze()});if(!n.ok)throw new Error("Failed to check consent requirement");return n.json()},qf=async e=>{const{tenantId:t,outletId:r,appointmentId:n,customerId:a,serviceId:i,formId:s,staffId:l,signatureType:c,isChecked:d,typedName:u,imageUrl:f}=e,v={tenantId:t,appointmentId:n,customerId:a,serviceIds:[i],outletId:r,concentFormId:s,signatureType:c,channel:"Online_Web",staffId:l};c==="CHECKBOX_ONLY"&&(v.isChecked=d??!0),u&&(v.typedName=u),f&&(v.imageUrl=f);const h=await fetch(`${qe}/concent/customer-sign`,{method:"POST",headers:Ze(),body:JSON.stringify(v)}),m=await h.json();if(!h.ok)throw m;return m},Tr=_n("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await Lf(e,t,r)),Ml=Xe({name:"slots",initialState:{selectedSlotIndexes:[],selectedSlotIds:[],selectedDate:null,selectedTime:null,slots:{morning:[],afternoon:[],evening:[]},loading:!1},reducers:{setSelectedSlots:(e,t)=>{e.selectedSlotIndexes=t.payload.indexes,e.selectedSlotIds=t.payload.ids},setSelectedDate:(e,t)=>{e.selectedDate=t.payload},setSelectedTime:(e,t)=>{e.selectedTime=t.payload},clearSlots:e=>{e.slots={morning:[],afternoon:[],evening:[]},e.selectedSlotIndexes=[],e.selectedSlotIds=[],e.selectedDate=null,e.selectedTime=null}},extraReducers:e=>{e.addCase(Tr.pending,t=>{t.loading=!0}).addCase(Tr.fulfilled,(t,r)=>{t.loading=!1,t.slots=r.payload?.data?.groups||{morning:[],afternoon:[],evening:[]}}).addCase(Tr.rejected,t=>{t.loading=!1})}}),{setSelectedSlots:pr,clearSlots:ft,setSelectedDate:pt,setSelectedTime:hr}=Ml.actions,Wf=Ml.reducer,Gf=()=>{try{const e=localStorage.getItem("isDarkMode");if(e!==null)return JSON.parse(e)}catch(e){console.error("Error reading isDarkMode from localStorage:",e)}return!1},Hf={button:{bg:"#d7263d",text:"#ffffff",bgHover:"#1f2937",textHover:"#ffffff"},colors:{bg:"#fafaf8",link:"#385b5a",text:"#e09898",bgHover:"#4c6f6e",textHover:"#ffffff"},isOpenSidebar:!1,isDarkMode:Gf()},Ll=Xe({name:"theme",initialState:Hf,reducers:{setTheme:(e,t)=>{if(t.payload?.button&&(e.button=t.payload.button),t.payload?.colors&&(e.colors=t.payload.colors),t.payload?.isDarkMode!==void 0){e.isDarkMode=t.payload.isDarkMode;try{localStorage.setItem("isDarkMode",JSON.stringify(t.payload.isDarkMode))}catch(r){console.error("Error writing isDarkMode to localStorage:",r)}}},setIsDarkMode:(e,t)=>{e.isDarkMode=t.payload;try{localStorage.setItem("isDarkMode",JSON.stringify(t.payload))}catch(r){console.error("Error writing isDarkMode to localStorage:",r)}},setSidebarOpen:(e,t)=>{e.isOpenSidebar=t.payload}}}),{setTheme:Kf,setIsDarkMode:mo,setSidebarOpen:$t}=Ll.actions,Yf=Ll.reducer,Ar=_n("appointment/create",async(e,{rejectWithValue:t})=>{try{return await Ff(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),vo={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking",payType:""},Fl=Xe({name:"appointment",initialState:vo,reducers:{resetAppointment:()=>vo,setBookingMode:(e,t)=>{e.bookingMode=t.payload},setUserDetails:(e,t)=>{e.userDetails=t.payload},setPayType:(e,t)=>{e.payType=t.payload},setTips:(e,t)=>{e.tipPct=t.payload},setAppointmentId:(e,t)=>{e.appointmentId=t.payload},clearUserDetails:e=>{e.userDetails=null}},extraReducers:e=>{e.addCase(Ar.pending,t=>{t.loading=!0,t.error=null}).addCase(Ar.fulfilled,(t,r)=>{t.loading=!1,t.success=!0,t.data=r.payload;const n=r.payload;t.appointmentId=n?.id||null,t.customerId=n?.customerId||n?.customer?.id||null}).addCase(Ar.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:ht,setBookingMode:Eg,setUserDetails:yo,setTips:Xf,setAppointmentId:mr,clearUserDetails:Zf,setPayType:Pg}=Fl.actions,Jf=Fl.reducer,Bl=Xe({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:Qf,clearOutletList:Og}=Bl.actions,e0=Bl.reducer,t0=(0,ya.combineReducers)({booking:(0,ya.combineReducers)({breadcrumbs:Pf,outletDetails:Af,service:Mf,slots:Wf,appointment:Jf,outletList:e0,theme:Yf})}),r0=(e,t)=>(t.type==="RESET_ALL"&&(e=void 0),t0(e,t)),n0=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),a0={key:"booking",storage:typeof window<"u"?_f("session"):n0()},i0=(0,Ke.persistReducer)(a0,r0),wn=dl({reducer:i0,devTools:process.env.NODE_ENV!=="production",middleware:e=>e({serializableCheck:{ignoredActions:[Ke.FLUSH,Ke.REHYDRATE,Ke.PAUSE,Ke.PERSIST,Ke.PURGE,Ke.REGISTER]}})}),si=(0,Ke.persistStore)(wn),jg=wn.getState,Me=Object.create(null);Me.open="0";Me.close="1";Me.ping="2";Me.pong="3";Me.message="4";Me.upgrade="5";Me.noop="6";var Ir=Object.create(null);Object.keys(Me).forEach(e=>{Ir[Me[e]]=e});var Na={type:"error",data:"parser error"},Ul=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Vl=typeof ArrayBuffer=="function",zl=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,li=({type:e,data:t},r,n)=>Ul&&t instanceof Blob?r?n(t):go(t,n):Vl&&(t instanceof ArrayBuffer||zl(t))?r?n(t):go(new Blob([t]),n):n(Me[e]+(t||"")),go=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function $o(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Yn;function o0(e,t){if(Ul&&e.data instanceof Blob)return e.data.arrayBuffer().then($o).then(t);if(Vl&&(e.data instanceof ArrayBuffer||zl(e.data)))return t($o(e.data));li(e,!1,r=>{Yn||(Yn=new TextEncoder),t(Yn.encode(r))})}var s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<64;e++)Dt[s0.charCodeAt(e)]=e;var l0=e=>{let t=e.length*.75,r=e.length,n,a=0,i,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),u=new Uint8Array(d);for(n=0;n<r;n+=4)i=Dt[e.charCodeAt(n)],s=Dt[e.charCodeAt(n+1)],l=Dt[e.charCodeAt(n+2)],c=Dt[e.charCodeAt(n+3)],u[a++]=i<<2|s>>4,u[a++]=(s&15)<<4|l>>2,u[a++]=(l&3)<<6|c&63;return d},c0=typeof ArrayBuffer=="function",ci=(e,t)=>{if(typeof e!="string")return{type:"message",data:ql(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:d0(e.substring(1),t)}:Ir[r]?e.length>1?{type:Ir[r],data:e.substring(1)}:{type:Ir[r]}:Na},d0=(e,t)=>{if(c0){const r=l0(e);return ql(r,t)}else return{base64:!0,data:e}},ql=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Wl="",u0=(e,t)=>{const r=e.length,n=new Array(r);let a=0;e.forEach((i,s)=>{li(i,!1,l=>{n[s]=l,++a===r&&t(n.join(Wl))})})},f0=(e,t)=>{const r=e.split(Wl),n=[];for(let a=0;a<r.length;a++){const i=ci(r[a],t);if(n.push(i),i.type==="error")break}return n};function p0(){return new TransformStream({transform(e,t){o0(e,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const i=new DataView(a.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{a=new Uint8Array(9);const i=new DataView(a.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(r)})}})}var Xn;function vr(e){return e.reduce((t,r)=>t+r.length,0)}function yr(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let a=0;a<t;a++)r[a]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function h0(e,t){Xn||(Xn=new TextDecoder);const r=[];let n=0,a=-1,i=!1;return new TransformStream({transform(s,l){for(r.push(s);;){if(n===0){if(vr(r)<1)break;const c=yr(r,1);i=(c[0]&128)===128,a=c[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(vr(r)<2)break;const c=yr(r,2);a=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(vr(r)<8)break;const c=yr(r,8),d=new DataView(c.buffer,c.byteOffset,c.length),u=d.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(Na);break}a=u*Math.pow(2,32)+d.getUint32(4),n=3}else{if(vr(r)<a)break;const c=yr(r,a);l.enqueue(ci(i?c:Xn.decode(c),t)),n=0}if(a===0||a>e){l.enqueue(Na);break}}}})}function le(e){if(e)return m0(e)}function m0(e){for(var t in le.prototype)e[t]=le.prototype[t];return e}le.prototype.on=le.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};le.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};le.prototype.off=le.prototype.removeListener=le.prototype.removeAllListeners=le.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===t||n.fn===t){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+e],this};le.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,t)}return this};le.prototype.emitReserved=le.prototype.emit;le.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};le.prototype.hasListeners=function(e){return!!this.listeners(e).length};var En=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),je=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),v0="arraybuffer";function Gl(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var y0=je.setTimeout,g0=je.clearTimeout;function Pn(e,t){t.useNativeTimers?(e.setTimeoutFn=y0.bind(je),e.clearTimeoutFn=g0.bind(je)):(e.setTimeoutFn=je.setTimeout.bind(je),e.clearTimeoutFn=je.clearTimeout.bind(je))}var $0=1.33;function b0(e){return typeof e=="string"?N0(e):Math.ceil((e.byteLength||e.size)*$0)}function N0(e){let t=0,r=0;for(let n=0,a=e.length;n<a;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function Hl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function S0(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function x0(e){let t={},r=e.split("&");for(let n=0,a=r.length;n<a;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var C0=class extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}},di=class extends le{constructor(e){super(),this.writable=!1,Pn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,r){return super.emitReserved("error",new C0(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=ci(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=S0(e);return t.length?"?"+t:""}},_0=class extends di{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};f0(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,u0(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Hl()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Kl=!1;try{Kl=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var w0=Kl;function E0(){}var P0=class extends _0{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let r=location.port;r||(r=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(n,a)=>{this.onError("xhr post error",n,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}},mt=class kr extends le{constructor(t,r,n){super(),this.createRequest=t,Pn(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=Gl(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=kr.requestsCount++,kr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=E0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete kr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};mt.requestsCount=0;mt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bo);else if(typeof addEventListener=="function"){const e="onpagehide"in je?"pagehide":"unload";addEventListener(e,bo,!1)}}function bo(){for(let e in mt.requests)mt.requests.hasOwnProperty(e)&&mt.requests[e].abort()}var O0=(function(){const e=Yl({xdomain:!1});return e&&e.responseType!==null})(),j0=class extends P0{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=O0&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new mt(Yl,this.uri(),e)}};function Yl(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||w0))return new XMLHttpRequest}catch{}if(!t)try{return new je[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Xl=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",T0=class extends di{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,r=Xl?{}:Gl(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,r)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;li(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}n&&En(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Hl()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Zn=je.WebSocket||je.MozWebSocket,A0=class extends T0{createSocket(e,t,r){return Xl?new Zn(e,t,r):t?new Zn(e,t):new Zn(e)}doWrite(e,t){this.ws.send(t)}},I0=class extends di{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=h0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=p0();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();const a=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;this._writer.write(r).then(()=>{n&&En(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}},k0={websocket:A0,webtransport:I0,polling:j0},R0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,D0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sa(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let a=R0.exec(e||""),i={},s=14;for(;s--;)i[D0[s]]=a[s]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=M0(i,i.path),i.queryKey=L0(i,i.query),i}function M0(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function L0(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,i){a&&(r[a]=i)}),r}var xa=typeof addEventListener=="function"&&typeof removeEventListener=="function",Rr=[];xa&&addEventListener("offline",()=>{Rr.forEach(e=>e())},!1);var Dr=class Mr extends le{constructor(t,r){if(super(),this.binaryType=v0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=Sa(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Sa(r.host).host);Pn(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=x0(this.opts.query)),xa&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Rr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=4,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Mr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Mr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(t+=b0(n)),r>0&&t>this._maxPayload)return this.writeBuffer.slice(0,r);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,En(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Mr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xa&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Rr.indexOf(this._offlineEventListener);n!==-1&&Rr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};Dr.protocol=4;var F0=class extends Dr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),r=!1;Dr.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Dr.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=t.name,this.emitReserved("upgradeError",f)}}))};function a(){r||(r=!0,d(),t.close(),t=null)}const i=u=>{const f=new Error("probe error: "+u);f.transport=t.name,a(),this.emitReserved("upgradeError",f)};function s(){i("transport closed")}function l(){i("socket closed")}function c(u){t&&u.name!==t.name&&a()}const d=()=>{t.removeListener("open",n),t.removeListener("error",i),t.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};t.once("open",n),t.once("error",i),t.once("close",s),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}},Zl=class extends F0{constructor(e,t={}){const r=typeof e=="object",n=r?{...e}:{...t};(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>k0[a]).filter(a=>!!a)),super(r?n:e,n)}},Tg=Zl.protocol;function B0(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=Sa(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}var U0=typeof ArrayBuffer=="function",V0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Jl=Object.prototype.toString,z0=typeof Blob=="function"||typeof Blob<"u"&&Jl.call(Blob)==="[object BlobConstructor]",q0=typeof File=="function"||typeof File<"u"&&Jl.call(File)==="[object FileConstructor]";function ui(e){return U0&&(e instanceof ArrayBuffer||V0(e))||z0&&e instanceof Blob||q0&&e instanceof File}function Lr(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(Lr(e[r]))return!0;return!1}if(ui(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Lr(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Lr(e[r]))return!0;return!1}function W0(e){const t=[],r=e.data,n=e;return n.data=Fr(r,t),n.attachments=t.length,{packet:n,buffers:t}}function Fr(e,t,r){if(!e)return e;if(ui(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=Fr(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!r)return Fr(e.toJSON(),t,!0);const n={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=Fr(e[a],t));return n}return e}function G0(e,t){return e.data=Ca(e.data,t),delete e.attachments,e}function Ca(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Ca(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Ca(e[r],t));return e}var H0=Ms({Decoder:()=>Y0,Encoder:()=>K0,PacketType:()=>q,isPacketValid:()=>ep,protocol:()=>5}),Ql=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var q;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(q||(q={}));var K0=class{constructor(e){this.replacer=e}encode(e){return(e.type===q.EVENT||e.type===q.ACK)&&Lr(e)?this.encodeAsBinary({type:e.type===q.EVENT?q.BINARY_EVENT:q.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===q.BINARY_EVENT||e.type===q.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=W0(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}},Y0=class ec extends le{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const n=r.type===q.BINARY_EVENT;n||r.type===q.BINARY_ACK?(r.type=n?q.EVENT:q.ACK,this.reconstructor=new X0(r)):super.emitReserved("decoded",r)}else if(ui(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const n={type:Number(t.charAt(0))};if(q[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===q.BINARY_EVENT||n.type===q.BINARY_ACK){const i=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const s=t.substring(i,r);if(s!=Number(s)||t.charAt(r)!=="-")throw new Error("Illegal attachments");const l=Number(s);if(!tc(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=l}if(t.charAt(r+1)==="/"){const i=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(i,r)}else n.nsp="/";const a=t.charAt(r+1);if(a!==""&&Number(a)==a){const i=r+1;for(;++r;){const s=t.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===t.length)break}n.id=Number(t.substring(i,r+1))}if(t.charAt(++r)){const i=this.tryParse(t.substr(r));if(ec.isPayloadValid(n.type,i))n.data=i;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case q.CONNECT:return tn(r);case q.DISCONNECT:return r===void 0;case q.CONNECT_ERROR:return typeof r=="string"||tn(r);case q.EVENT:case q.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Ql.indexOf(r[0])===-1);case q.ACK:case q.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},X0=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=G0(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Z0(e){return typeof e=="string"}var tc=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function J0(e){return e===void 0||tc(e)}function tn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q0(e,t){switch(e){case q.CONNECT:return t===void 0||tn(t);case q.DISCONNECT:return t===void 0;case q.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Ql.indexOf(t[0])===-1);case q.ACK:return Array.isArray(t);case q.CONNECT_ERROR:return typeof t=="string"||tn(t);default:return!1}}function ep(e){return Z0(e.nsp)&&J0(e.id)&&Q0(e.type,e.data)}function ke(e,t,r){return e.on(t,r),function(){e.off(t,r)}}var tp=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),rc=class extends le{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ke(e,"open",this.onopen.bind(this)),ke(e,"packet",this.onpacket.bind(this)),ke(e,"error",this.onerror.bind(this)),ke(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var r,n,a;if(tp.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:q.EVENT,data:t};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const c=this.ids++,d=t.pop();this._registerAckCallback(c,d),i.id=c}const s=(n=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||n===void 0?void 0:n.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var r;const n=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);t.call(this,new Error("operation has timed out"))},n),i=(...s)=>{this.io.clearTimeoutFn(a),t.apply(this,s)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((r,n)=>{const a=(i,s)=>i?n(i):r(s);a.withError=!0,t.push(a),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...a)=>(this._queue[0],n!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(n)):(this._queue.shift(),t&&t(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:q.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case q.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case q.EVENT:case q.BINARY_EVENT:this.onevent(e);break;case q.ACK:case q.BINARY_ACK:this.onack(e);break;case q.DISCONNECT:this.ondisconnect();break;case q.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:q.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:q.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}};function wt(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wt.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};wt.prototype.reset=function(){this.attempts=0};wt.prototype.setMin=function(e){this.ms=e};wt.prototype.setMax=function(e){this.max=e};wt.prototype.setJitter=function(e){this.jitter=e};var _a=class extends le{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Pn(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new wt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const n=t.parser||H0;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Zl(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=ke(t,"open",function(){r.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},i=ke(t,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{n(),a(new Error("timeout")),t.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ke(e,"ping",this.onping.bind(this)),ke(e,"data",this.ondata.bind(this)),ke(e,"error",this.onerror.bind(this)),ke(e,"close",this.onclose.bind(this)),ke(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){En(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new rc(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}},kt={};function Br(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=B0(e,t.path||"/socket.io"),n=r.source,a=r.id,i=r.path,s=kt[a]&&i in kt[a].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new _a(n,t):(kt[a]||(kt[a]=new _a(n,t)),c=kt[a]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(Br,{Manager:_a,Socket:rc,io:Br,connect:Br});var rp="https://prod.aaravpos.com",nc=(0,S.createContext)(void 0),np=({children:e})=>{const{selectedProfessional:t}=(0,L.useSelector)(a=>a.booking.service),[r]=(0,S.useState)(()=>Br(rp,{path:"/socket.io",transports:["websocket"],autoConnect:!1,reconnection:!0,reconnectionAttempts:5,reconnectionDelay:3e3})),n=a=>{r.connected||r.connect(),r.off("connect"),r.on("connect",()=>{r.emit("joinStaff",a)})};return(0,S.useEffect)(()=>{if(!t?.id)return;const a={staffId:t.id,roomId:t.id,room:t.id,id:t.id};n(a)},[t?.id]),(0,o.jsx)(nc.Provider,{value:{socket:r,connectSocket:n},children:e})},ap=()=>{const e=(0,S.useContext)(nc);if(!e)throw new Error("useSocket must be used within SocketProvider");return e};function ip({children:e}){return(0,o.jsx)(L.Provider,{store:wn,children:(0,o.jsx)(Ls,{loading:null,persistor:si,children:(0,o.jsx)(np,{children:e})})})}var op=e=>{if(!e)return;const t=document.documentElement;e.isDarkMode?(t.classList.add("dark"),t.setAttribute("data-theme","dark")):(t.classList.remove("dark"),t.setAttribute("data-theme","light")),e?.button?.bg&&t.style.setProperty("--btn-bg",e.button.bg),e.button?.text&&t.style.setProperty("--btn-text",e.button.text),e.button?.bgHover&&t.style.setProperty("--btn-bg-hover",e.button.bgHover),e.button?.textHover&&t.style.setProperty("--btn-text-hover",e.button.textHover),e.colors?.bg&&t.style.setProperty("--app-bg",e.colors.bg),e.colors?.link&&t.style.setProperty("--app-link",e.colors.link),e.colors?.text&&t.style.setProperty("--app-text",e.colors.text),e.colors?.bgHover&&t.style.setProperty("--app-bg-hover",e.colors.bgHover),e.colors?.textHover&&t.style.setProperty("--app-text-hover",e.colors.textHover)},ac=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),sp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),No=e=>{const t=lp(e);return t.charAt(0).toUpperCase()+t.slice(1)},Jn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cp=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},dp=(0,S.createContext)({}),up=()=>(0,S.useContext)(dp),fp=(0,S.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...l},c)=>{const{size:d=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:v="currentColor",className:h=""}=up()??{},m=n??f?Number(r??u)*24/Number(t??d):r??u;return(0,S.createElement)("svg",{ref:c,...Jn,width:t??d??Jn.width,height:t??d??Jn.height,stroke:e??v,strokeWidth:m,className:ac("lucide",h,a),...!i&&!cp(l)&&{"aria-hidden":"true"},...l},[...s.map(([y,g])=>(0,S.createElement)(y,g)),...Array.isArray(i)?i:[i]])}),Z=(e,t)=>{const r=(0,S.forwardRef)(({className:n,...a},i)=>(0,S.createElement)(fp,{ref:i,iconNode:t,className:ac(`lucide-${sp(No(e))}`,`lucide-${e}`,n),...a}));return r.displayName=No(e),r},pp=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],hp=Z("calendar-1",pp),mp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],vp=Z("calendar-days",mp),yp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fi=Z("check",yp),gp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pi=Z("chevron-down",gp),$p=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rn=Z("chevron-left",$p),bp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Et=Z("chevron-right",bp),Np=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wa=Z("circle-check",Np),Sp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],bt=Z("clock-3",Sp),xp=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],ic=Z("dollar-sign",xp),Cp=[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]],_p=Z("euro",Cp),wp=[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]],Ep=Z("indian-rupee",wp),Pp=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Op=Z("moon",Pp),jp=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],So=Z("move-left",jp),Tp=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Ap=Z("move-right",Tp),Ip=[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]],kp=Z("package-2",Ip),Rp=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dp=Z("plus",Rp),Mp=[["path",{d:"M18 7c0-5.333-8-5.333-8 0",key:"1prm2n"}],["path",{d:"M10 7v14",key:"18tmcs"}],["path",{d:"M6 21h12",key:"4dkmi1"}],["path",{d:"M6 13h10",key:"ybwr4a"}]],Lp=Z("pound-sterling",Mp),Fp=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Bp=Z("rotate-cw",Fp),Up=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],oc=Z("scissors",Up),Vp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hi=Z("search",Vp),zp=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],qp=Z("shopping-cart",zp),Wp=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],Gp=Z("store",Wp),Hp=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Kp=Z("sun",Hp),Yp=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],Xp=Z("sunrise",Yp),Zp=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],sc=Z("user",Zp),Jp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],We=Z("x",Jp),Qp=({status:e})=>(0,o.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),eh=({item:e,onSelect:t,selected:r,isLoading:n,isDisabled:a})=>(0,o.jsxs)("div",{className:`aaravpos-outlet-card ${r?"selected":""} ${e.isOpen?"":"closed"} ${a&&!n?"loading-disabled":""} ${n?"loading-card":""}`,onClick:()=>{a||t(String(e?.id))},children:[(0,o.jsxs)("div",{className:"aaravpos-outlet-card-top",children:[(0,o.jsx)(Qp,{status:e.isOpen}),n&&(0,o.jsx)("div",{className:"aaravpos-outlet-card-loader-corner",children:(0,o.jsx)("div",{className:"aaravpos-loader"})})]}),(0,o.jsx)("div",{className:"aaravpos-outlet-card-content",children:(0,o.jsxs)("div",{className:"aaravpos-outlet-card-inner",children:[(0,o.jsx)("h2",{className:"aaravpos-outlet-card-title",children:e.outletName}),(0,o.jsx)("p",{className:"aaravpos-outlet-card-address",children:e.address})]})})]});function th({outlets:e,onSelectOutlet:t,loadingOutletId:r}){const[n,a]=(0,S.useState)(null),[i,s]=(0,S.useState)(""),l=!!r,c=u=>{if(l)return;a(u);const f=e.find(v=>String(v.id)===String(u));f&&t(f)},d=(0,S.useMemo)(()=>{if(!i.trim())return e;const u=i.toLowerCase();return e.filter(f=>f.outletName?.toLowerCase().includes(u)||f.address?.toLowerCase().includes(u))},[e,i]);return(0,o.jsxs)("div",{className:"aaravpos-container",children:[(0,o.jsxs)("div",{className:"aaravpos-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-title",children:"Choose Your Outlet"}),(0,o.jsx)("div",{className:"aaravpos-outlet-divider"})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(hi,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,disabled:l,onChange:u=>s(u.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:i&&!l&&(0,o.jsx)("button",{onClick:()=>s(""),className:"aaravpos-search-clear",type:"button",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{className:"aaravpos-outlet-list-wrapper",children:d.length>0?(0,o.jsx)("div",{className:"aaravpos-outlet-grid",children:d.map((u,f)=>{const v=String(n)===String(u.id)||String(r)===String(u.id),h=String(r)===String(u.id);return(0,o.jsx)("div",{children:(0,o.jsx)(eh,{item:u,onSelect:c,selected:v,isLoading:h,isDisabled:l})},u.id||f)})}):(0,o.jsx)("div",{className:"aaravpos-empty-state",children:(0,o.jsxs)("div",{className:"aaravpos-empty-content",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-title",children:"No outlets found"}),(0,o.jsx)("p",{className:"aaravpos-empty-text",children:"Try searching with a different keyword"})]})})})]})}var rh={USD:ic,INR:Ep,EUR:_p,GBP:Lp},ie=({size:e=20,className:t})=>{const r=(0,L.useSelector)(a=>a.booking.outletDetails?.currency),n=r?rh[r]:ic;return(0,o.jsx)(n,{size:e,className:`aaravpos-currency-icon ${t||""}`.trim()})},ot=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},nh=e=>Number(e.price||e.min_price||0),Ea=(e,{perUnit:t=!1}={})=>{const r=nh(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+(i.taxRate||0)*n:i.taxType==="PERCENTAGE"?a+r*n*(i.taxRate||0)/100:a:a,0)},Qn=async()=>{try{const e=await fetch("https://api.ipify.org?format=json");if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return(await e.json()).ip}catch(e){return console.error("Failed to fetch public IP:",e),null}},gr=e=>{if(!e||typeof e!="string")return!1;const t=e.trim();return t.includes("..")?!1:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9]+(?:\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/.test(t)};function lc(){const[e,t]=(0,S.useState)({width:0,height:0});return(0,S.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var ah={services:[co,ft,ht],professionals:[co,ft,ht],time:[ft,ht],confirm:[]},ih={professionals:[ft,lo,ht],services:[lo,ft,ht],time:[ft,ht],confirm:[]},oh=[{label:"Services",page:"services",icon:(0,o.jsx)(oc,{size:16})},{label:"Professional",page:"professionals",icon:(0,o.jsx)(sc,{size:16})},{label:"Time Slot",page:"time",icon:(0,o.jsx)(bt,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,o.jsx)(wa,{size:16})}],sh=[{label:"Professional",page:"professionals",icon:(0,o.jsx)(sc,{size:16})},{label:"Service",page:"services",icon:(0,o.jsx)(oc,{size:16})},{label:"Time",page:"time",icon:(0,o.jsx)(bt,{size:16})},{label:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,o.jsx)(wa,{size:13})]}),page:"confirm",icon:(0,o.jsx)(wa,{size:16})}];function Pt(){const e=(0,L.useDispatch)(),{width:t}=lc(),{isOpenSidebar:r}=(0,L.useSelector)(C=>C.booking.theme),{isService:n}=(0,L.useSelector)(C=>C.booking.outletDetails),{selectedServices:a}=(0,L.useSelector)(C=>C.booking.service),i=(0,L.useSelector)(C=>C.booking.outletList.outlets),{currentStep:s,completedSteps:l}=(0,L.useSelector)(C=>C.booking.breadcrumbs),c=n?ah:ih,d=n?oh:sh,u=d.findIndex(C=>C.page===s),f=()=>{si.purge(),e({type:"RESET_ALL"})},v=()=>{if(u===0&&i.length>1){f(),e(Of());return}if(u<=0)return;const C=d[u-1].page;c[C]?.forEach(x=>{e(x())}),e(oo(C)),e(ba(C))},h=v,m=v,y=d[u],g=t<991,p=a?.length||0,b=Array.isArray(i)&&i.length>1;return(0,o.jsx)(o.Fragment,{children:g?(0,o.jsxs)("div",{className:"aaravpos-mobile-stepper",children:[(0,o.jsx)("button",{type:"button",onClick:h,className:"aaravpos-mobile-back-btn",children:(0,o.jsx)(rn,{size:22})}),(0,o.jsx)("span",{className:"aaravpos-mobile-step-label",children:y?.label})]}):(0,o.jsxs)("div",{className:"aaravpos-desktop-stepper",children:[(0,o.jsx)("button",{type:"button",onClick:b?m:h,className:"aaravpos-desktop-back-btn",children:(0,o.jsx)(rn,{size:20})}),(0,o.jsx)("nav",{className:"aaravpos-step-nav",children:d.map((C,x)=>{const N=s===C.page,$=l?.includes(C.page)||x<=u;return(0,o.jsxs)("button",{type:"button",onClick:()=>{if(!$)return;const T=C.page;d.findIndex(R=>R.page===T)<u&&(c[T]?.forEach(R=>{e(R())}),e(oo(T))),e(ba(T))},className:`aaravpos-step-btn ${$?"clickable":"disabled"} ${N?"active":"inactive"}`,children:[(0,o.jsx)("span",{className:`aaravpos-step-icon ${N?"active":"inactive"}`,children:C.icon}),(0,o.jsx)("span",{children:C.label})]},C.page)})}),!r&&(0,o.jsxs)("button",{type:"button",className:"aaravpos-cart-btn",onClick:()=>e($t(!0)),children:[(0,o.jsx)("span",{className:"aaravpos-count",children:p}),(0,o.jsx)(qp,{size:18})]})]})})}function Ot({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:a,isSidebarOpen:i=!1}){const{isOpenSidebar:s}=(0,L.useSelector)(l=>l.booking.theme);return(0,o.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,o.jsxs)("div",{className:s?"aaravpos-layout-wrapper":"",children:[(0,o.jsxs)("main",{className:"aaravpos-main-content",children:[e,(0,o.jsx)("div",{className:"aaravpos-mobile-action-wrapper",children:n?(0,o.jsx)("button",{onClick:a,className:"aaravpos-cta-btn",children:(0,o.jsx)("span",{children:"View Order"})}):r})]}),(0,o.jsx)("aside",{className:`aaravpos-sidebar ${s?"open":""}`,children:t})]}),i&&(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var cc=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:a})=>{const i=(0,L.useDispatch)(),{outletName:s,isService:l}=(0,L.useSelector)(d=>d.booking.outletDetails),{selectedServices:c}=(0,L.useSelector)(d=>d.booking.service);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[s||"-"," Outlet"]}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>i($t(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",style:{marginBottom:8},children:"Selected Professional"}),(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:e.color||"#111"},children:ot(e.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:e.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:e.staff_type})]})]})]}),(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Services"}),(0,o.jsx)("ul",{className:l?l&&e?.id?"aaravpos-pro-order-list":"aaravpos-pro-order-list-single":"aaravpos-pro-order-list-pro",children:t?.length>0?(0,o.jsx)(o.Fragment,{children:t.map(d=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:d.name}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("p",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(bt,{size:13}),(0,o.jsxs)("span",{children:[d.min_time||d.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),d.price||d.min_price]})]})]},d.id))}):(0,o.jsx)(o.Fragment,{children:c?.length>0&&c?.map(d=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:d.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(bt,{size:13}),(0,o.jsxs)("span",{children:[d.min_time||d.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),d.price||d.min_price]})]})]},d.id))})})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[l&&e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),r]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Duration"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[n," min"]})]})]}),(0,o.jsx)("button",{disabled:l?!t.length:!e,onClick:()=>a("time"),className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[l?"Choose Time":"Choose Services",(0,o.jsx)(Et,{size:16})]})})]})]})]})]})};function lh(){const e=(0,L.useDispatch)(),{staff:t,selectedProfessional:r}=(0,L.useSelector)(i=>i.booking.service),n=!t||t.length===0,a=i=>{if(!i?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const s=new Date,l=i.futureLeaveDates.find(c=>{if(c.status!=="APPROVED"||c.leaveType!=="FULL_DAY")return!1;const d=new Date(c.startDate),u=new Date(c.endDate);return s>=d&&s<=u});return l?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(l.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Ot,{sidebar:(0,o.jsx)(cc,{pro:r,goToStep:()=>e(_e())}),children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),n&&(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No staff Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No staff available for selected services"})]}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:t?.map((i,s)=>{const{isOnLeave:l,availableFrom:c}=a(i);return(0,o.jsxs)("div",{onClick:()=>{e(ii(i)),e(pt(null)),e(_e())},className:`aaravpos-pro-card ${r?.id===i.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[i.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,alt:i.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:i.color||"#111"},children:ot(i.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:i.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:i.staff_type})]})]}),l&&c&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",c]})]})]},s)})})})]})]})}function ch(){return(0,o.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,o.jsx)("div",{className:"aaravpos-professional-skeleton",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}function dh(){const{width:e}=lc(),t=(0,L.useDispatch)(),{staff:r,selectedServices:n,selectedProfessional:a,loading:i}=(0,L.useSelector)(p=>p.booking.service),[s,l]=(0,S.useState)(!1),c=e<1024,d=n.map(p=>p.id),u=n.length>0,f=(0,S.useMemo)(()=>d.length?r.filter(p=>d.every(b=>p.assignments?.some(C=>String(C.id)===String(b)&&!!C.assigned))):[],[r,d]);(0,S.useEffect)(()=>{if(!i&&u&&f.length===0){const p=setTimeout(()=>l(!0),300);return()=>clearTimeout(p)}else l(!1)},[i,u,f]);const v=p=>{if(!p?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const b=new Date,C=p.futureLeaveDates.find(x=>{if(x.status!=="APPROVED"||x.leaveType!=="FULL_DAY")return!1;const N=new Date(x.startDate),$=new Date(x.endDate);return b>=N&&b<=$});return C?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(C.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}},h=(0,S.useMemo)(()=>{if(!a?.id)return[];const p=r?.find(b=>b.id===a.id);return p?n.map(b=>{const C=p.assignments?.find(N=>N.id===b.id),x={...b,price:C?.price||b.price||b.min_price||0,duration:C?.duration||b.estimated_time||b.min_time||0,qty:b.qty||1};return{...x,tax:Ea(x)}}):[]},[a,r,n]),m=(0,S.useMemo)(()=>h.reduce((p,b)=>p+Number(b.price||b.min_price||0)*b.qty,0),[h]),y=(0,S.useMemo)(()=>h.reduce((p,b)=>p+(b?.duration||0)*b.qty,0),[h]),g=p=>{if(!n||n.length===0)return!0;const b=p.assignments??[];return!n.every(C=>b.some(x=>String(x.id)===String(C.id)&&!!x.assigned))};return(0,o.jsxs)(Ot,{sidebar:(0,o.jsx)(cc,{pro:a,selectedStaffServices:h,totalPrice:m,totalDuration:y,goToStep:()=>t(_e())}),renderButton:c&&a?(0,o.jsxs)("button",{onClick:()=>t(_e()),className:"aaravpos-btn",disabled:!n.length,children:[(0,o.jsxs)("span",{children:[n.length," ",n.length===1?"Service":"Services"," Selected"]}),(0,o.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",fontWeight:600},children:["Next ",(0,o.jsx)(Et,{size:16})]})]}):null,children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-page-subtitle",children:"Available based on selected services"}),s&&(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No staff Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No staff available for selected services"})]}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:i?Array.from({length:10}).map((p,b)=>(0,o.jsx)(ch,{},`skeleton-${b}`)):r?.map(p=>{const{isOnLeave:b,availableFrom:C}=v(p),x=g(p)||b||C,N=a?.id===p.id;return(0,o.jsx)("div",{onClick:()=>{x||(t(ii(p)),t(pt(null)),t(_e()))},className:`booking-pro-card ${x?"disabled":N?"active":""}`,children:(0,o.jsxs)("div",{className:"booking-pro-card-header",children:[(0,o.jsx)("div",{className:"booking-pro-avatar-container",children:p.imageUrl?(0,o.jsx)("img",{src:p.imageUrl,alt:p.name,className:"booking-pro-avatar-img"}):(0,o.jsx)("div",{className:"booking-pro-avatar-circle",style:{background:p.color||"#111"},children:ot(p.name)})}),(0,o.jsxs)("div",{className:"booking-pro-info",children:[(0,o.jsx)("p",{className:"booking-pro-name",children:p.name}),(0,o.jsx)("p",{className:"booking-pro-role",children:p.staff_type})]})]})},p.id)})})})]})]})}function uh({selectedServices:e,totalPrice:t,goToStep:r}){const n=(0,L.useDispatch)(),{outletName:a,isService:i}=(0,L.useSelector)(s=>s.booking?.outletDetails);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[a||"-"," Outlet"]}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>n($t(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"SELECTED SERVICES"}),(0,o.jsx)("ul",{className:"aaravpos-order-list",children:e?.length>0&&e?.map(s=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:s.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(kp,{size:13}),(0,o.jsx)("span",{children:s.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(bt,{size:13}),(0,o.jsxs)("span",{children:[s.min_time||s.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),s.price||s.min_price]})]})]},s.id))})]}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),t]})]}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[i?"Choose Professional":"Choose Time",(0,o.jsx)(Et,{size:16})]})})})]})]})]})}var $r=({className:e,style:t})=>(0,o.jsx)("div",{className:`aaravpos-skeleton-block ${e||""}`,style:t,children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer"})});function dc(){return(0,o.jsxs)("div",{className:"aaravpos-service-card",style:{cursor:"default",pointerEvents:"none"},children:[(0,o.jsx)($r,{style:{height:"16px",width:"70%",marginTop:"12px",marginBottom:"4px"}}),(0,o.jsx)($r,{style:{height:"12px",width:"95%",margin:"8px 0px"}}),(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",marginBottom:"8px"},children:[(0,o.jsx)($r,{style:{height:"14px",width:"40px"}}),(0,o.jsx)($r,{style:{height:"14px",width:"50px"}})]})]})}function fh(){const e=(0,L.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,selectedProfessional:i,loading:s}=(0,L.useSelector)(N=>N.booking.service),[l,c]=(0,S.useState)(null),[d,u]=(0,S.useState)(null),[f,v]=(0,S.useState)(""),h=new Set(i?i?.assignments?.map(N=>N.id):[]),m=new Set(i?i?.assignments?.map(N=>N.categoryId):[]),y=n?.map(N=>({...N,categories:N.categories?.map($=>({...$,services:$.services?.filter(T=>h.has(T.id))||[]})).filter($=>m.has($.id)&&$.services.length>0)||[]})).filter(N=>N.categories.length>0)||[],g=(0,S.useMemo)(()=>l?d?d?.services||[]:l?.categories?.flatMap(N=>N.services||[])||[]:[],[l,d]),p=(0,S.useMemo)(()=>y?.flatMap(N=>N.categories?.flatMap($=>$.services||[]))||[],[y]),b=(0,S.useMemo)(()=>{const N=f.trim().toLowerCase();return N?p.filter($=>$.name?.toLowerCase().includes(N)||$.description?.toLowerCase().includes(N)):g},[f,p,g]),C=N=>N.taxRows?.some($=>$.isActive)||!1,x=a.reduce((N,$)=>N+Number($.price||$.min_price||0)*$.qty,0);return(0,S.useEffect)(()=>{if(!y?.length)return;const N=y.find($=>$?.categories?.some(T=>T?.services?.length>0));N&&!l&&(c(N),u(null))},[y,l]),(0,o.jsxs)(Ot,{sidebar:(0,o.jsx)(uh,{selectedServices:a,totalPrice:x,goToStep:()=>e(_e())}),renderButton:b?.length>0?(0,o.jsx)("button",{onClick:()=>e(_e()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,o.jsx)(Et,{size:16})]})}):null,children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",i?.name,"'s available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(hi,{size:14})}),(0,o.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:f,onChange:N=>v(N.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:N=>{t.current&&(t.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper super-cat",children:y?.map(N=>(0,o.jsx)("button",{onClick:()=>{c(N),u(null)},className:`aaravpos-supercategory-btn ${l?.id===N.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:N?.isStandAloneCategory?"Standalone":N.name})},N.id))}),l?.categories?.some(N=>N?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:N=>{r.current&&(r.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper supercategory-row",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${d?"":"active"}`,children:["All Services (",l?.categories?.reduce((N,$)=>N+($?.services?.length||0),0),")"]}),l?.categories?.map(N=>(0,o.jsxs)("button",{onClick:()=>u(N),className:`aaravpos-supercategory-btn ${d?.id===N.id?"active":""}`,children:[N.name," (",N.services.length,")"]},N.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:s?Array.from({length:10}).map((N,$)=>(0,o.jsx)(dc,{},$)):(0,o.jsx)(o.Fragment,{children:b?.length?b?.map((N,$)=>{const T=a.some(R=>R.id===N.id);return(0,o.jsxs)("div",{onClick:()=>{e(Df(N))},className:`aaravpos-service-card ${T?"active":""}`,children:[C(N)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),oi(N)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:N.name}),(0,o.jsx)("div",{className:"aaravpos-service-description-wrapper",children:(0,o.jsx)("p",{className:"aaravpos-service-description",children:N.description})}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:N.estimated_time?`${N.estimated_time} min`:`${N.min_time}-${N.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:N.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",N.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",N.min_price," - ",(0,o.jsx)(ie,{className:"aaravpos-currency-icon"})," ",N.max_price]})})]})]},$)}):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}var Qe=({className:e,style:t})=>(0,o.jsx)("div",{className:`aaravpos-skeleton-block ${e||""}`,style:t,children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer"})});function ph(){const e=(0,L.useDispatch)();return(0,o.jsxs)("div",{className:"aaravpos-sidebar-skeleton",children:[(0,o.jsxs)("div",{className:"skeleton-header",children:[(0,o.jsx)(Qe,{className:"aaravpos-skeleton-title"}),(0,o.jsx)("button",{className:"aaravpos-sidebar-close-btn",onClick:()=>e($t(!1)),children:(0,o.jsx)(We,{size:18})})]}),(0,o.jsx)("div",{className:"aaravpos-skeleton-subtitle-wrapper",children:(0,o.jsx)(Qe,{className:"aaravpos-skeleton-subtitle"})}),(0,o.jsx)("div",{className:"aaravpos-skeleton-list",children:Array.from({length:3}).map((t,r)=>(0,o.jsxs)("div",{className:`aaravpos-skeleton-item ${r!==2?"aaravpos-skeleton-border":""}`,children:[(0,o.jsx)(Qe,{className:"aaravpos-skeleton-item-name"}),(0,o.jsx)(Qe,{className:"aaravpos-skeleton-item-price"})]},r))}),(0,o.jsx)("div",{className:"aaravpos-divider aaravpos-skeleton-divider"}),(0,o.jsxs)("div",{className:"aaravpos-skeleton-subtotal-row",children:[(0,o.jsx)(Qe,{className:"aaravpos-skeleton-subtotal-label"}),(0,o.jsx)(Qe,{className:"aaravpos-skeleton-subtotal-val"})]}),(0,o.jsx)(Qe,{className:"aaravpos-skeleton-button"})]})}function hh(){const e=(0,L.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,loading:i}=(0,L.useSelector)(p=>p.booking.service),{outletName:s}=(0,L.useSelector)(p=>p.booking?.outletDetails),[l,c]=(0,S.useState)(null),[d,u]=(0,S.useState)(null),[f,v]=(0,S.useState)(""),h=(0,S.useMemo)(()=>l?d?d?.services||[]:l?.categories?.flatMap(p=>p.services||[])||[]:[],[l,d]),m=(0,S.useMemo)(()=>n?.flatMap(p=>p?.categories?.flatMap(b=>b.services||[]))||[],[n]),y=(0,S.useMemo)(()=>{const p=f.trim().toLowerCase();return p?m.filter(b=>b.name?.toLowerCase().includes(p)||b.description?.toLowerCase().includes(p)):h},[f,m,h]),g=p=>p.taxRows?.some(b=>b.isActive)||!1;return(0,S.useEffect)(()=>{if(!n?.length)return;const p=n.find(b=>b?.categories?.some(C=>C?.services?.length>0));p&&!l&&(c(p),u(null))},[n,l]),(0,o.jsxs)(Ot,{sidebar:(0,o.jsx)(ph,{}),children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Book A Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from"," ",(0,o.jsx)("span",{className:"aaravpos-text-bold",children:s})," Outlet's available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(hi,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search services...",value:f,onChange:p=>v(p.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,o.jsx)(We,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:p=>{t.current&&(t.current.scrollLeft+=p.deltaY)},className:"aaravpos-supercategory-wrapper super-cat",children:n?.filter(p=>p?.categories?.some(b=>b?.services?.length>0))?.map(p=>(0,o.jsx)("button",{onClick:()=>{c(p),u(null)},className:`aaravpos-supercategory-btn ${l?.id===p.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:p?.isStandAloneCategory?"Standalone":p.name})},p.id))}),l?.categories?.some(p=>p?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:p=>{r.current&&(r.current.scrollLeft+=p.deltaY)},className:"aaravpos-supercategory-wrapper supercategory-row",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${d?"":"active"}`,children:["All Services (",l?.categories?.reduce((p,b)=>p+(b?.services?.length||0),0),")"]}),l?.categories?.filter(p=>p?.services?.length>0)?.map(p=>(0,o.jsxs)("button",{onClick:()=>u(p),className:`aaravpos-supercategory-btn ${d?.id===p.id?"active":""}`,children:[p.name," (",p.services.length,")"]},p.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:i?Array.from({length:10}).map((p,b)=>(0,o.jsx)(dc,{},b)):(0,o.jsx)(o.Fragment,{children:y?.length?y?.map((p,b)=>{const C=a[0]?.id===p.id;return(0,o.jsxs)("div",{onClick:()=>{e(Rf(p)),e(_e())},className:`aaravpos-service-card ${C?"active":""}`,children:[g(p)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),oi(p)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:p.name}),(0,o.jsx)("p",{className:"aaravpos-service-description",children:p.description}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:p.estimated_time?`${p.estimated_time} min`:`${p.min_time}-${p.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:p.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.min_price," - ",(0,o.jsx)(ie,{className:"aaravpos-currency-icon"}),p.max_price]})})]})]},b)}):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var Mt=({dateObj:e,selectedProfessional:t,outletTimeZone:r})=>{if(!t)return!1;const n=he.DateTime.fromObject({year:e.year,month:e.month,day:e.day},{zone:r}),a=n.toISODate();if((t?.futureLeaveDates||[]).some(d=>{if(d.status!=="APPROVED"||d.leaveType!=="FULL_DAY")return!1;const u=d?.leavePeriod?.date;return u?he.DateTime.fromISO(u,{zone:"utc"}).toISODate()===a:!1}))return!0;const i=(t?.dateOverrides||[]).find(d=>he.DateTime.fromISO(d.date,{zone:"utc"}).toISODate()===a);if(i?.type==="CLOSED")return!0;if(i?.type==="TIME")return!1;const s=t?.weeklyHours?.weeklyJson||{},l={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",7:"sun"}[n.weekday],c=s?.[l];return!c||!!c.isClosed},mh=e=>{try{if(!e)throw new Error("Missing timezone");const t=he.DateTime.now().setZone(e);if(!t.isValid)throw new Error("Invalid timezone");return Array.from({length:4},(r,n)=>{const a=t.plus({months:n}).startOf("month");return{label:a.toFormat("LLLL yyyy"),monthIdx:a.month,year:a.year,startDow:a.startOf("month").weekday%7,days:a.daysInMonth||0}})}catch(t){return console.error("generateMonths error:",t),[]}},vh=["S","M","T","W","T","F","S"];function yh({isOpen:e,onClose:t}){const r=(0,L.useDispatch)(),{selectedDate:n}=(0,L.useSelector)(m=>m.booking.slots),{selectedProfessional:a}=(0,L.useSelector)(m=>m.booking.service),{timeZone:i}=(0,L.useSelector)(m=>m.booking.outletDetails),s=(0,S.useMemo)(()=>i?mh(i):[],[i]),l=()=>{if(!n)return 0;const m=s.findIndex(y=>y.monthIdx===n.month&&y.year===n.year);return m>=0?m:0},[c,d]=(0,S.useState)(l());(0,S.useEffect)(()=>{if(!e||!n||!s.length)return;const m=s.findIndex(y=>y.monthIdx===n.month&&y.year===n.year);m>=0&&d(m)},[e,n,s]);const u=s[c];if(!e)return null;const f=he.DateTime.now().setZone(i??"UTC").startOf("day"),v=f.plus({months:3}).minus({days:1}),h=(m,y)=>{const g=he.DateTime.fromObject({year:u.year,month:m,day:y},{zone:i||"UTC"}),p={day:y,month:m,year:u.year,fullDate:g.toISODate()||""},b=g.startOf("day");b<f||b>v||Mt({dateObj:p,selectedProfessional:a,outletTimeZone:i||"UTC"})||(r(pt({month:m,day:y,year:u.year})),t())};return(0,o.jsx)("div",{className:"aaravpos-date-modal-overlay",onClick:m=>m.target===m.currentTarget&&t(),children:(0,o.jsxs)("div",{className:"aaravpos-date-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-date-modal-header",children:[(0,o.jsx)("h2",{className:"aaravpos-date-modal-title",children:"Pick a Date"}),(0,o.jsx)("button",{onClick:t,className:"aaravpos-date-close-btn",children:(0,o.jsx)(We,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-date-modal-body",children:[(0,o.jsxs)("div",{className:"aaravpos-date-nav",children:[(0,o.jsx)("button",{disabled:c===0,onClick:()=>d(m=>Math.max(m-1,0)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(rn,{})}),(0,o.jsx)("div",{className:"aaravpos-date-month-label",children:u?.label}),(0,o.jsx)("button",{disabled:c===s.length-1,onClick:()=>d(m=>Math.min(m+1,s.length-1)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(Et,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-calendar-grid",children:[vh.map((m,y)=>(0,o.jsx)("div",{className:"aaravpos-calendar-weekday",children:m},y)),Array.from({length:u?.startDow||0}).map((m,y)=>(0,o.jsx)("div",{},`e${y}`)),Array.from({length:u?.days||0},(m,y)=>y+1).map(m=>{const y=n?.month===u?.monthIdx&&n?.day===m,g=u?.monthIdx===f.month&&m===f.day,p=he.DateTime.fromObject({year:u.year,month:u.monthIdx,day:m},{zone:i||"UTC"}),b={day:m,month:u.monthIdx,year:u.year,fullDate:p.toISODate()||""},C=p.startOf("day"),x=C<f,N=C>v,$=Mt({dateObj:b,selectedProfessional:a,outletTimeZone:i||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{$||h(u.monthIdx,m)},className:["aaravpos-calendar-day",!y&&!$&&"aaravpos-calendar-day-active",g&&!y&&"aaravpos-calendar-day-today",y&&"aaravpos-calendar-day-selected",$&&"aaravpos-calendar-day-disabled",(x||N)&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:[$&&(0,o.jsx)("div",{className:"aaravpos-calendar-day-slash"}),(0,o.jsx)("span",{className:"aaravpos-calendar-day-text",children:m})]},m)})]})]})]})})}var gh=e=>Number(e.price||e.min_price||0),xo=(e,{perUnit:t=!1}={})=>{const r=gh(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+i.taxRate*n:i.taxType==="PERCENTAGE"?a+r*n*i.taxRate/100:a:a,0)},$h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uc({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:a=0,onTipChange:i,consentRequired:s=!1,consentCompleted:l=0,totalConsents:c=0,checkingConsent:d=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:v}){const{selectedSlotIndexes:h,slots:m,selectedDate:y}=(0,L.useSelector)(A=>A.booking.slots),{staff:g,selectedServices:p,selectedProfessional:b}=(0,L.useSelector)(A=>A.booking.service),{timeZone:C}=(0,L.useSelector)(A=>A.booking.outletDetails),x=he.DateTime.now().setZone(C??"UTC"),[N,$]=(0,S.useState)(""),[T,R]=(0,S.useState)(!1),G=(0,S.useRef)(null),Y=(0,S.useRef)(null),[se,te]=(0,S.useState)(0),ve=[0,5,10,15,20],de=(0,S.useMemo)(()=>[...m?.morning||[],...m?.afternoon||[],...m?.evening||[]],[m]),be=15,re=(0,S.useMemo)(()=>{if(!b?.id)return[];const A=g?.find(w=>w.id===b.id);return A?p.map(w=>{const H=A.assignments?.find(ge=>ge.id===w.id),J={...w,price:H?.price||w.price||w.min_price||0,duration:H?.duration||w.estimated_time||w.min_time||0};return{...J,tax:xo(J),unitTax:xo(J,{perUnit:!0})}}):[]},[b,g,p]),ue=re.reduce((A,w)=>A+Number(w.price||w.min_price)*(w.qty||1),0),ne=re.reduce((A,w)=>A+Number(w.duration)*(w.qty||1),0),pe=Math.ceil(ne/be),Pe=A=>{if(!de.length)return"";const w=de[A]?.start_time_12h,H=de[A+pe-1];return!w||!H?"":`${w} - ${H.end_time_12h??H.start_time_12h}`},ye=y||{day:x.day,month:x.month,year:x.year},j=h?.[0],k=j!==void 0?Pe(j):null,V=ye.month??0,z=k?`${$h[V-1]} ${ye.day} at ${k}`:null,F=re.reduce((A,w)=>A+w.tax,0),U=Number(a)||0,_=n?ue*U/100:0,O=ue+F+_;(0,S.useEffect)(()=>{n&&a==null&&i?.(0)},[n,a,i]);const D=(0,S.useMemo)(()=>u?"Processing...":d?"Checking consents...":s&&l<c?`Sign Consents (${l}/${c})`:(0,o.jsxs)(o.Fragment,{children:[e||"Book Appointment",(0,o.jsx)(Ap,{})]}),[u,d,s,l,c,e]),M=f||u||d||!k;return(0,S.useEffect)(()=>{const A=()=>{const H=G.current?.offsetHeight||0,J=Y.current?.offsetHeight||0,ge=(H+(window.innerWidth<=991?190:205)||0)+J;te(window.innerHeight-ge)};A();const w=new ResizeObserver(()=>{A()});return Y.current&&w.observe(Y.current),G.current&&w.observe(G.current),window.addEventListener("resize",A),()=>{w.disconnect(),window.removeEventListener("resize",A)}},[re,n,l,c,T]),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsxs)("p",{className:"aaravpos-order-title",children:["Your Order",v&&(0,o.jsx)("button",{type:"button",className:"aaravpos-sidebar-close-btn",onClick:()=>v(),children:(0,o.jsx)(We,{})})]}),b?.id&&(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[b.imageUrl?(0,o.jsx)("img",{src:b.imageUrl,alt:b.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:b.color||"#111"},children:ot(b.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:b.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:b.staff_type})]})]}),(0,o.jsxs)("div",{className:"aaravpos-date-time",children:[(0,o.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),z?(0,o.jsx)("span",{className:"aaravpos-date-time-value",children:z}):(0,o.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,o.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${se}px`},children:re?.length>0&&re.map(A=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:A.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(bt,{size:13}),(0,o.jsxs)("span",{children:[A.min_time||A.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(ie,{size:12}),A.price||A.min_price]})]})]},A.id))}),(0,o.jsxs)("div",{className:"third",ref:Y,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-tip-title",children:"Add Tip"}),(0,o.jsx)("div",{className:"aaravpos-tip-options",children:[...ve,"custom"].map((A,w)=>{const H=A==="custom",J=H?T:U===A,ge=w===0,Le=w===[...ve,"custom"].length-1;return(0,o.jsx)("button",{type:"button",onClick:()=>{H?(R(!0),i?.(Number(N)||0)):(R(!1),$(""),i?.(Number(A)))},className:`aaravpos-tip-btn
19
+ ${ge||Le?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${J?"aaravpos-tip-btn-active":""}`,children:H?"Custom":A===0?"No tip":`${A}%`},A)})}),T&&(0,o.jsx)("div",{className:"aaravpos-tip-input-wrapper",children:(0,o.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:N,onChange:A=>{const w=A.target.value;(w===""||Number(w)>=0&&Number(w)<=100)&&($(w),i?.(Number(w)||0))},className:"aaravpos-tip-input"})})]}),s&&l<c&&(0,o.jsxs)("div",{className:"aaravpos-consent-box",children:[(0,o.jsxs)("p",{className:"aaravpos-consent-text",children:["Consent Required: ",l,"/",c," completed"]}),(0,o.jsx)("div",{className:"aaravpos-consent-progress",children:(0,o.jsx)("div",{className:"aaravpos-consent-progress-bar",style:{width:`${l/c*100}%`}})})]}),(0,o.jsxs)("div",{className:"aaravpos-mt-auto",children:[(0,o.jsx)(br,{label:"Service",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),ue.toFixed(2)]})}),ne>0&&(0,o.jsx)(br,{label:"Total Duration",value:`${ne} min`}),n&&(0,o.jsx)(br,{label:`Tip (${U}%)`,value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),_.toFixed(2)]})}),(!r||k)&&(0,o.jsx)(br,{label:"Taxes",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ie,{size:14}),F.toFixed(2)]})}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Total"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(ie,{size:16}),O.toFixed(2)]})]}),(0,o.jsx)("button",{type:"button",onClick:t,disabled:M,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,o.jsx)("span",{className:"aaravpos-common-btn-content",children:D})})]})]})]})}function br({label:e,value:t}){return(0,o.jsxs)("div",{className:"aaravpos-summary-row",children:[(0,o.jsx)("span",{className:"aaravpos-summary-label",children:e}),(0,o.jsx)("span",{className:"aaravpos-summary-value",children:t})]})}function bh(){return(0,o.jsx)("div",{className:"aaravpos-scroll-area",children:Array.from({length:3}).map((e,t)=>(0,o.jsx)("div",{className:"aaravpos-slot-section",children:(0,o.jsxs)("div",{className:"aaravpos-slot-section-header",children:[(0,o.jsx)("div",{className:"aaravpos-slot-skeleton-title shimmer"}),(0,o.jsx)("div",{className:"aaravpos-slot-skeleton-arrow shimmer"})]})},t))})}var Co=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Nh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function Sh(){const e=(0,L.useDispatch)(),{socket:t}=ap(),[r,n]=(0,S.useState)(11),{staff:a,selectedServices:i,selectedProfessional:s}=(0,L.useSelector)(_=>_.booking.service),{isService:l}=(0,L.useSelector)(_=>_.booking.outletDetails),{tenantId:c,timeZone:d}=(0,L.useSelector)(_=>_?.booking?.outletDetails),{selectedSlotIndexes:u,selectedDate:f,selectedTime:v,slots:h,loading:m}=(0,L.useSelector)(_=>_.booking.slots),[y,g]=(0,S.useState)(!1),[p,b]=(0,S.useState)(0),C=15,x=(0,S.useMemo)(()=>[h.morning,h.afternoon,h.evening].flat(),[h]),N=(0,S.useMemo)(()=>he.DateTime.now().setZone(d).startOf("day"),[d]),$=(0,S.useMemo)(()=>N.plus({months:3}).minus({days:1}),[N]),T=i.map(_=>_.id),R=(0,S.useMemo)(()=>T.length?a.filter(_=>T.every(O=>_?.assignments?.some(D=>D.id===O&&D.assigned)??!1)):[],[a,T]),G=(0,S.useMemo)(()=>R.filter(_=>_.id!==s?.id),[R,s]),Y=_=>{_.id!==s?.id&&(e(ii(_)),e(pt(null)),e(hr(null)),e(pr({indexes:[],ids:[]})))},se=(_,O)=>{try{if(!_.isValid||!O.isValid)throw new Error("Invalid timezone or date range");const D=Math.floor(O.diff(_,"days").days)+1;return Array.from({length:D},(M,A)=>{const w=_.plus({days:A});return{day:w.day,month:w.month,year:w.year,fullDate:w.toISODate()}})}catch(D){return console.error("generateDates error:",D),[]}},te=(0,S.useMemo)(()=>se(N,$),[N,$]),ve=(0,S.useMemo)(()=>{if(!s?.id)return[];const _=a?.find(O=>O.id===s.id);return _?i.map(O=>{const D=_.assignments?.find(M=>M.id===O.id);return{...O,price:D?.price||O.price||O.min_price||0,duration:D?.duration||O.estimated_time||O.min_time||0,qty:D?.qty||1}}):[]},[s,a,i]).reduce((_,O)=>_+Number(O.duration)*(O.qty||1),0),de=Math.ceil(ve/C),be=f?he.DateTime.fromObject(f).toFormat("yyyy-MM-dd"):null,re=(0,S.useCallback)(()=>{!s?.id||!be||e(Tr({tenantId:c,staffId:s.id,date:be}))},[e,c,s?.id,be]);(0,S.useEffect)(()=>{re()},[re]),(0,S.useEffect)(()=>{if(!t)return;const _=O=>{O.staffId===s?.id&&re()};return t.on("appointment:updated",_),()=>{t.off("appointment:updated",_)}},[t,s?.id,re]);const ue=_=>{b(O=>Math.max(0,Math.min(te.length-r,O+_*4)))},ne=()=>te.find(_=>!Mt({dateObj:_,selectedProfessional:s,outletTimeZone:d||"UTC"}));(0,S.useEffect)(()=>{if(f||!s)return;const _=ne();_&&e(pt({day:_.day,month:_.month,year:_.year}))},[f,s,te,d,e]),(0,S.useEffect)(()=>{if(!f||!te.length)return;const _=te.findIndex(D=>D.day===f.day&&D.month===f.month&&D.year===f.year);if(_===-1)return;const O=Math.max(0,Math.min(te.length-r,_-Math.floor(r/2)));b(O)},[f,te,r]);const pe=_=>{const O=he.DateTime.fromISO(_.fullDate||"",{zone:d||"UTC"}).startOf("day");if(O<N||O>$||Mt({dateObj:_,selectedProfessional:s,outletTimeZone:d||"UTC"})){ee.toast.warning("Staff is unavailable on this date");return}e(pt({day:_.day,month:_.month,year:_.year})),e(hr(null))},Pe=_=>{if(!x.length)return;const O=x.slice(_,_+de);if(O.length<de){ee.toast.warning("You don't have sufficient time for selected service");return}if(O.some(A=>A.isBooked||A.status!=="AVAILABLE"||A.disabled)){ee.toast.warning("Selected time range is not fully available");return}e(hr(x[_].start_time));const D=Array.from({length:de},(A,w)=>_+w),M=D.map(A=>x[A]?.id);e(pr({indexes:D,ids:M})),setTimeout(()=>{e(_e())},200)};(0,S.useEffect)(()=>{if(!v||!x.length)return;const _=x.findIndex(D=>D.start_time===v);if(_===-1)return;const O=Array.from({length:de},(D,M)=>_+M);if(!(O.length===u.length&&O.every((D,M)=>D===u[M]))){const D=O.map(M=>x[M]?.id);e(pr({indexes:O,ids:D}))}},[v,x,de,u]),(0,S.useEffect)(()=>{const _=()=>{const O=window.innerWidth;O<350?n(2):O<420?n(3):O<575?n(4):O<680?n(6):O<991?n(8):O<1280?n(10):n(12)};return _(),window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}},[]);const ye=h?.morning||[],j=h?.afternoon||[],k=h?.evening||[],V=_=>_.some(O=>!O.isBooked&&O.status==="AVAILABLE"&&!O.disabled),z=()=>V(ye)?"morning":V(j)?"afternoon":V(k)?"evening":null,[F,U]=(0,S.useState)(z());return(0,S.useEffect)(()=>{const _=u[0],O=x[_];O&&(ye.some(D=>D.id===O.id)?U("morning"):j.some(D=>D.id===O.id)?U("afternoon"):k.some(D=>D.id===O.id)&&U("evening"))},[u,x,ye,j,k]),(0,S.useEffect)(()=>{e(hr(null)),e(pr({indexes:[],ids:[]}))},[f,e]),(0,o.jsxs)(Ot,{sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(uc,{buttonText:"Fill Details",onButtonClick:()=>{if(!v||!u.length){ee.toast.warning("Please select a time slot");return}e(_e())},showTaxesOnlyIfTime:!0})}),children:[(0,o.jsx)(Pt,{}),(0,o.jsx)("div",{style:{marginTop:15},children:(0,o.jsx)("h1",{className:"aaravpos-page-title",style:{marginBottom:10},children:"Choose a Time"})}),(0,o.jsxs)("div",{className:"aaravpos-date-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-date-strip",children:[(0,o.jsx)(_o,{onClick:()=>ue(-1),children:(0,o.jsx)(rn,{size:20})}),te.slice(p,p+r).map(_=>{const O=he.DateTime.fromObject({year:_.year,month:_.month,day:_.day},{zone:d||"UTC"}),D=O.weekday%7,M=he.DateTime.now().setZone(d).startOf("day"),A=O.hasSame(M,"day"),w=f?.day===_.day&&f?.month===_.month&&f?.year===_.year,H=O.startOf("day"),J=H<N,ge=H>$,Le=J||ge||Mt({dateObj:_,selectedProfessional:s,outletTimeZone:d||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{Le||pe(_)},className:["aaravpos-date-card",J||ge||Le?"aaravpos-date-card-disabled":w?"aaravpos-date-card-active":"aaravpos-date-card-default"].filter(Boolean).join(" "),children:[Le&&(0,o.jsx)("div",{className:"aaravpos-date-disabled-slash"}),(0,o.jsx)("span",{className:"aaravpos-date-week",children:Nh[D]}),(0,o.jsx)("span",{className:"aaravpos-date-day",children:_.day}),A&&(0,o.jsx)("span",{className:"aaravpos-date-today",children:"TODAY"}),Le&&(0,o.jsx)("span",{className:"aaravpos-date-unavailable",children:"UNAVAILABLE"})]},`${_.day}-${_.month}-${_.year}`)}),(0,o.jsx)(_o,{onClick:()=>ue(1),children:(0,o.jsx)(Et,{size:20})})]}),(0,o.jsxs)("button",{onClick:()=>g(!0),className:"aaravpos-calendar-btn",children:[(0,o.jsx)(hp,{size:16}),f?.month!=null?`${Co[f.month-1]} ${f.year}`:`${Co[N.month-1]} ${N.year}`]})]}),(0,o.jsxs)("div",{className:"aaravpos-professional-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-selected-professional",children:[s?.imageUrl?(0,o.jsx)("img",{src:s.imageUrl,alt:s.name,className:"aaravpos-selected-professional-image"}):(0,o.jsx)("div",{className:"aaravpos-selected-professional-avatar",style:{background:s?.color||"#111"},children:ot(s?.name)}),(0,o.jsxs)("div",{className:"aaravpos-selected-professional-content",children:[(0,o.jsx)("p",{className:"aaravpos-selected-professional-name",children:s?.name}),(0,o.jsx)("p",{className:"aaravpos-selected-professional-services",children:s?.staff_type})]})]}),l&&G.length>0&&(0,o.jsx)(xh,{professionals:R,selectedProfessional:s,onSelect:Y})]}),(0,o.jsxs)("div",{className:"aaravpos-scroll-area",style:m?{height:300}:{},children:[m?(0,o.jsx)(bh,{}):(0,o.jsx)(o.Fragment,{children:x?.length?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ea,{label:"Morning",icon:(0,o.jsx)(Xp,{size:18,className:"aaravpos-slot-icon"}),slots:ye,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="morning",onToggle:()=>U(F==="morning"?null:"morning")}),(0,o.jsx)(ea,{label:"Afternoon",icon:(0,o.jsx)(Kp,{size:18,className:"aaravpos-slot-icon"}),slots:j,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="afternoon",onToggle:()=>U(F==="afternoon"?null:"afternoon")}),(0,o.jsx)(ea,{label:"Evening",icon:(0,o.jsx)(Op,{size:18,className:"aaravpos-slot-icon"}),slots:k,allSlots:x,selectedSlotIndexes:u,handleSlotSelect:Pe,isOpen:F==="evening",onToggle:()=>U(F==="evening"?null:"evening")})," "]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-supercategory-wrapper"}),(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Slots Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:"No slots available for selected date. Please choose a different date."})]})]})}),(0,o.jsx)(yh,{isOpen:y,onClose:()=>g(!1)})]})]})}function _o({onClick:e,children:t}){return(0,o.jsx)("button",{onClick:e,className:"aaravpos-date-nav-btn",children:t})}function ea({icon:e,label:t,slots:r,allSlots:n,selectedSlotIndexes:a,handleSlotSelect:i,isOpen:s,onToggle:l}){return!r||r?.length===0?null:(0,o.jsxs)("div",{className:"aaravpos-slot-section",children:[(0,o.jsxs)("div",{onClick:l,className:"aaravpos-slot-section-header",children:[(0,o.jsxs)("div",{className:"aaravpos-slot-section-title",children:[(0,o.jsx)("span",{children:e})," ",t]}),(0,o.jsx)("span",{className:`aaravpos-slot-section-arrow ${s?"aaravpos-slot-section-arrow-open":""}`,children:(0,o.jsx)(pi,{})})]}),s&&(0,o.jsx)("div",{className:"aaravpos-slot-section-content",children:(0,o.jsx)("div",{className:"aaravpos-slot-grid",children:r.map(c=>{const d=n.findIndex(h=>h.id===c.id),u=a.includes(d),f=c.disabled,v=c.isBooked||c.status!=="AVAILABLE"||f;return(0,o.jsxs)("div",{onClick:()=>{v||i(d)},className:`aaravpos-slot-card ${v?"aaravpos-slot-card-disabled":u?"aaravpos-slot-card-selected":"aaravpos-slot-card-default"}`,children:[(0,o.jsx)("span",{className:"aaravpos-slot-time",children:c.start_time_12h}),(0,o.jsx)("span",{className:"aaravpos-slot-status",children:c.disabled?"":c.isBooked?"Booked":"Available"})]},c.id)})})})]})}function xh({professionals:e,selectedProfessional:t,onSelect:r}){const[n,a]=(0,S.useState)(!1);return(0,o.jsxs)("div",{className:"aaravpos-professional-dropdown",children:[(0,o.jsxs)("button",{onClick:()=>a(i=>!i),className:"aaravpos-professional-dropdown-btn",children:[(0,o.jsx)("span",{className:"aaravpos-professional-dropdown-text",children:"Choose Professional"}),(0,o.jsx)(pi,{size:18,className:`aaravpos-professional-dropdown-icon ${n?"aaravpos-professional-dropdown-icon-open":""}`})]}),n&&(0,o.jsx)("div",{className:"aaravpos-professional-dropdown-menu",children:e.filter(i=>i.id!==t?.id).map((i,s,l)=>(0,o.jsxs)("div",{onClick:()=>{r(i),a(!1)},className:`aaravpos-professional-dropdown-item ${s!==l.length-1?"aaravpos-professional-dropdown-item-border":""}`,children:[i.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,className:"aaravpos-professional-dropdown-avatar",alt:i.name}):(0,o.jsx)("div",{className:"aaravpos-professional-dropdown-avatar-placeholder",style:{background:i.color||"#111"},children:ot(i.name)}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"aaravpos-professional-dropdown-name",children:i.name}),(0,o.jsx)("p",{className:"aaravpos-professional-dropdown-type",children:i.staff_type})]})]},i.id))})]})}var Ch=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),_h=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},wh=e=>e.replace(/\D/g,"").slice(0,3);function Eh({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,L.useSelector)(u=>u.booking?.outletDetails),{control:a,handleSubmit:i,reset:s,formState:{errors:l,isSubmitting:c}}=(0,Ue.useForm)({defaultValues:{name:"",number:"",expiry:"",cvv:""}}),d=async u=>{await t({name:u.name.trim(),number:u.number.trim(),expiry:u.expiry,cvv:u.cvv})&&e()};return(0,o.jsx)("div",{className:"aaravpos-payment-overlay",children:(0,o.jsx)("form",{onSubmit:i(d),className:"aaravpos-payment-form",children:(0,o.jsxs)("div",{className:"aaravpos-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-payment-header",children:[(0,o.jsx)("h2",{className:"aaravpos-payment-title",children:"Make a payment"}),(0,o.jsxs)("span",{className:"aaravpos-payment-amount",children:[(0,o.jsx)(ie,{size:14}),r?.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-fields",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"name",className:"aaravpos-payment-label",children:["Card Holder Name ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"name",control:a,rules:{required:"Name required",pattern:{value:/^[A-Za-z ]+$/,message:"Only letters allowed"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"name",autoComplete:"cc-name",placeholder:"Card Holder Name",onChange:f=>{const v=f.target.value.replace(/[^A-Za-z ]/g,"");u.onChange(v)},className:"aaravpos-custom-input"})}),l.name&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.name.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"number",className:"aaravpos-payment-label",children:["Card Number ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"number",control:a,rules:{required:"Card number required",validate:u=>u.replace(/\s/g,"").length===16||"Must be 16 digits"},render:({field:u})=>(0,o.jsx)("input",{...u,id:"number",placeholder:"4242 4242 4242 4242",onChange:f=>{u.onChange(Ch(f.target.value))},className:"aaravpos-custom-input"})}),l.number&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.number.message})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"expiry",className:"aaravpos-payment-label",children:["Expiry Date ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"expiry",control:a,rules:{required:"Expiry required",validate:u=>{if(!/^\d{2}\/\d{2}$/.test(u))return"Invalid format";const[f,v]=u.split("/").map(Number);if(f<1||f>12)return"Invalid month";const h=he.DateTime.now().setZone(n),m=h.year%100,y=h.month;return v<m||v===m&&f<y?"Card expired":!0}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"expiry",placeholder:"MM/YY",onChange:f=>{u.onChange(_h(f.target.value))},className:"aaravpos-custom-input"})}),l.expiry&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.expiry.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"cvv",className:"aaravpos-payment-label",children:["CVV ",(0,o.jsx)("span",{className:"aaravpos-payment-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{name:"cvv",control:a,rules:{required:"CVV required",minLength:{value:3,message:"3 digits required"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"cvv",placeholder:"CVV",onChange:f=>{u.onChange(wh(f.target.value))},className:"aaravpos-custom-input"})}),l.cvv&&(0,o.jsx)("p",{className:"aaravpos-payment-error",children:l.cvv.message})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-payment-btn-grid",children:[(0,o.jsx)("button",{type:"button",onClick:()=>{s(),e()},className:"aaravpos-payment-cancel-btn",children:"Cancel"}),(0,o.jsx)("button",{type:"submit",disabled:c,className:"aaravpos-payment-submit-btn",children:c?"Processing...":"Proceed"})]})]})})})}function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pa.apply(null,arguments)}function Ph(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Oh(e,t){if(e==null)return{};var r,n,a=Ph(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function jh(e,t){if(Nt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Th(e){var t=jh(e,"string");return Nt(t)=="symbol"?t:t+""}function wo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Th(n.key),n)}}function Ah(e,t,r){return t&&wo(e.prototype,t),r&&wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ih(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oa(e,t){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Oa(e,t)}function kh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oa(e,t)}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(e)}function fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fc=function(){return!!e})()}function Rh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dh(e,t){if(t&&(Nt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rh(e)}function Mh(e){var t=fc();return function(){var r,n=nn(e);if(t){var a=nn(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Dh(this,r)}}var Lh=Ae((e=>{var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function x($){if(typeof $=="object"&&$!==null){var T=$.$$typeof;switch(T){case r:switch($=$.type,$){case d:case u:case a:case s:case i:case v:return $;default:switch($=$&&$.$$typeof,$){case c:case f:case y:case m:case l:return $;default:return T}}case n:return T}}}function N($){return x($)===u}e.AsyncMode=d,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=l,e.Element=r,e.ForwardRef=f,e.Fragment=a,e.Lazy=y,e.Memo=m,e.Portal=n,e.Profiler=s,e.StrictMode=i,e.Suspense=v,e.isAsyncMode=function($){return N($)||x($)===d},e.isConcurrentMode=N,e.isContextConsumer=function($){return x($)===c},e.isContextProvider=function($){return x($)===l},e.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===r},e.isForwardRef=function($){return x($)===f},e.isFragment=function($){return x($)===a},e.isLazy=function($){return x($)===y},e.isMemo=function($){return x($)===m},e.isPortal=function($){return x($)===n},e.isProfiler=function($){return x($)===s},e.isStrictMode=function($){return x($)===i},e.isSuspense=function($){return x($)===v},e.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===a||$===u||$===s||$===i||$===v||$===h||typeof $=="object"&&$!==null&&($.$$typeof===y||$.$$typeof===m||$.$$typeof===l||$.$$typeof===c||$.$$typeof===f||$.$$typeof===p||$.$$typeof===b||$.$$typeof===C||$.$$typeof===g)},e.typeOf=x})),Fh=Ae((e=>{process.env.NODE_ENV!=="production"&&(function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function x(w){return typeof w=="string"||typeof w=="function"||w===a||w===u||w===s||w===i||w===v||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===m||w.$$typeof===l||w.$$typeof===c||w.$$typeof===f||w.$$typeof===p||w.$$typeof===b||w.$$typeof===C||w.$$typeof===g)}function N(w){if(typeof w=="object"&&w!==null){var H=w.$$typeof;switch(H){case r:var J=w.type;switch(J){case d:case u:case a:case s:case i:case v:return J;default:var ge=J&&J.$$typeof;switch(ge){case c:case f:case y:case m:case l:return ge;default:return H}}case n:return H}}}var $=d,T=u,R=c,G=l,Y=r,se=f,te=a,ve=y,de=m,be=n,re=s,ue=i,ne=v,pe=!1;function Pe(w){return pe||(pe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ye(w)||N(w)===d}function ye(w){return N(w)===u}function j(w){return N(w)===c}function k(w){return N(w)===l}function V(w){return typeof w=="object"&&w!==null&&w.$$typeof===r}function z(w){return N(w)===f}function F(w){return N(w)===a}function U(w){return N(w)===y}function _(w){return N(w)===m}function O(w){return N(w)===n}function D(w){return N(w)===s}function M(w){return N(w)===i}function A(w){return N(w)===v}e.AsyncMode=$,e.ConcurrentMode=T,e.ContextConsumer=R,e.ContextProvider=G,e.Element=Y,e.ForwardRef=se,e.Fragment=te,e.Lazy=ve,e.Memo=de,e.Portal=be,e.Profiler=re,e.StrictMode=ue,e.Suspense=ne,e.isAsyncMode=Pe,e.isConcurrentMode=ye,e.isContextConsumer=j,e.isContextProvider=k,e.isElement=V,e.isForwardRef=z,e.isFragment=F,e.isLazy=U,e.isMemo=_,e.isPortal=O,e.isProfiler=D,e.isStrictMode=M,e.isSuspense=A,e.isValidElementType=x,e.typeOf=N})()})),pc=Ae(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=Lh():t.exports=Fh()})),Bh=Ae(((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function s(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var c={},d=0;d<10;d++)c["_"+String.fromCharCode(d)]=d;if(Object.getOwnPropertyNames(c).map(function(f){return c[f]}).join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=s()?Object.assign:function(l,c){for(var d,u=i(l),f,v=1;v<arguments.length;v++){d=Object(arguments[v]);for(var h in d)n.call(d,h)&&(u[h]=d[h]);if(r){f=r(d);for(var m=0;m<f.length;m++)a.call(d,f[m])&&(u[f[m]]=d[f[m]])}}return u}})),mi=Ae(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),hc=Ae(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Uh=Ae(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=mi(),a={},i=hc();r=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function s(l,c,d,u,f){if(process.env.NODE_ENV!=="production"){for(var v in l)if(i(l,v)){var h;try{if(typeof l[v]!="function"){var m=Error((u||"React class")+": "+d+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}h=l[v](c,v,u,d,null,n)}catch(g){h=g}if(h&&!(h instanceof Error)&&r((u||"React class")+": type specification of "+d+" `"+v+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in a)){a[h.message]=!0;var y=f?f():"";r("Failed "+d+" type: "+h.message+(y??""))}}}}s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},t.exports=s})),Vh=Ae(((e,t)=>{var r=pc(),n=Bh(),a=mi(),i=hc(),s=Uh(),l=function(){};process.env.NODE_ENV!=="production"&&(l=function(d){var u="Warning: "+d;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function c(){return null}t.exports=function(d,u){var f=typeof Symbol=="function"&&Symbol.iterator,v="@@iterator";function h(j){var k=j&&(f&&j[f]||j[v]);if(typeof k=="function")return k}var m="<<anonymous>>",y={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:x(),arrayOf:N,element:$(),elementType:T(),instanceOf:R,node:te(),objectOf:Y,oneOf:G,oneOfType:se,shape:de,exact:be};function g(j,k){return j===k?j!==0||1/j===1/k:j!==j&&k!==k}function p(j,k){this.message=j,this.data=k&&typeof k=="object"?k:{},this.stack=""}p.prototype=Error.prototype;function b(j){if(process.env.NODE_ENV!=="production")var k={},V=0;function z(U,_,O,D,M,A,w){if(D=D||m,A=A||O,w!==a){if(u){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=D+":"+O;!k[J]&&V<3&&(l("You are manually calling a React.PropTypes validation function for the `"+A+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[J]=!0,V++)}}return _[O]==null?U?_[O]===null?new p("The "+M+" `"+A+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new p("The "+M+" `"+A+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:j(_,O,D,M,A)}var F=z.bind(null,!1);return F.isRequired=z.bind(null,!0),F}function C(j){function k(V,z,F,U,_,O){var D=V[z];if(ne(D)!==j){var M=pe(D);return new p("Invalid "+U+" `"+_+"` of type "+("`"+M+"` supplied to `"+F+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return b(k)}function x(){return b(c)}function N(j){function k(V,z,F,U,_){if(typeof j!="function")return new p("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var O=V[z];if(!Array.isArray(O)){var D=ne(O);return new p("Invalid "+U+" `"+_+"` of type "+("`"+D+"` supplied to `"+F+"`, expected an array."))}for(var M=0;M<O.length;M++){var A=j(O,M,F,U,_+"["+M+"]",a);if(A instanceof Error)return A}return null}return b(k)}function $(){function j(k,V,z,F,U){var _=k[V];if(!d(_)){var O=ne(_);return new p("Invalid "+F+" `"+U+"` of type "+("`"+O+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return b(j)}function T(){function j(k,V,z,F,U){var _=k[V];if(!r.isValidElementType(_)){var O=ne(_);return new p("Invalid "+F+" `"+U+"` of type "+("`"+O+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return b(j)}function R(j){function k(V,z,F,U,_){if(!(V[z]instanceof j)){var O=j.name||m,D=ye(V[z]);return new p("Invalid "+U+" `"+_+"` of type "+("`"+D+"` supplied to `"+F+"`, expected ")+("instance of `"+O+"`."))}return null}return b(k)}function G(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array.")),c;function k(V,z,F,U,_){for(var O=V[z],D=0;D<j.length;D++)if(g(O,j[D]))return null;var M=JSON.stringify(j,function(w,H){return pe(H)==="symbol"?String(H):H});return new p("Invalid "+U+" `"+_+"` of value `"+String(O)+"` "+("supplied to `"+F+"`, expected one of "+M+"."))}return b(k)}function Y(j){function k(V,z,F,U,_){if(typeof j!="function")return new p("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var O=V[z],D=ne(O);if(D!=="object")return new p("Invalid "+U+" `"+_+"` of type "+("`"+D+"` supplied to `"+F+"`, expected an object."));for(var M in O)if(i(O,M)){var A=j(O,M,F,U,_+"."+M,a);if(A instanceof Error)return A}return null}return b(k)}function se(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&l("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var k=0;k<j.length;k++){var V=j[k];if(typeof V!="function")return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Pe(V)+" at index "+k+"."),c}function z(F,U,_,O,D){for(var M=[],A=0;A<j.length;A++){var w=j[A],H=w(F,U,_,O,D,a);if(H==null)return null;H.data&&i(H.data,"expectedType")&&M.push(H.data.expectedType)}var J=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new p("Invalid "+O+" `"+D+"` supplied to "+("`"+_+"`"+J+"."))}return b(z)}function te(){function j(k,V,z,F,U){return re(k[V])?null:new p("Invalid "+F+" `"+U+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return b(j)}function ve(j,k,V,z,F){return new p((j||"React class")+": "+k+" type `"+V+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function de(j){function k(V,z,F,U,_){var O=V[z],D=ne(O);if(D!=="object")return new p("Invalid "+U+" `"+_+"` of type `"+D+"` "+("supplied to `"+F+"`, expected `object`."));for(var M in j){var A=j[M];if(typeof A!="function")return ve(F,U,_,M,pe(A));var w=A(O,M,F,U,_+"."+M,a);if(w)return w}return null}return b(k)}function be(j){function k(V,z,F,U,_){var O=V[z],D=ne(O);if(D!=="object")return new p("Invalid "+U+" `"+_+"` of type `"+D+"` "+("supplied to `"+F+"`, expected `object`."));for(var M in n({},V[z],j)){var A=j[M];if(i(j,M)&&typeof A!="function")return ve(F,U,_,M,pe(A));if(!A)return new p("Invalid "+U+" `"+_+"` key `"+M+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(V[z],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var w=A(O,M,F,U,_+"."+M,a);if(w)return w}return null}return b(k)}function re(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(re);if(j===null||d(j))return!0;var k=h(j);if(k){var V=k.call(j),z;if(k!==j.entries){for(;!(z=V.next()).done;)if(!re(z.value))return!1}else for(;!(z=V.next()).done;){var F=z.value;if(F&&!re(F[1]))return!1}}else return!1;return!0;default:return!1}}function ue(j,k){return j==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function ne(j){var k=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":ue(k,j)?"symbol":k}function pe(j){if(typeof j>"u"||j===null)return""+j;var k=ne(j);if(k==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return k}function Pe(j){var k=pe(j);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ye(j){return!j.constructor||!j.constructor.name?m:j.constructor.name}return y.checkPropTypes=s,y.resetWarningCache=s.resetWarningCache,y.PropTypes=y,y}})),zh=Ae(((e,t)=>{var r=mi();function n(){}function a(){}a.resetWarningCache=n,t.exports=function(){function i(c,d,u,f,v,h){if(h!==r){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}i.isRequired=i;function s(){return i}var l={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:a,resetWarningCache:n};return l.PropTypes=l,l}})),qh=Ae(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=pc(),n=!0;t.exports=Vh()(r.isElement,n)}else t.exports=zh()()})),P=tr(qh(),1);function it(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}it.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1};it.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))};it.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function vi(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}vi.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,a=0;a<=e;a+=1){var i=a/e,s=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),l=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(a>0){var c=s-r,d=l-n;t+=Math.sqrt(c*c+d*d)}r=s,n=l}return t};vi.prototype._point=function(e,t,r,n,a){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+a*e*e*e};function Wh(e,t,r){var n,a,i,s=null,l=0;r||(r={});var c=function(){l=r.leading===!1?0:Date.now(),s=null,i=e.apply(n,a),s||(n=a=null)};return function(){var d=Date.now();!l&&r.leading===!1&&(l=d);var u=t-(d-l);return n=this,a=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),l=d,i=e.apply(n,a),s||(n=a=null)):!s&&r.trailing!==!1&&(s=setTimeout(c,u)),i}}function X(e,t){var r=this,n=t||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle="throttle"in n?n.throttle:16,this.minDistance="minDistance"in n?n.minDistance:5,this.throttle?this._strokeMoveUpdate=Wh(X.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=X.prototype._strokeUpdate,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onBegin=n.onBegin,this.onEnd=n.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(a){a.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(a))},this._handleMouseMove=function(a){r._mouseButtonDown&&r._strokeMoveUpdate(a)},this._handleMouseUp=function(a){a.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(a))},this._handleTouchStart=function(a){if(a.targetTouches.length===1){var i=a.changedTouches[0];r._strokeBegin(i)}},this._handleTouchMove=function(a){a.preventDefault();var i=a.targetTouches[0];r._strokeMoveUpdate(i)},this._handleTouchEnd=function(a){a.target===r._canvas&&(a.preventDefault(),r._strokeEnd(a))},this.on()}X.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0};X.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,a=r.ratio||window.devicePixelRatio||1,i=r.width||this._canvas.width/a,s=r.height||this._canvas.height/a;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,i,s)},this._isEmpty=!1};X.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}};X.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};X.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)};X.prototype.isEmpty=function(){return this._isEmpty};X.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};X.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),a=this._data[this._data.length-1],i=a&&a[a.length-1],s=i&&n.distanceTo(i)<this.minDistance;if(!(i&&s)){var l=this._addPoint(n),c=l.curve,d=l.widths;c&&d&&this._drawCurve(c,d.start,d.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}};X.prototype._strokeEnd=function(e){var t=this.points.length>2,r=this.points[0];if(!t&&r&&this._drawDot(r),r){var n=this._data[this._data.length-1],a=n[n.length-1];r.equals(a)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)};X.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};X.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)};X.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};X.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new it(e-n.left,t-n.top,r||new Date().getTime())};X.prototype._addPoint=function(e){var t=this.points,r=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),r=this._calculateCurveControlPoints(t[0],t[1],t[2]);var n=r.c2;r=this._calculateCurveControlPoints(t[1],t[2],t[3]);var a=r.c1,i=new vi(t[1],n,a,t[2]),s=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:s}}return{}};X.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,a=e.y-t.y,i=t.x-r.x,s=t.y-r.y,l={x:(e.x+t.x)/2,y:(e.y+t.y)/2},c={x:(t.x+r.x)/2,y:(t.y+r.y)/2},d=Math.sqrt(n*n+a*a),u=Math.sqrt(i*i+s*s),f=l.x-c.x,v=l.y-c.y,h=u/(d+u),m={x:c.x+f*h,y:c.y+v*h},y=t.x-m.x,g=t.y-m.y;return{c1:new it(l.x+y,l.y+g),c2:new it(c.x+y,c.y+g)}};X.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},a=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(a);return n.start=this._lastWidth,n.end=i,this._lastVelocity=a,this._lastWidth=i,n};X.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};X.prototype._drawPoint=function(e,t,r){var n=this._ctx;n.moveTo(e,t),n.arc(e,t,r,0,2*Math.PI,!1),this._isEmpty=!1};X.prototype._drawCurve=function(e,t,r){var n=this._ctx,a=r-t,i=Math.floor(e.length());n.beginPath();for(var s=0;s<i;s+=1){var l=s/i,c=l*l,d=c*l,u=1-l,f=u*u,v=f*u,h=v*e.startPoint.x;h+=3*f*l*e.control1.x,h+=3*u*c*e.control2.x,h+=d*e.endPoint.x;var m=v*e.startPoint.y;m+=3*f*l*e.control1.y,m+=3*u*c*e.control2.y,m+=d*e.endPoint.y;var y=t+d*a;this._drawPoint(h,m,y)}n.closePath(),n.fill()};X.prototype._drawDot=function(e){var t=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,r),t.closePath(),t.fill()};X.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.length>1)for(var i=0;i<a.length;i+=1){var s=a[i],l=new it(s.x,s.y,s.time),c=s.color;if(i===0)this.penColor=c,this._reset(),this._addPoint(l);else if(i!==a.length-1){var d=this._addPoint(l),u=d.curve,f=d.widths;u&&f&&t(u,f,c)}}else{this._reset();var v=a[0];r(v)}}};X.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),a=0,i=0,s=r.width/n,l=r.height/n,c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS(null,"width",r.width),c.setAttributeNS(null,"height",r.height),this._fromData(t,function(g,p,b){var C=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var x="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));C.setAttribute("d",x),C.setAttribute("stroke-width",(p.end*2.25).toFixed(3)),C.setAttribute("stroke",b),C.setAttribute("fill","none"),C.setAttribute("stroke-linecap","round"),c.appendChild(C)}},function(g){var p=document.createElement("circle"),b=typeof e.dotSize=="function"?e.dotSize():e.dotSize;p.setAttribute("r",b),p.setAttribute("cx",g.x),p.setAttribute("cy",g.y),p.setAttribute("fill",g.color),c.appendChild(p)});var d="data:image/svg+xml;base64,",u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+a+" "+i+" "+s+" "+l+'"')+(' width="'+s+'"')+(' height="'+l+'"')+">",f=c.innerHTML;if(f===void 0){var v=document.createElement("dummy"),h=c.childNodes;v.innerHTML="";for(var m=0;m<h.length;m+=1)v.appendChild(h[m].cloneNode(!0));f=v.innerHTML}var y=u+f+"</svg>";return d+btoa(y)};X.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(r,n){return t._drawCurve(r,n.start,n.end)},function(r){return t._drawDot(r)}),this._data=e};X.prototype.toData=function(){return this._data};var Gh=Ae(((e,t)=>{(function(r,n){typeof e=="object"&&typeof t=="object"?t.exports=n():typeof define=="function"&&define.amd?define([],n):typeof e=="object"?e.trimCanvas=n():r.trimCanvas=n()})(e,function(){return(function(r){function n(i){if(a[i])return a[i].exports;var s=a[i]={exports:{},id:i,loaded:!1};return r[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}var a={};return n.m=r,n.c=a,n.p="",n(0)})([function(r,n){"use strict";function a(d){var u=d.getContext("2d"),f=d.width,v=d.height,h=u.getImageData(0,0,f,v).data,m=l(!0,f,v,h),y=l(!1,f,v,h),g=c(!0,f,v,h),p=c(!1,f,v,h)-g+1,b=y-m+1,C=u.getImageData(g,m,p,b);return d.width=p,d.height=b,u.clearRect(0,0,p,b),u.putImageData(C,0,0),d}function i(d,u,f,v){return{red:v[4*(f*u+d)],green:v[4*(f*u+d)+1],blue:v[4*(f*u+d)+2],alpha:v[4*(f*u+d)+3]}}function s(d,u,f,v){return i(d,u,f,v).alpha}function l(d,u,f,v){for(var h=d?1:-1,m=d?0:f-1;d?m<f:m>-1;m+=h)for(var y=0;y<u;y++)if(s(y,m,u,v))return m;return null}function c(d,u,f,v){for(var h=d?1:-1,m=d?0:u-1;d?m<u:m>-1;m+=h)for(var y=0;y<f;y++)if(s(m,y,u,v))return m;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=a}])})})),Hh=tr(Gh(),1),Kh=["canvasProps","clearOnResize"],On=(function(e){kh(r,e);var t=Mh(r);function r(){var n;Ih(this,r);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=t.call.apply(t,[this].concat(i)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(l){n._canvas=l,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var l=n.props;return l.canvasProps,l.clearOnResize,Oh(l,Kh)},n.componentDidMount=function(){var l=n.getCanvas();n._sigPad=new X(l,n._excludeOurProps()),n._resizeCanvas(),n.on()},n.componentWillUnmount=function(){n.off()},n.componentDidUpdate=function(){Object.assign(n._sigPad,n._excludeOurProps())},n.getCanvas=function(){if(n._canvas===null)throw n.staticThis.refNullError;return n._canvas},n.getTrimmedCanvas=function(){var l=n.getCanvas(),c=document.createElement("canvas");return c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0),(0,Hh.default)(c)},n.getSignaturePad=function(){if(n._sigPad===null)throw n.staticThis.refNullError;return n._sigPad},n._checkClearOnResize=function(){n.props.clearOnResize&&n._resizeCanvas()},n._resizeCanvas=function(){var l,c,d=(l=n.props.canvasProps)!==null&&l!==void 0?l:{},u=d.width,f=d.height;if(!(typeof u<"u"&&typeof f<"u")){var v=n.getCanvas(),h=Math.max((c=window.devicePixelRatio)!==null&&c!==void 0?c:1,1);typeof u>"u"&&(v.width=v.offsetWidth*h),typeof f>"u"&&(v.height=v.offsetHeight*h),v.getContext("2d").scale(h,h),n.clear()}},n.render=function(){var l=n.props.canvasProps;return S.default.createElement("canvas",Pa({ref:n.setRef},l))},n.on=function(){return window.addEventListener("resize",n._checkClearOnResize),n.getSignaturePad().on()},n.off=function(){return window.removeEventListener("resize",n._checkClearOnResize),n.getSignaturePad().off()},n.clear=function(){return n.getSignaturePad().clear()},n.isEmpty=function(){return n.getSignaturePad().isEmpty()},n.fromDataURL=function(l,c){return n.getSignaturePad().fromDataURL(l,c)},n.toDataURL=function(l,c){return n.getSignaturePad().toDataURL(l,c)},n.fromData=function(l){return n.getSignaturePad().fromData(l)},n.toData=function(){return n.getSignaturePad().toData()},n}return Ah(r)})(S.Component);On.propTypes={velocityFilterWeight:P.default.number,minWidth:P.default.number,maxWidth:P.default.number,minDistance:P.default.number,dotSize:P.default.oneOfType([P.default.number,P.default.func]),penColor:P.default.string,throttle:P.default.number,onEnd:P.default.func,onBegin:P.default.func,canvasProps:P.default.object,clearOnResize:P.default.bool};On.defaultProps={clearOnResize:!0};On.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var Yh=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:a})=>{const i=(0,S.useRef)(null),{register:s,handleSubmit:l,control:c,reset:d,watch:u,setValue:f,formState:{errors:v,isSubmitting:h}}=(0,Ue.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),m=u("accepted"),y=u("typedName"),g=u("signatureDataUrl"),p=()=>{d(),r==="DRAW_SIGNATURE"&&i.current?.clear()},b=()=>{p(),e()},C=()=>{i.current?.clear(),f("signatureDataUrl","")},x=$=>{let T="";if(r==="DRAW_SIGNATURE"){const R=i.current;if(R&&!R.isEmpty())T=R.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?$.accepted:!1,typedName:r==="TYPED_NAME"?$.typedName.trim():"",signatureDataUrl:T,emailMe:$.emailMe}),p(),e()},N=!h&&(r==="CHECKBOX_ONLY"?m:r==="TYPED_NAME"?y?.trim().length>2:r==="DRAW_SIGNATURE"?!!g:!1);return(0,o.jsxs)("div",{className:"aaravpos-consent-overlay",children:[(0,o.jsx)("div",{className:"aaravpos-consent-backdrop"}),(0,o.jsxs)("div",{className:"aaravpos-consent-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-consent-header",children:[(0,o.jsx)("h3",{className:"aaravpos-consent-title",children:n||"Consent Form"}),(0,o.jsx)("button",{onClick:b,className:"aaravpos-consent-close-btn",children:(0,o.jsx)(We,{})})]}),(0,o.jsx)("div",{className:"aaravpos-consent-content-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-consent-content-box",children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a},className:"aaravpos-consent-content"})})}),(0,o.jsxs)("form",{onSubmit:l(x),children:[r==="CHECKBOX_ONLY"&&(0,o.jsxs)("label",{className:"aaravpos-consent-checkbox-label",htmlFor:"accepted",children:[(0,o.jsx)("input",{type:"checkbox",...s("accepted",{required:"You must accept terms"}),id:"accepted",className:"aaravpos-consent-checkbox"}),(0,o.jsx)("span",{className:"aaravpos-consent-checkbox-text",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,o.jsxs)("div",{className:"aaravpos-consent-typed-wrapper",children:[(0,o.jsxs)("label",{className:"aaravpos-consent-input-label",htmlFor:"typedName",children:["Full Name",(0,o.jsx)("span",{className:"aaravpos-consent-required",children:"*"})]}),(0,o.jsx)("input",{...s("typedName",{required:"Name is required",validate:$=>$.trim().length>2||"Enter full name"}),id:"typedName",placeholder:"Type your full name",className:`aaravpos-consent-input ${v.typedName?"aaravpos-consent-input-error":"aaravpos-consent-input-normal"}`}),(0,o.jsx)("p",{className:"aaravpos-consent-helper-text",children:"By typing your name, you agree to the consent above"}),v.typedName&&(0,o.jsx)("p",{className:"aaravpos-consent-error",children:v.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,o.jsx)(Ue.Controller,{control:c,name:"signatureDataUrl",rules:{validate:()=>i.current&&!i.current.isEmpty()?!0:"Signature required"},render:({field:$})=>(0,o.jsxs)("div",{className:"aaravpos-consent-signature-wrapper",children:[(0,o.jsx)(On,{ref:i,canvasProps:{className:"aaravpos-consent-signature-canvas"},onEnd:()=>{const T=i.current;if(!T)return;const R=T.getCanvas().toDataURL("image/png");$.onChange(R)}}),v.signatureDataUrl&&(0,o.jsx)("p",{className:"aaravpos-consent-error aaravpos-consent-error-signature",children:v.signatureDataUrl.message}),(0,o.jsxs)("div",{className:"aaravpos-consent-signature-actions",children:[(0,o.jsxs)("button",{type:"button",onClick:C,className:"aaravpos-consent-clear-btn",children:[(0,o.jsx)(Bp,{size:14}),"Clear"]}),(0,o.jsxs)("label",{className:"aaravpos-consent-email-label",htmlFor:"emailme",children:[(0,o.jsx)("input",{type:"checkbox",...s("emailMe"),id:"emailme",className:"aaravpos-consent-email-checkbox"}),(0,o.jsx)("span",{className:"aaravpos-consent-email-text",children:"Email me"})]})]})]})}),(0,o.jsxs)("div",{className:"aaravpos-consent-footer",children:[(0,o.jsx)("button",{type:"button",onClick:b,className:"aaravpos-consent-cancel-btn",children:"Cancel"}),(0,o.jsxs)("button",{type:"submit",disabled:!N,className:`aaravpos-consent-submit-btn ${N?"aaravpos-consent-submit-active":"aaravpos-consent-submit-disabled"}`,children:[(0,o.jsx)(fi,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},mc={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},Xh=Ae(((e,t)=>{(function(){"use strict";var r={}.hasOwnProperty;function n(){for(var s="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(s=i(s,a(c)))}return s}function a(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var c in s)r.call(s,c)&&s[c]&&(l=i(l,c));return l}function i(s,l){return l?s?s+" "+l:s+l:s}typeof t<"u"&&t.exports?(n.default=n,t.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()}));function Zh(e,t,r){switch(r){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1)}return{value:e,caret:t}}function Jh(e,t,r){for(var n={},a="",i=0,s=0;s<e.length;){var l=r(e[s],a,n);l!==void 0&&(a+=l,t!==void 0&&(t===s?i=a.length-1:t>s&&(i=a.length))),s++}return t===void 0&&(i=a.length),{value:a,caret:i}}function Qh(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=e1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e1(e,t){if(e){if(typeof e=="string")return Eo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eo(e,t)}}function Eo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ja(e,t){for(var r=0,n=Qh(t.split("")),a;!(a=n()).done;)a.value===e&&r++;return r}function t1(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"x",n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",a=e.length,i=ja("(",e)-ja(")",e);i>0&&a<t.length;)e+=t[a].replace(r,n),t[a]===")"&&i--,a++;return e}function r1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=n1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n1(e,t){if(e){if(typeof e=="string")return Po(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Po(e,t)}}function Po(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",r=arguments.length>2?arguments[2]:void 0;if(!e)return function(a){return{text:a}};var n=ja(t,e);return function(a){if(!a)return{text:"",template:e};for(var i=0,s="",l=r1(e.split("")),c;!(c=l()).done;){var d=c.value;if(d!==t){s+=d;continue}if(s+=a[i],i++,i===a.length&&a.length<n)break}return r&&(s=t1(s,e)),{text:s,template:e}}}function i1(e,t,r){typeof r=="string"&&(r=a1(r));var n=r(e)||{},a=n.text,i=n.template;if(a===void 0&&(a=e),i)if(t===void 0)t=a.length;else{for(var s=0,l=!1,c=-1;s<a.length&&s<i.length;){if(a[s]!==i[s]){if(t===0){l=!0,t=s;break}c=s,t--}s++}l||(t=c+1)}return{text:a,caret:t}}function o1(e){return e.hasAttribute("readonly")}function s1(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}var Oo={Backspace:8,Delete:46};function l1(e){switch(e.keyCode){case Oo.Backspace:return"Backspace";case Oo.Delete:return"Delete"}}function c1(e){return e.selectionStart}function vc(e,t){t!==void 0&&(d1()?setTimeout(function(){return e.setSelectionRange(t,t)},0):e.setSelectionRange(t,t))}function d1(){if(typeof navigator<"u")return u1.test(navigator.userAgent)}var u1=/Android/i;function f1(e,t,r,n,a){Ta(t,r,n,void 0,a)}function p1(e,t,r,n,a){if(!o1(t)){var i=l1(e);switch(i){case"Delete":case"Backspace":e.preventDefault();var s=s1(t);return s?(h1(t,s),Ta(t,r,n,void 0,a)):Ta(t,r,n,i,a)}}}function h1(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,vc(e,t.start)}function Ta(e,t,r,n,a){var i=Jh(e.value,c1(e),t),s=i.value,l=i.caret;if(n){var c=Zh(s,l,n);s=c.value,l=c.caret}var d=i1(s,l,r),u=d.text;l=d.caret,e.value=u,vc(e,l),a&&a(s)}var m1=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function jo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jo(Object(r),!0).forEach(function(n){v1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y1(e,t){if(e==null)return{};var r=g1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g1(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function $1(e){var t=e.ref,r=e.parse,n=e.format,a=e.value,i=e.defaultValue,s=e.controlled,l=s===void 0?!0:s,c=e.onChange,d=e.onKeyDown,u=y1(e,m1),f=(0,S.useRef)(),v=(0,S.useCallback)(function(g){f.current=g,t&&(typeof t=="function"?t(g):t.current=g)},[t]),h=(0,S.useCallback)(function(g){return f1(g,f.current,r,n,c)},[f,r,n,c]),m=(0,S.useCallback)(function(g){if(d&&d(g),!g.defaultPrevented)return p1(g,f.current,r,n,c)},[f,r,n,c,d]),y=st(st({},u),{},{ref:v,onChange:h,onKeyDown:m});return l?st(st({},y),{},{value:n(To(a)?"":a).text}):st(st({},y),{},{defaultValue:n(To(i)?"":i).text})}function To(e){return e==null}var b1=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function N1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(r),!0).forEach(function(n){S1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x1(e,t){if(e==null)return{};var r=C1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C1(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function an(e,t){var r=e.inputComponent,n=r===void 0?"input":r,a=e.parse,i=e.format,s=e.value,l=e.defaultValue,c=e.onChange,d=e.controlled,u=e.onKeyDown,f=e.type,v=f===void 0?"text":f,h=x1(e,b1),m=$1(N1({ref:t,parse:a,format:i,value:s,defaultValue:l,onChange:c,controlled:d,onKeyDown:u,type:v},h));return S.default.createElement(n,m)}an=S.default.forwardRef(an);an.propTypes={parse:P.default.func.isRequired,format:P.default.func.isRequired,inputComponent:P.default.elementType,type:P.default.string,value:P.default.string,defaultValue:P.default.string,onChange:P.default.func,controlled:P.default.bool,onKeyDown:P.default.func,onCut:P.default.func,onPaste:P.default.func};var _1=an;function Io(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),a=0;a<3;a++){var i=Number(r[a]),s=Number(n[a]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var w1={}.constructor;function nt(e){return e!=null&&e.constructor===w1}function St(e){"@babel/helpers - typeof";return St=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(e)}function jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E1(n.key),n)}}function Tn(e,t,r){return t&&ko(e.prototype,t),r&&ko(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E1(e){var t=P1(e,"string");return St(t)=="symbol"?t:t+""}function P1(e,t){if(St(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(St(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O1="1.2.0",j1="1.7.35",Ro=" ext. ",T1=/^\d+$/,ce=(function(){function e(t){jn(this,e),yc(t),this.metadata=t,$c.call(this,t)}return Tn(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(r){return r!=="001"})}},{key:"getCountryMetadata",value:function(r){return this.metadata.countries[r]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(r){return this.getCountryMetadata(r)!==void 0}},{key:"hasCallingCode",value:function(r){if(this.getCountryCodesForCallingCode(r))return!0;if(this.nonGeographic()){if(this.nonGeographic()[r])return!0}else{var n=this.countryCallingCodes()[r];if(n&&n.length===1&&n[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(r){return this.nonGeographic()?!!this.nonGeographic()[r]:!this.getCountryCodesForCallingCode(r)}},{key:"country",value:function(r){return this.selectNumberingPlan(r)}},{key:"selectNumberingPlan",value:function(r,n){if(r&&T1.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Do(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Do(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(r){var n=this.countryCallingCodes()[r];if(n)return n.length===1&&n[0].length===3?void 0:n}},{key:"getCountryCodeForCallingCode",value:function(r){var n=this.getCountryCodesForCallingCode(r);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(r){var n=this.getCountryCodeForCallingCode(r);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var a=this.nonGeographic()[r];if(a)return a}else{var i=this.countryCallingCodes()[r];if(i&&i.length===1&&i[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(r){return this.numberingPlan.type(r)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(r){return this.selectNumberingPlan(r)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}])})(),Do=(function(){function e(t,r){jn(this,e),this.globalMetadataObject=r,this.metadata=t,$c.call(this,r.metadata)}return Tn(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(r){return r[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var r=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(n){return new A1(n,r)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(r){return r[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(r){if(this.hasTypes()&&Mo(this.types(),r))return new k1(Mo(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?Ro:this.metadata[13]||Ro}}])})(),A1=(function(){function e(t,r){jn(this,e),this._format=t,this.metadata=r}return Tn(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!I1.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),I1=/^\(?\$1\)?$/,k1=(function(){function e(t,r){jn(this,e),this.type=t,this.metadata=r}return Tn(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])})();function Mo(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function yc(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!nt(e)||!nt(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(nt(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+R1(e)+": "+e,"."))}var R1=function(t){return St(t)};function Je(e,t){if(t=new ce(t),t.hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function gc(e,t){return t.countries.hasOwnProperty(e)}function $c(e){var t=e.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?Io(t,O1)===-1?this.v2=!0:Io(t,j1)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function D1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=M1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M1(e,t){if(e){if(typeof e=="string")return Lo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lo(e,t):void 0}}function Lo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function L1(e,t){for(var r=e.slice(),n=D1(t),a;!(a=n()).done;){var i=a.value;e.indexOf(i)<0&&r.push(i)}return r.sort(function(s,l){return s-l})}function An(e,t,r){return bc(e,t,void 0,r)}function bc(e,t,r,n){t&&(n=new ce(n.metadata),n.selectNumberingPlan(t));var a=n.type(r),i=a&&a.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(r==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return bc(e,t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=L1(i,s.possibleLengths()))}else if(r&&!a)return"INVALID_LENGTH";var l=e.length,c=i[0];return c===l?"IS_POSSIBLE":c>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function F1(e,t,r){if(t===void 0&&(t={}),r=new ce(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return Nc(e.phone||e.nationalNumber,e.country,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Nc(e,t,r){return An(e,t,r)==="IS_POSSIBLE"}function ze(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function B1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=U1(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U1(e,t){if(e){if(typeof e=="string")return Fo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fo(e,t):void 0}}function Fo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var V1=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function yi(e,t,r){if(t=t||{},!(!e.country&&!e.countryCallingCode)){r=new ce(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(ze(n,r.nationalNumberPattern())){if(ta(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||ta(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=B1(V1),i;!(i=a()).done;){var s=i.value;if(ta(n,s,r))return s}}}}function ta(e,t,r){var n=r.type(t);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0?!1:ze(e,n.pattern())}function z1(e,t,r){if(t=t||{},r=new ce(r),r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes())return yi(e,t,r.metadata)!==void 0;var n=t.v2?e.nationalNumber:e.phone;return ze(n,r.nationalNumberPattern())}function q1(e,t,r){var n=new ce(r).getCountryCodesForCallingCode(e);return n?n.filter(function(a){return W1(t,a,r)}):[]}function W1(e,t,r){var n=new ce(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}var $e="0-90-9٠-٩۰-۹",G1="-‐-―−ー-",H1="//",K1="..",Y1="  ­​⁠ ",X1="()()[]\\[\\]",Z1="~⁓∼~",De="".concat(G1).concat(H1).concat(K1).concat(Y1).concat(X1).concat(Z1),In="++",J1=new RegExp("(["+$e+"])");function Sc(e,t,r,n){if(t){var a=new ce(n);a.selectNumberingPlan(t,r);var i=new RegExp(a.IDDPrefix());if(e.search(i)===0){e=e.slice(e.match(i)[0].length);var s=e.match(J1);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return e}}}function Aa(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var a,i,s=n.length-1,l=s>0&&n[s];if(t.nationalPrefixTransformRule()&&l)a=e.replace(r,t.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{var c=n[0];a=e.slice(c.length),l&&(i=n[1])}var d;if(l){var u=e.indexOf(n[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(d=t.numberingPlan.nationalPrefix())}else d=n[0];return{nationalNumber:a,nationalPrefix:d,carrierCode:i}}}return{nationalNumber:e}}function Q1(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=em(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function em(e,t){if(e){if(typeof e=="string")return Bo(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bo(e,t):void 0}}function Bo(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function xc(e,t){var r=t.countries,n=t.metadata;n=new ce(n);for(var a=Q1(r),i;!(i=a()).done;){var s=i.value;if(n.selectNumberingPlan(s),n.leadingDigits()){if(e&&e.search(n.leadingDigits())===0)return s}else if(yi({phone:e,country:s},void 0,n.metadata))return s}}var tm=!1;function gi(e,t){var r=t.nationalNumber,n=t.metadata;if(tm&&n.isNonGeographicCallingCode(e))return"001";var a=n.getCountryCodesForCallingCode(e);if(a)return a.length===1?a[0]:xc(r,{countries:a,metadata:n.metadata})}function Ia(e,t,r){var n=Aa(e,r),a=n.carrierCode,i=n.nationalNumber;if(i!==e){if(!rm(e,i,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=gi(r.numberingPlan.callingCode(),{nationalNumber:i,metadata:r})),!nm(i,t,r)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:a}}function rm(e,t,r){return!(ze(e,r.nationalNumberPattern())&&!ze(t,r.nationalNumberPattern()))}function nm(e,t,r){switch(An(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Cc(e,t,r,n,a){var i=t||r?Je(t||r,a):n;if(e.indexOf(i)===0){a=new ce(a),a.selectNumberingPlan(t||r,i);var s=e.slice(i.length),l=Ia(s,t,a).nationalNumber,c=Ia(e,t,a).nationalNumber;if(!ze(c,a.nationalNumberPattern())&&ze(l,a.nationalNumberPattern())||An(c,t,a)==="TOO_LONG")return{countryCallingCode:i,number:s}}return{number:e}}function $i(e,t,r,n,a){if(!e)return{};var i;if(e[0]!=="+"){var s=Sc(e,t||r,n,a);if(s&&s!==e)i=!0,e="+"+s;else{if(t||r||n){var l=Cc(e,t,r,n,a),c=l.countryCallingCode,d=l.number;if(c)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:c,number:d}}return{number:e}}}if(e[1]==="0")return{};a=new ce(a);for(var u=2;u-1<=3&&u<=e.length;){var f=e.slice(1,u);if(a.hasCallingCode(f))return a.selectNumberingPlan(f),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:f,number:e.slice(u)};u++}return{}}function _c(e){return e.replace(new RegExp("[".concat(De,"]+"),"g")," ").trim()}var wc=/(\$\d)/;function Ec(e,t,r){var n=r.useInternationalFormat,a=r.withNationalPrefix;r.carrierCode,r.metadata;var i=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(wc,t.nationalPrefixFormattingRule()):t.format());return n?_c(i):i}var am=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function im(e,t,r){var n=new ce(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(am.test(n.IDDPrefix()))return n.IDDPrefix()}var om=";ext=",lt=function(t){return"([".concat($e,"]{1,").concat(t,"})")};function Pc(e){var t="20",r="15",n="9",a="6",i="[  \\t,]*",s="[:\\..]?[  \\t,-]*",l="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",d="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",v="(?:,{2}|;)",h=om+lt(t),m=i+c+s+lt(t)+l,y=i+d+s+lt(n)+l,g=u+lt(a)+"#",p=f+v+s+lt(r)+l,b=f+"(?:,)+"+s+lt(n)+l;return h+"|"+m+"|"+y+"|"+g+"|"+p+"|"+b}var sm="["+$e+"]{2}",lm="["+In+"]{0,1}(?:["+De+"]*["+$e+"]){3,}["+De+$e+"]*",cm=new RegExp("^["+In+"]{0,1}(?:["+De+"]*["+$e+"]){1,2}$","i"),dm=lm+"(?:"+Pc()+")?",um=new RegExp("^"+sm+"$|^"+dm+"$","i");function fm(e){return e.length>=2&&um.test(e)}function pm(e){return cm.test(e)}function hm(e){var t=e.number,r=e.ext;if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(r?";ext="+r:"")}var Uo={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function mm(e,t,r,n){if(r?r=gm({},Uo,r):r=Uo,n=new ce(n),e.country&&e.country!=="001"){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else if(e.countryCallingCode)n.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var a=n.countryCallingCode(),i=r.v2?e.nationalNumber:e.phone,s;switch(t){case"NATIONAL":return i?(s=on(i,e.carrierCode,"NATIONAL",n,r),ra(s,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return i?(s=on(i,null,"INTERNATIONAL",n,r),s="+".concat(a," ").concat(s),ra(s,e.ext,n,r.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(i);case"RFC3966":return hm({number:"+".concat(a).concat(i),ext:e.ext});case"IDD":if(!r.fromCountry)return;var l=ym(i,e.carrierCode,a,r.fromCountry,n);return l?ra(l,e.ext,n,r.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function on(e,t,r,n,a){var i=vm(n.formats(),e);return i?Ec(e,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&a&&a.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function vm(e,t){return $m(e,function(r){if(r.leadingDigitsPatterns().length>0){var n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(t.search(n)!==0)return!1}return ze(t,r.pattern())})}function ra(e,t,r,n){return t?n(e,t,r):e}function ym(e,t,r,n,a){if(Je(n,a.metadata)===r){var i=on(e,t,"NATIONAL",a);return r==="1"?r+" "+i:i}var s=im(n,void 0,a.metadata);if(s)return"".concat(s," ").concat(r," ").concat(on(e,null,"INTERNATIONAL",a))}function gm(){for(var e=1,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(;e<r.length;){if(r[e])for(var a in r[e])r[0][a]=r[e][a];e++}return r[0]}function $m(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}function Ut(e){"@babel/helpers - typeof";return Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(e)}function Vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vo(Object(r),!0).forEach(function(n){bm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bm(e,t,r){return(t=Oc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oc(n.key),n)}}function Sm(e,t,r){return t&&qo(e.prototype,t),r&&qo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oc(e){var t=xm(e,"string");return Ut(t)=="symbol"?t:t+""}function xm(e,t){if(Ut(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ut(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cm=!1,jc=(function(){function e(t,r,n){if(Nm(this,e),!t)throw new TypeError("First argument is required");if(typeof t!="string")throw new TypeError("First argument must be a string");if(t[0]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(nt(r)&&nt(r.countries)){n=r;var a=t;if(!Em.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=$i(a,void 0,void 0,void 0,n),s=i.countryCallingCode;if(r=i.number,t=s,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");yc(n);var l=wm(t,n),c=l.country,d=l.countryCallingCode;this.country=c,this.countryCallingCode=d,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}return Sm(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:q1(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return F1(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return z1(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new ce(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return yi(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return mm(this,r,n?zo(zo({},n),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(r){return this.format("NATIONAL",r)}},{key:"formatInternational",value:function(r){return this.format("INTERNATIONAL",r)}},{key:"getURI",value:function(r){return this.format("RFC3966",r)}}])})(),_m=function(t){return/^[A-Z]{2}$/.test(t)};function wm(e,t){var r,n,a=new ce(t);return _m(e)?(r=e,a.selectNumberingPlan(r),n=a.countryCallingCode()):(n=e,Cm&&a.isNonGeographicCallingCode(n)&&(r="001")),{country:r,countryCallingCode:n}}var Em=/^\+\d+$/;function xt(e){"@babel/helpers - typeof";return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}function Wo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Om(n.key),n)}}function Pm(e,t,r){return t&&Wo(e.prototype,t),r&&Wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Om(e){var t=jm(e,"string");return xt(t)=="symbol"?t:t+""}function jm(e,t){if(xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Am(e,t,r){return t=zt(t),Im(e,bi()?Reflect.construct(t,r||[],zt(e).constructor):t.apply(e,r))}function Im(e,t){if(t&&(xt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return km(e)}function km(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rm(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}function ka(e){var t=typeof Map=="function"?new Map:void 0;return ka=function(n){if(n===null||!Mm(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return Dm(n,arguments,zt(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Vt(a,n)},ka(e)}function Dm(e,t,r){if(bi())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&Vt(a,r.prototype),a}function bi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bi=function(){return!!e})()}function Mm(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Vt(e,t)}function zt(e){return zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zt(e)}var Be=(function(e){function t(r){var n;return Tm(this,t),n=Am(this,t,[r]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return Rm(t,e),Pm(t)})(ka(Error)),Go=new RegExp("(?:"+Pc()+")$","i");function Lm(e){var t=e.search(Go);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Go),a=1;a<n.length;){if(n[a])return{number:r,ext:n[a]};a++}}function Fm(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Bm(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bm(e,t){if(e){if(typeof e=="string")return Ho(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ho(e,t):void 0}}function Ho(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Um={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Tc(e){return Um[e]}function sn(e){for(var t="",r=Fm(e.split("")),n;!(n=r()).done;){var a=n.value,i=Tc(a);i&&(t+=i)}return t}function Vm(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=zm(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zm(e,t){if(e){if(typeof e=="string")return Ko(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ko(e,t):void 0}}function Ko(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ra(e){for(var t="",r=Vm(e.split("")),n;!(n=r()).done;){var a=n.value;t+=Ac(a,t)||""}return t}function Ac(e,t,r){if(e==="+"){if(t){typeof r=="function"&&r("end");return}return"+"}return Tc(e)}var Yo="(["+$e+"]|[\\-\\.\\(\\)]?)",qm="^\\+"+Yo+"*["+$e+"]"+Yo+"*$",Wm=new RegExp(qm,"g"),Da=$e,Gm="["+Da+"]+((\\-)*["+Da+"])*",Hm="[a-zA-Z]+((\\-)*["+Da+"])*",Km="^("+Gm+"\\.)*"+Hm+"\\.?$",Ym=new RegExp(Km,"g"),Xo="tel:",Ma=";phone-context=",Xm=";isub=";function Zm(e){var t=e.indexOf(Ma);if(t<0)return null;var r=t+Ma.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}function Jm(e){return e===null?!0:e.length===0?!1:Wm.test(e)||Ym.test(e)}function Qm(e,t){var r=t.extractFormattedPhoneNumber,n=Zm(e);if(!Jm(n))throw new Be("NOT_A_NUMBER");var a;if(n===null)a=r(e)||"";else{a="",n.charAt(0)==="+"&&(a+=n);var i=e.indexOf(Xo),s;i>=0?s=i+Xo.length:s=0;var l=e.indexOf(Ma);a+=e.substring(s,l)}var c=a.indexOf(Xm);if(c>0&&(a=a.substring(0,c)),a!=="")return a}var e2=250,t2=new RegExp("["+In+$e+"]"),r2=new RegExp("[^"+$e+"#]+$"),n2=!1;function a2(e,t,r){if(t=t||{},r=new ce(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new Be("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=o2(e,t.v2,t.extract),a=n.number,i=n.ext,s=n.error;if(!a){if(t.v2)throw s==="TOO_SHORT"?new Be("TOO_SHORT"):new Be("NOT_A_NUMBER");return{}}var l=l2(a,t.defaultCountry,t.defaultCallingCode,r),c=l.country,d=l.nationalNumber,u=l.countryCallingCode,f=l.countryCallingCodeSource,v=l.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new Be("INVALID_COUNTRY");return{}}if(!d||d.length<2){if(t.v2)throw new Be("TOO_SHORT");return{}}if(d.length>17){if(t.v2)throw new Be("TOO_LONG");return{}}if(t.v2){var h=new jc(u,d,r.metadata);return c&&(h.country=c),v&&(h.carrierCode=v),i&&(h.ext=i),h.__countryCallingCodeSource=f,h}var m=(t.extended?r.hasSelectedNumberingPlan():c)?ze(d,r.nationalNumberPattern()):!1;return t.extended?{country:c,countryCallingCode:u,carrierCode:v,valid:m,possible:m?!0:!!(t.extended===!0&&r.possibleLengths()&&Nc(d,c,r)),phone:d,ext:i}:m?s2(c,d,i):{}}function i2(e,t,r){if(e){if(e.length>e2){if(r)throw new Be("TOO_LONG");return}if(t===!1)return e;var n=e.search(t2);if(!(n<0))return e.slice(n).replace(r2,"")}}function o2(e,t,r){var n=Qm(e,{extractFormattedPhoneNumber:function(s){return i2(s,r,t)}});if(!n)return{};if(!fm(n))return pm(n)?{error:"TOO_SHORT"}:{};var a=Lm(n);return a.ext?a:{number:n}}function s2(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function l2(e,t,r,n){var a=$i(Ra(e),void 0,t,r,n.metadata),i=a.countryCallingCodeSource,s=a.countryCallingCode,l=a.number,c;if(s)n.selectNumberingPlan(s);else if(l&&(t||r))n.selectNumberingPlan(t,r),t?c=t:n2&&n.isNonGeographicCallingCode(r)&&(c="001"),s=r||Je(t,n.metadata);else return{};if(!l)return{countryCallingCodeSource:i,countryCallingCode:s};var d=Ia(Ra(l),c,n),u=d.nationalNumber,f=d.carrierCode,v=gi(s,{nationalNumber:u,metadata:n});return v&&(c=v,v==="001"||n.selectNumberingPlan(c)),{country:c,countryCallingCode:s,countryCallingCodeSource:i,nationalNumber:u,carrierCode:f}}function qt(e){"@babel/helpers - typeof";return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(e)}function Zo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zo(Object(r),!0).forEach(function(n){c2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c2(e,t,r){return(t=d2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d2(e){var t=u2(e,"string");return qt(t)=="symbol"?t:t+""}function u2(e,t){if(qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f2(e,t,r){return a2(e,Jo(Jo({},t),{},{v2:!0}),r)}function Wt(e){"@babel/helpers - typeof";return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(e)}function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function p2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qo(Object(r),!0).forEach(function(n){h2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h2(e,t,r){return(t=m2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m2(e){var t=v2(e,"string");return Wt(t)=="symbol"?t:t+""}function v2(e,t){if(Wt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y2(e,t){return N2(e)||b2(e,t)||$2(e,t)||g2()}function g2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $2(e,t){if(e){if(typeof e=="string")return es(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?es(e,t):void 0}}function es(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}function N2(e){if(Array.isArray(e))return e}function Ic(e){var t=y2(Array.prototype.slice.call(e),4),r=t[0],n=t[1],a=t[2],i=t[3],s,l,c;if(typeof r=="string")s=r;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")i?(l=a,c=i):(l=void 0,c=a),n&&(l=p2({defaultCountry:n},l));else if(nt(n))a?(l=n,c=a):c=n;else throw new Error("Invalid second argument: ".concat(n));return{text:s,options:l,metadata:c}}function Gt(e){"@babel/helpers - typeof";return Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(e)}function ts(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ts(Object(r),!0).forEach(function(n){S2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ts(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S2(e,t,r){return(t=x2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x2(e){var t=C2(e,"string");return Gt(t)=="symbol"?t:t+""}function C2(e,t){if(Gt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kc(e,t,r){t&&t.defaultCountry&&!gc(t.defaultCountry,r)&&(t=rs(rs({},t),{},{defaultCountry:void 0}));try{return f2(e,t,r)}catch(n){if(!(n instanceof Be))throw n}}function _2(){var e=Ic(arguments),t=e.text,r=e.options,n=e.metadata;return kc(t,r,n)}function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(e)}function ns(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function as(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ns(Object(r),!0).forEach(function(n){w2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ns(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w2(e,t,r){return(t=E2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E2(e){var t=P2(e,"string");return Ht(t)=="symbol"?t:t+""}function P2(e,t){if(Ht(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ht(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O2(){var e=Ic(arguments),t=e.text,r=e.options,n=e.metadata;r=as(as({},r),{},{extract:!1});var a=kc(t,r,n);return a&&a.isValid()||!1}function Kt(e){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kt(e)}function j2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A2(n.key),n)}}function T2(e,t,r){return t&&is(e.prototype,t),r&&is(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function A2(e){var t=I2(e,"string");return Kt(t)=="symbol"?t:t+""}function I2(e,t){if(Kt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k2=(function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;j2(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return T2(e,[{key:"reset",value:function(r){var n=r.country,a=r.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(n,a)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(r){for(var n=0,a=Object.keys(r);n<a.length;n++){var i=a[n];this[i]=r[i]}}},{key:"initCountryAndCallingCode",value:function(r,n){this.setCountry(r),this.setCallingCode(n)}},{key:"setCountry",value:function(r){this.country=r,this.onCountryChange(r)}},{key:"setCallingCode",value:function(r){this.callingCode=r,this.onCallingCodeChange(r,this.country)}},{key:"startInternationalNumber",value:function(r,n){this.international=!0,this.initCountryAndCallingCode(r,n)}},{key:"appendDigits",value:function(r){this.digits+=r}},{key:"appendNationalSignificantNumberDigits",value:function(r){this.nationalSignificantNumber+=r}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])})();function R2(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=D2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D2(e,t){if(e){if(typeof e=="string")return os(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?os(e,t):void 0}}function os(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var na=new RegExp("x");function Ur(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function ss(e,t){return e[t]===")"&&t++,M2(e.slice(0,t))}function M2(e){for(var t=[],r=0;r<e.length;)e[r]==="("?t.push(r):e[r]===")"&&t.pop(),r++;var n=0,a="";t.push(e.length);for(var i=0,s=t;i<s.length;i++){var l=s[i];a+=e.slice(n,l),n=l+1}return a}function L2(e,t,r){for(var n=R2(r.split("")),a;!(a=n()).done;){var i=a.value;if(e.slice(t+1).search(na)<0)return;t=e.search(na),e=e.replace(na,i)}return[e,t]}function F2(e,t,r){var n=r.metadata,a=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return U2(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:i})}function B2(e,t,r){return An(e,t,r)==="IS_POSSIBLE"}function U2(e,t,r){var n=r.metadata,a=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,a(t)){var s=ls(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:i,metadata:n});if(s)return s}return ls(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:i,metadata:n})}function ls(e,t,r){var n=r.metadata,a=r.useNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix,s=Ec(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:a,metadata:n});if(a||(e.nationalPrefix?s=e.nationalPrefix+i(t)+s:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(s=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+s)),V2(s,e))return s}function V2(e,t){return sn(e)===t.getNationalDigits()}function Yt(e){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(e)}function z2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W2(n.key),n)}}function q2(e,t,r){return t&&cs(e.prototype,t),r&&cs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W2(e){var t=G2(e,"string");return Yt(t)=="symbol"?t:t+""}function G2(e,t){if(Yt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H2=(function(){function e(){z2(this,e)}return q2(e,[{key:"parse",value:function(r){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(r),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var n=this.context[0],a=n.branches,i=n.instructions;if(a)return{op:"|",args:a.concat([aa(i)])};if(i.length===0)throw new Error("Pattern is required");return i.length===1?i[0]:i}},{key:"startContext",value:function(r){this.context.push(r)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(r){if(!r)throw new Error("Pattern is required");var n=r.match(X2);if(!n){if(Y2.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var a=n[1],i=r.slice(0,n.index),s=r.slice(n.index+a.length);switch(a){case"(?:":i&&this.parsePattern(i),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(i&&this.parsePattern(i),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var l=this.getContext().branches;l.push(aa(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:l});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(i&&this.parsePattern(i),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(aa(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":i&&this.parsePattern(i),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:K2(i)});break;default:throw new Error("Unknown operator: ".concat(a))}s&&this.parsePattern(s)}}])})();function K2(e){for(var t=[],r=0;r<e.length;){if(e[r]==="-"){if(r===0||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,a=e[r+1].charCodeAt(0)-1,i=n;i<=a;)t.push(String.fromCharCode(i)),i++}else t.push(e[r]);r++}return t}var Y2=/[\(\)\[\]\?\:\|]/,X2=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function aa(e){return e.length===1?e[0]:e}function ds(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Z2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z2(e,t){if(e){if(typeof e=="string")return us(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?us(e,t):void 0}}function us(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Xt(e){"@babel/helpers - typeof";return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(e)}function J2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ev(n.key),n)}}function Q2(e,t,r){return t&&fs(e.prototype,t),r&&fs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ev(e){var t=tv(e,"string");return Xt(t)=="symbol"?t:t+""}function tv(e,t){if(Xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rv=(function(){function e(t){J2(this,e),this.matchTree=new H2().parse(t)}return Q2(e,[{key:"match",value:function(r){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).allowOverflow;if(!r)throw new Error("String is required");var a=La(r.split(""),this.matchTree,!0);if(a&&a.match&&delete a.matchedChars,!(a&&a.overflow&&!n))return a}}])})();function La(e,t,r){if(typeof t=="string"){var n=e.join("");return t.indexOf(n)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:n.indexOf(t)===0?r&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var a=e.slice(),i=0;i<t.length;){var s=t[i],l=La(a,s,r&&i===t.length-1);if(l){if(l.overflow)return l;if(l.match){if(a=a.slice(l.matchedChars.length),a.length===0)return i===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(l.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
31
+ `.concat(JSON.stringify(l,null,2)))}}else return;i++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-a.length)}}switch(t.op){case"|":for(var c,d=ds(t.args),u;!(u=d()).done;){var f=u.value,v=La(e,f,r);if(v){if(v.overflow)return v;if(v.match)return{match:!0,matchedChars:v.matchedChars};if(v.partialMatch)c=!0;else throw new Error(`Unsupported match result:
32
+ `.concat(JSON.stringify(v,null,2)))}}return c?{partialMatch:!0}:void 0;case"[]":for(var h=ds(t.args),m;!(m=h()).done;){var y=m.value;if(e[0]===y)return e.length===1?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[y]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function Zt(e){"@babel/helpers - typeof";return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(e)}function ps(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=nv(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nv(e,t){if(e){if(typeof e=="string")return hs(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hs(e,t):void 0}}function hs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function av(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ov(n.key),n)}}function iv(e,t,r){return t&&ms(e.prototype,t),r&&ms(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ov(e){var t=sv(e,"string");return Zt(t)=="symbol"?t:t+""}function sv(e,t){if(Zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fa="9",lv=Ur(Fa,15),cv=/[- ]/,ln=!0,dv=ln&&function(){return/\[([^\[\]])*\]/g},uv=ln&&function(){return/\d(?=[^,}][^,}])/g},fv=new RegExp("["+De+"]*\\$1["+De+"]*(\\$\\d["+De+"]*)*$"),vs=3,pv=(function(){function e(t){t.state;var r=t.metadata;av(this,e),this.metadata=r,this.resetFormat()}return iv(e,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(r,n){this.resetFormat(),r?(this.isNANP=r.callingCode()==="1",this.matchingFormats=r.formats(),n.nationalSignificantNumber&&this.narrowDownMatchingFormats(n)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(r,n){var a=this;if(B2(n.nationalSignificantNumber,n.country,this.metadata))for(var i=ps(this.matchingFormats),s;!(s=i()).done;){var l=s.value,c=F2(n,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return a.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return a.getSeparatorAfterNationalPrefix(u)}});if(c)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(c.replace(/\d/g,"x"),n),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),c}return this.formatNationalNumberWithNextDigits(r,n)}},{key:"formatNationalNumberWithNextDigits",value:function(r,n){var a=this.chosenFormat,i=this.chooseFormat(n);if(i)return i===a?this.formatNextNationalNumberDigits(r):this.formatNextNationalNumberDigits(n.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(r){var n=this,a=r.nationalSignificantNumber,i=r.nationalPrefix,s=r.international,l=a,c=l.length-vs;c<0&&(c=0),this.matchingFormats=this.matchingFormats.filter(function(d){return n.formatSuits(d,s,i)&&n.formatMatches(d,l,c)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(r,n,a){return!(a&&!r.usesNationalPrefix()&&!r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!n&&!a&&r.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(r,n,a){var i=r.leadingDigitsPatterns().length;if(i===0)return!0;a=Math.min(a,i-1);var s=r.leadingDigitsPatterns()[a];if(n.length<vs)try{return new rv(s).match(n,{allowOverflow:!0})!==void 0}catch(l){return console.error(l),!0}return new RegExp("^(".concat(s,")")).test(n)}},{key:"getFormatFormat",value:function(r,n){return n?r.internationalFormat():r.format()}},{key:"chooseFormat",value:function(r){for(var n=this,a=function(){var d=l.value;return n.chosenFormat===d?0:fv.test(n.getFormatFormat(d,r.international))?n.createTemplateForFormat(d,r)?(n.chosenFormat=d,0):(n.matchingFormats=n.matchingFormats.filter(function(u){return u!==d}),1):1},i,s=ps(this.matchingFormats.slice()),l;!(l=s()).done&&(i=a(),i!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(ln&&r.pattern().indexOf("|")>=0)){var a=this.getTemplateForFormat(r,n);if(a)return this.setNationalNumberTemplate(a,n),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(r){return this.isNANP||r&&r.nationalPrefixFormattingRule()&&cv.test(r.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(r,n){var a=r.IDDPrefix,i=r.missingPlus;return a?n&&n.spacing===!1?a:a+" ":i?"":"+"}},{key:"getTemplate",value:function(r){if(this.template){for(var n=-1,a=0,i=r.international?this.getInternationalPrefixBeforeCountryCallingCode(r,{spacing:!1}):"";a<i.length+r.getDigitsWithoutInternationalPrefix().length;)n=this.template.indexOf("x",n+1),a++;return ss(this.template,n+1)}}},{key:"setNationalNumberTemplate",value:function(r,n){this.nationalNumberTemplate=r,this.populatedNationalNumberTemplate=r,this.populatedNationalNumberTemplatePosition=-1,n.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,"x")+Ur("x",n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var a=n.nationalSignificantNumber,i=n.international,s=n.nationalPrefix,l=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,c=r.pattern();ln&&(c=c.replace(dv(),"\\d").replace(uv(),"\\d"));var d=lv.match(c)[0];if(!(a.length>d.length)){var u=new RegExp("^"+c+"$"),f=a.replace(/\d/g,Fa);u.test(f)&&(d=f);var v=this.getFormatFormat(r,i),h;if(this.shouldTryNationalPrefixFormattingRule(r,{international:i,nationalPrefix:s})){var m=v.replace(wc,r.nationalPrefixFormattingRule());if(sn(r.nationalPrefixFormattingRule())===(s||"")+sn("$1")&&(v=m,h=!0,s))for(var y=s.length;y>0;)v=v.replace(/\d/,"x"),y--}var g=d.replace(new RegExp(c),v).replace(new RegExp(Fa,"g"),"x");return h||(l?g=Ur("x",l.length)+" "+g:s&&(g=Ur("x",s.length)+this.getSeparatorAfterNationalPrefix(r)+g)),i&&(g=_c(g)),g}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=L2(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],ss(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(r,n){var a=n.international,i=n.nationalPrefix;if(r.nationalPrefixFormattingRule()){var s=r.usesNationalPrefix();if(s&&i||!s&&!a)return!0}}}])})();function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function Rc(e,t){return yv(e)||vv(e,t)||mv(e,t)||hv()}function hv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
34
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mv(e,t){if(e){if(typeof e=="string")return ys(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ys(e,t):void 0}}function ys(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}function yv(e){if(Array.isArray(e))return e}function gv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bv(n.key),n)}}function $v(e,t,r){return t&&gs(e.prototype,t),r&&gs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bv(e){var t=Nv(e,"string");return Jt(t)=="symbol"?t:t+""}function Nv(e,t){if(Jt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sv="["+De+$e+"]+",xv=new RegExp("^"+Sv+"$","i"),Cv="(?:["+In+"]["+De+$e+"]*|["+De+$e+"]+)",_v=new RegExp("[^"+De+$e+"]+.*$"),wv=/[^\d\[\]]/,Ev=(function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,a=t.metadata,i=t.onNationalSignificantNumberChange;gv(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=a,this.onNationalSignificantNumberChange=i}return $v(e,[{key:"input",value:function(r,n){var a=Rc(jv(r),2),i=a[0],s=a[1],l=sn(i),c;return s&&(n.digits||(n.startInternationalNumber(void 0,void 0),l||(c=!0))),l&&this.inputDigits(l,n),{digits:l,justLeadingPlus:c}}},{key:"inputDigits",value:function(r,n){var a=n.digits,i=a.length<3&&a.length+r.length>=3;if(n.appendDigits(r),i&&this.extractIddPrefix(n),this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n))return}else n.appendNationalSignificantNumberDigits(r);n.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(n.getNationalDigits(),function(s){return n.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(r){var n=r.international,a=r.callingCode;return n&&!a}},{key:"extractCountryCallingCode",value:function(r){var n=$i("+"+r.getDigitsWithoutInternationalPrefix(),r.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),a=n.countryCallingCode,i=n.number;if(a)return r.setCallingCode(a),r.update({nationalSignificantNumber:i}),!0}},{key:"reset",value:function(r){if(r){this.hasSelectedNumberingPlan=!0;var n=r._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&wv.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(this.hasSelectedNumberingPlan){var a=Aa(r,this.metadata),i=a.nationalPrefix,s=a.nationalNumber,l=a.carrierCode;if(s!==r)return this.onExtractedNationalNumber(i,l,s,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,a){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,a);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var i=Aa(r,this.metadata),s=i.nationalPrefix,l=i.nationalNumber,c=i.carrierCode;if(l!==n)return this.onExtractedNationalNumber(s,c,l,r,a),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,a,i,s){var l=!1,c,d=i.lastIndexOf(a);if(d<0||d!==i.length-a.length)l=!0;else{var u=i.slice(0,d);u&&u!==r&&(c=u)}s({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:a,nationalSignificantNumberIsModified:l,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:c}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(r){if(this.extractAnotherNationalSignificantNumber(r.getNationalDigits(),r.nationalSignificantNumber,function(n){return r.update(n)}))return!0;if(this.extractIddPrefix(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0;if(this.fixMissingPlus(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0}},{key:"extractIddPrefix",value:function(r){var n=r.international,a=r.IDDPrefix,i=r.digits;if(r.nationalSignificantNumber,!(n||a)){var s=Sc(i,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==i)return r.update({IDDPrefix:i.slice(0,i.length-s.length)}),this.startInternationalNumber(r,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(r){if(!r.international){var n=Cc(r.digits,r.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(n)return r.update({missingPlus:!0}),this.startInternationalNumber(r,{country:r.country,callingCode:n}),!0}}},{key:"startInternationalNumber",value:function(r,n){var a=n.country,i=n.callingCode;r.startInternationalNumber(a,i),r.nationalSignificantNumber&&(r.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(r){this.extractCountryCallingCode(r)&&this.extractNationalSignificantNumber(r.getNationalDigits(),function(n){return r.update(n)})}}])})();function Pv(e){var t=e.search(Cv);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(_v,""),r&&(e="+"+e),e}}function Ov(e){var t=Pv(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function jv(e){var t=Rc(Ov(e),2),r=t[0],n=t[1];return xv.test(r)||(r=""),[r,n]}function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function Tv(e,t){return Rv(e)||kv(e,t)||Iv(e,t)||Av()}function Av(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iv(e,t){if(e){if(typeof e=="string")return $s(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$s(e,t):void 0}}function $s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function kv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}function Rv(e){if(Array.isArray(e))return e}function Dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lv(n.key),n)}}function Mv(e,t,r){return t&&bs(e.prototype,t),r&&bs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lv(e){var t=Fv(e,"string");return Qt(t)=="symbol"?t:t+""}function Fv(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ns=!1,jt=(function(){function e(t,r){Dv(this,e),this.metadata=new ce(r);var n=Tv(this.getCountryAndCallingCode(t),2),a=n[0],i=n[1];this.defaultCountry=a,this.defaultCallingCode=i,this.reset()}return Mv(e,[{key:"getCountryAndCallingCode",value:function(r){var n,a;return r&&(nt(r)?(n=r.defaultCountry,a=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),a&&Ns&&this.metadata.isNonGeographicCallingCode(a)&&(n="001"),[n,a]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),a=n.digits;if(n.justLeadingPlus)this.formattedOutput="+";else if(a){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var i;if(this.metadata.hasSelectedNumberingPlan()&&(i=this.formatter.format(a,this.state)),i===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var s=this.state.getNationalDigits();s&&(i=this.formatter.format(s,this.state))}this.formattedOutput=i?this.getFullNumber(i):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new k2({onCountryChange:function(a){r.country=a},onCallingCodeChange:function(a,i){r.metadata.selectNumberingPlan(i,a),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new pv({state:this.state,metadata:this.metadata}),this.parser=new Ev({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){r.determineTheCountryIfNeeded(),r.formatter.reset(r.metadata.numberingPlan,r.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){var r=this.state.country;if(!(Ns&&r==="001"))return r}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(r){var n=this;if(this.isInternational()){var a=function(l){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!l})+l},i=this.state.callingCode;return a(i?r?"".concat(i," ").concat(r):i:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,a=r.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,i=r.nationalPrefix,s=n,l=a||i;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var r=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(r?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var r=this.getNonFormattedNumber();if(r)return r.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var r=this.state.callingCode,n=this.metadata.getCountryCodesForCallingCode(r);return n&&n.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(gi(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var r=this.state,n=r.digits,a=r.callingCode,i=r.country,s=r.nationalSignificantNumber;if(n){if(this.isInternational())return a?"+"+a+s:"+"+n;if(i||a)return"+"+(i?this.metadata.countryCallingCode():a)+s}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,a=r.carrierCode,i=r.callingCode,s=this._getCountry();if(n&&!(!s&&!i)){if(s&&s===this.defaultCountry){var l=new ce(this.metadata.metadata);l.selectNumberingPlan(s);var c=l.numberingPlan.callingCode(),d=this.metadata.getCountryCodesForCallingCode(c);if(d.length>1){var u=xc(n,{countries:d,metadata:this.metadata.metadata});u&&(s=u)}}var f=new jc(s||i,n,this.metadata.metadata);return a&&(f.carrierCode=a),f}}},{key:"isPossible",value:function(){var r=this.getNumber();return r?r.isPossible():!1}},{key:"isValid",value:function(){var r=this.getNumber();return r?r.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])})();function Ss(e){return new ce(e).getCountries()}function Bv(e,t,r){return r||(r=t,t=void 0),new jt(t,r).input(e)}var cn=tr(Xh(),1);function Dc(e){var t=e.inputFormat,r=e.country,n=e.metadata;return t==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(Je(r,n)):""}function Ba(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}function Uv(e,t,r){if(!(r&&r.ignoreRest))return Ac(e,t,function(a){r&&a==="end"&&(r.ignoreRest=!0)})}function Mc(e){var t=e.onKeyDown,r=e.inputFormat;return(0,S.useCallback)(function(n){if(n.keyCode===zv&&r==="INTERNATIONAL"&&n.target instanceof HTMLInputElement&&Vv(n.target)===qv.length){n.preventDefault();return}t&&t(n)},[t,r])}function Vv(e){return e.selectionStart}var zv=8,qv="+",Wv=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ua.apply(this,arguments)}function Gv(e,t){if(e==null)return{};var r=Hv(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hv(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Kv(e){function t(r,n){var a=r.onKeyDown,i=r.country,s=r.inputFormat,l=r.metadata,c=l===void 0?e:l;r.international,r.withCountryCallingCode;var d=Gv(r,Wv),u=(0,S.useCallback)(function(v){var h=new jt(i,c),m=Dc({inputFormat:s,country:i,metadata:c}),y=h.input(m+v),g=h.getTemplate();return m&&(y=Ba(y,m),g&&(g=Ba(g,m))),{text:y,template:g}},[i,c]),f=Mc({onKeyDown:a,inputFormat:s});return S.default.createElement(_1,Ua({},d,{ref:n,parse:Uv,format:u,onKeyDown:f}))}return t=S.default.forwardRef(t),t.propTypes={value:P.default.string.isRequired,onChange:P.default.func.isRequired,onKeyDown:P.default.func,country:P.default.string,inputFormat:P.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:P.default.object},t}var Yv=Kv(),Xv=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}function Zv(e,t){if(e==null)return{};var r=Jv(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jv(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Qv(e){function t(r,n){var a=r.value,i=r.onChange,s=r.onKeyDown,l=r.country,c=r.inputFormat,d=r.metadata,u=d===void 0?e:d,f=r.inputComponent,v=f===void 0?"input":f;r.international,r.withCountryCallingCode;var h=Zv(r,Xv),m=Dc({inputFormat:c,country:l,metadata:u}),y=(0,S.useCallback)(function(p){var b=Ra(p.target.value);b===a&&xs(m,b,l,u).indexOf(p.target.value)===0&&(b=b.slice(0,-1)),i(b)},[m,a,i,l,u]),g=Mc({onKeyDown:s,inputFormat:c});return S.default.createElement(v,Va({},h,{ref:n,value:xs(m,a,l,u),onChange:y,onKeyDown:g}))}return t=S.default.forwardRef(t),t.propTypes={value:P.default.string.isRequired,onChange:P.default.func.isRequired,onKeyDown:P.default.func,country:P.default.string,inputFormat:P.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:P.default.object,inputComponent:P.default.elementType},t}var ey=Qv();function xs(e,t,r,n){return Ba(Bv(e+t,r,n),e)}function ty(e){return Cs(e[0])+Cs(e[1])}function Cs(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var ry=["value","onChange","options","disabled","readOnly"],ny=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function ay(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=iy(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iy(e,t){if(e){if(typeof e=="string")return _s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _s(e,t)}}function _s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dn.apply(this,arguments)}function Lc(e,t){if(e==null)return{};var r=oy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oy(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Fc(e){var t=e.value,r=e.onChange,n=e.options,a=e.disabled,i=e.readOnly,s=Lc(e,ry),l=(0,S.useCallback)(function(c){var d=c.target.value;r(d==="ZZ"?void 0:d)},[r]);return(0,S.useMemo)(function(){return Uc(n,t)},[n,t]),S.default.createElement("select",dn({},s,{disabled:a||i,readOnly:i,value:t||"ZZ",onChange:l}),n.map(function(c){var d=c.value,u=c.label,f=c.divider;return S.default.createElement("option",{key:f?"|":d||"ZZ",value:f?"|":d||"ZZ",disabled:!!f,style:f?sy:void 0},u)}))}Fc.propTypes={value:P.default.string,onChange:P.default.func.isRequired,options:P.default.arrayOf(P.default.shape({value:P.default.string,label:P.default.string,divider:P.default.bool})).isRequired,disabled:P.default.bool,readOnly:P.default.bool};var sy={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function Bc(e){var t=e.value,r=e.options,n=e.className,a=e.iconComponent;e.getIconAspectRatio;var i=e.arrowComponent,s=i===void 0?ly:i,l=e.unicodeFlags,c=Lc(e,ny),d=(0,S.useMemo)(function(){return Uc(r,t)},[r,t]);return S.default.createElement("div",{className:"PhoneInputCountry"},S.default.createElement(Fc,dn({},c,{value:t,options:r,className:(0,cn.default)("PhoneInputCountrySelect",n)})),d&&(l&&t?S.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},ty(t)):S.default.createElement(a,{"aria-hidden":!0,country:t,label:d.label,aspectRatio:l?1:void 0})),S.default.createElement(s,null))}Bc.propTypes={iconComponent:P.default.elementType,arrowComponent:P.default.elementType,unicodeFlags:P.default.bool};function ly(){return S.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function Uc(e,t){for(var r=ay(e),n;!(n=r()).done;){var a=n.value;if(!a.divider&&cy(a.value,t))return a}}function cy(e,t){return e==null?t==null:e===t}var dy=["country","countryName","flags","flagUrl"];function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},za.apply(this,arguments)}function uy(e,t){if(e==null)return{};var r=fy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fy(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Ni(e){var t=e.country,r=e.countryName,n=e.flags,a=e.flagUrl,i=uy(e,dy);return n&&n[t]?n[t]({title:r}):S.default.createElement("img",za({},i,{alt:r,role:r?void 0:"presentation",src:a.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}Ni.propTypes={country:P.default.string.isRequired,countryName:P.default.string.isRequired,flags:P.default.objectOf(P.default.elementType),flagUrl:P.default.string.isRequired};var py=["aspectRatio"],hy=["title"],my=["title"];function un(){return un=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},un.apply(this,arguments)}function Si(e,t){if(e==null)return{};var r=vy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vy(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function kn(e){var t=e.aspectRatio,r=Si(e,py);return t===1?S.default.createElement(zc,r):S.default.createElement(Vc,r)}kn.propTypes={title:P.default.string.isRequired,aspectRatio:P.default.number};function Vc(e){var t=e.title,r=Si(e,hy);return S.default.createElement("svg",un({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),S.default.createElement("title",null,t),S.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},S.default.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),S.default.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),S.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),S.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),S.default.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),S.default.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),S.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}Vc.propTypes={title:P.default.string.isRequired};function zc(e){var t=e.title,r=Si(e,my);return S.default.createElement("svg",un({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),S.default.createElement("title",null,t),S.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},S.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),S.default.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),S.default.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),S.default.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),S.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),S.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),S.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}zc.propTypes={title:P.default.string.isRequired};function yy(e){if(e.length<2||e[0]!=="+")return!1;for(var t=1;t<e.length;){var r=e.charCodeAt(t);if(!(r>=48&&r<=57))return!1;t++}return!0}function qc(e){yy(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function gy(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=$y(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $y(e,t){if(e){if(typeof e=="string")return ws(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ws(e,t)}}function ws(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function by(e,t){if(!t)return e;for(var r=[],n=[],a=r,i=function(){var d=l.value;if(d==="|")a.push({divider:!0});else if(d==="..."||d==="…")a=n;else{var u;d==="🌐"?u=void 0:u=d;var f=e.indexOf(e.filter(function(h){return h.value===u})[0]),v=e[f];e.splice(f,1),a.push(v)}},s=gy(t),l;!(l=s()).done;)i();return r.concat(e).concat(n)}function Ny(e,t){if(e&&(e=e.filter(function(r){switch(r){case"🌐":case"|":case"...":case"…":return!0;default:return Rn(r,t)}}),e.length>0))return e}function Rn(e,t){return gc(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function Wc(e,t){return e&&(e=e.filter(function(r){return Rn(r,t)}),e.length===0&&(e=void 0)),e}var Sy=["country","label","aspectRatio"];function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(this,arguments)}function xy(e,t){if(e==null)return{};var r=Cy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cy(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Gc(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,a=e.internationalIcon;function i(s){var l=s.country,c=s.label,d=s.aspectRatio,u=xy(s,Sy),f=a===kn?d:void 0;return S.default.createElement("div",qa({},u,{className:(0,cn.default)("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":f===1,"PhoneInputCountryIcon--border":l})}),l?S.default.createElement(n,{country:l,countryName:c,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):S.default.createElement(a,{title:c,aspectRatio:f,className:"PhoneInputCountryIconImg"}))}return i.propTypes={country:P.default.string,label:P.default.string.isRequired,aspectRatio:P.default.number},i}var Ag=Gc({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:Ni,internationalIcon:kn});function _y(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=wy(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
38
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wy(e,t){if(e){if(typeof e=="string")return Es(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Es(e,t)}}function Es(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ey(e,t){for(var r=_y(e),n;!(n=r()).done;){var a=n.value;a&&Py(a,t)}}function Py(e,t){typeof e=="function"?e(t):e.current=t}var Hc=P.default.shape({country_calling_codes:P.default.object.isRequired,countries:P.default.object.isRequired}),Kc=P.default.objectOf(P.default.string);function Ve(e,t){return"+"+Je(e,t)}function Oy(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,a=e.getAnyCountry,i=e.countries,s=e.required,l=e.metadata,c;return r&&r.country?c=r.country:n&&(!t||vt(t,n,l))&&(c=n),i&&i.indexOf(c)<0&&(c=void 0),!c&&s&&i&&i.length>0&&(c=a()),c}function jy(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,a=e.compareStringsLocales,i=e.compareStrings;i||(i=My);var s=t.map(function(l){return{value:l,label:r[l]||l}});return s.sort(function(l,c){return i(l.label,c.label,a)}),n&&s.unshift({label:r.ZZ}),s}function Yc(e,t){return _2(e||"",t)}function Ty(e){return e.formatNational().replace(/\D/g,"")}function Ay(e,t){var r=t.prevCountry,n=t.newCountry,a=t.metadata,i=t.useNationalFormat;if(r===n)return e;if(!e)return i?"":n?Ve(n,a):"";if(n){if(e[0]==="+"){if(i)return e.indexOf("+"+Je(n,a))===0?Ly(e,n,a):"";if(r){var s=Ve(n,a);return e.indexOf(s)===0?e:s}else{var l=Ve(n,a);return e.indexOf(l)===0?e:l}}}else if(e[0]!=="+")return dt(e,r,a)||"";return e}function dt(e,t,r){if(e){if(e[0]==="+"){if(e==="+")return;var n=new jt(t,r);return n.input(e),n.getNumberValue()}if(t){var a=Zc(e,t,r);return"+".concat(Je(t,r)).concat(a||"")}}}function Iy(e,t,r){var n=Zc(e,t,r);if(n){var a=n.length-ky(t,r);if(a>0)return e.slice(0,e.length-a)}return e}function ky(e,t){return t=new ce(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Xc(e,t){var r=t.country,n=t.countries,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.required,l=t.metadata;if(e==="+")return r;var c=Dy(e,l);if(c)return!n||n.indexOf(c)>=0?c:void 0;if(r){if(vt(e,r,l)){if(i&&vt(e,i,l))return i;if(a&&vt(e,a,l))return a;if(!s)return}else if(!s)return}return r}function Ry(e,t){var r=t.prevPhoneDigits,n=t.country,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.countryRequired,l=t.getAnyCountry,c=t.countries,d=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,v=t.metadata;if(d&&f===!1&&n){var h=Ve(n,v);if(e.indexOf(h)!==0){var m;return e&&e[0]!=="+"?(e=h+e,m=dt(e,n,v)):e=h,{phoneDigits:e,value:m,country:n}}}d===!1&&n&&e&&e[0]==="+"&&(e=Ps(e,n,v)),e&&n&&u&&(e=Iy(e,n,v)),e&&e[0]!=="+"&&(!n||d)&&(e="+"+e),!e&&r&&r[0]==="+"&&(d?n=void 0:n=a),e==="+"&&r&&r[0]==="+"&&r.length>1&&(n=void 0);var y;return e&&(e[0]==="+"&&(e==="+"||n&&Ve(n,v).indexOf(e)===0)?y=void 0:y=dt(e,n,v)),y&&(n=Xc(y,{country:n,countries:c,defaultCountry:a,latestCountrySelectedByUser:i,required:!1,metadata:v}),d===!1&&n&&e&&e[0]==="+"&&(e=Ps(e,n,v),y=dt(e,n,v))),!n&&s&&(n=a||l()),{phoneDigits:e,country:n,value:y}}function Ps(e,t,r){if(e.indexOf(Ve(t,r))===0){var n=new jt(t,r);n.input(e);var a=n.getNumber();return a?a.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function Dy(e,t){var r=new jt(null,t);return r.input(e),r.getCountry()}function My(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function Ly(e,t,r){if(t){var n="+"+Je(t,r);if(e.length<n.length){if(n.indexOf(e)===0)return""}else if(e.indexOf(n)===0)return e.slice(n.length)}for(var a=0,i=Object.keys(r.country_calling_codes);a<i.length;a++){var s=i[a];if(e.indexOf(s)===1)return e.slice(1+s.length)}return""}function Zc(e,t,r){var n=new jt(t,r);n.input(e);var a=n.getNumber();return a&&a.nationalNumber}function vt(e,t,r){for(var n=Ve(t,r),a=0;a<e.length&&a<n.length;){if(e[a]!==n[a])return!1;a++}return!0}function Jc(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,a=e.international,i=e.useNationalFormat,s=e.metadata;return(a===!1||i)&&r&&r.country?Ty(r):!t&&a&&n?Ve(n,s):t}function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function Os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Os(Object(r),!0).forEach(function(n){Fy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fy(e,t,r){return t=By(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function By(e){var t=Uy(e,"string");return er(t)=="symbol"?t:t+""}function Uy(e,t){if(er(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(er(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vy(e,t,r){var n=e.metadata,a=e.countries,i=e.defaultCountry,s=e.value,l=e.reset,c=e.international,d=e.displayInitialValueAsLocalNumber,u=e.initialValueFormat,f=t.defaultCountry,v=t.value,h=t.reset;r.country;var m=r.value,y=r.hasUserSelectedACountry,g=r.latestCountrySelectedByUser,p=function(G){return Jc(Nr(Nr({},G),{},{international:c,useNationalFormat:d||u==="national",metadata:n}))};if(l!==h)return{phoneDigits:p({value:void 0,defaultCountry:i}),value:void 0,country:i,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(i!==f){var b=!i||Rn(i,n),C=!m||c&&m===p({value:void 0,defaultCountry:f});if(!y&&b&&!s&&C)return{country:i,phoneDigits:p({value:void 0,defaultCountry:i}),value:void 0}}if(!js(s,v)&&!js(s,m)){var x,N;if(s){s&&qc(s),x=Yc(s,n);var $=Wc(a,n);x&&x.country?(!$||$.indexOf(x.country)>=0)&&(N=x.country):(N=Xc(s,{country:void 0,countries:$,metadata:n}),N||i&&s.indexOf(Ve(i,n))===0&&(N=i))}var T;return s?g&&((N?g===N:vt(s,g,n))?N||(N=g):T={latestCountrySelectedByUser:void 0}):T={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},Nr(Nr({},T),{},{phoneDigits:p({phoneNumber:x,value:s,defaultCountry:i}),value:s,country:s?N:i})}}function js(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}var zy=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function Ct(e){"@babel/helpers - typeof";return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}function Ts(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ts(Object(r),!0).forEach(function(n){Ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ts(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yt.apply(this,arguments)}function qy(e,t){if(e==null)return{};var r=Wy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wy(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Gy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function As(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,td(n.key),n)}}function Hy(e,t,r){return t&&As(e.prototype,t),r&&As(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ky(e,t,r){return t=fn(t),Yy(e,ed()?Reflect.construct(t,r||[],fn(e).constructor):t.apply(e,r))}function Yy(e,t){if(t&&(Ct(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xy(e)}function Xy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ed(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ed=function(){return!!e})()}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fn(e)}function Zy(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wa(e,t)}function Wa(e,t){return Wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wa(e,t)}function Ie(e,t,r){return t=td(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function td(e){var t=Jy(e,"string");return Ct(t)=="symbol"?t:t+""}function Jy(e,t){if(Ct(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qy=(function(e){function t(r){var n;Gy(this,t),n=Ky(this,t,[r]),Ie(n,"setInputRef",function(g){Ey([n.props.inputRef,n.inputRef],g)}),Ie(n,"isCountrySupportedWithError",function(g){var p=n.props.metadata;return Rn(g,p)}),Ie(n,"onCountryChange",function(g){var p=n.props,b=p.international,C=p.metadata,x=p.onChange,N=p.focusInputOnCountrySelection,$=n.state,T=$.phoneDigits,R=$.country,G=Ay(T,{prevCountry:R,newCountry:g,metadata:C,useNationalFormat:!b}),Y=dt(G,g,C);N&&n.inputRef.current.focus(),n.setState({country:g,latestCountrySelectedByUser:g,hasUserSelectedACountry:!0,phoneDigits:G,value:Y},function(){x(Y)})}),Ie(n,"onChange",function(g){var p=n.props,b=p.defaultCountry,C=p.onChange,x=p.addInternationalOption,N=p.international,$=p.limitMaxLength,T=p.countryCallingCodeEditable,R=p.metadata,G=n.state,Y=G.countries,se=G.phoneDigits,te=G.country,ve=G.latestCountrySelectedByUser,de=Ry(g,{prevPhoneDigits:se,country:te,countryRequired:!x,defaultCountry:b,latestCountrySelectedByUser:ve,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:Y})},countries:Y,international:N,limitMaxLength:$,countryCallingCodeEditable:T,metadata:R}),be=de.phoneDigits,re=de.country,ue=de.value,ne={phoneDigits:be,value:ue,country:re};ve&&ue&&!vt(ue,ve,R)&&(ne.latestCountrySelectedByUser=void 0),T===!1&&!ue&&be===n.state.phoneDigits&&(ne.forceRerender={}),n.setState(ne,function(){return C(ue)})}),Ie(n,"_onFocus",function(){return n.setState({isFocused:!0})}),Ie(n,"_onBlur",function(){return n.setState({isFocused:!1})}),Ie(n,"onFocus",function(g){n._onFocus();var p=n.props.onFocus;p&&p(g)}),Ie(n,"onBlur",function(g){var p=n.props.onBlur;n._onBlur(),p&&p(g)}),Ie(n,"onCountryFocus",function(g){n._onFocus();var p=n.props.countrySelectProps;if(p){var b=p.onFocus;b&&b(g)}}),Ie(n,"onCountryBlur",function(g){n._onBlur();var p=n.props.countrySelectProps;if(p){var b=p.onBlur;b&&b(g)}}),n.inputRef=S.default.createRef();var a=n.props,i=a.value;a.labels;var s=a.international,l=a.addInternationalOption,c=a.displayInitialValueAsLocalNumber,d=a.initialValueFormat,u=a.metadata,f=n.props,v=f.defaultCountry,h=f.countries;v&&(n.isCountrySupportedWithError(v)||(v=void 0)),i&&qc(i),h=Wc(h,u);var m=Yc(i,u);n.CountryIcon=Gc(n.props);var y=Oy({value:i,phoneNumber:m,defaultCountry:v,required:!l,countries:h||Ss(u),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:h})},metadata:u});return n.state={props:n.props,country:y,countries:h,phoneDigits:Jc({value:i,phoneNumber:m,defaultCountry:v,international:s,useNationalFormat:c||d==="national",metadata:u}),value:i},n}return Zy(t,e),Hy(t,[{key:"componentDidMount",value:function(){var n=this.props.onCountryChange,a=this.props.defaultCountry,i=this.state.country;n&&(a&&(this.isCountrySupportedWithError(a)||(a=void 0)),i!==a&&n(i))}},{key:"componentDidUpdate",value:function(n,a){var i=this.props.onCountryChange,s=this.state.country;i&&s!==a.country&&i(s)}},{key:"getCountrySelectOptions",value:function(n){var a=n.countries,i=this.props,s=i.international,l=i.countryCallingCodeEditable,c=i.countryOptionsOrder,d=i.addInternationalOption,u=i.labels,f=i.locales,v=i.metadata;return this.useMemoCountrySelectOptions(function(){return by(jy({countries:a||Ss(v),countryNames:u,addInternationalOption:s&&l===!1?!1:d,compareStringsLocales:f}),Ny(c,v))},[a,c,d,u,v])}},{key:"useMemoCountrySelectOptions",value:function(n,a){return(!this.countrySelectOptionsMemoDependencies||!tg(a,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=n(),this.countrySelectOptionsMemoDependencies=a),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(n){var a=n.countries;return this.getCountrySelectOptions({countries:a})[0].value}},{key:"render",value:function(){var n=this.props,a=n.name,i=n.disabled,s=n.readOnly,l=n.autoComplete,c=n.style,d=n.className;n.inputRef;var u=n.inputComponent,f=n.numberInputProps,v=n.smartCaret,h=n.countrySelectComponent,m=n.countrySelectProps,y=n.containerComponent,g=n.containerComponentProps;n.defaultCountry,n.countries,n.countryOptionsOrder;var p=n.labels;n.flags,n.flagComponent,n.flagUrl,n.addInternationalOption,n.internationalIcon,n.displayInitialValueAsLocalNumber,n.initialValueFormat,n.onCountryChange,n.limitMaxLength,n.countryCallingCodeEditable,n.focusInputOnCountrySelection,n.reset;var b=n.metadata,C=n.international;n.locales;var x=qy(n,zy),N=this.state,$=N.country,T=N.countries,R=N.phoneDigits,G=N.isFocused,Y=v?Yv:ey,se=this.getCountrySelectOptions({countries:T});return S.default.createElement(y,yt({style:c,className:(0,cn.default)(d,"PhoneInput",{"PhoneInput--focus":G,"PhoneInput--disabled":i,"PhoneInput--readOnly":s})},g),S.default.createElement(h,yt({name:a?"".concat(a,"Country"):void 0,"aria-label":p.country},m,{value:$,options:se,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:i||m&&m.disabled,readOnly:s||m&&m.readOnly,iconComponent:this.CountryIcon})),S.default.createElement(Y,yt({ref:this.setInputRef,type:"tel",autoComplete:l},f,x,{inputFormat:C===!0?"INTERNATIONAL":C===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:C?!0:void 0,withCountryCallingCode:C?!0:void 0,name:a,metadata:b,country:$,value:R||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:i,readOnly:s,inputComponent:u,className:(0,cn.default)("PhoneInputInput",f&&f.className,x.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return Qc({props:n},Vy(n,a.props,a))}}])})(S.default.PureComponent),rd=S.default.forwardRef(function(e,t){return S.default.createElement(Qy,yt({},eg(e),{inputRef:t}))});rd.propTypes={value:P.default.string,onChange:P.default.func.isRequired,onFocus:P.default.func,onBlur:P.default.func,disabled:P.default.bool,readOnly:P.default.bool,autoComplete:P.default.string,initialValueFormat:P.default.oneOf(["national"]),displayInitialValueAsLocalNumber:P.default.bool,defaultCountry:P.default.string,countries:P.default.arrayOf(P.default.string),labels:Kc,locales:P.default.oneOfType([P.default.string,P.default.arrayOf(P.default.string)]),flagUrl:P.default.string,flags:P.default.objectOf(P.default.elementType),flagComponent:P.default.elementType,addInternationalOption:P.default.bool,internationalIcon:P.default.elementType,countryOptionsOrder:P.default.arrayOf(P.default.string),style:P.default.object,className:P.default.string,countrySelectComponent:P.default.elementType,countrySelectProps:P.default.object,inputComponent:P.default.elementType,numberInputProps:P.default.object,containerComponent:P.default.elementType,containerComponentProps:P.default.object,smartCaret:P.default.bool,international:P.default.bool,limitMaxLength:P.default.bool,countryCallingCodeEditable:P.default.bool,metadata:Hc,onCountryChange:P.default.func,focusInputOnCountrySelection:P.default.bool};var Is={autoComplete:"tel",countrySelectComponent:Bc,flagComponent:Ni,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:kn,inputComponent:"input",containerComponent:"div",reset:P.default.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function eg(e){e=Qc({},e);for(var t in Is)e[t]===void 0&&(e[t]=Is[t]);return e}function tg(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;){if(e[r]!==t[r])return!1;r++}return!0}var rg={ext:"ext.",country:"Phone number country",phone:"Phone",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XA:"Abkhazia",XK:"Kosovo",XO:"South Ossetia",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"},ng=["metadata","labels"];function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ga.apply(this,arguments)}function ag(e,t){if(e==null)return{};var r=ig(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ig(e,t){if(e==null)return{};for(var r={},n=Object.keys(e),a,i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function nd(e){var t=S.default.forwardRef(function(r,n){var a=r.metadata,i=a===void 0?e:a,s=r.labels,l=s===void 0?rg:s,c=ag(r,ng);return S.default.createElement(rd,Ga({},c,{ref:n,metadata:i,labels:l}))});return t.propTypes={metadata:Hc,labels:Kc},t}var Ig=nd();function og(e,t){var r=Array.prototype.slice.call(t);return r.push(mc),e.apply(this,r)}var sg=nd(mc);function Sr(){return og(O2,arguments)}var lg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],xr="consentDraftByService",cg=15,dg=["IN","US","CA","PH","NZ","AU","CN"],ks=e=>{if(!e)return!0;const t=e.replace(/\D/g,"");return["91","1","63","64","61","86"].includes(t)||t.length===0},ug=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function fg(){const e=(0,L.useDispatch)(),{tenantId:t,id:r}=(0,L.useSelector)(E=>E.booking.outletDetails),{timeZone:n,image:a,outletName:i,address:s}=(0,L.useSelector)(E=>E.booking.outletDetails),{staff:l,selectedServices:c,selectedProfessional:d}=(0,L.useSelector)(E=>E.booking.service),{selectedSlotIds:u,selectedDate:f,selectedTime:v}=(0,L.useSelector)(E=>E.booking.slots),{userDetails:h,bookingMode:m,tipPct:y}=(0,L.useSelector)(E=>E.booking.appointment),g=Array.isArray(c)?c:[c],{selectedSlotIndexes:p,slots:b}=(0,L.useSelector)(E=>E.booking.slots),[C,x]=(0,S.useState)(!1),[N,$]=(0,S.useState)(!1),[T,R]=(0,S.useState)(null),[G,Y]=(0,S.useState)("person"),[se,te]=(0,S.useState)(!1),[ve,de]=(0,S.useState)(""),[be,re]=(0,S.useState)(""),[ue,ne]=(0,S.useState)(null),[pe,Pe]=(0,S.useState)(null),[ye,j]=(0,S.useState)({}),[k,V]=(0,S.useState)({}),[z,F]=(0,S.useState)(!1),U=(0,S.useRef)(!1),_=(0,S.useRef)(""),O=he.DateTime.now().setZone(n??"UTC"),[D,M]=(0,S.useState)(null),[A,w]=(0,S.useState)(!1),H=(0,S.useRef)(""),J=(0,S.useRef)(null),{register:ge,handleSubmit:Le,control:ad,watch:Tt,reset:Dn,trigger:xi,setValue:At,formState:{errors:Ge,isSubmitted:Ci}}=(0,Ue.useForm)({defaultValues:{firstName:h?.firstName||"",lastName:h?.lastName||"",phone:h?.phone||"",email:h?.email||""},mode:"onChange",reValidateMode:"onChange"}),sr=Tt("phone"),Mn=Tt("email"),_i=sr?Sr(sr):!1,wi=gr(Mn),id=!wi||_i,od=!_i||wi,sd=E=>E?.replace(/\s+/g,"")||"",Ln=g.map(E=>{const I=l?.find(W=>W.id===d?.id)?.assignments?.find(W=>W.id===E.id),B={...E,price:I?.price??E.price??E.min_price??0,duration:I?.duration??E.estimated_time??E.min_time??0};return{...B,duration:I?.duration??E.estimated_time??E.min_time??0,tax:Ea(B),unitTax:Ea(B,{perUnit:!0})}}),Fn=[...b?.morning??[],...b?.afternoon??[],...b?.evening??[]],ld=Ln.reduce((E,I)=>E+Number(I.duration??0),0),cd=Math.ceil(ld/cg),dd=E=>{if(!Fn.length)return"";const I=Fn[E]?.start_time_12h,B=Fn[E+cd-1];return!I||!B?"":`${I} - ${B.end_time_12h??B.start_time_12h}`},Ei={day:Number(f?.day??O.day),month:Number(f?.month??O.month),year:Number(f?.year??O.year)},Pi=p?.[0],Oi=Pi!==void 0?dd(Pi):null,ud=Oi?`${lg[Ei.month-1]} ${Ei.day} at ${Oi}`:null,Bn=Ln.reduce((E,I)=>E+Number(I.price)*(I.qty??1),0),ji=Ln.reduce((E,I)=>E+I.tax,0),fd=Math.round(ji*100),Ti=Bn*y/100,pd=Math.round(Ti*100),Ai=Bn+Ti+ji,Oe=(0,S.useMemo)(()=>g.filter(E=>!(!oi(E)||(E?.consent_rule?.enforcementMode??E?.enforcementMode)==="FIXED")),[g]),hd=(0,S.useMemo)(()=>Oe.map(E=>String(E.id)).filter(Boolean),[Oe]),md=E=>{const I=E?.consent_template??E?.consentTemplate??null;return{heading:String(I?.heading??"").trim(),consent:String(I?.consent??"").trim()}},Un=E=>{j(I=>({...I,[String(E)]:!0}))};(0,S.useEffect)(()=>{h&&Oe?.length>0&&yd()},[h,Oe?.length]),(0,S.useEffect)(()=>{Dn({...h,phone:h?.phone||""},{keepErrors:!0,keepDirty:!1})},[h,Dn]),(0,S.useEffect)(()=>{Ci&&xi(["phone","email"])},[sr,Mn,Ci,xi]);const Ii=(0,S.useCallback)(async({value:E,type:I})=>{if(!E)return;let B="";if(I==="phone"){if(!Sr(E))return;B=sd(E)}if(I==="email"){if(!gr(E))return;B=E.trim()}if(B&&!(H.current===B&&A)){H.current=B,x(!0),M(I);try{const W=(await Uf({search:B,tenantId:t}))?.data?.[0];W?(At("firstName",W.first_name||"",{shouldValidate:!0}),At("lastName",W.last_name||""),W.phone&&Sr(W.phone)&&At("phone",W.phone),W.email&&At("email",W.email),e(yo({email:W.email,firstName:W.first_name,lastName:W.last_name,phone:W.phone})),w(!0)):w(!1)}catch(W){console.error(W)}finally{x(!1),M(null)}}},[e,At,t,A]);(0,S.useEffect)(()=>(J.current=(0,Rd.debounce)(Ii,800),()=>{J.current?.cancel?.()}),[Ii]);const ki=(E,I,B)=>{if(I&&I(E),!E){J.current?.cancel?.(),H.current="",w(!1),M(null);return}M(B),J.current?.({value:E,type:B})},vd=()=>{Dn({firstName:"",lastName:"",email:"",phone:""}),w(!1),H.current="",e(Zf())},yd=async()=>{const E=h?.id;if(E){F(!0);try{const I={};for(const B of Oe){const W=String(B.id),ae=String(B.consent_form_id??"");if(!W||!ae)continue;const Q=fo(B);if(!(Q==="EVERY_X_DAYS"||Q==="ONCE_PER_CUSTOMER")){I[W]={data:{checked:!0,needsSignature:!0}};continue}const Ne=!!(await ho(E,ae,W))?.data?.needsSignature;I[W]={data:{checked:!0,needsSignature:Ne}},Ne||Un(W)}V(I)}catch(I){console.error(I)}finally{F(!1)}}},Vn=(0,S.useMemo)(()=>Oe.filter(E=>{const I=String(E.id);if(ye[I])return!1;const B=k[I];return!(B?.data?.checked&&B?.data?.needsSignature===!1)}),[Oe,ye,k]),Ri=hd.length,Di=Ri-Vn.length,Mi=Vn.length===0,Li=async()=>{if(!U.current){U.current=!0;try{if(!h?.firstName){ee.toast.warn("Please enter First Name before signing consent.");return}if(!h?.email&&!h?.phone){ee.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const E=Vn[0];if(!E){await zn();return}const I=String(E.id);if(_.current===I&&se)return;_.current=I;const B=String(E.consent_form_id??"");if(!B){ee.toast.error("Consent form missing.");return}const W=po(E);if(!W){ee.toast.error("Consent enforcement method not found.");return}const ae=h?.id;if(fo(E)!=="EVERY_VISIT"&&ae){const Se=!!(await ho(ae,B,I))?.data?.needsSignature;if(V(He=>({...He,[I]:{data:{checked:!0,needsSignature:Se}}})),!Se){Un(I),ee.toast.success("Consent already signed for this service."),setTimeout(()=>Li(),250);return}}else V(Ne=>({...Ne,[I]:{data:{checked:!0,needsSignature:!0}}}));const{heading:Q,consent:fe}=md(E);if(!Q||!fe){ee.toast.error("Consent template missing.");return}de(Q),re(fe),ne(W),Pe(I),te(!0)}catch(E){console.error(E),ee.toast.error(E?.message??"Consent check failed")}finally{U.current=!1}}},gd=(E,I)=>{try{const B=localStorage.getItem(xr),W=B?JSON.parse(B):{};W[String(E)]=I,localStorage.setItem(xr,JSON.stringify(W))}catch(B){console.error("Failed to save consent draft",B)}},$d=()=>{try{return JSON.parse(localStorage.getItem(xr)??"{}")}catch{return{}}},bd=E=>{const I=String(pe);if(!I)return;const B=Oe.find(fe=>String(fe.id)===I);if(!B)return;const W=String(B.consent_form_id??""),ae=po(B);if(!W||!ae){ee.toast.error("Consent form/method missing.");return}let Q="CHECKBOX_ONLY";ae==="TYPED_NAME"?Q="TYPED_NAME":ae==="DRAW_SIGNATURE"&&(Q="SIGNATURE_IMAGE"),gd(I,{serviceId:I,concentFormId:W,signatureType:Q,typedName:E?.typedName,isChecked:E?.accepted,signatureDataUrl:E?.signatureDataUrl,emailMe:E?.emailMe}),Un(I),te(!1),_.current="",ee.toast.success("Consent captured.")},Nd=()=>{te(!1),Pe(null)},Sd=async(E,I,B)=>{const W=$d(),ae=Object.entries(W).map(([Q,fe])=>({serviceId:Q,concentFormId:fe.concentFormId,captured:fe})).filter(Q=>Q.serviceId&&Q.concentFormId);for(const Q of ae){const{serviceId:fe,concentFormId:Ne,captured:Se}=Q,He=Se.signatureType||(Se.typedName?"TYPED_NAME":Se.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Vi={tenantId:t,outletId:r,appointmentId:E,customerId:I,serviceId:fe,formId:Ne,staffId:B,signatureType:He,typedName:Se.typedName,imageUrl:Se.signatureDataUrl};He==="CHECKBOX_ONLY"&&(Vi.isChecked=Se.isChecked??!0),await qf(Vi)}localStorage.removeItem(xr)};let Fi="";f&&(Fi=`${f?.year}-${String(f?.month).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const zn=async E=>{const I=E||h,B={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Qn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},W={tenantId:t,outletId:r,staffId:d?.id,date:Fi,startTime:v,serviceIds:g.map(ae=>ae.id),slotIds:u,isWalkIn:!1,requiresConsent:Oe.length>0,customer:{first_name:I?.firstName,last_name:I?.lastName,email:I?.email,phone:I?.phone},tracking:B};if(Oe.length&&!Mi){ee.toast.warn("Please complete all consent forms first");return}try{x(!0);const ae=await e(Ar(W)).unwrap(),Q=ae?.data??ae,fe=Q.id||"",Ne=Q.customerId||Q.customer?.id||"",Se=Q.staffId||d?.id||"";m==="booking"&&Di>0&&await Sd(fe,Ne,Se),G==="card"?(R({appointmentId:fe,customerId:Ne}),$(!0)):(e(mr(String(fe))),e(_e()))}catch(ae){const Q=ae?.payload?.message||ae?.data?.message||ae?.message||"Staff not working on this day";ee.toast.error(Q)}finally{x(!1)}},Bi=async E=>{const I={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Qn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},B={...E,phone:E?.phone??"",tracking:I};if(!G){ee.toast.error("Select payment method");return}if(!v&&m==="booking"){ee.toast.error("Select time");return}e(yo(B)),Oe.length>0?Mi?await zn(B):await Li():await zn(B)},xd=E=>{const I=E.replace(/\s/g,"");return/^4/.test(I)?"VISA":/^5[1-5]/.test(I)?"MASTERCARD":/^3[47]/.test(I)?"AMEX":/^6/.test(I)?"DISCOVER":"UNKNOWN"},Cd=async E=>{try{x(!0);const I=T?.appointmentId,B=String(T?.customerId);if(!I||!r)return ee.toast.error("Something went wrong."),!1;const W=xd(E.number),ae={marketing:{utmSource:"website",utmMedium:"plugin",utmCampaign:"service-plugin",utmTerm:"",utmContent:"cta_book_now"},request:{ipAddress:await Qn(),userAgent:navigator.userAgent,referrer:window.location.hostname,landingPage:window.location.href}},Q={appointmentId:I,customerId:B,outletId:r,referenceNo:I,currency:"USD",amountCents:Math.round(Ai*100),tipAmountCents:G==="card"?pd:0,taxAmountCents:G==="card"?fd:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:E.name,cardNumber:E.number.replace(/\s/g,""),cardType:W,cardExpiry:ug(E.expiry),cvData:E.cvv},billingContact:{name:{firstName:h?.firstName??"",lastName:h?.lastName??""},email:h?.email??""}},tracking:ae},fe=await Vf(Q),Ne=fe?.data?.data??fe?.data??fe??{},Se=Ne?.orderId;if(String(Ne?.mappedStatus).toLowerCase()==="succeeded"||String(Ne?.reasonMessage).toLowerCase()==="success"){if(ee.toast.success("Payment successful!"),Se)try{await zf(Se)}catch(He){ee.toast.warning(He instanceof Error?He.message:String(He??"Payment done, but finalize failed"))}}else ee.toast.warning("Payment pending");return $(!1),e(mr(String(T?.appointmentId))),e(_e()),!0}catch(I){return ee.toast.warning(I instanceof Error?I.message:"Payment failed, but appointment is booked"),$(!1),e(mr(String(T?.appointmentId))),e(_e()),!0}finally{x(!1)}},_d=()=>{$(!1),ee.toast.warning("Appointment booked. Payment was cancelled."),e(mr(String(T?.appointmentId))),e(_e())},wd=()=>!d?.id||!v&&m==="booking"||!Tt("firstName")||!Tt("email")&&!Tt("phone"),[Ed,Ui]=(0,S.useState)(!1),Pd=()=>{Ui(!1),e($t(!1))},Od=()=>{Ui(E=>{const I=!E;return e($t(I)),I})};return(0,o.jsxs)(Ot,{isSidebarOpen:Ed,handleSidebarOpen:Od,sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(uc,{buttonText:"Book Appointment",onButtonClick:Le(Bi),showTip:G==="card",tipPct:y,onTipChange:E=>e(Xf(E??0)),consentRequired:Oe?.length>0,consentCompleted:Di,totalConsents:Ri,checkingConsent:z,loading:C,isBookingDisabled:wd(),handleSidebarOpen:Pd})}),isConfirm:!0,children:[(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Confirm Booking"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Review your appointment details before booking"}),(0,o.jsxs)("div",{className:"aaravpos-booking-wrapper",children:[(0,o.jsxs)("div",{className:"aaravpos-outlet-info",children:[a&&(0,o.jsx)("div",{className:"aaravpos-outlet-logo",children:(0,o.jsx)("img",{src:a??"/logo.svg",alt:"Logo",className:"aaravpos-outlet-logo-img"})}),(0,o.jsxs)("div",{className:"aaravpos-outlet-content",children:[(0,o.jsx)("p",{className:"aaravpos-outlet-name",children:i??"-"}),(0,o.jsxs)("p",{className:"aaravpos-outlet-address",children:[s??"-",(0,o.jsx)("br",{})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-booking-scroll",children:[(0,o.jsxs)("div",{className:"aaravpos-booking-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-booking-column",children:[(0,o.jsx)(Rs,{children:"Appointment"}),(0,o.jsxs)(pg,{children:[(0,o.jsxs)("div",{className:"aaravpos-appointment-header",children:[(0,o.jsx)(hg,{pro:d}),(0,o.jsxs)("div",{className:"aaravpos-appointment-content",children:[(0,o.jsx)("p",{className:"aaravpos-appointment-name",children:d?.name}),(0,o.jsx)("p",{className:"aaravpos-appointment-services",children:d?.staff_type})]}),(0,o.jsxs)("span",{className:"aaravpos-appointment-price",children:[(0,o.jsx)(ie,{size:14}),Bn]})]}),(0,o.jsxs)("div",{className:"aaravpos-appointment-date",children:[(0,o.jsx)(vp,{size:18}),(0,o.jsx)("span",{className:"aaravpos-appointment-date-text",children:ud??"No time selected"})]})]})]}),(0,o.jsxs)("div",{className:"aaravpos-booking-column",children:[(0,o.jsx)(Rs,{children:"Payment Method"}),(0,o.jsx)(mg,{icon:(0,o.jsx)(Gp,{size:18}),label:"Pay in person",selected:G==="person",onClick:()=>Y("person")})]})]}),G&&(0,o.jsx)("div",{className:"booking-confirm-scroll-container",children:(0,o.jsxs)("form",{onSubmit:Le(Bi),children:[(0,o.jsx)("h4",{className:"booking-confirm-form-title",children:"Your information"}),(0,o.jsx)("div",{className:"booking-confirm-info-box",children:(0,o.jsxs)("div",{className:"booking-confirm-form-grid",children:[(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{className:"booking-confirm-field-label",htmlFor:"phone",children:["Phone ",id&&(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsx)(Ue.Controller,{control:ad,name:"phone",rules:{validate:E=>{const I=!ks(E),B=gr(Mn);return!I&&!B?"Enter phone or email":I&&!Sr(E)?"Enter valid phone number":!0}},render:({field:E})=>(0,o.jsxs)("div",{className:"booking-confirm-input-wrapper",children:[(0,o.jsx)(sg,{...E,id:"phone",international:!0,countries:dg,defaultCountry:"US",value:E.value||"",onChange:I=>ki(I??"",E.onChange,"phone"),countryCallingCodeEditable:!1,className:"booking-confirm-input"}),C&&D==="phone"&&(0,o.jsx)("div",{className:"booking-confirm-phone-loader",children:(0,o.jsx)("div",{className:"booking-confirm-phone-spinner"})})]})}),Ge.phone&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.phone.message}),A&&(0,o.jsxs)("div",{className:"booking-confirm-autofill-info",children:["Using existing customer",(0,o.jsx)("span",{onClick:vd,className:"booking-confirm-clear-action",children:"Clear"})]})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{className:"booking-confirm-field-label",htmlFor:"email",children:["Email ",od&&(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsxs)("div",{className:"booking-confirm-input-wrapper",children:[(0,o.jsx)("input",{id:"email",minLength:10,maxLength:50,...ge("email",{minLength:{value:10,message:"Minimum 2 characters required"},maxLength:{value:50,message:"Email must be maximum 50 characters"},validate:E=>{const I=!!E?.trim(),B=!ks(sr);return!I&&!B?"Enter phone or email":I&&!gr(E)?"Invalid email":!0},onChange:E=>{ki(E.target.value,null,"email")}}),autoComplete:"email",placeholder:"Email address",className:"booking-confirm-input"}),C&&D==="email"&&(0,o.jsx)("div",{className:"booking-confirm-phone-loader",children:(0,o.jsx)("div",{className:"booking-confirm-phone-spinner"})})]}),Ge.email&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.email.message})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsxs)("label",{htmlFor:"firstName",className:"booking-confirm-field-label",children:["First Name ",(0,o.jsx)("span",{className:"booking-confirm-field-required",children:"*"})]}),(0,o.jsx)("input",{id:"firstName",minLength:2,maxLength:30,...ge("firstName",{required:"First name required",pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"},minLength:{value:2,message:"Minimum 2 characters required"},maxLength:{value:30,message:"Maximum 30 characters allowed"}}),autoComplete:"given-name",placeholder:"First Name",className:"booking-confirm-input"}),Ge.firstName&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.firstName.message})]}),(0,o.jsxs)("div",{className:"booking-confirm-field",children:[(0,o.jsx)("label",{htmlFor:"lastName",className:"booking-confirm-field-label",children:"Last Name"}),(0,o.jsx)("input",{minLength:2,maxLength:20,id:"lastName",autoComplete:"family-name",...ge("lastName",{minLength:{value:2,message:"Last name must be at least 2 characters"},maxLength:{value:30,message:"Last name cannot exceed 30 characters"},pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"}}),placeholder:"Last Name",className:"booking-confirm-input"}),Ge.lastName&&(0,o.jsx)("p",{className:"booking-confirm-error",children:Ge.lastName.message})]})]})})]})})]})]})]})]}),N&&(0,o.jsx)(Eh,{onClose:_d,onPay:Cd,amount:Ai}),se&&pe&&(0,o.jsx)(Yh,{enforcement:ue,heading:ve,consent:be,onClose:Nd,onConfirm:bd},pe??"consent")]})}function pg({children:e}){return(0,o.jsx)("div",{className:"aaravpos-card-box",children:e})}function hg({pro:e}){return(0,o.jsx)(o.Fragment,{children:e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-profile-image"}):(0,o.jsx)("div",{className:"aaravpos-profile-avatar",style:{background:e.color??"#111"},children:ot(e.name)})})}function Rs({children:e}){return(0,o.jsx)("p",{className:"aaravpos-section-label",children:e})}function mg({icon:e,label:t,selected:r,onClick:n}){return(0,o.jsx)("div",{className:"aaravpos-paymentcard-wrapper",onClick:n,children:(0,o.jsx)("div",{className:"aaravpos-paymentcard-container",children:(0,o.jsx)("div",{className:`${r?"aaravpos-paymentcard-card active":"aaravpos-paymentcard-card"}`,children:(0,o.jsxs)("div",{className:"aaravpos-paymentcard-content",children:[(0,o.jsx)("div",{className:"aaravpos-paymentcard-icon",children:e}),(0,o.jsx)("div",{className:"aaravpos-paymentcard-info",children:(0,o.jsxs)("div",{className:"aaravpos-paymentcard-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"aaravpos-paymentcard-title",children:t}),(0,o.jsx)("p",{className:"aaravpos-paymentcard-description",children:"Payment will be collected at the outlet during your appointment."})]}),r&&(0,o.jsx)("div",{className:"aaravpos-paymentcard-check",children:(0,o.jsx)(fi,{size:18})})]})})]})})})})}function vg(){const e=(0,L.useDispatch)(),t=(0,L.useSelector)($=>$.booking.appointment.appointmentId),{tenantId:r}=(0,L.useSelector)($=>$.booking.outletDetails),[n,a]=(0,S.useState)(null),[i,s]=(0,S.useState)(!0),[l,c]=(0,S.useState)(null),[d,u]=(0,S.useState)(!1);console.log("appointment",n),(0,S.useEffect)(()=>{if(!t){c("No appointment ID provided"),s(!1);return}(async()=>{try{const T=await Bf(t,r);T.success?a(T?.data?.appointment):c("Failed to load appointment details")}catch(T){console.error(T),c("An error occurred while fetching appointment details")}finally{s(!1)}})()},[t]);const f=()=>{si.purge(),e({type:"RESET_ALL"})};if(i)return(0,o.jsx)("div",{className:"aaravpos-loading-container",children:(0,o.jsx)("p",{className:"aaravpos-loading-text",children:"Loading appointment details..."})});if(l||!n)return(0,o.jsxs)("div",{className:"aaravpos-error-container",children:[(0,o.jsx)("p",{className:"aaravpos-error-text",children:l||"Appointment not found"}),(0,o.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,o.jsx)(So,{}),"Book Another Appointment"]})]});const{staff:v,outlet:h,services:m}=n,y=m?.reduce(($,T)=>$+Number(T.price||T.min_price||0),0),g=(n.tipsCents||0)/100,p=(n.taxCents||0)/100,b=(n.totalCents||0)/100;console.log("taxAmt",p);const C=b>0?b.toFixed(2):(y+g+p).toFixed(2),x=d?m:m.slice(0,5),N=m.length-5;return(0,o.jsx)("div",{className:"aaravpos-success-wrapper",children:(0,o.jsxs)("div",{className:"aaravpos-success-motion",children:[(0,o.jsx)("div",{className:"aaravpos-success-icon success-pulse",children:(0,o.jsx)(fi,{})}),(0,o.jsx)("h1",{className:"aaravpos-success-title",children:"You're Booked!"}),(0,o.jsxs)("p",{className:"aaravpos-success-description",children:["Your appointment has been confirmed.",(0,o.jsx)("br",{}),"A confirmation has been sent to your email."]}),(0,o.jsxs)("div",{className:"aaravpos-success-content",children:[(0,o.jsxs)("div",{className:"aaravpos-success-card",children:[(0,o.jsxs)("div",{className:"aaravpos-success-row aaravpos-success-row-first",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Outlet Name"}),(0,o.jsx)("span",{className:"aaravpos-value",children:h?.outletName||"-"})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Professional"}),(0,o.jsx)("span",{className:"aaravpos-value",children:v?`${v?.firstName} ${v?.lastName}`:"-"})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row aaravpos-services-header",children:[(0,o.jsxs)("span",{className:"aaravpos-services-label",children:["Services (",m.length,")"]}),m.length>5&&(0,o.jsx)("button",{onClick:()=>u($=>!$),className:"aaravpos-show-btn",children:d?"Hide":(0,o.jsxs)("span",{className:"aaravpos-show-btn-inner",children:["Show",(0,o.jsx)(pi,{size:16})]})})]}),(0,o.jsxs)("div",{className:"aaravpos-services-list",children:[x?.map($=>(0,o.jsxs)("div",{className:"aaravpos-service-row",children:[(0,o.jsx)("span",{className:"aaravpos-service-name",children:$.serviceName}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),Number($.price).toFixed(2)]})]},$.id)),!d&&N>0&&(0,o.jsxs)("div",{className:"aaravpos-more-services",children:[(0,o.jsx)(Dp,{size:14}),N," more services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Date & Time"}),(0,o.jsxs)("span",{className:"aaravpos-value",children:[n.appointmentDate," at"," ",n.start_time_12h]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Tip"}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),g.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-success-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Tax"}),(0,o.jsxs)("span",{className:"aaravpos-price",children:[(0,o.jsx)(ie,{size:14}),p.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"aaravpos-total-row",children:[(0,o.jsx)("span",{className:"aaravpos-label",children:"Total Amount"}),(0,o.jsxs)("span",{className:"aaravpos-total-price",children:[(0,o.jsx)(ie,{size:14}),C]})]})]}),(0,o.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,o.jsx)(So,{}),"Book Another Appointment"]})]})]})})}function yg(){const{currentStep:e}=(0,L.useSelector)(n=>n.booking.breadcrumbs),{isService:t}=(0,L.useSelector)(n=>n.booking.outletDetails),r={services:t?hh:fh,professionals:t?dh:lh,time:Sh,confirm:fg,success:vg}[e];return(0,o.jsx)("div",{className:"aaravpos-layout",children:(0,o.jsx)("div",{className:"aaravpos-layout-content",children:(0,o.jsx)("div",{className:"aaravpos-layout-page",children:(0,o.jsx)(r,{})},e)})})}function gg(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(yg,{}),(0,o.jsx)(ee.ToastContainer,{position:"top-right",autoClose:3e3})]})}var $g=({bookingCode:e,isDarkMode:t=!1})=>{const r=(0,L.useDispatch)(),n=(0,L.useSelector)(y=>y.booking.outletList.outlets),a=(0,L.useSelector)(y=>y.booking.theme),[i,s]=(0,S.useState)(!1),[l,c]=(0,S.useState)(null),{id:d}=(0,L.useSelector)(y=>y.booking.outletDetails);(0,S.useEffect)(()=>{const y=localStorage.getItem("isDarkMode");if(y!==null)try{r(mo(JSON.parse(y)));return}catch(g){console.error("Error parsing isDarkMode from localStorage:",g)}r(mo(t))},[t,r]);const u=(0,S.useCallback)(async()=>{try{s(!0),c(null);const y=await uo(e);if(y?.success){const g=y?.data?.data?.outlets||[];r(Qf(g)),r(Kf(y?.data?.result)),g.length===1&&m(g[0])}else c(y?.message||"Failed to fetch data")}catch(y){console.error(y),c(y?.message||"Something went wrong")}finally{s(!1)}},[e,r]),f=async(y,g)=>{try{r(kf(!0));const p=await uo(e,y,g);p?.success||c(p?.message||"Failed to fetch outlet data"),r(Tf(p?.data?.token)),r(Ef(p?.data?.data?.outlets[0]?.isService)),r(If({superCategories:p?.data?.data?.superCategories,staff:p?.data?.data?.staff}))}catch(p){console.error(p),c(p?.message||"Something went wrong")}finally{s(!1)}},[v,h]=(0,S.useState)(null),m=async y=>{if(!(!y||v)){h(String(y.id));try{await f(String(y?.tenantId),String(y?.id));const g={...y,tenantId:y.tenantId??"",currency:y.currency??"",outletTimeZoneDate:he.DateTime.now().setZone(y?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:he.DateTime.fromISO(y?.createdAt,{zone:"utc"}).setZone(y?.timeZone).year};r(jf(g)),r(ba(y?.isService?"services":"professionals"))}catch(g){console.error("fetchOutletData error:",g)}finally{h(null)}}};return(0,S.useEffect)(()=>{Array.isArray(n)&&n.length===0&&u()},[n?.length,u]),(0,S.useEffect)(()=>{a&&op(a)},[a]),l?(0,o.jsx)("div",{className:"aaravpos-error-box",children:l}):!n.length&&i?(0,o.jsx)("div",{className:`aaravpos-loader-wrapper ${a?.isDarkMode?"dark":"light"}`,style:{height:700},children:(0,o.jsx)("div",{className:"aaravpos-loader"})}):(0,o.jsx)("div",{className:`aaravpos-overflow-hidden ${a?.isDarkMode?"dark":"light"}`,"data-theme":a?.isDarkMode?"dark":"light",children:n.length>1&&!d?(0,o.jsx)(th,{outlets:n,onSelectOutlet:y=>{y?.id&&m(y)},loadingOutletId:v}):(0,o.jsx)(gg,{})})},bg=({...e})=>(0,o.jsx)(ip,{children:(0,o.jsx)($g,{...e})});exports.AppointmentBookingPlugin=bg;