@aaravpos/appointment-booking-plugin 2.0.3 → 2.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.
- package/dist/index.cjs +33 -41
- package/dist/index.js +5444 -10677
- package/dist/styles.css +106 -89
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -1,49 +1,41 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s0=Object.create,vr=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,c0=Object.getOwnPropertyNames,u0=Object.getPrototypeOf,Hu=Object.prototype.hasOwnProperty,d0=(e,t)=>()=>(e&&(t=e(e=0)),t),Le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Ku=(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},Tn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=c0(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Hu.call(e,s)&&s!==r&&vr(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(n=l0(t,s))||n.enumerable});return e},f0=(e,t,r)=>(Tn(e,t,"default"),r&&Tn(r,t,"default")),Lr=(e,t,r)=>(r=e!=null?s0(u0(e)):{},Tn(t||!e||!e.__esModule?vr(r,"default",{value:e,enumerable:!0}):r,e)),h0=e=>Hu.call(e,"module.exports")?e["module.exports"]:Tn(vr({},"__esModule",{value:!0}),e);let On=require("react"),$=Lr(On,1);On=Lr(On);let H=require("react-redux"),Oe=require("redux"),ct=require("redux-persist"),c=require("react/jsx-runtime"),Ce=require("luxon"),ce=require("react-toastify"),nt=require("react-hook-form"),p0=require("lodash");function cn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cn=function(r){return typeof r}:cn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cn(e)}function m0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ks(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 v0(e,t,r){return t&&ks(e.prototype,t),r&&ks(e,r),e}function y0(e,t){return t&&(cn(t)==="object"||typeof t=="function")?t:un(e)}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g0(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&&$a(e,t)}function $a(e,t){return $a=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$a(e,t)}function dn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qu=(function(e){g0(t,e);function t(){var r,n;m0(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=y0(this,(r=ga(t)).call.apply(r,[this].concat(a))),dn(un(n),"state",{bootstrapped:!1}),dn(un(n),"_unsubscribe",void 0),dn(un(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 v0(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})(On.PureComponent);dn(qu,"defaultProps",{children:null,loading:null});var Yu=Symbol.for("immer-nothing"),Ls=Symbol.for("immer-draftable"),Ne=Symbol.for("immer-state"),$0=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 _e(e,...t){if(process.env.NODE_ENV!=="production"){const r=$0[e],n=xt(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 Me=Object,Yt=Me.getPrototypeOf,_n="constructor",ci="prototype",ba="configurable",An="enumerable",fn="writable",yr="value",je=e=>!!e&&!!e[Ne];function He(e){return e?Xu(e)||di(e)||!!e[Ls]||!!e[_n]?.[Ls]||fi(e)||hi(e):!1}var b0=Me[ci][_n].toString(),Fs=new WeakMap;function Xu(e){if(!e||!No(e))return!1;const t=Yt(e);if(t===null||t===Me[ci])return!0;const r=Me.hasOwnProperty.call(t,_n)&&t[_n];if(r===Object)return!0;if(!xt(r))return!1;let n=Fs.get(r);return n===void 0&&(n=Function.toString.call(r),Fs.set(r,n)),n===b0}function x0(e){return je(e)||_e(15,e),e[Ne].base_}function ui(e,t,r=!0){Fr(e)===0?(r?Reflect.ownKeys(e):Me.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function Fr(e){const t=e[Ne];return t?t.type_:di(e)?1:fi(e)?2:hi(e)?3:0}var Vs=(e,t,r=Fr(e))=>r===2?e.has(t):Me[ci].hasOwnProperty.call(e,t),xa=(e,t,r=Fr(e))=>r===2?e.get(t):e[t],jn=(e,t,r,n=Fr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function S0(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var di=Array.isArray,fi=e=>e instanceof Map,hi=e=>e instanceof Set,No=e=>typeof e=="object",xt=e=>typeof e=="function",Vi=e=>typeof e=="boolean";function C0(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var tt=e=>e.copy_||e.base_,wo=e=>e.modified_?e.copy_:e.base_;function Sa(e,t){if(fi(e))return new Map(e);if(hi(e))return new Set(e);if(di(e))return Array[ci].slice.call(e);const r=Xu(e);if(t===!0||t==="class_only"&&!r){const n=Me.getOwnPropertyDescriptors(e);delete n[Ne];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[fn]===!1&&(s[fn]=!0,s[ba]=!0),(s.get||s.set)&&(n[o]={[ba]:!0,[fn]:!0,[An]:s[An],[yr]:e[o]})}return Me.create(Yt(e),n)}else{const n=Yt(e);if(n!==null&&r)return{...e};const i=Me.create(n);return Me.assign(i,e)}}function pi(e,t=!1){return mi(e)||je(e)||!He(e)||(Fr(e)>1&&Me.defineProperties(e,{set:Zr,add:Zr,clear:Zr,delete:Zr}),Me.freeze(e),t&&ui(e,(r,n)=>{pi(n,!0)},!1)),e}function N0(){_e(2)}var Zr={[yr]:N0};function mi(e){return e===null||!No(e)?!0:Me.isFrozen(e)}var In="MapSet",Ca="Patches",Bs="ArrayMethods",Zu={};function _t(e){const t=Zu[e];return t||_e(0,e),t}var Us=e=>!!Zu[e],gr,Ju=()=>gr,w0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Us(In)?_t(In):void 0,arrayMethodsPlugin_:Us(Bs)?_t(Bs):void 0});function Ws(e,t){t&&(e.patchPlugin_=_t(Ca),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Na(e){wa(e),e.drafts_.forEach(P0),e.drafts_=null}function wa(e){e===gr&&(gr=e.parent_)}var zs=e=>gr=w0(gr,e);function P0(e){const t=e[Ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gs(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ne].modified_&&(Na(t),_e(4)),He(e)&&(e=Hs(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[Ne].base_,e,t)}else e=Hs(t,r);return E0(t,e,!0),Na(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Yu?e:void 0}function Hs(e,t){if(mi(t))return t;const r=t[Ne];if(!r)return Mn(t,e.handledSet_,e);if(!vi(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);td(r,e)}return r.copy_}function E0(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pi(t,r)}function Qu(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var vi=(e,t)=>e.scope_===t,T0=[];function ed(e,t,r,n){const i=tt(e),a=e.type_;if(n!==void 0&&xa(i,n,a)===t){jn(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;ui(i,(l,u)=>{if(je(u)){const d=s.get(u)||[];d.push(l),s.set(u,d)}})}const o=e.draftLocations_.get(t)??T0;for(const s of o)jn(i,s,r,a)}function O0(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!vi(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=wo(a);ed(e,a.draft_??a,o,r),td(a,i)})}function td(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)}Qu(e)}}function _0(e,t,r){const{scope_:n}=e;if(je(r)){const i=r[Ne];vi(i,n)&&i.callbacks_.push(function(){hn(e),ed(e,r,wo(i),t)})}else He(r)&&e.callbacks_.push(function(){const a=tt(e);e.type_===3?a.has(r)&&Mn(r,n.handledSet_,n):xa(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Mn(xa(e.copy_,t,e.type_),n.handledSet_,n)})}function Mn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||je(e)||t.has(e)||!He(e)||mi(e)||(t.add(e),ui(e,(n,i)=>{if(je(i)){const a=i[Ne];vi(a,r)&&(jn(e,n,wo(a),e.type_),Qu(a))}else He(i)&&Mn(i,t,r)})),e}function A0(e,t){const r=di(e),n={type_:r?1:0,scope_:t?t.scope_:Ju(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=Dn;r&&(i=[n],a=$r);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var Dn={get(e,t){if(t===Ne)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 i=tt(e);if(!Vs(i,t,e.type_))return j0(e,i,t);const a=i[t];if(e.finalized_||!He(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&C0(t))return a;if(a===Bi(e.base_,t)){hn(e);const o=e.type_===1?+t:t,s=Ea(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in tt(e)},ownKeys(e){return Reflect.ownKeys(tt(e))},set(e,t,r){const n=rd(tt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Bi(tt(e),t),a=i?.[Ne];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(S0(r,i)&&(r!==void 0||Vs(e.base_,t,e.type_)))return!0;hn(e),Pa(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),_0(e,t,r)),!0},deleteProperty(e,t){return hn(e),Bi(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Pa(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=tt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[fn]:!0,[ba]:e.type_!==1||t!=="length",[An]:n[An],[yr]:r[t]}},defineProperty(){_e(11)},getPrototypeOf(e){return Yt(e.base_)},setPrototypeOf(){_e(12)}},$r={};for(let e in Dn){let t=Dn[e];$r[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}$r.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&_e(13),$r.set.call(this,e,t,void 0)};$r.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&_e(14),Dn.set.call(this,e[0],t,r,e[0])};function Bi(e,t){const r=e[Ne];return(r?tt(r):e)[t]}function j0(e,t,r){const n=rd(t,r);return n?yr in n?n[yr]:n.get?.call(e.draft_):void 0}function rd(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 Pa(e){e.modified_||(e.modified_=!0,e.parent_&&Pa(e.parent_))}function hn(e){e.copy_||(e.assigned_=new Map,e.copy_=Sa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var I0=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(xt(t)&&!xt(r)){const a=r;r=t;const o=this;return function(l=a,...u){return o.produce(l,d=>r.call(this,d,...u))}}xt(r)||_e(6),n!==void 0&&!xt(n)&&_e(7);let i;if(He(t)){const a=zs(this),o=Ea(a,t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Na(a):wa(a)}return Ws(a,n),Gs(i,a)}else if(!t||!No(t)){if(i=r(t),i===void 0&&(i=t),i===Yu&&(i=void 0),this.autoFreeze_&&pi(i,!0),n){const a=[],o=[];_t(Ca).generateReplacementPatches_(t,i,{patches_:a,inversePatches_:o}),n(a,o)}return i}else _e(1,t)},this.produceWithPatches=(t,r)=>{if(xt(t))return(a,...o)=>this.produceWithPatches(a,s=>t(s,...o));let n,i;return[this.produce(t,r,(a,o)=>{n=a,i=o}),n,i]},Vi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Vi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Vi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){He(e)||_e(8),je(e)&&(e=yi(e));const t=zs(this),r=Ea(t,e,void 0);return r[Ne].isManual_=!0,wa(t),r}finishDraft(e,t){const r=e&&e[Ne];(!r||!r.isManual_)&&_e(9);const{scope_:n}=r;return Ws(n,t),Gs(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=_t(Ca).applyPatches_;return je(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Ea(e,t,r,n){const[i,a]=fi(t)?_t(In).proxyMap_(t,r):hi(t)?_t(In).proxySet_(t,r):A0(t,r);return(r?.scope_??Ju()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?O0(r,a,n):a.callbacks_.push(function(s){s.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:l}=s;a.modified_&&l&&l.generatePatches_(a,[],s)}),i}function yi(e){return je(e)||_e(10,e),nd(e)}function nd(e){if(!He(e)||mi(e))return e;const t=e[Ne];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Sa(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Sa(e,!0);return ui(r,(i,a)=>{jn(r,i,nd(a))},n),t&&(t.finalized_=!1),r}var M0=new I0,gi=M0.produce,D0=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const i={};e(i)===i&&(n=!0)}catch{}if(n){let i;try{throw new Error}catch(a){({stack:i}=a)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var el=Object.create,ir=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,rl=Object.getOwnPropertyNames,nl=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty,xe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),il=(e,t)=>{let r={};for(var n in e)ir(r,n,{get:e[n],enumerable:!0});return t||ir(r,Symbol.toStringTag,{value:"Module"}),r},bn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=rl(t),i=0,s=a.length,d;i<s;i++)d=a[i],!al.call(e,d)&&d!==r&&ir(e,d,{get:(l=>t[l]).bind(null,d),enumerable:!(n=tl(t,d))||n.enumerable});return e},ol=(e,t,r)=>(bn(e,t,"default"),r&&bn(r,t,"default")),Dt=(e,t,r)=>(r=e!=null?el(nl(e)):{},bn(t||!e||!e.__esModule?ir(r,"default",{value:e,enumerable:!0}):r,e));let or=require("react"),S=Dt(or,1);or=Dt(or);let F=require("react-redux"),$e=require("redux"),Le=require("redux-persist"),o=require("react/jsx-runtime"),me=require("luxon"),ne=require("react-toastify"),Me=require("react-hook-form"),sl=require("lodash");function Yt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yt=function(r){return typeof r}:Yt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yt(e)}function dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function La(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 ll(e,t,r){return t&&La(e.prototype,t),r&&La(e,r),e}function cl(e,t){return t&&(Yt(t)==="object"||typeof t=="function")?t:Zt(e)}function Nn(e){return Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Nn(e)}function Zt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ul(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&&Sn(e,t)}function Sn(e,t){return Sn=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Sn(e,t)}function Xt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jo=(function(e){ul(t,e);function t(){var r,n;dl(this,t);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=cl(this,(r=Nn(t)).call.apply(r,[this].concat(i))),Xt(Zt(n),"state",{bootstrapped:!1}),Xt(Zt(n),"_unsubscribe",void 0),Xt(Zt(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 ll(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})(or.PureComponent);Xt(jo,"defaultProps",{children:null,loading:null});var Io=Symbol.for("immer-nothing"),Ba=Symbol.for("immer-draftable"),he=Symbol.for("immer-state"),fl=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 ge(e,...t){if(process.env.NODE_ENV!=="production"){const r=fl[e],n=ze(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 Se=Object,st=Se.getPrototypeOf,sr="constructor",Ir="prototype",Cn="configurable",dr="enumerable",Jt="writable",yt="value",be=e=>!!e&&!!e[he];function Ee(e){return e?To(e)||Ar(e)||!!e[Ba]||!!e[sr]?.[Ba]||Dr(e)||Mr(e):!1}var pl=Se[Ir][sr].toString(),Ua=new WeakMap;function To(e){if(!e||!ta(e))return!1;const t=st(e);if(t===null||t===Se[Ir])return!0;const r=Se.hasOwnProperty.call(t,sr)&&t[sr];if(r===Object)return!0;if(!ze(r))return!1;let n=Ua.get(r);return n===void 0&&(n=Function.toString.call(r),Ua.set(r,n)),n===pl}function ml(e){return be(e)||ge(15,e),e[he].base_}function Tr(e,t,r=!0){Mt(e)===0?(r?Reflect.ownKeys(e):Se.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,a)=>t(a,n,e))}function Mt(e){const t=e[he];return t?t.type_:Ar(e)?1:Dr(e)?2:Mr(e)?3:0}var Va=(e,t,r=Mt(e))=>r===2?e.has(t):Se[Ir].hasOwnProperty.call(e,t),xn=(e,t,r=Mt(e))=>r===2?e.get(t):e[t],lr=(e,t,r,n=Mt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function hl(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ar=Array.isArray,Dr=e=>e instanceof Map,Mr=e=>e instanceof Set,ta=e=>typeof e=="object",ze=e=>typeof e=="function",nn=e=>typeof e=="boolean";function vl(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Ae=e=>e.copy_||e.base_,ra=e=>e.modified_?e.copy_:e.base_;function Pn(e,t){if(Dr(e))return new Map(e);if(Mr(e))return new Set(e);if(Ar(e))return Array[Ir].slice.call(e);const r=To(e);if(t===!0||t==="class_only"&&!r){const n=Se.getOwnPropertyDescriptors(e);delete n[he];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){const s=a[i],d=n[s];d[Jt]===!1&&(d[Jt]=!0,d[Cn]=!0),(d.get||d.set)&&(n[s]={[Cn]:!0,[Jt]:!0,[dr]:d[dr],[yt]:e[s]})}return Se.create(st(e),n)}else{const n=st(e);if(n!==null&&r)return{...e};const a=Se.create(n);return Se.assign(a,e)}}function kr(e,t=!1){return Rr(e)||be(e)||!Ee(e)||(Mt(e)>1&&Se.defineProperties(e,{set:zt,add:zt,clear:zt,delete:zt}),Se.freeze(e),t&&Tr(e,(r,n)=>{kr(n,!0)},!1)),e}function yl(){ge(2)}var zt={[yt]:yl};function Rr(e){return e===null||!ta(e)?!0:Se.isFrozen(e)}var cr="MapSet",wn="Patches",za="ArrayMethods",Ao={};function He(e){const t=Ao[e];return t||ge(0,e),t}var Ga=e=>!!Ao[e],$t,Do=()=>$t,$l=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ga(cr)?He(cr):void 0,arrayMethodsPlugin_:Ga(za)?He(za):void 0});function Wa(e,t){t&&(e.patchPlugin_=He(wn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _n(e){On(e),e.drafts_.forEach(gl),e.drafts_=null}function On(e){e===$t&&($t=e.parent_)}var qa=e=>$t=$l($t,e);function gl(e){const t=e[he];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ha(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[he].modified_&&(_n(t),ge(4)),Ee(e)&&(e=Ka(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[he].base_,e,t)}else e=Ka(t,r);return bl(t,e,!0),_n(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Io?e:void 0}function Ka(e,t){if(Rr(t))return t;const r=t[he];if(!r)return ur(t,e.handledSet_,e);if(!Fr(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);Ro(r,e)}return r.copy_}function bl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kr(t,r)}function Mo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fr=(e,t)=>e.scope_===t,Nl=[];function ko(e,t,r,n){const a=Ae(e),i=e.type_;if(n!==void 0&&xn(a,n,i)===t){lr(a,n,r,i);return}if(!e.draftLocations_){const d=e.draftLocations_=new Map;Tr(a,(l,c)=>{if(be(c)){const u=d.get(c)||[];u.push(l),d.set(c,u)}})}const s=e.draftLocations_.get(t)??Nl;for(const d of s)lr(a,d,r,i)}function Sl(e,t,r){e.callbacks_.push(function(a){const i=t;if(!i||!Fr(i,a))return;a.mapSetPlugin_?.fixSetContents(i);const s=ra(i);ko(e,i.draft_??i,s,r),Ro(i,a)})}function Ro(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)}Mo(e)}}function Cl(e,t,r){const{scope_:n}=e;if(be(r)){const a=r[he];Fr(a,n)&&a.callbacks_.push(function(){Qt(e),ko(e,r,ra(a),t)})}else Ee(r)&&e.callbacks_.push(function(){const i=Ae(e);e.type_===3?i.has(r)&&ur(r,n.handledSet_,n):xn(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ur(xn(e.copy_,t,e.type_),n.handledSet_,n)})}function ur(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||be(e)||t.has(e)||!Ee(e)||Rr(e)||(t.add(e),Tr(e,(n,a)=>{if(be(a)){const i=a[he];Fr(i,r)&&(lr(e,n,ra(i),e.type_),Mo(i))}else Ee(a)&&ur(a,t,r)})),e}function xl(e,t){const r=Ar(e),n={type_:r?1:0,scope_:t?t.scope_:Do(),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=fr;r&&(a=[n],i=gt);const{revoke:s,proxy:d}=Proxy.revocable(a,i);return n.draft_=d,n.revoke_=s,[d,n]}var fr={get(e,t){if(t===he)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=Ae(e);if(!Va(a,t,e.type_))return Pl(e,a,t);const i=a[t];if(e.finalized_||!Ee(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&vl(t))return i;if(i===an(e.base_,t)){Qt(e);const s=e.type_===1?+t:t,d=jn(e.scope_,i,e,s);return e.copy_[s]=d}return i},has(e,t){return t in Ae(e)},ownKeys(e){return Reflect.ownKeys(Ae(e))},set(e,t,r){const n=Fo(Ae(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=an(Ae(e),t),i=a?.[he];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(hl(r,a)&&(r!==void 0||Va(e.base_,t,e.type_)))return!0;Qt(e),En(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),Cl(e,t,r)),!0},deleteProperty(e,t){return Qt(e),an(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),En(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ae(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Jt]:!0,[Cn]:e.type_!==1||t!=="length",[dr]:n[dr],[yt]:r[t]}},defineProperty(){ge(11)},getPrototypeOf(e){return st(e.base_)},setPrototypeOf(){ge(12)}},gt={};for(let e in fr){let t=fr[e];gt[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}gt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ge(13),gt.set.call(this,e,t,void 0)};gt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ge(14),fr.set.call(this,e[0],t,r,e[0])};function an(e,t){const r=e[he];return(r?Ae(r):e)[t]}function Pl(e,t,r){const n=Fo(t,r);return n?yt in n?n[yt]:n.get?.call(e.draft_):void 0}function Fo(e,t){if(!(t in e))return;let r=st(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=st(r)}}function En(e){e.modified_||(e.modified_=!0,e.parent_&&En(e.parent_))}function Qt(e){e.copy_||(e.assigned_=new Map,e.copy_=Pn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(ze(t)&&!ze(r)){const i=r;r=t;const s=this;return function(l=i,...c){return s.produce(l,u=>r.call(this,u,...c))}}ze(r)||ge(6),n!==void 0&&!ze(n)&&ge(7);let a;if(Ee(t)){const i=qa(this),s=jn(i,t,void 0);let d=!0;try{a=r(s),d=!1}finally{d?_n(i):On(i)}return Wa(i,n),Ha(a,i)}else if(!t||!ta(t)){if(a=r(t),a===void 0&&(a=t),a===Io&&(a=void 0),this.autoFreeze_&&kr(a,!0),n){const i=[],s=[];He(wn).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else ge(1,t)},this.produceWithPatches=(t,r)=>{if(ze(t))return(i,...s)=>this.produceWithPatches(i,d=>t(d,...s));let n,a;return[this.produce(t,r,(i,s)=>{n=i,a=s}),n,a]},nn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),nn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),nn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ee(e)||ge(8),be(e)&&(e=Lr(e));const t=qa(this),r=jn(t,e,void 0);return r[he].isManual_=!0,On(t),r}finishDraft(e,t){const r=e&&e[he];(!r||!r.isManual_)&&ge(9);const{scope_:n}=r;return Wa(n,t),Ha(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=He(wn).applyPatches_;return be(e)?n(e,t):this.produce(e,a=>n(a,t))}};function jn(e,t,r,n){const[a,i]=Dr(t)?He(cr).proxyMap_(t,r):Mr(t)?He(cr).proxySet_(t,r):xl(t,r);return(r?.scope_??Do()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Sl(r,i,n):i.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:l}=d;i.modified_&&l&&l.generatePatches_(i,[],d)}),a}function Lr(e){return be(e)||ge(10,e),Lo(e)}function Lo(e){if(!Ee(e)||Rr(e))return e;const t=e[he];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Pn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Pn(e,!0);return Tr(r,(a,i)=>{lr(r,a,Lo(i))},n),t&&(t.finalized_=!1),r}var _l=new wl,Br=_l.produce,Ol=(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
2
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
3
3
|
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:
|
|
4
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},El=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,d=n(()=>({}),...a);if(d.apply(null,i)!==d.apply(null,s)){let l;try{throw new Error}catch(c){({stack:l}=c)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
5
5
|
This means your output selector will likely run more frequently than intended.
|
|
6
6
|
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:
|
|
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
|
|
7
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:i,secondInputs:s,stack:l})}},jl={inputStabilityCheck:"once",identityFunctionCheck:"once"},pr=Symbol("NOT_FOUND");function Il(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Tl(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 Ya=e=>Array.isArray(e)?e:[e];function Al(e){const t=Array.isArray(e[0])?e[0]:e;return Tl(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Za(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var Dl=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...jl,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:Ol},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:El}}};function Ml(e){let t;return{get(r){return t&&e(t.key,r)?t.value:pr},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function kl(e,t){let r=[];function n(d){const l=r.findIndex(c=>t(d,c.key));if(l>-1){const c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return pr}function a(d,l){n(d)===pr&&(r.unshift({key:d,value:l}),r.length>e&&r.pop())}function i(){return r}function s(){r=[]}return{get:n,put:a,getEntries:i,clear:s}}var Rl=(e,t)=>e===t;function Fl(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 Ll(e,t){const{equalityCheck:r=Rl,maxSize:n=1,resultEqualityCheck:a}=typeof t=="object"?t:{equalityCheck:t},i=Fl(r);let s=0;const d=n<=1?Ml(i):kl(n,i);function l(){let c=d.get(arguments);if(c===pr){if(c=e.apply(null,arguments),s++,a){const u=d.getEntries().find(f=>a(f.value,c));u&&(c=u.value,s!==0&&s--)}d.put(arguments,c)}return c}return l.clearCache=()=>{d.clear(),l.resetResultsCount()},l.resultsCount=()=>s,l.resetResultsCount=()=>{s=0},l}var Bl=class{constructor(e){this.value=e}deref(){return this.value}},Ul=()=>typeof WeakRef>"u"?Bl:WeakRef,Bo=Ul(),Vl=0,Xa=1;function Gt(){return{s:Vl,v:void 0,o:null,p:null}}function zl(e){return e instanceof Bo?e.deref():e}function Ur(e,t={}){let r=Gt();const{resultEqualityCheck:n}=t;let a,i=0;function s(){let d=r;const{length:l}=arguments;for(let f=0,p=l;f<p;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=d.o;v===null&&(d.o=v=new WeakMap);const y=v.get(m);y===void 0?(d=Gt(),v.set(m,d)):d=y}else{let v=d.p;v===null&&(d.p=v=new Map);const y=v.get(m);y===void 0?(d=Gt(),v.set(m,d)):d=y}}const c=d;let u;if(d.s===Xa)u=d.v;else if(u=e.apply(null,arguments),i++,n){const f=zl(a);f!=null&&n(f,u)&&(u=f,i!==0&&i--),a=typeof u=="object"&&u!==null||typeof u=="function"?new Bo(u):u}return c.s=Xa,c.v=u,u}return s.clearCache=()=>{r=Gt(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function na(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let i=0,s=0,d,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),Il(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:m=Ur,argsMemoizeOptions:v=[]}=u,y=Ya(p),$=Ya(v),g=Al(a),h=f(function(){return i++,c.apply(null,arguments)},...y);let x=!0;const P=m(function(){s++;const N=Za(g,arguments);if(d=h.apply(null,N),process.env.NODE_ENV!=="production"){const{devModeChecks:E={}}=u,{identityFunctionCheck:A,inputStabilityCheck:z}=Dl(x,E);if(A.shouldRun&&A.run(c,N,d),z.shouldRun){const Z=Za(g,arguments);z.run({inputSelectorResults:N,inputSelectorResultsCopy:Z},{memoize:f,memoizeOptions:y},arguments)}x&&(x=!1)}return d},...$);return Object.assign(P,{resultFunc:c,memoizedResultFunc:h,dependencies:g,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>d,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var Gl=na(Ur);function Uo(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var Wl=Uo(),ql=Uo,Vo=il({ReducerType:()=>ms,SHOULD_AUTOBATCH:()=>oa,TaskAbortError:()=>Ft,Tuple:()=>aa,addListener:()=>la,asyncThunkCreator:()=>ac,autoBatchEnhancer:()=>rs,buildCreateSlice:()=>hs,clearAllListeners:()=>ws,combineSlices:()=>Vc,configureStore:()=>ns,createAction:()=>_e,createActionCreatorInvariantMiddleware:()=>Ko,createAsyncThunk:()=>zr,createDraftSafeSelector:()=>Go,createDraftSafeSelectorCreator:()=>zo,createDynamicMiddleware:()=>Ac,createEntityAdapter:()=>bc,createImmutableStateInvariantMiddleware:()=>Qo,createListenerMiddleware:()=>jc,createNextState:()=>Br,createReducer:()=>is,createSelector:()=>Gl,createSelectorCreator:()=>na,createSerializableStateInvariantMiddleware:()=>ts,createSlice:()=>Ye,current:()=>Lr,findNonSerializableValue:()=>mr,formatProdErrorMessage:()=>Y,freeze:()=>kr,isActionCreator:()=>qo,isAllOf:()=>hr,isAnyOf:()=>ft,isAsyncThunkAction:()=>cs,isDraft:()=>be,isFluxStandardAction:()=>Ho,isFulfilled:()=>ls,isImmutableDefault:()=>Zo,isPending:()=>ss,isPlain:()=>ia,isRejected:()=>vr,isRejectedWithValue:()=>ds,lruMemoize:()=>Ll,miniSerializeError:()=>us,nanoid:()=>Rt,original:()=>ml,prepareAutoBatched:()=>Jl,removeListener:()=>ca,unwrapResult:()=>fs,weakMapMemoize:()=>Ur});ol(Vo,require("redux"));var zo=(...e)=>{const t=na(...e),r=Object.assign((...n)=>{const a=t(...n),i=(s,...d)=>a(be(s)?Lr(s):s,...d);return Object.assign(i,a),i},{withTypes:()=>r});return r},Go=zo(Ur),Hl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$e.compose:$e.compose.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Wo=e=>e&&typeof e.match=="function";function _e(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(process.env.NODE_ENV==="production"?Y(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,$e.isAction)(n)&&n.type===e,r}function qo(e){return typeof e=="function"&&"type"in e&&Wo(e)}function Ho(e){return(0,$e.isAction)(e)&&Object.keys(e).every(Kl)}function Kl(e){return["type","payload","error","meta"].indexOf(e)>-1}function Yl(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 Ko(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=qo}=e;return()=>r=>n=>(t(n)&&console.warn(Yl(n.type)),r(n))}function Yo(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
9
|
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
|
|
11
|
-
Take a look at the logic that dispatched this action: `,
|
|
10
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var aa=class ht extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ht.prototype)}static get[Symbol.species](){return ht}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ht(...t[0].concat(this)):new ht(...t.concat(this))}};function Ja(e){return Ee(e)?Br(e,()=>{}):e}function Ge(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Zo(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Zl(e,t,r){const n=Xo(e,t,r);return{detectMutations(){return Jo(e,t,n,r)}}}function Xo(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 d in r){const l=n?n+"."+d:d;s&&t.some(c=>c instanceof RegExp?c.test(l):l===c)||(i.children[d]=Xo(e,t,r[d],l))}}return i}function Jo(e,t=[],r,n,a=!1,i=""){const s=r?r.value:void 0,d=s===n;if(a&&!d&&!Number.isNaN(n))return{wasMutated:!0,path:i};if(e(s)||e(n))return{wasMutated:!1};const l={};for(let u in r.children)l[u]=!0;for(let u in n)l[u]=!0;const c=t.length>0;for(let u in l){const f=i?i+"."+u:u;if(c&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const p=Jo(e,t,r.children[u],n[u],d,f);if(p.wasMutated)return p}return{wasMutated:!1}}function Qo(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(d,l,c,u){return JSON.stringify(d,r(l,u),c)},r=function(d,l){let c=[],u=[];return l||(l=function(f,p){return c[0]===p?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(p)).join(".")+"]"}),function(f,p){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(p)&&(p=l.call(this,f,p))}else c.push(p);return d==null?p:d.call(this,f,p)}},{isImmutable:n=Zo,ignoredPaths:a,warnAfter:i=32}=e;const s=Zl.bind(null,n,a);return({getState:d})=>{let l=d(),c=s(l),u;return f=>p=>{const m=Yo(i,"ImmutableStateInvariantMiddleware");m.measureTime(()=>{if(l=d(),u=c.detectMutations(),c=s(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Y(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 v=f(p);return m.measureTime(()=>{if(l=d(),u=c.detectMutations(),c=s(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Y(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(p)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),m.warnIfExceeded(),v}}}}function ia(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||(0,$e.isPlainObject)(e)}function mr(e,t="",r=ia,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 d=n!=null?n(e):Object.entries(e),l=a.length>0;for(const[c,u]of d){const f=t?t+"."+c:c;if(!(l&&a.some(p=>p instanceof RegExp?p.test(f):f===p))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=mr(u,f,r,n,a,i),s))return s}}return i&&es(e)&&i.add(e),!1}function es(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!es(t))return!1;return!0}function ts(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=ia,getEntries:r,ignoredActions:n=[],ignoredActionPaths:a=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],warnAfter:s=32,ignoreState:d=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return f=>p=>m=>{if(!(0,$e.isAction)(m))return p(m);const v=p(m),y=Yo(s,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(m.type)!==-1)&&y.measureTime(()=>{const $=mr(m,"",t,r,a,u);if($){const{keyPath:g,value:h}=$;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,h,`
|
|
11
|
+
Take a look at the logic that dispatched this action: `,m,`
|
|
12
12
|
(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)`)}}),
|
|
14
|
-
Take a look at the reducer(s) handling this action 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()),m}}}function Qr(e){return typeof e=="boolean"}var im=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Eo;if(r&&(Qr(r)?o.push(J0):o.push(Q0(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};Qr(n)||(s=n),o.unshift(yd(s))}if(i){let s={};Qr(i)||(s=i),o.push($d(s))}if(a){let s={};Qr(a)||(s=a),o.unshift(fd(s))}}return o},Oo="RTK_autoBatch",am=()=>e=>({payload:e,meta:{[Oo]:!0}}),Zs=e=>t=>{setTimeout(t,e)},bd=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Zs(10):e.type==="callback"?e.queueNotification:Zs(e.timeout),u=()=>{o=!1,a&&(a=!1,s.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const f=()=>i&&d(),h=n.subscribe(f);return s.add(d),()=>{h(),s.delete(d)}},dispatch(d){try{return i=!d?.meta?.[Oo],a=!i,a&&(o||(o=!0,l(u))),n.dispatch(d)}finally{i=!0}}})},om=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Eo(e);return n&&i.push(bd(typeof n=="object"?n:void 0)),i};function xd(e){const t=im(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let l;if(typeof r=="function")l=r;else if((0,Oe.isPlainObject)(r))l=(0,Oe.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?re(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"?re(2):"`middleware` field must be a callback");let u;if(typeof n=="function"){if(u=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(u))throw new Error(process.env.NODE_ENV==="production"?re(3):"when using a middleware builder function, an array of middleware must be returned")}else u=t();if(process.env.NODE_ENV!=="production"&&u.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?re(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let y=new Set;u.forEach(v=>{if(y.has(v))throw new Error(process.env.NODE_ENV==="production"?re(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");y.add(v)})}let d=Oe.compose;i&&(d=em({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=(0,Oe.applyMiddleware)(...u),h=om(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?re(5):"`enhancers` field must be a callback");let p=typeof s=="function"?s(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?re(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?re(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&u.length&&!p.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=d(...p);return(0,Oe.createStore)(l,o,m)}function Sd(e){const t={},r=[];let n;const i={addCase(a,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?re(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?re(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof a=="string"?a:a.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?re(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?re(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=o,i},addAsyncThunk(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?re(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?re(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?re(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function sm(e){return typeof e=="function"}function Cd(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?re(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,i]=Sd(t),a;if(sm(e))a=()=>Xs(e());else{const s=Xs(e);a=()=>s}function o(s=a(),l){let u=[r[l.type],...n.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[i]),u.reduce((d,f)=>{if(f)if(je(d)){const h=f(d,l);return h===void 0?d:h}else{if(He(d))return gi(d,h=>f(h,l));{const h=f(d,l);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return o.getInitialState=a,o}var Nd=(e,t)=>cd(e)?e.match(t):e(t);function rr(...e){return t=>e.some(r=>Nd(r,t))}function Ln(...e){return t=>e.every(r=>Nd(r,t))}function bi(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 Vr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function wd(...e){return e.length===0?t=>bi(t,["pending"]):Vr(e)?rr(...e.map(t=>t.pending)):wd()(e[0])}function Fn(...e){return e.length===0?t=>bi(t,["rejected"]):Vr(e)?rr(...e.map(t=>t.rejected)):Fn()(e[0])}function Pd(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ln(Fn(...e),t):Vr(e)?Ln(Fn(...e),t):Pd()(e[0])}function Ed(...e){return e.length===0?t=>bi(t,["fulfilled"]):Vr(e)?rr(...e.map(t=>t.fulfilled)):Ed()(e[0])}function Td(...e){return e.length===0?t=>bi(t,["pending","fulfilled","rejected"]):Vr(e)?rr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Td()(e[0])}var lm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Br=(e=21)=>{let t="",r=e;for(;r--;)t+=lm[Math.random()*64|0];return t},cm=["name","message","stack","code"],Ui=class{constructor(e,t){this.payload=e,this.meta=t}_type},Js=class{constructor(e,t){this.payload=e,this.meta=t}_type},Od=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of cm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Qs="External signal was aborted",xi=(()=>{function e(t,r,n){const i=We(t+"/fulfilled",(l,u,d,f)=>({payload:l,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),a=We(t+"/pending",(l,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:l,requestStatus:"pending"}})),o=We(t+"/rejected",(l,u,d,f,h)=>({payload:f,error:(n&&n.serializeError||Od)(l||"Rejected"),meta:{...h||{},arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function s(l,{signal:u}={}){return(d,f,h)=>{const p=n?.idGenerator?n.idGenerator(l):Br(),m=new AbortController;let y,v;function g(x){v=x,m.abort()}u&&(u.aborted?g(Qs):u.addEventListener("abort",()=>g(Qs),{once:!0}));const b=(async function(){let x;try{let S=n?.condition?.(l,{getState:f,extra:h});if(um(S)&&(S=await S),S===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,_)=>{y=()=>{_({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",y,{once:!0})});d(a(p,l,n?.getPendingMeta?.({requestId:p,arg:l},{getState:f,extra:h}))),x=await Promise.race([E,Promise.resolve(r(l,{dispatch:d,getState:f,extra:h,requestId:p,signal:m.signal,abort:g,rejectWithValue:(C,_)=>new Ui(C,_),fulfillWithValue:(C,_)=>new Js(C,_)})).then(C=>{if(C instanceof Ui)throw C;return C instanceof Js?i(C.payload,p,l,C.meta):i(C,p,l)})])}catch(S){x=S instanceof Ui?o(null,p,l,S.payload,S.meta):o(S,p,l)}finally{y&&m.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&o.match(x)&&x.meta.condition||d(x),x})();return Object.assign(b,{abort:g,requestId:p,arg:l,unwrap(){return b.then(_d)}})}}return Object.assign(s,{pending:a,rejected:o,fulfilled:i,settled:rr(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function _d(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function um(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ad=Symbol.for("rtk-slice-createasyncthunk"),dm={[Ad]:xi},jd=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(jd||{});function fm(e,t){return`${e}/${t}`}function Id({creators:e}={}){const t=e?.asyncThunk?.[Ad];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?re(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 o=(typeof n.reducers=="function"?n.reducers(pm()):n.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(x,S){const E=typeof x=="string"?x:x.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?re(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?re(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=S,u},addMatcher(x,S){return l.sliceMatchers.push({matcher:x,reducer:S}),u},exposeAction(x,S){return l.actionCreators[x]=S,u},exposeCaseReducer(x,S){return l.sliceCaseReducersByName[x]=S,u}};s.forEach(x=>{const S=o[x],E={reducerName:x,type:fm(i,x),createNotation:typeof n.reducers=="function"};vm(S)?gm(E,S,u,t):mm(E,S,u)});function d(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?re(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[x={},S=[],E=void 0]=typeof n.extraReducers=="function"?Sd(n.extraReducers):[n.extraReducers],C={...x,...l.sliceCaseReducersByType};return Cd(n.initialState,_=>{for(let T in C)_.addCase(T,C[T]);for(let T of l.sliceMatchers)_.addMatcher(T.matcher,T.reducer);for(let T of S)_.addMatcher(T.matcher,T.reducer);E&&_.addDefaultCase(E)})}const f=x=>x,h=new Map,p=new WeakMap;let m;function y(x,S){return m||(m=d()),m(x,S)}function v(){return m||(m=d()),m.getInitialState()}function g(x,S=!1){function E(_){let T=_[x];if(typeof T>"u"){if(S)T=St(p,E,v);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?re(15):"selectSlice returned undefined for an uninjected slice reducer")}return T}function C(_=f){return St(St(h,S,()=>new WeakMap),_,()=>{const T={};for(const[M,N]of Object.entries(n.selectors??{}))T[M]=hm(N,_,()=>St(p,_,v),S);return T})}return{reducerPath:x,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const b={name:i,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...g(a),injectInto(x,{reducerPath:S,...E}={}){const C=S??a;return x.inject({reducerPath:C,reducer:y},E),{...b,...g(C,!0)}}};return b}}function hm(e,t,r,n){function i(a,...o){let s=t(a);if(typeof s>"u"){if(n)s=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?re(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...o)}return i.unwrapped=e,i}var jt=Id();function pm(){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 mm({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!ym(n))throw new Error(process.env.NODE_ENV==="production"?re(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?We(e,o):We(e))}function vm(e){return e._reducerDefinitionType==="asyncThunk"}function ym(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gm({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?re(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:u,options:d}=r,f=i(e,a,d);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),u&&n.addMatcher(f.settled,u),n.exposeCaseReducer(t,{fulfilled:o||en,pending:s||en,rejected:l||en,settled:u||en})}function en(){}function $m(){return{ids:[],entities:{}}}function bm(e){function t(r={},n){const i=Object.assign($m(),r);return n?e.setAll(i,n):i}return{getInitialState:t}}function xm(){function e(t,r={}){const{createSelector:n=ld}=r,i=f=>f.ids,a=f=>f.entities,o=n(i,a,(f,h)=>f.map(p=>h[p])),s=(f,h)=>h,l=(f,h)=>f[h],u=n(i,f=>f.length);if(!t)return{selectIds:i,selectEntities:a,selectAll:o,selectTotal:u,selectById:n(a,s,l)};const d=n(t,a);return{selectIds:n(t,i),selectEntities:d,selectAll:n(t,o),selectTotal:n(t,u),selectById:n(d,s,l)}}return{getSelectors:e}}var Sm=je;function Cm(e){const t=fe((r,n)=>e(n));return function(n){return t(n,void 0)}}function fe(e){return function(r,n){function i(o){return dd(o)}const a=o=>{i(n)?e(n.payload,o):e(n,o)};return Sm(r)?(a(r),r):gi(r,a)}}function Ft(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 ut(e){return Array.isArray(e)||(e=Object.values(e)),e}function pn(e){return je(e)?yi(e):e}function Md(e,t,r){e=ut(e);const n=pn(r.ids),i=new Set(n),a=[],o=new Set([]),s=[];for(const l of e){const u=Ft(l,t);i.has(u)||o.has(u)?s.push({id:u,changes:l}):(o.add(u),a.push(l))}return[a,s,n]}function Dd(e){function t(m,y){const v=Ft(m,e);v in y.entities||(y.ids.push(v),y.entities[v]=m)}function r(m,y){m=ut(m);for(const v of m)t(v,y)}function n(m,y){const v=Ft(m,e);v in y.entities||y.ids.push(v),y.entities[v]=m}function i(m,y){m=ut(m);for(const v of m)n(v,y)}function a(m,y){m=ut(m),y.ids=[],y.entities={},r(m,y)}function o(m,y){return s([m],y)}function s(m,y){let v=!1;m.forEach(g=>{g in y.entities&&(delete y.entities[g],v=!0)}),v&&(y.ids=y.ids.filter(g=>g in y.entities))}function l(m){Object.assign(m,{ids:[],entities:{}})}function u(m,y,v){const g=v.entities[y.id];if(g===void 0)return!1;const b=Object.assign({},g,y.changes),x=Ft(b,e),S=x!==y.id;return S&&(m[y.id]=x,delete v.entities[y.id]),v.entities[x]=b,S}function d(m,y){return f([m],y)}function f(m,y){const v={},g={};m.forEach(b=>{b.id in y.entities&&(g[b.id]={id:b.id,changes:{...g[b.id]?.changes,...b.changes}})}),m=Object.values(g),m.length>0&&m.filter(b=>u(v,b,y)).length>0&&(y.ids=Object.values(y.entities).map(b=>Ft(b,e)))}function h(m,y){return p([m],y)}function p(m,y){const[v,g]=Md(m,e,y);r(v,y),f(g,y)}return{removeAll:Cm(l),addOne:fe(t),addMany:fe(r),setOne:fe(n),setMany:fe(i),setAll:fe(a),updateOne:fe(d),updateMany:fe(f),upsertOne:fe(h),upsertMany:fe(p),removeOne:fe(o),removeMany:fe(s)}}function Nm(e,t,r){let n=0,i=e.length;for(;n<i;){let a=n+i>>>1;const o=e[a];r(t,o)>=0?n=a+1:i=a}return n}function wm(e,t,r){const n=Nm(e,t,r);return e.splice(n,0,t),e}function Pm(e,t){const{removeOne:r,removeMany:n,removeAll:i}=Dd(e);function a(v,g){return o([v],g)}function o(v,g,b){v=ut(v);const x=new Set(b??pn(g.ids)),S=new Set,E=v.filter(C=>{const _=Ft(C,e),T=!S.has(_);return T&&S.add(_),!x.has(_)&&T});E.length!==0&&y(g,E)}function s(v,g){return l([v],g)}function l(v,g){let b={};if(v=ut(v),v.length!==0){for(const x of v){const S=e(x);b[S]=x,delete g.entities[S]}v=ut(b),y(g,v)}}function u(v,g){v=ut(v),g.entities={},g.ids=[],o(v,g,[])}function d(v,g){return f([v],g)}function f(v,g){let b=!1,x=!1;for(let S of v){const E=g.entities[S.id];if(!E)continue;b=!0,Object.assign(E,S.changes);const C=e(E);if(S.id!==C){x=!0,delete g.entities[S.id];const _=g.ids.indexOf(S.id);g.ids[_]=C,g.entities[C]=E}}b&&y(g,[],b,x)}function h(v,g){return p([v],g)}function p(v,g){const[b,x,S]=Md(v,e,g);b.length&&o(b,g,S),x.length&&f(x,g)}function m(v,g){if(v.length!==g.length)return!1;for(let b=0;b<v.length;b++)if(v[b]!==g[b])return!1;return!0}const y=(v,g,b,x)=>{const S=pn(v.entities),E=pn(v.ids),C=v.entities;let _=E;x&&(_=new Set(E));let T=[];for(const L of _){const G=S[L];G&&T.push(G)}const M=T.length===0;for(const L of g)C[e(L)]=L,M||wm(T,L,t);M?T=g.slice().sort(t):b&&T.sort(t);const N=T.map(e);m(E,N)||(v.ids=N)};return{removeOne:r,removeMany:n,removeAll:i,addOne:fe(a),updateOne:fe(d),upsertOne:fe(h),setOne:fe(s),setMany:fe(l),setAll:fe(u),addMany:fe(o),updateMany:fe(f),upsertMany:fe(p)}}function Em(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:o=>o.id,...e},n=r?Pm(t,r):Dd(t),i=bm(n),a=xm();return{selectId:t,sortComparer:r,...i,...a,...n}}var Tm="task",Rd="listener",kd="completed",_o="cancelled",Om=`task-${_o}`,_m=`task-${kd}`,Ta=`${Rd}-${_o}`,Am=`${Rd}-${kd}`,Ur=class{constructor(e){this.code=e,this.message=`${Tm} ${_o} (reason: ${e})`}name="TaskAbortError";message},Ao=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?re(32):`${t} is not a function`)},Vn=()=>{},Ld=(e,t=Vn)=>(e.catch(t),e),Fd=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),wt=e=>{if(e.aborted)throw new Ur(e.reason)};function Vd(e,t){let r=Vn;return new Promise((n,i)=>{const a=()=>i(new Ur(e.reason));if(e.aborted){a();return}r=Fd(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Vn})}var jm=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ur?"cancelled":"rejected",error:r}}finally{t?.()}},Bn=e=>t=>Ld(Vd(e,t).then(r=>(wt(e),r))),Bd=e=>{const t=Bn(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Gt}=Object,el={},Wr="listenerMiddleware",Im=(e,t)=>{const r=n=>Fd(e,()=>n.abort(e.reason));return(n,i)=>{Ao(n,"taskExecutor");const a=new AbortController;r(a);const o=jm(async()=>{wt(e),wt(a.signal);const s=await n({pause:Bn(a.signal),delay:Bd(a.signal),signal:a.signal});return wt(a.signal),s},()=>a.abort(_m));return i?.autoJoin&&t.push(o.catch(Vn)),{result:Bn(e)(o),cancel(){a.abort(Om)}}}},Mm=(e,t)=>{const r=async(n,i)=>{wt(t);let a=()=>{};const o=[new Promise((s,l)=>{let u=e({predicate:n,effect:(d,f)=>{f.unsubscribe(),s([d,f.getState(),f.getOriginalState()])}});a=()=>{u(),l()}})];i!=null&&o.push(new Promise(s=>setTimeout(s,i,null)));try{const s=await Vd(t,Promise.race(o));return wt(t),s}finally{a()}};return(n,i)=>Ld(r(n,i))},Ud=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=We(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(process.env.NODE_ENV==="production"?re(21):"Creating or removing a listener requires one of the known fields for matching an action");return Ao(a,"options.listener"),{predicate:i,type:t,effect:a}},Wd=Gt(e=>{const{type:t,predicate:r,effect:n}=Ud(e);return{id:Br(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?re(22):"Unsubscribe not initialized")}}},{withTypes:()=>Wd}),tl=(e,t)=>{const{type:r,effect:n,predicate:i}=Ud(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Oa=e=>{e.pending.forEach(t=>{t.abort(Ta)})},Dm=(e,t)=>()=>{for(const r of t.keys())Oa(r);e.clear()},rl=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},jo=Gt(We(`${Wr}/add`),{withTypes:()=>jo}),zd=We(`${Wr}/removeAll`),Io=Gt(We(`${Wr}/remove`),{withTypes:()=>Io}),Rm=(...e)=>{console.error(`${Wr}/error`,...e)},km=(e={})=>{const t=new Map,r=new Map,n=p=>{const m=r.get(p)??0;r.set(p,m+1)},i=p=>{const m=r.get(p)??1;m===1?r.delete(p):r.set(p,m-1)},{extra:a,onError:o=Rm}=e;Ao(o,"onError");const s=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),m=>{p.unsubscribe(),m?.cancelActive&&Oa(p)}),l=p=>s(tl(t,p)??Wd(p));Gt(l,{withTypes:()=>l});const u=p=>{const m=tl(t,p);return m&&(m.unsubscribe(),p.cancelActive&&Oa(m)),!!m};Gt(u,{withTypes:()=>u});const d=async(p,m,y,v)=>{const g=new AbortController,b=Mm(l,g.signal),x=[];try{p.pending.add(g),n(p),await Promise.resolve(p.effect(m,Gt({},y,{getOriginalState:v,condition:(S,E)=>b(S,E).then(Boolean),take:b,delay:Bd(g.signal),pause:Bn(g.signal),extra:a,signal:g.signal,fork:Im(g.signal,x),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((S,E,C)=>{S!==g&&(S.abort(Ta),C.delete(S))})},cancel:()=>{g.abort(Ta),p.pending.delete(g)},throwIfCancelled:()=>{wt(g.signal)}})))}catch(S){S instanceof Ur||rl(o,S,{raisedBy:"effect"})}finally{await Promise.all(x),g.abort(Am),i(p),p.pending.delete(g)}},f=Dm(t,r);return{middleware:p=>m=>y=>{if(!(0,Oe.isAction)(y))return m(y);if(jo.match(y))return l(y.payload);if(zd.match(y)){f();return}if(Io.match(y))return u(y.payload);let v=p.getState();const g=()=>{if(v===el)throw new Error(process.env.NODE_ENV==="production"?re(23):`${Wr}: getOriginalState can only be called synchronously`);return v};let b;try{if(b=m(y),t.size>0){const x=p.getState(),S=Array.from(t.values());for(const E of S){let C=!1;try{C=E.predicate(y,x,v)}catch(_){C=!1,rl(o,_,{raisedBy:"predicate"})}C&&d(E,y,p,g)}}}finally{v=el}return b},startListening:l,stopListening:u,clearListeners:f}},Lm=e=>({middleware:e,applied:new Map}),Fm=e=>t=>t?.meta?.instanceId===e,Vm=()=>{const e=Br(),t=new Map,r=Object.assign(We("dynamicMiddleware/add",(...s)=>({payload:s,meta:{instanceId:e}})),{withTypes:()=>r}),n=Object.assign(function(...l){l.forEach(u=>{St(t,u,Lm)})},{withTypes:()=>n}),i=s=>(0,Oe.compose)(...Array.from(t.values()).map(l=>St(l.applied,s,l.middleware))),a=Ln(r,Fm(e));return{middleware:s=>l=>u=>a(u)?(n(...u.payload),s.dispatch):i(s)(l)(u),addMiddleware:n,withMiddleware:r,instanceId:e}},Bm=e=>"reducerPath"in e&&typeof e.reducerPath=="string",Um=e=>e.flatMap(t=>Bm(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),Mo=Symbol.for("rtk-state-proxy-original"),Wm=e=>!!e&&!!e[Mo],zm=new WeakMap,Gm=(e,t,r)=>St(zm,e,()=>new Proxy(e,{get:(n,i,a)=>{if(i===Mo)return n;const o=Reflect.get(n,i,a);if(typeof o>"u"){const s=r[i];if(typeof s<"u")return s;const l=t[i];if(l){const u=l(void 0,{type:Br()});if(typeof u>"u")throw new Error(process.env.NODE_ENV==="production"?re(24):`The slice reducer for key "${i.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[i]=u,u}}return o}})),Hm=e=>{if(!Wm(e))throw new Error(process.env.NODE_ENV==="production"?re(25):"original must be used on state Proxy");return e[Mo]},Km={},qm=(e=Km)=>e;function Ym(...e){const t=Object.fromEntries(Um(e)),r=()=>Object.keys(t).length?(0,Oe.combineReducers)(t):qm;let n=r();function i(l,u){return n(l,u)}i.withLazyLoadedSlices=()=>i;const a={},o=(l,u={})=>{const{reducerPath:d,reducer:f}=l,h=t[d];return!u.overrideExisting&&h&&h!==f?(typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`inject\` to override already-existing reducer ${d} without specifying \`overrideExisting: true\``),i):(u.overrideExisting&&h!==f&&delete a[d],t[d]=f,n=r(),i)},s=Object.assign(function(u,d){return function(h,...p){return u(Gm(d?d(h,...p):h,t,a),...p)}},{original:Hm});return Object.assign(i,{inject:o,selector:s})}function re(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. `}var Wi=e=>e?["services","professionals","time","details","confirm","success"]:["professionals","services","time","details","confirm","success"],Xm={currentStep:"services",completedSteps:["services"],isOrder:!0},Gd=jt({name:"breadcrumbs",initialState:Xm,reducers:{setIsOrder:(e,t)=>{e.isOrder=t.payload},goToStep:(e,t)=>{const r=Wi(e.isOrder),n=t.payload,i=r.indexOf(e.currentStep),a=r.indexOf(n);if(a<=i){e.currentStep=n;return}const o=r[a-1];e.completedSteps.includes(o)&&(e.currentStep=n)},completeStep:(e,t)=>{const r=t.payload;e.completedSteps.includes(r)||e.completedSteps.push(r)},nextStep:e=>{const t=Wi(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=Wi(e.isOrder),r=t[t.indexOf(e.currentStep)-1];r&&(e.currentStep=r)},clearSteps:e=>{e.currentStep="services",e.completedSteps=["services"]}}}),{setIsOrder:Zm,goToStep:_a,completeStep:V5,nextStep:Ee,prevStep:B5,clearSteps:U5}=Gd.actions,Jm=Gd.reducer,nl={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},Hd=jt({name:"outletDetails",initialState:nl,reducers:{clearBooking:()=>nl,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:Qm,setOutletData:e1,setOutletToken:t1}=Hd.actions,r1=Hd.reducer,il={standaloneCategories:[],superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null},Kd=jt({name:"service",initialState:il,reducers:{setServicePayload:(e,t)=>{e.standaloneCategories=t.payload.standaloneCategories,e.superCategories=t.payload.superCategories,e.staff=t.payload.staff},setCategory:(e,t)=>{e.selectedCategory=t.payload},toggleService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload.id);r?r.qty<5&&(r.qty+=1):e.selectedServices.push({...t.payload,qty:1})},incrementService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload);r&&r.qty<5&&(r.qty+=1)},decrementService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload);r&&(r.qty===1?e.selectedServices=e.selectedServices.filter(n=>n.id!==t.payload):r.qty-=1)},toggleProfessional:(e,t)=>{e.selectedProfessional=t.payload},clearServices:()=>il}}),{setServicePayload:n1,setCategory:Un,toggleService:Wn,clearServices:W5,incrementService:qd,decrementService:zn,toggleProfessional:Yd}=Kd.actions,i1=Kd.reducer,st="https://prod.aaravpos.com/api/v1",mt=()=>({"Content-Type":"application/json",Authorization:`Bearer ${Si.getState()?.outletDetails?.token}`}),al=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 i=`${st}/integration/service/code/${e}?${n}`,a=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json"}});if(!a.ok)throw new Error("Failed to fetch services");return await a.json()},a1=async(e,t,r)=>{const n=await fetch(`${st}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`,{method:"GET",headers:mt()});if(!n.ok)throw new Error("Failed to fetch services");return await n.json()},o1=async e=>{const t=await fetch(`${st}/integration/appointment/create`,{method:"POST",headers:mt(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to fetch services");return await t.json()},s1=async(e,t)=>{const r=await fetch(`${st}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`,{method:"GET",headers:mt()});if(!r.ok)throw new Error("Failed to fetch appointment details");return await r.json()},l1=async({search:e,tenantId:t})=>{const r=await fetch(`${st}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e||"")}`,{method:"GET",headers:mt()});if(!r.ok)throw new Error("Failed to fetch customers");return await r.json()},c1=async e=>{try{const t=await fetch(`${st}/payment/pay/customer/direct`,{method:"POST",headers:mt(),body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},u1=async e=>{try{const t=await fetch(`${st}/payment/orders/${e}/invoicing/finalize`,{method:"POST",headers:mt()}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},ol=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"},Do=e=>{const t=!!(e?.requires_consent??e?.requiresConsent),r=String(e?.consent_form_id??e?.consentFormId??"").trim();return t&&!!r},sl=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},ll=async(e,t,r)=>{const n=await fetch(`${st}/concent/check/${e}/${t}?serviceId=${r}`,{method:"GET",headers:mt()});if(!n.ok)throw new Error("Failed to check consent requirement");return n.json()},d1=async e=>{const{tenantId:t,outletId:r,appointmentId:n,customerId:i,serviceId:a,formId:o,staffId:s,signatureType:l,isChecked:u,typedName:d,imageUrl:f}=e,h={tenantId:t,appointmentId:n,customerId:i,serviceIds:[a],outletId:r,concentFormId:o,signatureType:l,channel:"Online_Web",staffId:s};l==="CHECKBOX_ONLY"&&(h.isChecked=u??!0),d&&(h.typedName=d),f&&(h.imageUrl=f);const p=await fetch(`${st}/concent/customer-sign`,{method:"POST",headers:mt(),body:JSON.stringify(h)}),m=await p.json();if(!p.ok)throw m;return m},mn=xi("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await a1(e,t,r)),Xd=jt({name:"slots",initialState:{selectedSlotIndexes:[],selectedSlotIds:[],selectedDate:null,selectedTime:null,slots:{morning:[],afternoon:[],evening:[]},loading:!1},reducers:{clearSlots:e=>{e.slots={morning:[],afternoon:[],evening:[]},e.selectedSlotIndexes=[],e.selectedSlotIds=[],e.selectedDate=null,e.selectedTime=null},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}},extraReducers:e=>{e.addCase(mn.pending,t=>{t.loading=!0}).addCase(mn.fulfilled,(t,r)=>{t.loading=!1,t.slots=r.payload?.data?.groups||{morning:[],afternoon:[],evening:[]}}).addCase(mn.rejected,t=>{t.loading=!1})}}),{setSelectedSlots:zi,clearSlots:z5,setSelectedDate:Ht,setSelectedTime:Gi}=Xd.actions,f1=Xd.reducer,vn=xi("appointment/create",async(e,{rejectWithValue:t})=>{try{return await o1(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),cl={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking"},Zd=jt({name:"appointment",initialState:cl,reducers:{resetAppointment:()=>cl,setBookingMode:(e,t)=>{e.bookingMode=t.payload},setUserDetails:(e,t)=>{e.userDetails=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(vn.pending,t=>{t.loading=!0,t.error=null}).addCase(vn.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(vn.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:G5,setBookingMode:H5,setUserDetails:ul,setTips:h1,setAppointmentId:Hi,clearUserDetails:p1}=Zd.actions,m1=Zd.reducer,Jd=jt({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:v1,clearOutletList:K5}=Jd.actions,y1=Jd.reducer;function yn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yn=function(r){return typeof r}:yn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yn(e)}function Ki(){}var g1={getItem:Ki,setItem:Ki,removeItem:Ki};function $1(e){if((typeof self>"u"?"undefined":yn(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 b1(e){var t="".concat(e,"Storage");return $1(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),g1)}function x1(e){var t=b1(e);return{getItem:function(n){return new Promise(function(i,a){i(t.getItem(n))})},setItem:function(n,i){return new Promise(function(a,o){a(t.setItem(n,i))})},removeItem:function(n){return new Promise(function(i,a){i(t.removeItem(n))})}}}var dl=(0,od.combineReducers)({breadcrumbs:Jm,outletDetails:r1,service:i1,slots:f1,appointment:m1,outletList:y1}),S1=(e,t)=>t.type==="RESET_ALL"?dl({breadcrumbs:void 0,outletDetails:void 0,service:void 0,slots:void 0,appointment:void 0,outletList:void 0},t):dl(e,t),C1=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),N1=(0,ct.persistReducer)({key:"root",storage:typeof window<"u"?x1("local"):C1()},S1),Si=xd({reducer:N1,devTools:process.env.NODE_ENV!=="production",middleware:e=>e({serializableCheck:{ignoredActions:[ct.FLUSH,ct.REHYDRATE,ct.PAUSE,ct.PERSIST,ct.PURGE,ct.REGISTER]}})}),Ro=(0,ct.persistStore)(Si),q5=Si.getState;function w1({children:e}){return(0,c.jsx)(H.Provider,{store:Si,children:(0,c.jsx)(qu,{loading:null,persistor:Ro,children:e})})}var P1=e=>{if(!e)return;const t=document.documentElement;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)},ko=(0,$.createContext)({});function Lo(e){const t=(0,$.useRef)(null);return t.current===null&&(t.current=e()),t.current}var E1=typeof window<"u",Qd=E1?$.useLayoutEffect:$.useEffect,Ci=(0,$.createContext)(null);function Fo(e,t){e.indexOf(t)===-1&&e.push(t)}function Gn(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}var Qe=(e,t,r)=>r>t?t:r<e?e:r;function Aa(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var nr=()=>{},at=()=>{};typeof process<"u"&&process.env.NODE_ENV!=="production"&&(nr=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(Aa(t,r))},at=(e,t,r)=>{if(!e)throw new Error(Aa(t,r))});var ft={},ef=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function tf(e){return typeof e=="object"&&e!==null}var rf=e=>/^0[^.\s]+$/u.test(e);function nf(e){let t;return()=>(t===void 0&&(t=e()),t)}var ke=e=>e,T1=(e,t)=>r=>t(e(r)),zr=(...e)=>e.reduce(T1),br=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Vo=class{constructor(){this.subscriptions=[]}add(e){return Fo(this.subscriptions,e),()=>Gn(this.subscriptions,e)}notify(e,t,r){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){const a=this.subscriptions[i];a&&a(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Ae=e=>e*1e3,Re=e=>e/1e3;function af(e,t){return t?e*(1e3/t):0}var fl=new Set;function Bo(e,t,r){e||fl.has(t)||(console.warn(Aa(t,r)),fl.add(t))}var of=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,O1=1e-7,_1=12;function A1(e,t,r,n,i){let a,o,s=0;do o=t+(r-t)/2,a=of(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>O1&&++s<_1);return o}function Gr(e,t,r,n){if(e===t&&r===n)return ke;const i=a=>A1(a,0,1,e,r);return a=>a===0||a===1?a:of(i(a),t,n)}var sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lf=e=>t=>1-e(1-t),cf=Gr(.33,1.53,.69,.99),Uo=lf(cf),uf=sf(Uo),df=e=>e>=1?1:(e*=2)<1?.5*Uo(e):.5*(2-Math.pow(2,-10*(e-1))),Wo=e=>1-Math.sin(Math.acos(e)),ff=lf(Wo),hf=sf(Wo),j1=Gr(.42,0,1,1),I1=Gr(0,0,.58,1),pf=Gr(.42,0,.58,1),M1=e=>Array.isArray(e)&&typeof e[0]!="number",mf=e=>Array.isArray(e)&&typeof e[0]=="number",hl={linear:ke,easeIn:j1,easeInOut:pf,easeOut:I1,circIn:Wo,circInOut:hf,circOut:ff,backIn:Uo,backInOut:uf,backOut:cf,anticipate:df},D1=e=>typeof e=="string",pl=e=>{if(mf(e)){at(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,i]=e;return Gr(t,r,n,i)}else if(D1(e))return at(hl[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),hl[e];return e},tn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ze={value:null,addProjectionMetrics:null};function R1(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(f){o.has(f)&&(d.schedule(f),e()),l++,f(s)}const d={schedule:(f,h=!1,p=!1)=>{const m=p&&i?r:n;return h&&o.add(f),m.add(f),f},cancel:f=>{n.delete(f),o.delete(f)},process:f=>{if(s=f,i){a=!0;return}i=!0;const h=r;r=n,n=h,r.forEach(u),t&&Ze.value&&Ze.value.frameloop[t].push(l),l=0,r.clear(),i=!1,a&&(a=!1,d.process(f))}};return d}var k1=40;function vf(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=tn.reduce((x,S)=>(x[S]=R1(a,t?S:void 0),x),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:p,postRender:m}=o,y=()=>{const x=ft.useManualTiming,S=x?i.timestamp:performance.now();r=!1,x||(i.delta=n?1e3/60:Math.max(Math.min(S-i.timestamp,k1),1)),i.timestamp=S,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),d.process(i),f.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(y))},v=()=>{r=!0,n=!0,i.isProcessing||e(y)};return{schedule:tn.reduce((x,S)=>{const E=o[S];return x[S]=(C,_=!1,T=!1)=>(r||v(),E.schedule(C,_,T)),x},{}),cancel:x=>{for(let S=0;S<tn.length;S++)o[tn[S]].cancel(x)},state:i,steps:o}}var{schedule:oe,cancel:ht,state:xe,steps:qi}=vf(typeof requestAnimationFrame<"u"?requestAnimationFrame:ke,!0),gn;function L1(){gn=void 0}var we={now:()=>(gn===void 0&&we.set(xe.isProcessing||ft.useManualTiming?xe.timestamp:performance.now()),gn),set:e=>{gn=e,queueMicrotask(L1)}},Pt={layout:0,mainThread:0,waapi:0},yf=e=>t=>typeof t=="string"&&t.startsWith(e),gf=yf("--"),F1=yf("var(--"),zo=e=>F1(e)?V1.test(e.split("/*")[0].trim()):!1,V1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ml(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var ir={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xr={...ir,transform:e=>Qe(0,1,e)},rn={...ir,default:1},fr=e=>Math.round(e*1e5)/1e5,Go=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function B1(e){return e==null}var U1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ho=(e,t)=>r=>!!(typeof r=="string"&&U1.test(r)&&r.startsWith(e)||t&&!B1(r)&&Object.prototype.hasOwnProperty.call(r,t)),$f=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,s]=n.match(Go);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},W1=e=>Qe(0,255,e),Yi={...ir,transform:e=>Math.round(W1(e))},Ct={test:Ho("rgb","red"),parse:$f("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Yi.transform(e)+", "+Yi.transform(t)+", "+Yi.transform(r)+", "+fr(xr.transform(n))+")"};function z1(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var ja={test:Ho("#"),parse:z1,transform:Ct.transform},Hr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lt=Hr("deg"),Je=Hr("%"),B=Hr("px"),G1=Hr("vh"),H1=Hr("vw"),vl={...Je,parse:e=>Je.parse(e)/100,transform:e=>Je.transform(e*100)},Vt={test:Ho("hsl","hue"),parse:$f("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Je.transform(fr(t))+", "+Je.transform(fr(r))+", "+fr(xr.transform(n))+")"},me={test:e=>Ct.test(e)||ja.test(e)||Vt.test(e),parse:e=>Ct.test(e)?Ct.parse(e):Vt.test(e)?Vt.parse(e):ja.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ct.transform(e):Vt.transform(e),getAnimatableNone:e=>{const t=me.parse(e);return t.alpha=0,me.transform(t)}},K1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function q1(e){return isNaN(e)&&typeof e=="string"&&(e.match(Go)?.length||0)+(e.match(K1)?.length||0)>0}var bf="number",xf="color",Y1="var",X1="var(",yl="${}",Z1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xt(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;return{values:r,split:t.replace(Z1,o=>(me.test(o)?(n.color.push(a),i.push(xf),r.push(me.parse(o))):o.startsWith(X1)?(n.var.push(a),i.push(Y1),r.push(o)):(n.number.push(a),i.push(bf),r.push(parseFloat(o))),++a,yl)).split(yl),indexes:n,types:i}}function J1(e){return Xt(e).values}function Sf({split:e,types:t}){const r=e.length;return n=>{let i="";for(let a=0;a<r;a++)if(i+=e[a],n[a]!==void 0){const o=t[a];o===bf?i+=fr(n[a]):o===xf?i+=me.transform(n[a]):i+=n[a]}return i}}function Q1(e){return Sf(Xt(e))}var ev=e=>typeof e=="number"?0:me.test(e)?me.getAnimatableNone(e):e,tv=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:ev(e);function rv(e){const t=Xt(e);return Sf(t)(t.values.map((r,n)=>tv(r,t.split[n])))}var ze={test:q1,parse:J1,createTransformer:Q1,getAnimatableNone:rv};function Xi(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function nv({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;i=Xi(l,s,e+1/3),a=Xi(l,s,e),o=Xi(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function Hn(e,t){return r=>r>0?t:e}var ue=(e,t,r)=>e+(t-e)*r,Zi=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},iv=[ja,Ct,Vt],av=e=>iv.find(t=>t.test(e));function gl(e){const t=av(e);if(nr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Vt&&(r=nv(r)),r}var $l=(e,t)=>{const r=gl(e),n=gl(t);if(!r||!n)return Hn(e,t);const i={...r};return a=>(i.red=Zi(r.red,n.red,a),i.green=Zi(r.green,n.green,a),i.blue=Zi(r.blue,n.blue,a),i.alpha=ue(r.alpha,n.alpha,a),Ct.transform(i))},Ia=new Set(["none","hidden"]);function ov(e,t){return Ia.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sv(e,t){return r=>ue(e,t,r)}function Ko(e){return typeof e=="number"?sv:typeof e=="string"?zo(e)?Hn:me.test(e)?$l:uv:Array.isArray(e)?Cf:typeof e=="object"?me.test(e)?$l:lv:Hn}function Cf(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>Ko(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function lv(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=Ko(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function cv(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]];r[i]=e.values[o]??0,n[a]++}return r}var uv=(e,t)=>{const r=ze.createTransformer(t),n=Xt(e),i=Xt(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Ia.has(e)&&!i.values.length||Ia.has(t)&&!n.values.length?ov(e,t):zr(Cf(cv(n,i),i.values),r):(nr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Hn(e,t))};function Nf(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ue(e,t,r):Ko(e)(e,t)}var dv=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>oe.update(t,r),stop:()=>ht(t),now:()=>xe.isProcessing?xe.timestamp:we.now()}},wf=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Pf=2e4;function qo(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function fv(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(qo(n),Pf);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Re(i)}}var de={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ma(e,t){return e*Math.sqrt(1-t*t)}var hv=12;function pv(e,t,r){let n=r;for(let i=1;i<hv;i++)n=n-e(n)/t(n);return n}var Ji=.001;function mv({duration:e=de.duration,bounce:t=de.bounce,velocity:r=de.velocity,mass:n=de.mass}){let i,a;nr(e<=Ae(de.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Qe(de.minDamping,de.maxDamping,o),e=Qe(de.minDuration,de.maxDuration,Re(e)),o<1?(i=u=>{const d=u*o,f=d*e,h=d-r,p=Ma(u,o),m=Math.exp(-f);return Ji-h/p*m},a=u=>{const d=u*o*e,f=d*r+r,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=Ma(Math.pow(u,2),o);return(-i(u)+Ji>0?-1:1)*((f-h)*p)/m}):(i=u=>{const d=Math.exp(-u*e),f=(u-r)*e+1;return-Ji+d*f},a=u=>Math.exp(-u*e)*((r-u)*(e*e)));const s=5/e,l=pv(i,a,s);if(e=Ae(e),isNaN(l))return{stiffness:de.stiffness,damping:de.damping,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var vv=["duration","bounce"],yv=["stiffness","damping","mass"];function bl(e,t){return t.some(r=>e[r]!==void 0)}function gv(e){let t={velocity:de.velocity,stiffness:de.stiffness,damping:de.damping,mass:de.mass,isResolvedFromDuration:!1,...e};if(!bl(e,yv)&&bl(e,vv))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*Qe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:de.mass,stiffness:i,damping:a}}else{const r=mv({...e,velocity:0});t={...t,...r,mass:de.mass},t.isResolvedFromDuration=!0}return t}function Kn(e=de.visualDuration,t=de.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=gv({...r,velocity:-Re(r.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*d)),v=o-a,g=Re(Math.sqrt(l/d)),b=Math.abs(v)<5;n||(n=b?de.restSpeed.granular:de.restSpeed.default),i||(i=b?de.restDelta.granular:de.restDelta.default);let x,S,E,C,_,T;if(y<1)E=Ma(g,y),C=(m+y*g*v)/E,x=N=>o-Math.exp(-y*g*N)*(C*Math.sin(E*N)+v*Math.cos(E*N)),_=y*g*C+v*E,T=y*g*v-C*E,S=N=>Math.exp(-y*g*N)*(_*Math.sin(E*N)+T*Math.cos(E*N));else if(y===1){x=L=>o-Math.exp(-g*L)*(v+(m+g*v)*L);const N=m+g*v;S=L=>Math.exp(-g*L)*(g*N*L-m)}else{const N=g*Math.sqrt(y*y-1);x=w=>{const F=Math.exp(-y*g*w),W=Math.min(N*w,300);return o-F*((m+y*g*v)*Math.sinh(W)+N*v*Math.cosh(W))/N};const L=(m+y*g*v)/N,G=y*g*L-v*N,R=y*g*v-L*N;S=w=>{const F=Math.exp(-y*g*w),W=Math.min(N*w,300);return F*(G*Math.sinh(W)+R*Math.cosh(W))}}const M={calculatedDuration:p&&f||null,velocity:N=>Ae(S(N)),next:N=>{if(!p&&y<1){const G=Math.exp(-y*g*N),R=Math.sin(E*N),w=Math.cos(E*N),F=o-G*(C*R+v*w),W=Ae(G*(_*R+T*w));return s.done=Math.abs(W)<=n&&Math.abs(o-F)<=i,s.value=s.done?o:F,s}const L=x(N);if(p)s.done=N>=f;else{const G=Ae(S(N));s.done=Math.abs(G)<=n&&Math.abs(o-L)<=i}return s.value=s.done?o:L,s},toString:()=>{const N=Math.min(qo(M),Pf),L=wf(G=>M.next(N*G).value,N,30);return N+"ms "+L},toTransition:()=>{}};return M}Kn.applyToOptions=e=>{const t=fv(e,100,Kn);return e.ease=t.ease,e.duration=Ae(t.duration),e.type="keyframes",e};var $v=5;function Ef(e,t,r){const n=Math.max(t-$v,0);return af(r-e(n),t-n)}function Da({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=T=>s!==void 0&&T<s||l!==void 0&&T>l,m=T=>s===void 0?l:l===void 0||Math.abs(s-T)<Math.abs(l-T)?s:l;let y=r*t;const v=f+y,g=o===void 0?v:o(v);g!==v&&(y=g-f);const b=T=>-y*Math.exp(-T/n),x=T=>g+b(T),S=T=>{const M=b(T),N=x(T);h.done=Math.abs(M)<=u,h.value=h.done?g:N};let E,C;const _=T=>{p(h.value)&&(E=T,C=Kn({keyframes:[h.value,m(h.value)],velocity:Ef(x,T,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:T=>{let M=!1;return!C&&E===void 0&&(M=!0,S(T),_(T)),E!==void 0&&T>=E?C.next(T-E):(!M&&S(T),h)}}}function bv(e,t,r){const n=[],i=r||ft.mix||Nf,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);t&&(s=zr(Array.isArray(t)?t[o]||ke:t,s)),n.push(s)}return n}function xv(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(at(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=bv(t,n,i),l=s.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=br(e[f],e[f+1],d);return s[f](h)};return r?d=>u(Qe(e[0],e[a-1],d)):u}function Sv(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=br(0,t,n);e.push(ue(r,1,i))}}function Cv(e){const t=[0];return Sv(t,e.length-1),t}function Nv(e,t){return e.map(r=>r*t)}function wv(e,t){return e.map(()=>t||pf).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=M1(n)?n.map(pl):pl(n),a={done:!1,value:t[0]},o=xv(Nv(r&&r.length===t.length?r:Cv(t),e),t,{ease:Array.isArray(i)?i:wv(t,i)});return{calculatedDuration:e,next:s=>(a.value=o(s),a.done=s>=e,a)}}var Pv=e=>e!==null;function Ni(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(Pv),o=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}var Ev={decay:Da,inertia:Da,tween:Bt,keyframes:Bt,spring:Kn};function Tf(e){typeof e.type=="string"&&(e.type=Ev[e.type])}var Yo=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Tv=e=>e/100,qn=class extends Yo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==we.now()&&this.tick(we.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Pt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Tf(e);const{type:t=Bt,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Bt;process.env.NODE_ENV!=="production"&&s!==Bt&&at(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),s!==Bt&&typeof o[0]!="number"&&(this.mixKeyframes=zr(Tv,Nf(o[0],o[1])),o=[0,100]);const l=s({...e,keyframes:o});i==="mirror"&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=qo(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:n,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>n;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let b=this.currentTime,x=r;if(d){const _=Math.min(this.currentTime,n)/o;let T=Math.floor(_),M=_%1;!M&&_>=1&&(M=1),M===1&&T--,T=Math.min(T,d+1),T%2&&(f==="reverse"?(M=1-M,h&&(M-=h/o)):f==="mirror"&&(x=a)),b=Qe(0,1,M)*o}let S;g?(this.delayState.value=u[0],S=this.delayState):S=x.next(b),i&&!g&&(S.value=i(S.value));let{done:E}=S;!g&&s!==null&&(E=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&p!==Da&&(S.value=Ni(u,this.options,y,this.speed)),m&&m(S.value),C&&this.finish(),S}then(e,t){return this.finished.then(e,t)}get duration(){return Re(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Re(e)}get time(){return Re(this.currentTime)}set time(e){e=Ae(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return Ef(r=>this.generator.next(r).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(we.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dv,startTime:t}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(we.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Pt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Ov(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Nt=e=>e*180/Math.PI,Ra=e=>ka(Nt(Math.atan2(e[1],e[0]))),_v={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ra,rotateZ:Ra,skewX:e=>Nt(Math.atan(e[1])),skewY:e=>Nt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ka=e=>(e=e%360,e<0&&(e+=360),e),xl=Ra,Sl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Cl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Av={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Sl,scaleY:Cl,scale:e=>(Sl(e)+Cl(e))/2,rotateX:e=>ka(Nt(Math.atan2(e[6],e[5]))),rotateY:e=>ka(Nt(Math.atan2(-e[2],e[0]))),rotateZ:xl,rotate:xl,skewX:e=>Nt(Math.atan(e[4])),skewY:e=>Nt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function La(e){return e.includes("scale")?1:0}function Fa(e,t){if(!e||e==="none")return La(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=Av,i=r;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=_v,i=s}if(!i)return La(t);const a=n[t],o=i[1].split(",").map(Iv);return typeof a=="function"?a(o):o[a]}var jv=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Fa(r,t)};function Iv(e){return parseFloat(e.trim())}var ar=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(ar),Nl=e=>e===ir||e===B,Mv=new Set(["x","y","z"]),Dv=ar.filter(e=>!Mv.has(e));function Rv(e){const t=[];return Dv.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var dt={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{const i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{const i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Fa(t,"x"),y:(e,{transform:t})=>Fa(t,"y")};dt.translateX=dt.x;dt.translateY=dt.y;var Et=new Set,Va=!1,Ba=!1,Ua=!1;function Of(){if(Ba){const e=Array.from(Et).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=Rv(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([a,o])=>{n.getValue(a)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Ba=!1,Va=!1,Et.forEach(e=>e.complete(Ua)),Et.clear()}function _f(){Et.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ba=!0)})}function kv(){Ua=!0,_f(),Of(),Ua=!1}var Xo=class{constructor(e,t,r,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Et.add(this),Va||(Va=!0,oe.read(_f),oe.resolveKeyframes(Of))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;if(e[0]===null){const i=n?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&t){const o=r.readValue(t,a);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=a),n&&i===void 0&&n.set(e[0])}Ov(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Et.delete(this)}cancel(){this.state==="scheduled"&&(Et.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}},Lv=e=>e.startsWith("--");function Af(e,t,r){Lv(t)?e.style.setProperty(t,r):e.style[t]=r}var Fv={};function jf(e,t){const r=nf(e);return()=>Fv[t]??r()}var Vv=jf(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),If=jf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dr=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,wl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dr([0,.65,.55,1]),circOut:dr([.55,0,1,.45]),backIn:dr([.31,.01,.66,-.59]),backOut:dr([.33,1.53,.69,.99])};function Mf(e,t){if(e)return typeof e=="function"?If()?wf(e,t):"ease-out":mf(e)?dr(e):Array.isArray(e)?e.map(r=>Mf(r,t)||wl.easeOut):wl[e]}function Bv(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){const d={[t]:r};l&&(d.offset=l);const f=Mf(s,i);Array.isArray(f)&&(d.easing=f),Ze.value&&Pt.waapi++;const h={delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};u&&(h.pseudoElement=u);const p=e.animate(d,h);return Ze.value&&p.finished.finally(()=>{Pt.waapi--}),p}function Df(e){return typeof e=="function"&&"applyToOptions"in e}function Uv({type:e,...t}){return Df(e)&&If()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Rf=class extends Yo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:r,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,at(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Uv(e);this.animation=Bv(t,r,n,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Ni(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Af(t,r,u),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Re(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Re(e)}get time(){return Re(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ae(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:r,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Vv()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),ke):n(this)}},kf={anticipate:df,backInOut:uf,circInOut:hf};function Wv(e){return e in kf}function zv(e){typeof e.ease=="string"&&Wv(e.ease)&&(e.ease=kf[e.ease])}var Qi=10,Gv=class extends Rf{constructor(e){zv(e),Tf(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:n,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const o=new qn({...a,autoplay:!1}),s=Math.max(Qi,we.now()-this.startTime),l=Qe(0,Qi,s-Qi),u=o.sample(s).value,{name:d}=this.options;i&&d&&Af(i,d,u),t.setWithVelocity(o.sample(Math.max(0,s-l)).value,u,l),o.stop()}},Pl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ze.test(e)||e==="0")&&!e.startsWith("url("));function Hv(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Kv(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Pl(i,t),s=Pl(a,t);return nr(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,"value-not-animatable"),!o||!s?!1:Hv(e)||(r==="spring"||Df(r))&&n}function Wa(e){e.duration=0,e.type="keyframes"}var Lf=new Set(["opacity","clipPath","filter","transform"]),qv=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Yv(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&qv.test(e[t]))return!0;return!1}var Xv=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Zv=nf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jv(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Zv()&&r&&(Lf.has(r)||Xv.has(r)&&Yv(s))&&(r!=="transform"||!u)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}var Qv=40,ey=class extends Yo{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:l,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=we.now();const f={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:u,...d},h=u?.KeyframeResolver||Xo;this.keyframeResolver=new h(o,(p,m,y)=>this.onKeyframesResolved(p,m,f,!y),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:l,onUpdate:u}=r;this.resolvedAt=we.now();let d=!0;Kv(e,i,a,o)||(d=!1,(ft.instantAnimations||!s)&&u?.(Ni(e,r,t)),e[0]=e[e.length-1],Wa(r),r.repeat=0);const f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Qv?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=d&&!l&&Jv(f),p=f.motionValue?.owner?.current;let m;if(h)try{m=new Gv({...f,element:p})}catch{m=new qn(f)}else m=new qn(f);m.finished.then(()=>{this.notifyFinished()}).catch(ke),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),kv()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Ff(e,t,r,n=0,i=1){const a=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),o=e.size,s=(o-1)*n;return typeof r=="function"?r(a,o):i===1?a*n:s-a*n}var ty=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ry(e){const t=ty.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}var ny=4;function Vf(e,t,r=1){at(r<=ny,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,i]=ry(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return ef(o)?parseFloat(o):o}return zo(i)?Vf(i,t,r+1):i}var iy={type:"spring",stiffness:500,damping:25,restSpeed:10},ay=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oy={type:"keyframes",duration:.8},sy={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ly=(e,{keyframes:t})=>t.length>2?oy:or.has(e)?e.startsWith("scale")?ay(t[1]):iy:sy;function Bf(e,t){if(e?.inherit&&t){const{inherit:r,...n}=e;return{...t,...n}}return e}function Zo(e,t){const r=e?.[t]??e?.default??e;return r!==e?Bf(r,e):r}var cy=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function uy(e){for(const t in e)if(!cy.has(t))return!0;return!1}var Jo=(e,t,r,n={},i,a)=>o=>{const s=Zo(n,e)||{},l=s.delay||n.delay||0;let{elapsed:u=0}=n;u=u-Ae(l);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};uy(s)||Object.assign(d,ly(e,d)),d.duration&&(d.duration=Ae(d.duration)),d.repeatDelay&&(d.repeatDelay=Ae(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Wa(d),d.delay===0&&(f=!0)),(ft.instantAnimations||ft.skipAnimations||i?.shouldSkipAnimations)&&(f=!0,Wa(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!a&&t.get()!==void 0){const h=Ni(d.keyframes,s);if(h!==void 0){oe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return s.isSync?new qn(d):new ey(d)};function El(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Qo(e,t,r,n){if(typeof t=="function"){const[i,a]=El(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=El(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function Tt(e,t,r){const n=e.getProps();return Qo(n,t,r!==void 0?r:n.custom,e)}var Uf=new Set(["width","height","top","left","right","bottom",...ar]),Tl=30,dy=e=>!isNaN(parseFloat(e)),Ol={current:void 0},fy=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const n=we.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=we.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dy(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Bo(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Vo);const r=this.events[e].add(t);return e==="change"?()=>{r(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ol.current&&Ol.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=we.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Tl)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Tl);return af(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Zt(e,t){return new fy(e,t)}var za=e=>Array.isArray(e);function hy(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Zt(r))}function py(e){return za(e)?e[e.length-1]||0:e}function my(e,t){let{transitionEnd:r={},transition:n={},...i}=Tt(e,t)||{};i={...i,...r};for(const a in i)hy(e,a,py(i[a]))}var Se=e=>!!(e&&e.getVelocity);function vy(e){return!!(Se(e)&&e.add)}function Ga(e,t){const r=e.getValue("willChange");if(vy(r))return r.add(t);if(!r&&ft.WillChange){const n=new ft.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function es(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var yy="framerAppearId",Wf="data-"+es(yy);function zf(e){return e.props[Wf]}function gy({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Gf(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Bf(a,l):l;const u=a?.reduceMotion;n&&(a=n);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in s){const p=e.getValue(h,e.latestValues[h]??null),m=s[h];if(m===void 0||f&&gy(f,h))continue;const y={delay:r,...Zo(a||{},h)},v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(m)&&m===v&&!y.velocity){oe.update(()=>p.set(m));continue}let g=!1;if(window.MotionHandoffAnimation){const S=zf(e);if(S){const E=window.MotionHandoffAnimation(S,h,oe);E!==null&&(y.startTime=E,g=!0)}}Ga(e,h);const b=u??e.shouldReduceMotion;p.start(Jo(h,p,m,b&&Uf.has(h)?{type:!1}:y,e,g));const x=p.animation;x&&d.push(x)}if(o){const h=()=>oe.update(()=>{o&&my(e,o)});d.length?Promise.all(d).then(h):h()}return d}function Ha(e,t,r={}){const n=Tt(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(Gf(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return $y(e,t,l,u,d,f,r)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[a,o]:[o,a];return l().then(()=>u())}else return Promise.all([a(),o(r.delay)])}function $y(e,t,r=0,n=0,i=0,a=1,o){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Ha(l,t,{...o,delay:r+(typeof n=="function"?0:n)+Ff(e.variantChildren,l,n,i,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function by(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>Ha(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=Ha(e,t,r);else{const i=typeof t=="function"?Tt(e,t,r.custom):t;n=Promise.all(Gf(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var xy={test:e=>e==="auto",parse:e=>e},Hf=e=>t=>t.test(e),Kf=[ir,B,Je,lt,H1,G1,xy],_l=e=>Kf.find(Hf(e));function Sy(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rf(e):!0}var Cy=new Set(["brightness","contrast","saturate","opacity"]);function Ny(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Go)||[];if(!n)return e;const i=r.replace(n,"");let a=Cy.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}var wy=/\b([a-z-]*)\(.*?\)/gu,Ka={...ze,getAnimatableNone:e=>{const t=e.match(wy);return t?t.map(Ny).join(" "):e}},qa={...ze,getAnimatableNone:e=>{const t=ze.parse(e);return ze.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Al={...ir,transform:Math.round},Py={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:rn,scaleX:rn,scaleY:rn,scaleZ:rn,skew:lt,skewX:lt,skewY:lt,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:xr,originX:vl,originY:vl,originZ:B},ts={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...Py,zIndex:Al,fillOpacity:xr,strokeOpacity:xr,numOctaves:Al},Ey={...ts,color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:Ka,WebkitFilter:Ka,mask:qa,WebkitMask:qa},qf=e=>Ey[e],Ty=new Set([Ka,qa]);function Yf(e,t){let r=qf(e);return Ty.has(r)||(r=ze),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Oy=new Set(["auto","none","0"]);function _y(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!Oy.has(a)&&Xt(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=Yf(r,i)}var Ay=class extends Xo{constructor(e,t,r,n,i){super(e,t,r,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let l=e[s];if(typeof l=="string"&&(l=l.trim(),zo(l))){const u=Vf(l,t.current);u!==void 0&&(e[s]=u),s===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Uf.has(r)||e.length!==2)return;const[n,i]=e,a=_l(n),o=_l(i);if(ml(n)!==ml(i)&&dt[r]){this.needsMeasurement=!0;return}if(a!==o)if(Nl(a)&&Nl(o))for(let s=0;s<e.length;s++){const l=e[s];typeof l=="string"&&(e[s]=parseFloat(l))}else dt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let n=0;n<e.length;n++)(e[n]===null||Sy(e[n]))&&r.push(n);r.length&&_y(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];n!==void 0&&e.getValue(r,n).jump(n,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=dt[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,s])=>{e.getValue(o).set(s)}),this.resolveNoneKeyframes()}};function Xf(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);const i=r?.[e]??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(n=>n!=null)}var Zf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function $n(e){return tf(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:rs,cancel:Y5}=vf(queueMicrotask,!1),Ue={x:!1,y:!1};function Jf(){return Ue.x||Ue.y}function jy(e){return e==="x"||e==="y"?Ue[e]?null:(Ue[e]=!0,()=>{Ue[e]=!1}):Ue.x||Ue.y?null:(Ue.x=Ue.y=!0,()=>{Ue.x=Ue.y=!1})}function Qf(e,t){const r=Xf(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Iy(e){return!(e.pointerType==="touch"||Jf())}function My(e,t,r={}){const[n,i,a]=Qf(e,r);return n.forEach(o=>{let s=!1,l=!1,u;const d=()=>{o.removeEventListener("pointerleave",m)},f=v=>{u&&(u(v),u=void 0),d()},h=v=>{s=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,f(v))},p=()=>{s=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=v=>{if(v.pointerType!=="touch"){if(s){l=!0;return}f(v)}},y=v=>{if(!Iy(v))return;l=!1;const g=t(o,v);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),a}var eh=(e,t)=>t?e===t?!0:eh(e,t.parentElement):!1,ns=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Dy=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ry(e){return Dy.has(e.tagName)||e.isContentEditable===!0}var ky=new Set(["INPUT","SELECT","TEXTAREA"]);function Ly(e){return ky.has(e.tagName)||e.isContentEditable===!0}var bn=new WeakSet;function jl(e){return t=>{t.key==="Enter"&&e(t)}}function ea(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Fy=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=jl(()=>{if(bn.has(r))return;ea(r,"down");const i=jl(()=>{ea(r,"up")}),a=()=>ea(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Il(e){return ns(e)&&!Jf()}var Ml=new WeakSet;function Vy(e,t,r={}){const[n,i,a]=Qf(e,r),o=s=>{const l=s.currentTarget;if(!Il(s)||Ml.has(s))return;bn.add(l),r.stopPropagation&&Ml.add(s);const u=t(l,s),d=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),bn.has(l)&&bn.delete(l),Il(p)&&typeof u=="function"&&u(p,{success:m})},f=p=>{d(p,l===window||l===document||r.useGlobalTarget||eh(l,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),$n(s)&&(s.addEventListener("focus",l=>Fy(l,i)),!Ry(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function is(e){return tf(e)&&"ownerSVGElement"in e}var xn=new WeakMap,Sn,th=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:is(n)&&"getBBox"in n?n.getBBox()[t]:n[r],By=th("inline","width","offsetWidth"),Uy=th("block","height","offsetHeight");function Wy({target:e,borderBoxSize:t}){xn.get(e)?.forEach(r=>{r(e,{get width(){return By(e,t)},get height(){return Uy(e,t)}})})}function zy(e){e.forEach(Wy)}function Gy(){typeof ResizeObserver>"u"||(Sn=new ResizeObserver(zy))}function Hy(e,t){Sn||Gy();const r=Xf(e);return r.forEach(n=>{let i=xn.get(n);i||(i=new Set,xn.set(n,i)),i.add(t),Sn?.observe(n)}),()=>{r.forEach(n=>{const i=xn.get(n);i?.delete(t),i?.size||Sn?.unobserve(n)})}}var Cn=new Set,Ut;function Ky(){Ut=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Cn.forEach(t=>t(e))},window.addEventListener("resize",Ut)}function qy(e){return Cn.add(e),Ut||Ky(),()=>{Cn.delete(e),!Cn.size&&typeof Ut=="function"&&(window.removeEventListener("resize",Ut),Ut=void 0)}}function Dl(e,t){return typeof e=="function"?qy(e):Hy(e,t)}function Yy(e){return is(e)&&e.tagName==="svg"}var Xy=[...Kf,me,ze],Zy=e=>Xy.find(Hf(e)),Rl=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:Rl(),y:Rl()}),kl=()=>({min:0,max:0}),ge=()=>({x:kl(),y:kl()}),Jy=new WeakMap;function wi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sr(e){return typeof e=="string"||Array.isArray(e)}var as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],os=["initial",...as];function Pi(e){return wi(e.animate)||os.some(t=>Sr(e[t]))}function rh(e){return!!(Pi(e)||e.variants)}function Qy(e,t,r){for(const n in t){const i=t[n],a=r[n];if(Se(i))e.addValue(n,i);else if(Se(a))e.addValue(n,Zt(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(n);e.addValue(n,Zt(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}var Ya={current:null},nh={current:!1},eg=typeof window<"u";function tg(){if(nh.current=!0,!!eg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ya.current=e.matches;e.addEventListener("change",t),t()}else Ya.current=!1}var Ll=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Yn={};function ih(e){Yn=e}function rg(){return Yn}var ng=class{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Xo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=we.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,oe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Pi(t),this.isVariantNode=rh(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&Se(p)&&p.set(l[h])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,Jy.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,r)=>this.bindToMotionValue(r,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(nh.current||tg(),this.shouldReduceMotion=Ya.current),process.env.NODE_ENV!=="production"&&Bo(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ht(this.notifyUpdate),ht(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Lf.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:s,ease:l,duration:u}=t.accelerate,d=new Rf({element:this.current,name:e,keyframes:o,times:s,ease:l,duration:Ae(u)}),f=a(d);this.valueSubscriptions.set(e,()=>{f(),d.cancel()});return}const r=or.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&oe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Yn){const t=Yn[e];if(!t)continue;const{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ge()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;r<Ll.length;r++){const n=Ll[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Qy(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&t!==void 0&&(r=Zt(t===null?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(ef(r)||rf(r))?r=parseFloat(r):!Zy(r)&&ze.test(t)&&(r=Yf(e,t)),this.setBaseTarget(e,Se(r)?r.get():r)),Se(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let r;if(typeof t=="string"||typeof t=="object"){const i=Qo(this.props,t,this.presenceContext?.custom);i&&(r=i[e])}if(t&&r!==void 0)return r;const n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!Se(n)?n:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Vo),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){rs.render(this.render)}},ah=class extends ng{constructor(){super(...arguments),this.KeyframeResolver=Ay}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const r=e.style;return r?r[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Se(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}},vt=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function oh({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function ig({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ag(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function ta(e){return e===void 0||e===1}function Xa({scale:e,scaleX:t,scaleY:r}){return!ta(e)||!ta(t)||!ta(r)}function $t(e){return Xa(e)||sh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sh(e){return Fl(e.x)||Fl(e.y)}function Fl(e){return e&&e!=="0%"}function Xn(e,t,r){return r+t*(e-r)}function Vl(e,t,r,n,i){return i!==void 0&&(e=Xn(e,i,n)),Xn(e,r,n)+t}function Za(e,t=0,r=1,n,i){e.min=Vl(e.min,t,r,n,i),e.max=Vl(e.max,t,r,n,i)}function lh(e,{x:t,y:r}){Za(e.x,t.translate,t.scale,t.originPoint),Za(e.y,r.translate,r.scale,r.originPoint)}var Bl=.999999999999,Ul=1.0000000000001;function og(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=r[s],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Xe(e.x,-a.scroll.offset.x),Xe(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,lh(e,o)),n&&$t(a.latestValues)&&Nn(e,a.latestValues,a.layout?.layoutBox))}t.x<Ul&&t.x>Bl&&(t.x=1),t.y<Ul&&t.y>Bl&&(t.y=1)}function Xe(e,t){e.min+=t,e.max+=t}function Wl(e,t,r,n,i=.5){Za(e,t,r,ue(e.min,e.max,i),n)}function zl(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Nn(e,t,r){const n=r??e;Wl(e.x,zl(t.x,n.x),t.scaleX,t.scale,t.originX),Wl(e.y,zl(t.y,n.y),t.scaleY,t.scale,t.originY)}function ch(e,t){return oh(ag(e.getBoundingClientRect(),t))}function sg(e,t,r){const n=ch(e,r),{scroll:i}=t;return i&&(Xe(n.x,i.offset.x),Xe(n.y,i.offset.y)),n}var lg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cg=ar.length;function ug(e,t,r){let n="",i=!0;for(let a=0;a<cg;a++){const o=ar[a],s=e[o];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(o.startsWith("scale")?1:0);else{const u=parseFloat(s);l=o.startsWith("scale")?u===1:u===0}if(!l||r){const u=Zf(s,ts[o]);if(!l){i=!1;const d=lg[o]||o;n+=`${d}(${u}) `}r&&(t[o]=u)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function ss(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const u=t[l];if(or.has(l)){o=!0;continue}else if(gf(l)){i[l]=u;continue}else{const d=Zf(u,ts[l]);l.startsWith("origin")?(s=!0,a[l]=d):n[l]=d}}if(t.transform||(o||r?n.transform=ug(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:d=0}=a;n.transformOrigin=`${l} ${u} ${d}`}}function uh(e,{style:t,vars:r},n,i){const a=e.style;let o;for(o in t)a[o]=t[o];i?.applyProjectionStyles(a,n);for(o in r)a.setProperty(o,r[o])}function Gl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;return`${Gl(e,t.target.x)}% ${Gl(e,t.target.y)}%`}},dg={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=ze.parse(e);if(i.length>5)return n;const a=ze.createTransformer(e),o=typeof i[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=ue(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},Ja={borderRadius:{...cr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cr,borderTopRightRadius:cr,borderBottomLeftRadius:cr,borderBottomRightRadius:cr,boxShadow:dg};function dh(e,{layout:t,layoutId:r}){return or.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ja[e]||e==="opacity")}function ls(e,t,r){const n=e.style,i=t?.style,a={};if(!n)return a;for(const o in n)(Se(n[o])||i&&Se(i[o])||dh(o,e)||r?.getValue(o)?.liveStyle!==void 0)&&(a[o]=n[o]);return a}function fg(e){return window.getComputedStyle(e)}var hg=class extends ah{constructor(){super(...arguments),this.type="html",this.renderInstance=uh}readValueFromInstance(e,t){if(or.has(t))return this.projection?.isProjecting?La(t):jv(e,t);{const r=fg(e),n=(gf(t)?r.getPropertyValue(t):r[t])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ch(e,t)}build(e,t,r){ss(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return ls(e,t,r)}},pg={offset:"stroke-dashoffset",array:"stroke-dasharray"},mg={offset:"strokeDashoffset",array:"strokeDasharray"};function vg(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?pg:mg;e[a.offset]=`${-n}`,e[a.array]=`${t} ${r}`}var yg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fh(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,d){if(ss(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete f.transformBox);for(const p of yg)f[p]!==void 0&&(h[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&vg(f,i,a,o,!1)}var hh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ph=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gg(e,t,r,n){uh(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(hh.has(i)?i:es(i),t.attrs[i])}function mh(e,t,r){const n=ls(e,t,r);for(const i in e)if(Se(e[i])||Se(t[i])){const a=ar.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}var $g=class extends ah{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(or.has(t)){const r=qf(t);return r&&r.default||0}return t=hh.has(t)?t:es(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return mh(e,t,r)}build(e,t,r){fh(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){gg(e,t,r,n)}mount(e){this.isSVGTag=ph(e.tagName),super.mount(e)}},bg=os.length;function vh(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?vh(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<bg;r++){const n=os[r],i=e.props[n];(Sr(i)||i===!1)&&(t[n]=i)}return t}function yh(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var xg=[...as].reverse(),Sg=as.length;function Cg(e){return t=>Promise.all(t.map(({animation:r,options:n})=>by(e,r,n)))}function Ng(e){let t=Cg(e),r=Hl(),n=!0,i=!1;const a=u=>(d,f)=>{const h=Tt(e,f,u==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:m,...y}=h;d={...d,...y,...m}}return d};function o(u){t=u(e)}function s(u){const{props:d}=e,f=vh(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<Sg;g++){const b=xg[g],x=r[b],S=d[b]!==void 0?d[b]:f[b],E=Sr(S),C=b===u?x.isActive:null;C===!1&&(y=g);let _=S===f[b]&&S!==d[b]&&E;if(_&&(n||i)&&e.manuallyAnimateOnMount&&(_=!1),x.protectedKeys={...m},!x.isActive&&C===null||!S&&!x.prevProp||wi(S)||typeof S=="boolean")continue;if(b==="exit"&&x.isActive&&C!==!0){x.prevResolvedValues&&(m={...m,...x.prevResolvedValues});continue}const T=wg(x.prevProp,S);let M=T||b===u&&x.isActive&&!_&&E||g>y&&E,N=!1;const L=Array.isArray(S)?S:[S];let G=L.reduce(a(b),{});C===!1&&(G={});const{prevResolvedValues:R={}}=x,w={...R,...G},F=q=>{M=!0,p.has(q)&&(N=!0,p.delete(q)),x.needsAnimating[q]=!0;const Z=e.getValue(q);Z&&(Z.liveStyle=!1)};for(const q in w){const Z=G[q],ne=R[q];if(m.hasOwnProperty(q))continue;let $e=!1;za(Z)&&za(ne)?$e=!yh(Z,ne):$e=Z!==ne,$e?Z!=null?F(q):p.add(q):Z!==void 0&&p.has(q)?F(q):x.protectedKeys[q]=!0}x.prevProp=S,x.prevResolvedValues=G,x.isActive&&(m={...m,...G}),(n||i)&&e.blockInitialAnimation&&(M=!1);const W=_&&T;M&&(!W||N)&&h.push(...L.map(q=>{const Z={type:b};if(typeof q=="string"&&(n||i)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,$e=Tt(ne,q);if(ne.enteringChildren&&$e){const{delayChildren:D}=$e.transition||{};Z.delay=Ff(ne.enteringChildren,e,D)}}return{animation:q,options:Z}}))}if(p.size){const g={};if(typeof d.initial!="boolean"){const b=Tt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(g.transition=b.transition)}p.forEach(b=>{const x=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),g[b]=x??null}),h.push({animation:g})}let v=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,i=!1,v?t(h):Promise.resolve()}function l(u,d){if(r[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(u,d)),r[u].isActive=d;const f=s(u);for(const h in r)r[h].protectedKeys={};return f}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Hl(),i=!0}}}function wg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yh(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hl(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function Qa(e,t){e.min=t.min,e.max=t.max}function Ve(e,t){Qa(e.x,t.x),Qa(e.y,t.y)}function Kl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var gh=1e-4,Pg=1-gh,Eg=1+gh,$h=.01,Tg=0-$h,Og=0+$h;function Pe(e){return e.max-e.min}function _g(e,t,r){return Math.abs(e-t)<=r}function ql(e,t,r,n=.5){e.origin=n,e.originPoint=ue(t.min,t.max,e.origin),e.scale=Pe(r)/Pe(t),e.translate=ue(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Pg&&e.scale<=Eg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Tg&&e.translate<=Og||isNaN(e.translate))&&(e.translate=0)}function hr(e,t,r,n){ql(e.x,t.x,r.x,n?n.originX:void 0),ql(e.y,t.y,r.y,n?n.originY:void 0)}function Yl(e,t,r,n=0){e.min=(n?ue(r.min,r.max,n):r.min)+t.min,e.max=e.min+Pe(t)}function Ag(e,t,r,n){Yl(e.x,t.x,r.x,n?.x),Yl(e.y,t.y,r.y,n?.y)}function Xl(e,t,r,n=0){const i=n?ue(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+Pe(t)}function Zn(e,t,r,n){Xl(e.x,t.x,r.x,n?.x),Xl(e.y,t.y,r.y,n?.y)}function Zl(e,t,r,n,i){return e-=t,e=Xn(e,1/r,n),i!==void 0&&(e=Xn(e,1/i,n)),e}function jg(e,t=0,r=1,n=.5,i,a=e,o=e){if(Je.test(t)&&(t=parseFloat(t),t=ue(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=ue(a.min,a.max,n);e===a&&(s-=t),e.min=Zl(e.min,t,r,s,i),e.max=Zl(e.max,t,r,s,i)}function Jl(e,t,[r,n,i],a,o){jg(e,t[r],t[n],t[i],t.scale,a,o)}var Ig=["x","scaleX","originX"],Mg=["y","scaleY","originY"];function Ql(e,t,r,n){Jl(e.x,t,Ig,r?r.x:void 0,n?n.x:void 0),Jl(e.y,t,Mg,r?r.y:void 0,n?n.y:void 0)}function ec(e){return e.translate===0&&e.scale===1}function bh(e){return ec(e.x)&&ec(e.y)}function tc(e,t){return e.min===t.min&&e.max===t.max}function Dg(e,t){return tc(e.x,t.x)&&tc(e.y,t.y)}function rc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xh(e,t){return rc(e.x,t.x)&&rc(e.y,t.y)}function nc(e){return Pe(e.x)/Pe(e.y)}function ic(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ye(e){return[e("x"),e("y")]}function Rg(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=r?.z||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:m}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var Sh=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],kg=Sh.length,ac=e=>typeof e=="string"?parseFloat(e):e,oc=e=>typeof e=="number"||B.test(e);function Lg(e,t,r,n,i,a){i?(e.opacity=ue(0,r.opacity??1,Fg(n)),e.opacityExit=ue(t.opacity??1,0,Vg(n))):a&&(e.opacity=ue(t.opacity??1,r.opacity??1,n));for(let o=0;o<kg;o++){const s=Sh[o];let l=sc(t,s),u=sc(r,s);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||oc(l)===oc(u)?(e[s]=Math.max(ue(ac(l),ac(u),n),0),(Je.test(u)||Je.test(l))&&(e[s]+="%")):e[s]=u)}(t.rotate||r.rotate)&&(e.rotate=ue(t.rotate||0,r.rotate||0,n))}function sc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Fg=Ch(0,.5,ff),Vg=Ch(.5,.95,ke);function Ch(e,t,r){return n=>n<e?0:n>t?1:r(br(e,t,n))}function Bg(e,t,r){const n=Se(e)?e:Zt(e);return n.start(Jo("",n,t,r)),n.animation}function Cr(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}var Ug=(e,t)=>e.depth-t.depth,Wg=class{constructor(){this.children=[],this.isDirty=!1}add(e){Fo(this.children,e),this.isDirty=!0}remove(e){Gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ug),this.isDirty=!1,this.children.forEach(e)}};function zg(e,t){const r=we.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(ht(n),e(a-t))};return oe.setup(n,!0),()=>ht(n)}function wn(e){return Se(e)?e.get():e}var Gg=class{constructor(){this.members=[]}add(e){Fo(this.members,e);for(let t=this.members.length-1;t>=0;t--){const r=this.members[t];if(r===e||r===this.lead||r===this.prevLead)continue;const n=r.instance;(!n||n.isConnected===!1)&&!r.snapshot&&(Gn(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Gn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const r=this.members[t];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:n}=r.options,{layoutDependency:i}=e.options;(n===void 0||n!==i)&&(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Pn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bt={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ra=["","X","Y","Z"],Hg=1e3,Kg=0;function na(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Nh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=zf(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",oe,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Nh(n)}function wh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},s=t?.()){this.id=Kg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ze.value&&(bt.nodes=bt.calculatedTargetDeltas=bt.calculatedProjections=0),this.nodes.forEach(Xg),this.nodes.forEach(r2),this.nodes.forEach(n2),this.nodes.forEach(Zg),Ze.addProjectionMetrics&&Ze.addProjectionMetrics(bt)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wg)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Vo),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=is(o)&&!Yy(o),this.instance=o;const{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;oe.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,d&&d(),d=zg(h,250),Pn.hasAnimatedSinceResize&&(Pn.hasAnimatedSinceResize=!1,this.nodes.forEach(uc)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||l2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!xh(this.targetLayout,p),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Zo(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,b)}else f||uc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i2),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const s=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),s&&this.nodes.forEach(Qg),this.nodes.forEach(lc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(e2),this.nodes.forEach(t2),this.nodes.forEach(qg),this.nodes.forEach(Yg)):this.nodes.forEach(cc),this.clearAllSnapshots();const o=we.now();xe.delta=Qe(0,1e3/60,o-xe.timestamp),xe.timestamp=o,xe.isProcessing=!0,qi.update.process(xe),qi.preRender.process(xe),qi.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jg),this.sharedNodes.forEach(a2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pe(this.snapshot.measuredBox.x)&&!Pe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ge()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!bh(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||$t(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),c2(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return ge();const s=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u2))){const{scroll:l}=this.root;l&&(Xe(s.x,l.offset.x),Xe(s.y,l.offset.y))}return s}removeElementScroll(o){const s=ge();if(Ve(s,o),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Ve(s,o),Xe(s.x,d.offset.x),Xe(s.y,d.offset.y))}return s}applyTransform(o,s=!1,l){const u=l||ge();Ve(u,o);for(let d=0;d<this.path.length;d++){const f=this.path[d];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Xe(u.x,-f.scroll.offset.x),Xe(u.y,-f.scroll.offset.y)),$t(f.latestValues)&&Nn(u,f.latestValues,f.layout?.layoutBox)}return $t(this.latestValues)&&Nn(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const s=ge();Ve(s,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!$t(u.latestValues))continue;let d;u.instance&&(Xa(u.latestValues)&&u.updateSnapshot(),d=ge(),Ve(d,u.measurePageBox())),Ql(s,u.latestValues,u.snapshot?.layoutBox,d)}return $t(this.latestValues)&&Ql(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=xe.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ag(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ve(this.target,this.layout.layoutBox),lh(this.target,this.targetDelta)):Ve(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0),Ze.value&&bt.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Xa(this.parent.latestValues)||sh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,s,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),Zn(this.relativeTargetOrigin,s,l,this.options.layoutAnchor||void 0),Ve(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),s=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Ve(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;og(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ge());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Kl(this.prevProjectionDelta.x,this.projectionDelta.x),Kl(this.prevProjectionDelta.y,this.projectionDelta.y)),hr(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!ic(this.projectionDelta.x,this.prevProjectionDelta.x)||!ic(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Ze.value&&bt.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wt(),this.projectionDelta=Wt(),this.projectionDeltaWithTransform=Wt()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},f=Wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=ge(),p=(l?l.source:void 0)!==(this.layout?this.layout.source:void 0),m=this.getStack(),y=!m||m.members.length<=1,v=!!(p&&!y&&this.options.crossfade===!0&&!this.path.some(s2));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const x=b/1e3;dc(f.x,o.x,x),dc(f.y,o.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),o2(this.relativeTarget,this.relativeTargetOrigin,h,x),g&&Dg(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ge()),Ve(g,this.relativeTarget)),p&&(this.animationValues=d,Lg(d,u,this.latestValues,x,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{Pn.hasAnimatedSinceResize=!0,Pt.layout++,this.motionValue||(this.motionValue=Zt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Bg(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onStop:()=>{Pt.layout--},onComplete:()=>{Pt.layout--,o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:d}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&Ph(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ge();const f=Pe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Pe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Ve(s,l),Nn(s,d),hr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Gg),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&na("z",o,u,this.animationValues);for(let d=0;d<ra.length;d++)na(`rotate${ra[d]}`,o,u,this.animationValues),na(`skew${ra[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=wn(s?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=wn(s?.pointerEvents)||""),this.hasProjected&&!$t(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Rg(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),o.transform=f;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Ja){if(d[m]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:g}=Ja[m],b=f==="none"?d[m]:y(d[m],u);if(v){const x=v.length;for(let S=0;S<x;S++)o[v[S]]=b}else g?this.options.visualElement.renderState.vars[m]=b:o[m]=b}this.options.layoutId&&(o.pointerEvents=u===this?wn(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(lc),this.root.sharedNodes.clear()}}}function qg(e){e.updateLayout()}function Yg(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i==="size")Ye(d=>{const f=a?t.measuredBox[d]:t.layoutBox[d],h=Pe(f);f.min=r[d].min,f.max=f.min+h});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";Qa(a?t.measuredBox[d]:t.layoutBox[d],r[d])}else Ph(i,t.layoutBox,r)&&Ye(d=>{const f=a?t.measuredBox[d]:t.layoutBox[d],h=Pe(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const o=Wt();hr(o,r,t.layoutBox);const s=Wt();a?hr(s,e.applyTransform(n,!0),t.measuredBox):hr(s,r,t.layoutBox);const l=!bh(o);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=e.options.layoutAnchor||void 0,m=ge();Zn(m,t.layoutBox,f.layoutBox,p);const y=ge();Zn(y,r,h.layoutBox,p),xh(m,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Xg(e){Ze.value&&bt.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Zg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jg(e){e.clearSnapshot()}function lc(e){e.clearMeasurements()}function Qg(e){e.isLayoutDirty=!0,e.updateLayout()}function cc(e){e.isLayoutDirty=!1}function e2(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function t2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r2(e){e.resolveTargetDelta()}function n2(e){e.calcProjection()}function i2(e){e.resetSkewAndRotation()}function a2(e){e.removeLeadSnapshot()}function dc(e,t,r){e.translate=ue(t.translate,0,r),e.scale=ue(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function fc(e,t,r,n){e.min=ue(t.min,r.min,n),e.max=ue(t.max,r.max,n)}function o2(e,t,r,n){fc(e.x,t.x,r.x,n),fc(e.y,t.y,r.y,n)}function s2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var l2={duration:.45,ease:[.4,0,.1,1]},hc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pc=hc("applewebkit/")&&!hc("chrome/")?Math.round:ke;function mc(e){e.min=pc(e.min),e.max=pc(e.max)}function c2(e){mc(e.x),mc(e.y)}function Ph(e,t,r){return e==="position"||e==="preserve-aspect"&&!_g(nc(t),nc(r),.2)}function u2(e){return e!==e.root&&e.scroll?.wasRoot}var d2=wh({attachResizeListener:(e,t)=>Cr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ia={current:void 0},Eh=wh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ia.current){const e=new d2({});e.mount(window),e.setOptions({layoutScroll:!0}),ia.current=e}return ia.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cs=(0,$.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function f2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=vc(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():vc(e[i],null)}}}}function h2(...e){return $.useCallback(f2(...e),e)}var p2=class extends $.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if($n(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=t.offsetParent,n=$n(r)&&r.offsetWidth||0,i=$n(r)&&r.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}};function m2({children:e,isPresent:t,anchorX:r,anchorY:n,root:i,pop:a}){const o=(0,$.useId)(),s=(0,$.useRef)(null),l=(0,$.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=(0,$.useContext)(cs),d=h2(s,e.props?.ref??e?.ref);return(0,$.useInsertionEffect)(()=>{const{width:f,height:h,top:p,left:m,right:y,bottom:v}=l.current;if(t||a===!1||!s.current||!f||!h)return;const g=r==="left"?`left: ${m}`:`right: ${y}`,b=n==="bottom"?`bottom: ${v}`:`top: ${p}`;s.current.dataset.motionPopId=o;const x=document.createElement("style");u&&(x.nonce=u);const S=i??document.head;return S.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
16
|
-
[data-motion-pop-id="${o}"] {
|
|
17
|
-
position: absolute !important;
|
|
18
|
-
width: ${f}px !important;
|
|
19
|
-
height: ${h}px !important;
|
|
20
|
-
${g}px !important;
|
|
21
|
-
${b}px !important;
|
|
22
|
-
}
|
|
23
|
-
`),()=>{s.current?.removeAttribute("data-motion-pop-id"),S.contains(x)&&S.removeChild(x)}},[t]),(0,c.jsx)(p2,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var v2=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:l,root:u})=>{const d=Lo(y2),f=(0,$.useId)();let h=!0,p=(0,$.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:i,onExitComplete:m=>{d.set(m,!0);for(const y of d.values())if(!y)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[r,d,n]);return a&&h&&(p={...p}),(0,$.useMemo)(()=>{d.forEach((m,y)=>d.set(y,!1))},[r]),$.useEffect(()=>{!r&&!d.size&&n&&n()},[r]),e=(0,c.jsx)(m2,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:u,children:e}),(0,c.jsx)(Ci.Provider,{value:p,children:e})};function y2(){return new Map}function Th(e=!0){const t=(0,$.useContext)(Ci);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);const o=(0,$.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}var nn=e=>e.key||"";function yc(e){const t=[];return $.Children.forEach(e,r=>{(0,$.isValidElement)(r)&&t.push(r)}),t}var pt=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",anchorY:l="top",root:u})=>{const[d,f]=Th(o),h=(0,$.useMemo)(()=>yc(e),[e]),p=o&&!d?[]:h.map(nn),m=(0,$.useRef)(!0),y=(0,$.useRef)(h),v=Lo(()=>new Map),g=(0,$.useRef)(new Set),[b,x]=(0,$.useState)(h),[S,E]=(0,$.useState)(h);Qd(()=>{m.current=!1,y.current=h;for(let T=0;T<S.length;T++){const M=nn(S[T]);p.includes(M)?(v.delete(M),g.current.delete(M)):v.get(M)!==!0&&v.set(M,!1)}},[S,p.length,p.join("-")]);const C=[];if(h!==b){let T=[...h];for(let M=0;M<S.length;M++){const N=S[M],L=nn(N);p.includes(L)||(T.splice(M,0,N),C.push(N))}return a==="wait"&&C.length&&(T=C),E(yc(T)),x(h),null}process.env.NODE_ENV!=="production"&&a==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:_}=(0,$.useContext)(ko);return(0,c.jsx)(c.Fragment,{children:S.map(T=>{const M=nn(T),N=o&&!d?!1:h===S||p.includes(M),L=()=>{if(g.current.has(M))return;if(v.has(M))g.current.add(M),v.set(M,!0);else return;let G=!0;v.forEach(R=>{R||(G=!1)}),G&&(_?.(),E(y.current),o&&f?.(),n&&n())};return(0,c.jsx)(v2,{isPresent:N,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:N?void 0:L,anchorX:s,anchorY:l,children:T},M)})})},Oh=(0,$.createContext)({strict:!1}),gc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$c=!1;function g2(){if($c)return;const e={};for(const t in gc)e[t]={isEnabled:r=>gc[t].some(n=>!!r[n])};ih(e),$c=!0}function _h(){return g2(),rg()}function $2(e){const t=_h();for(const r in e)t[r]={...t[r],...e[r]};ih(t)}var b2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||b2.has(e)}var x2=Ku({default:()=>Ah}),Ah,S2=d0((()=>{throw Ah={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')})),jh=e=>!Jn(e);function C2(e){typeof e=="function"&&(jh=t=>t.startsWith("on")?!Jn(t):e(t))}try{C2((S2(),h0(x2)).default)}catch{}function N2(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||Se(e[i])||(jh(i)||r===!0&&Jn(i)||!t&&!Jn(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var Ei=(0,$.createContext)({});function w2(e,t){if(Pi(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Sr(r)?r:void 0,animate:Sr(n)?n:void 0}}return e.inherit!==!1?t:{}}function P2(e){const{initial:t,animate:r}=w2(e,(0,$.useContext)(Ei));return(0,$.useMemo)(()=>({initial:t,animate:r}),[bc(t),bc(r)])}function bc(e){return Array.isArray(e)?e.join(" "):e}var us=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ih(e,t,r){for(const n in t)!Se(t[n])&&!dh(n,r)&&(e[n]=t[n])}function E2({transformTemplate:e},t){return(0,$.useMemo)(()=>{const r=us();return ss(r,t,e),Object.assign({},r.vars,r.style)},[t])}function T2(e,t){const r=e.style||{},n={};return Ih(n,r,e),Object.assign(n,E2(e,t)),n}function O2(e,t){const r={},n=T2(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var Mh=()=>({...us(),attrs:{}});function _2(e,t,r,n){const i=(0,$.useMemo)(()=>{const a=Mh();return fh(a,t,ph(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Ih(a,e.style,e),i.style={...a,...i.style}}return i}var A2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ds(e){return typeof e!="string"||e.includes("-")?!1:!!(A2.indexOf(e)>-1||/[A-Z]/u.test(e))}function j2(e,t,r,{latestValues:n},i,a=!1,o){const s=(o??ds(e)?_2:O2)(t,n,i,e),l=N2(t,typeof e=="string",a),u=e!==$.Fragment?{...l,...s,ref:r}:{},{children:d}=t,f=(0,$.useMemo)(()=>Se(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function I2({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:M2(r,n,i,e),renderState:t()}}function M2(e,t,r,n){const i={},a=n(e,{});for(const h in a)i[h]=wn(a[h]);let{initial:o,animate:s}=e;const l=Pi(e),u=rh(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=r?r.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!wi(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=Qo(e,h[p]);if(m){const{transitionEnd:y,transition:v,...g}=m;for(const b in g){let x=g[b];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(i[b]=x)}for(const b in y)i[b]=y[b]}}}return i}var Dh=e=>(t,r)=>{const n=(0,$.useContext)(Ei),i=(0,$.useContext)(Ci),a=()=>I2(e,t,n,i);return r?a():Lo(a)},D2=Dh({scrapeMotionValuesFromProps:ls,createRenderState:us}),R2=Dh({scrapeMotionValuesFromProps:mh,createRenderState:Mh}),k2=Symbol.for("motionComponentSymbol");function L2(e,t,r){const n=(0,$.useRef)(r);(0,$.useInsertionEffect)(()=>{n.current=r});const i=(0,$.useRef)(null);return(0,$.useCallback)(a=>{a&&e.onMount?.(a);const o=n.current;if(typeof o=="function")if(a){const s=o(a);typeof s=="function"&&(i.current=s)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a);t&&(a?t.mount(a):t.unmount())},[t])}var Rh=(0,$.createContext)({});function Lt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F2(e,t,r,n,i,a){const{visualElement:o}=(0,$.useContext)(Ei),s=(0,$.useContext)(Oh),l=(0,$.useContext)(Ci),u=(0,$.useContext)(cs),d=u.reducedMotion,f=u.skipAnimations,h=(0,$.useRef)(null),p=(0,$.useRef)(!1);n=n||s.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:o,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=(0,$.useContext)(Rh);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&V2(h.current,r,i,y);const v=(0,$.useRef)(!1);(0,$.useInsertionEffect)(()=>{m&&v.current&&m.update(r,l)});const g=r[Wf],b=(0,$.useRef)(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Qd(()=>{p.current=!0,m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),(0,$.useEffect)(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),b.current=!1),m.enteringChildren=void 0)}),m}function V2(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:kh(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Lt(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:d})}function kh(e){if(e)return e.options.allowProjection!==!1?e.projection:kh(e.parent)}function aa(e,{forwardMotionProps:t=!1,type:r}={},n,i){n&&$2(n);const a=r?r==="svg":ds(e),o=a?R2:D2;function s(u,d){let f;const h={...(0,$.useContext)(cs),...u,layoutId:B2(u)},{isStatic:p}=h,m=P2(u),y=o(u,p);if(!p&&typeof window<"u"){U2(h,n);const v=W2(h);f=v.MeasureLayout,m.visualElement=F2(e,y,h,i,v.ProjectionNode,a)}return(0,c.jsxs)(Ei.Provider,{value:m,children:[f&&m.visualElement?(0,c.jsx)(f,{visualElement:m.visualElement,...h}):null,j2(e,u,L2(y,m.visualElement,d),y,p,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=(0,$.forwardRef)(s);return l[k2]=e,l}function B2({layoutId:e}){const t=(0,$.useContext)(ko).id;return t&&e!==void 0?t+"-"+e:e}function U2(e,t){const r=(0,$.useContext)(Oh).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?nr(!1,n,"lazy-strict-mode"):at(!1,n,"lazy-strict-mode")}}function W2(e){const{drag:t,layout:r}=_h();if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function z2(e,t){if(typeof Proxy>"u")return aa;const r=new Map,n=(a,o)=>aa(a,o,e,t),i=(a,o)=>(process.env.NODE_ENV!=="production"&&Bo(!1,"motion() is deprecated. Use motion.create() instead."),n(a,o));return new Proxy(i,{get:(a,o)=>o==="create"?n:(r.has(o)||r.set(o,aa(o,void 0,e,t)),r.get(o))})}var G2=(e,t)=>t.isSVG??ds(e)?new $g(t):new hg(t,{allowProjection:e!==$.Fragment}),H2=class extends vt{constructor(e){super(e),e.animationState||(e.animationState=Ng(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();wi(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},K2=0,q2=class extends vt{constructor(){super(...arguments),this.id=K2++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const o=Tt(this.node,i,a);if(o){const{transition:s,transitionEnd:l,...u}=o;for(const d in u)this.node.getValue(d)?.jump(u[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},Y2={animation:{Feature:H2},exit:{Feature:q2}};function Kr(e){return{point:{x:e.pageX,y:e.pageY}}}var X2=e=>t=>ns(t)&&e(t,Kr(t));function pr(e,t,r,n){return Cr(e,t,X2(r),n)}var Lh=({current:e})=>e?e.ownerDocument.defaultView:null,xc=(e,t)=>Math.abs(e-t);function Z2(e,t){const r=xc(e.x,t.x),n=xc(e.y,t.y);return Math.sqrt(r**2+n**2)}var Sc=new Set(["auto","scroll"]),Fh=class{constructor(e,t,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=an(this.lastRawMoveEventInfo,this.transformPagePoint));const f=oa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=Z2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:m}=f,{timestamp:y}=xe;this.history.push({...m,timestamp:y});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=an(h,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=oa(f.type==="pointercancel"?this.lastMoveEventInfo:an(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),m&&m(f,v)},!ns(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=n||window;const s=an(Kr(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=xe;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=t;d&&d(e,oa(s,this.history)),this.removeListeners=zr(pr(this.contextWindow,"pointermove",this.handlePointerMove),pr(this.contextWindow,"pointerup",this.handlePointerUp),pr(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);(Sc.has(r.overflowX)||Sc.has(r.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:n.x-t.x,y:n.y-t.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,n),oe.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ht(this.updatePoint)}};function an(e,t){return t?{point:t(e.point)}:e}function Cc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oa({point:e},t){return{point:e,delta:Cc(e,Vh(t)),offset:Cc(e,J2(t)),velocity:Q2(t,.1)}}function J2(e){return e[0]}function Vh(e){return e[e.length-1]}function Q2(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Vh(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Ae(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>Ae(t)*2&&(n=e[1]);const a=Re(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function e3(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?ue(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?ue(r,e,n.max):Math.min(e,r)),e}function Nc(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function t3(e,{top:t,left:r,bottom:n,right:i}){return{x:Nc(e.x,r,i),y:Nc(e.y,t,n)}}function wc(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function r3(e,t){return{x:wc(e.x,t.x),y:wc(e.y,t.y)}}function n3(e,t){let r=.5;const n=Pe(e),i=Pe(t);return i>n?r=br(t.min,t.max-n,e.min):n>i&&(r=br(e.min,e.max-i,t.min)),Qe(0,1,r)}function i3(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var eo=.35;function a3(e=eo){return e===!1?e=0:e===!0&&(e=eo),{x:Pc(e,"left","right"),y:Pc(e,"top","bottom")}}function Pc(e,t,r){return{min:Ec(e,t),max:Ec(e,r)}}function Ec(e,t){return typeof e=="number"?e:e[t]||0}var o3=new WeakMap,s3=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=d=>{t&&this.snapToCursor(Kr(d).point),this.stopAnimation()},a=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jy(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ye(v=>{let g=this.getAxisMotionValue(v).get()||0;if(Je.test(g)){const{projection:b}=this.visualElement;if(b&&b.layout){const x=b.layout.layoutBox[v];x&&(g=Pe(x)*(parseFloat(g)/100))}}this.originPoint[v]=g}),m&&oe.update(()=>m(d,f),!1,!0),Ga(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=c3(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&oe.update(()=>y(d,f),!1,!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Fh(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Lh(this.visualElement),element:this.visualElement.current})}stop(e,t){const r=e||this.latestPointerEvent,n=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!n||!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&oe.postRender(()=>o(r,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!on(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=e3(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&Lt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=t3(r.layoutBox,e):this.constraints=!1,this.elastic=a3(t),n!==this.constraints&&!Lt(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ye(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=i3(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Lt(e))return!1;const r=e.current;at(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=sg(r,n.root,this.visualElement.getTransformPagePoint());let a=r3(n.layout.layoutBox,i);if(t){const o=t(ig(a));this.hasMutatedConstraints=!!o,o&&(a=oh(o))}return a}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=Ye(u=>{if(!on(u,t,this.currentDirection))return;let d=s&&s[u]||{};(a===!0||a===u)&&(d={min:0,max:0});const f=n?200:1e6,h=n?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return Ga(this.visualElement,e),r.start(Jo(e,r,0,t,this.visualElement,!1))}stopAnimation(){Ye(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Ye(t=>{const{drag:r}=this.getProps();if(!on(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){const{min:a,max:o}=n.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-ue(a,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Lt(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};Ye(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const s=o.get();n[a]=n3({min:s,max:s},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ye(a=>{if(!on(a,e,null))return;const o=this.getAxisMotionValue(a),{min:s,max:l}=this.constraints[a];o.set(ue(s,l,n[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;o3.set(this.visualElement,this);const e=this.visualElement.current,t=pr(e,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=l.target,h=f!==e&&Ly(f);u&&d&&!h&&this.start(l)});let r;const n=()=>{const{dragConstraints:l}=this.getProps();Lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=l3(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),oe.read(n);const o=Cr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ye(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:a=eo,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Tc(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function l3(e,t,r){const n=Dl(e,Tc(r)),i=Dl(t,Tc(r));return()=>{n(),i()}}function on(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function c3(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var u3=class extends vt{constructor(e){super(e),this.removeGroupControls=ke,this.removeListeners=ke,this.controls=new s3(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ke}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},sa=e=>(t,r)=>{e&&oe.update(()=>e(t,r),!1,!0)},d3=class extends vt{constructor(){super(...arguments),this.removePointerDownListener=ke}onPointerDown(e){this.session=new Fh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lh(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:sa(e),onStart:sa(t),onMove:sa(r),onEnd:(i,a)=>{delete this.session,n&&oe.postRender(()=>n(i,a))}}}mount(){this.removePointerDownListener=pr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},la=!1,f3=class extends $.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),la&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Pn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),la=!0,n||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||oe.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=t,r.root.didUpdate(),rs.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;la=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Bh(e){const[t,r]=Th(),n=(0,$.useContext)(ko);return(0,c.jsx)(f3,{...e,layoutGroup:n,switchLayoutGroup:(0,$.useContext)(Rh),isPresent:t,safeToRemove:r})}var h3={pan:{Feature:d3},drag:{Feature:u3,ProjectionNode:Eh,MeasureLayout:Bh}};function Oc(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i=n["onHover"+r];i&&oe.postRender(()=>i(t,Kr(t)))}var p3=class extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=My(e,(t,r)=>(Oc(this.node,r,"Start"),n=>Oc(this.node,n,"End"))))}unmount(){}},m3=class extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zr(Cr(this.node.current,"focus",()=>this.onFocus()),Cr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function _c(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i=n["onTap"+(r==="End"?"":r)];i&&oe.postRender(()=>i(t,Kr(t)))}var v3=class extends vt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=Vy(e,(n,i)=>(_c(this.node,i,"Start"),(a,{success:o})=>_c(this.node,a,o?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:r?.tap===!1})}unmount(){}},to=new WeakMap,ca=new WeakMap,y3=e=>{const t=to.get(e.target);t&&t(e)},g3=e=>{e.forEach(y3)};function $3({root:e,...t}){const r=e||document;ca.has(r)||ca.set(r,{});const n=ca.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(g3,{root:e,...t})),n[i]}function b3(e,t,r){const n=$3(t);return to.set(e,r),n.observe(e),()=>{to.delete(e),n.unobserve(e)}}var x3={some:0,all:1},S3=class extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:x3[n]},o=s=>{const{isIntersecting:l}=s;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=l?u:d;f&&f(s)};this.stopObserver=b3(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(C3(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function C3({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var N3={inView:{Feature:S3},tap:{Feature:v3},focus:{Feature:m3},hover:{Feature:p3}},w3={layout:{ProjectionNode:Eh,MeasureLayout:Bh}},P3={...Y2,...N3,...h3,...w3},Ke=z2(P3,G2),Uh=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),E3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Ac=e=>{const t=T3(e);return t.charAt(0).toUpperCase()+t.slice(1)},ua={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"},O3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},_3=(0,$.createContext)({}),A3=()=>(0,$.useContext)(_3),j3=(0,$.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:p=""}=A3()??{},m=n??f?Number(r??d)*24/Number(t??u):r??d;return(0,$.createElement)("svg",{ref:l,...ua,width:t??u??ua.width,height:t??u??ua.height,stroke:e??h,strokeWidth:m,className:Uh("lucide",p,i),...!a&&!O3(s)&&{"aria-hidden":"true"},...s},[...o.map(([y,v])=>(0,$.createElement)(y,v)),...Array.isArray(a)?a:[a]])}),ae=(e,t)=>{const r=(0,$.forwardRef)(({className:n,...i},a)=>(0,$.createElement)(j3,{ref:a,iconNode:t,className:Uh(`lucide-${E3(Ac(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Ac(e),r},I3=[["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"}]],M3=ae("calendar-1",I3),D3=[["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"}]],R3=ae("calendar-days",D3),k3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fs=ae("check",k3),L3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wh=ae("chevron-down",L3),F3=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Qn=ae("chevron-left",F3),V3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],It=ae("chevron-right",V3),B3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ro=ae("circle-check",B3),U3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],qr=ae("clock-3",U3),W3=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],z3=ae("credit-card",W3),G3=[["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"}]],zh=ae("dollar-sign",G3),H3=[["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"}]],K3=ae("euro",H3),q3=[["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"}]],Y3=ae("indian-rupee",q3),X3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Gh=ae("info",X3),Z3=[["path",{d:"M5 12h14",key:"1ays0h"}]],Hh=ae("minus",Z3),J3=[["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"}]],Q3=ae("moon",J3),e$=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],jc=ae("move-left",e$),t$=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],r$=ae("move-right",t$),n$=[["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"}]],hs=ae("package-2",n$),i$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ps=ae("plus",i$),a$=[["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"}]],o$=ae("pound-sterling",a$),s$=[["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"}]],l$=ae("rotate-cw",s$),c$=[["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"}]],Kh=ae("scissors",c$),u$=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ms=ae("search",u$),d$=[["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"}]],f$=ae("store",d$),h$=[["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"}]],p$=ae("sun",h$),m$=[["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"}]],v$=ae("sunrise",m$),y$=[["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"}]],qh=ae("user",y$),g$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sr=ae("x",g$),$$={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}},b$=({status:e})=>(0,c.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),x$=({item:e,onSelect:t,selected:r})=>(0,c.jsxs)("div",{className:`aaravpos-outlet-card
|
|
13
|
+
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),d||(y.measureTime(()=>{const $=mr(f.getState(),"",t,r,i,u);if($){const{keyPath:g,value:h}=$;console.error(`A non-serializable value was detected in the state, in the path: \`${g}\`. Value:`,h,`
|
|
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()),v}}}function Wt(e){return typeof e=="boolean"}var Xl=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new aa;if(r&&(Wt(r)?s.push(Wl):s.push(ql(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let d={};Wt(n)||(d=n),s.unshift(Qo(d))}if(a){let d={};Wt(a)||(d=a),s.push(ts(d))}if(i){let d={};Wt(i)||(d=i),s.unshift(Ko(d))}}return s},oa="RTK_autoBatch",Jl=()=>e=>({payload:e,meta:{[oa]:!0}}),Qa=e=>t=>{setTimeout(t,e)},rs=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,i=!1,s=!1;const d=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Qa(10):e.type==="callback"?e.queueNotification:Qa(e.timeout),c=()=>{s=!1,i&&(i=!1,d.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>a&&u(),p=n.subscribe(f);return d.add(u),()=>{p(),d.delete(u)}},dispatch(u){try{return a=!u?.meta?.[oa],i=!a,i&&(s||(s=!0,l(c))),n.dispatch(u)}finally{a=!0}}})},Ql=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new aa(e);return n&&a.push(rs(typeof n=="object"?n:void 0)),a};function ns(e){const t=Xl(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:d=void 0}=e||{};let l;if(typeof r=="function")l=r;else if((0,$e.isPlainObject)(r))l=(0,$e.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?Y(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"?Y(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"?Y(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"?Y(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let y=new Set;c.forEach($=>{if(y.has($))throw new Error(process.env.NODE_ENV==="production"?Y(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");y.add($)})}let u=$e.compose;a&&(u=Hl({trace:process.env.NODE_ENV!=="production",...typeof a=="object"&&a}));const f=(0,$e.applyMiddleware)(...c),p=Ql(f);if(process.env.NODE_ENV!=="production"&&d&&typeof d!="function")throw new Error(process.env.NODE_ENV==="production"?Y(5):"`enhancers` field must be a callback");let m=typeof d=="function"?d(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(m))throw new Error(process.env.NODE_ENV==="production"?Y(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"?Y(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 v=u(...m);return(0,$e.createStore)(l,s,v)}function as(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"?Y(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Y(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const d=typeof i=="string"?i:i.type;if(!d)throw new Error(process.env.NODE_ENV==="production"?Y(28):"`builder.addCase` cannot be called with an empty action type");if(d in t)throw new Error(process.env.NODE_ENV==="production"?Y(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${d}'`);return t[d]=s,a},addAsyncThunk(i,s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Y(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"?Y(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"?Y(31):"`builder.addDefaultCase` can only be called once");return n=i,a}};return e(a),[t,r,n]}function ec(e){return typeof e=="function"}function is(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Y(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]=as(t),i;if(ec(e))i=()=>Ja(e());else{const d=Ja(e);i=()=>d}function s(d=i(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[a]),c.reduce((u,f)=>{if(f)if(be(u)){const p=f(u,l);return p===void 0?u:p}else{if(Ee(u))return Br(u,p=>f(p,l));{const p=f(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},d)}return s.getInitialState=i,s}var os=(e,t)=>Wo(e)?e.match(t):e(t);function ft(...e){return t=>e.some(r=>os(r,t))}function hr(...e){return t=>e.every(r=>os(r,t))}function Vr(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 kt(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ss(...e){return e.length===0?t=>Vr(t,["pending"]):kt(e)?ft(...e.map(t=>t.pending)):ss()(e[0])}function vr(...e){return e.length===0?t=>Vr(t,["rejected"]):kt(e)?ft(...e.map(t=>t.rejected)):vr()(e[0])}function ds(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?hr(vr(...e),t):kt(e)?hr(vr(...e),t):ds()(e[0])}function ls(...e){return e.length===0?t=>Vr(t,["fulfilled"]):kt(e)?ft(...e.map(t=>t.fulfilled)):ls()(e[0])}function cs(...e){return e.length===0?t=>Vr(t,["pending","fulfilled","rejected"]):kt(e)?ft(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):cs()(e[0])}var tc="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rt=(e=21)=>{let t="",r=e;for(;r--;)t+=tc[Math.random()*64|0];return t},rc=["name","message","stack","code"],on=class{constructor(e,t){this.payload=e,this.meta=t}_type},ei=class{constructor(e,t){this.payload=e,this.meta=t}_type},us=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of rc)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ti="External signal was aborted",zr=(()=>{function e(t,r,n){const a=_e(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),i=_e(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=_e(t+"/rejected",(l,c,u,f,p)=>({payload:f,error:(n&&n.serializeError||us)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function d(l,{signal:c}={}){return(u,f,p)=>{const m=n?.idGenerator?n.idGenerator(l):Rt(),v=new AbortController;let y,$;function g(x){$=x,v.abort()}c&&(c.aborted?g(ti):c.addEventListener("abort",()=>g(ti),{once:!0}));const h=(async function(){let x;try{let P=n?.condition?.(l,{getState:f,extra:p});if(nc(P)&&(P=await P),P===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const b=new Promise((N,E)=>{y=()=>{E({name:"AbortError",message:$||"Aborted"})},v.signal.addEventListener("abort",y,{once:!0})});u(i(m,l,n?.getPendingMeta?.({requestId:m,arg:l},{getState:f,extra:p}))),x=await Promise.race([b,Promise.resolve(r(l,{dispatch:u,getState:f,extra:p,requestId:m,signal:v.signal,abort:g,rejectWithValue:(N,E)=>new on(N,E),fulfillWithValue:(N,E)=>new ei(N,E)})).then(N=>{if(N instanceof on)throw N;return N instanceof ei?a(N.payload,m,l,N.meta):a(N,m,l)})])}catch(P){x=P instanceof on?s(null,m,l,P.payload,P.meta):s(P,m,l)}finally{y&&v.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&s.match(x)&&x.meta.condition||u(x),x})();return Object.assign(h,{abort:g,requestId:m,arg:l,unwrap(){return h.then(fs)}})}}return Object.assign(d,{pending:i,rejected:s,fulfilled:a,settled:ft(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function fs(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function nc(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ps=Symbol.for("rtk-slice-createasyncthunk"),ac={[ps]:zr},ms=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(ms||{});function ic(e,t){return`${e}/${t}`}function hs({creators:e}={}){const t=e?.asyncThunk?.[ps];return function(n){const{name:a,reducerPath:i=a}=n;if(!a)throw new Error(process.env.NODE_ENV==="production"?Y(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(sc()):n.reducers)||{},d=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,P){const b=typeof x=="string"?x:x.type;if(!b)throw new Error(process.env.NODE_ENV==="production"?Y(12):"`context.addCase` cannot be called with an empty action type");if(b in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Y(13):"`context.addCase` cannot be called with two reducers for the same action type: "+b);return l.sliceCaseReducersByType[b]=P,c},addMatcher(x,P){return l.sliceMatchers.push({matcher:x,reducer:P}),c},exposeAction(x,P){return l.actionCreators[x]=P,c},exposeCaseReducer(x,P){return l.sliceCaseReducersByName[x]=P,c}};d.forEach(x=>{const P=s[x],b={reducerName:x,type:ic(a,x),createNotation:typeof n.reducers=="function"};lc(P)?uc(b,P,c,t):dc(b,P,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Y(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[x={},P=[],b=void 0]=typeof n.extraReducers=="function"?as(n.extraReducers):[n.extraReducers],N={...x,...l.sliceCaseReducersByType};return is(n.initialState,E=>{for(let A in N)E.addCase(A,N[A]);for(let A of l.sliceMatchers)E.addMatcher(A.matcher,A.reducer);for(let A of P)E.addMatcher(A.matcher,A.reducer);b&&E.addDefaultCase(b)})}const f=x=>x,p=new Map,m=new WeakMap;let v;function y(x,P){return v||(v=u()),v(x,P)}function $(){return v||(v=u()),v.getInitialState()}function g(x,P=!1){function b(E){let A=E[x];if(typeof A>"u"){if(P)A=Ge(m,b,$);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Y(15):"selectSlice returned undefined for an uninjected slice reducer")}return A}function N(E=f){return Ge(Ge(p,P,()=>new WeakMap),E,()=>{const A={};for(const[z,Z]of Object.entries(n.selectors??{}))A[z]=oc(Z,E,()=>Ge(m,E,$),P);return A})}return{reducerPath:x,getSelectors:N,get selectors(){return N(b)},selectSlice:b}}const h={name:a,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:$,...g(i),injectInto(x,{reducerPath:P,...b}={}){const N=P??i;return x.inject({reducerPath:N,reducer:y},b),{...h,...g(N,!0)}}};return h}}function oc(e,t,r,n){function a(i,...s){let d=t(i);if(typeof d>"u"){if(n)d=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Y(16):"selectState returned undefined for an uninjected slice reducer")}return e(d,...s)}return a.unwrapped=e,a}var Ye=hs();function sc(){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 dc({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!cc(n))throw new Error(process.env.NODE_ENV==="production"?Y(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?_e(e,s):_e(e))}function lc(e){return e._reducerDefinitionType==="asyncThunk"}function cc(e){return e._reducerDefinitionType==="reducerWithPrepare"}function uc({type:e,reducerName:t},r,n,a){if(!a)throw new Error(process.env.NODE_ENV==="production"?Y(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:d,rejected:l,settled:c,options:u}=r,f=a(e,i,u);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),d&&n.addCase(f.pending,d),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:s||qt,pending:d||qt,rejected:l||qt,settled:c||qt})}function qt(){}function fc(){return{ids:[],entities:{}}}function pc(e){function t(r={},n){const a=Object.assign(fc(),r);return n?e.setAll(a,n):a}return{getInitialState:t}}function mc(){function e(t,r={}){const{createSelector:n=Go}=r,a=f=>f.ids,i=f=>f.entities,s=n(a,i,(f,p)=>f.map(m=>p[m])),d=(f,p)=>p,l=(f,p)=>f[p],c=n(a,f=>f.length);if(!t)return{selectIds:a,selectEntities:i,selectAll:s,selectTotal:c,selectById:n(i,d,l)};const u=n(t,i);return{selectIds:n(t,a),selectEntities:u,selectAll:n(t,s),selectTotal:n(t,c),selectById:n(u,d,l)}}return{getSelectors:e}}var hc=be;function vc(e){const t=se((r,n)=>e(n));return function(n){return t(n,void 0)}}function se(e){return function(r,n){function a(s){return Ho(s)}const i=s=>{a(n)?e(n.payload,s):e(n,s)};return hc(r)?(i(r),r):Br(r,i)}}function tt(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 Be(e){return Array.isArray(e)||(e=Object.values(e)),e}function er(e){return be(e)?Lr(e):e}function vs(e,t,r){e=Be(e);const n=er(r.ids),a=new Set(n),i=[],s=new Set([]),d=[];for(const l of e){const c=tt(l,t);a.has(c)||s.has(c)?d.push({id:c,changes:l}):(s.add(c),i.push(l))}return[i,d,n]}function ys(e){function t(v,y){const $=tt(v,e);$ in y.entities||(y.ids.push($),y.entities[$]=v)}function r(v,y){v=Be(v);for(const $ of v)t($,y)}function n(v,y){const $=tt(v,e);$ in y.entities||y.ids.push($),y.entities[$]=v}function a(v,y){v=Be(v);for(const $ of v)n($,y)}function i(v,y){v=Be(v),y.ids=[],y.entities={},r(v,y)}function s(v,y){return d([v],y)}function d(v,y){let $=!1;v.forEach(g=>{g in y.entities&&(delete y.entities[g],$=!0)}),$&&(y.ids=y.ids.filter(g=>g in y.entities))}function l(v){Object.assign(v,{ids:[],entities:{}})}function c(v,y,$){const g=$.entities[y.id];if(g===void 0)return!1;const h=Object.assign({},g,y.changes),x=tt(h,e),P=x!==y.id;return P&&(v[y.id]=x,delete $.entities[y.id]),$.entities[x]=h,P}function u(v,y){return f([v],y)}function f(v,y){const $={},g={};v.forEach(h=>{h.id in y.entities&&(g[h.id]={id:h.id,changes:{...g[h.id]?.changes,...h.changes}})}),v=Object.values(g),v.length>0&&v.filter(h=>c($,h,y)).length>0&&(y.ids=Object.values(y.entities).map(h=>tt(h,e)))}function p(v,y){return m([v],y)}function m(v,y){const[$,g]=vs(v,e,y);r($,y),f(g,y)}return{removeAll:vc(l),addOne:se(t),addMany:se(r),setOne:se(n),setMany:se(a),setAll:se(i),updateOne:se(u),updateMany:se(f),upsertOne:se(p),upsertMany:se(m),removeOne:se(s),removeMany:se(d)}}function yc(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 $c(e,t,r){const n=yc(e,t,r);return e.splice(n,0,t),e}function gc(e,t){const{removeOne:r,removeMany:n,removeAll:a}=ys(e);function i($,g){return s([$],g)}function s($,g,h){$=Be($);const x=new Set(h??er(g.ids)),P=new Set,b=$.filter(N=>{const E=tt(N,e),A=!P.has(E);return A&&P.add(E),!x.has(E)&&A});b.length!==0&&y(g,b)}function d($,g){return l([$],g)}function l($,g){let h={};if($=Be($),$.length!==0){for(const x of $){const P=e(x);h[P]=x,delete g.entities[P]}$=Be(h),y(g,$)}}function c($,g){$=Be($),g.entities={},g.ids=[],s($,g,[])}function u($,g){return f([$],g)}function f($,g){let h=!1,x=!1;for(let P of $){const b=g.entities[P.id];if(!b)continue;h=!0,Object.assign(b,P.changes);const N=e(b);if(P.id!==N){x=!0,delete g.entities[P.id];const E=g.ids.indexOf(P.id);g.ids[E]=N,g.entities[N]=b}}h&&y(g,[],h,x)}function p($,g){return m([$],g)}function m($,g){const[h,x,P]=vs($,e,g);h.length&&s(h,g,P),x.length&&f(x,g)}function v($,g){if($.length!==g.length)return!1;for(let h=0;h<$.length;h++)if($[h]!==g[h])return!1;return!0}const y=($,g,h,x)=>{const P=er($.entities),b=er($.ids),N=$.entities;let E=b;x&&(E=new Set(b));let A=[];for(const ae of E){const ie=P[ae];ie&&A.push(ie)}const z=A.length===0;for(const ae of g)N[e(ae)]=ae,z||$c(A,ae,t);z?A=g.slice().sort(t):h&&A.sort(t);const Z=A.map(e);v(b,Z)||($.ids=Z)};return{removeOne:r,removeMany:n,removeAll:a,addOne:se(i),updateOne:se(u),upsertOne:se(p),setOne:se(d),setMany:se(l),setAll:se(c),addMany:se(s),updateMany:se(f),upsertMany:se(m)}}function bc(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:s=>s.id,...e},n=r?gc(t,r):ys(t),a=pc(n),i=mc();return{selectId:t,sortComparer:r,...a,...i,...n}}var Nc="task",$s="listener",gs="completed",sa="cancelled",Sc=`task-${sa}`,Cc=`task-${gs}`,In=`${$s}-${sa}`,xc=`${$s}-${gs}`,Ft=class{constructor(e){this.code=e,this.message=`${Nc} ${sa} (reason: ${e})`}name="TaskAbortError";message},da=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Y(32):`${t} is not a function`)},yr=()=>{},bs=(e,t=yr)=>(e.catch(t),e),Ns=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),We=e=>{if(e.aborted)throw new Ft(e.reason)};function Ss(e,t){let r=yr;return new Promise((n,a)=>{const i=()=>a(new Ft(e.reason));if(e.aborted){i();return}r=Ns(e,i),t.finally(()=>r()).then(n,a)}).finally(()=>{r=yr})}var Pc=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ft?"cancelled":"rejected",error:r}}finally{t?.()}},$r=e=>t=>bs(Ss(e,t).then(r=>(We(e),r))),Cs=e=>{const t=$r(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:nt}=Object,ri={},Lt="listenerMiddleware",wc=(e,t)=>{const r=n=>Ns(e,()=>n.abort(e.reason));return(n,a)=>{da(n,"taskExecutor");const i=new AbortController;r(i);const s=Pc(async()=>{We(e),We(i.signal);const d=await n({pause:$r(i.signal),delay:Cs(i.signal),signal:i.signal});return We(i.signal),d},()=>i.abort(Cc));return a?.autoJoin&&t.push(s.catch(yr)),{result:$r(e)(s),cancel(){i.abort(Sc)}}}},_c=(e,t)=>{const r=async(n,a)=>{We(t);let i=()=>{};const s=[new Promise((d,l)=>{let c=e({predicate:n,effect:(u,f)=>{f.unsubscribe(),d([u,f.getState(),f.getOriginalState()])}});i=()=>{c(),l()}})];a!=null&&s.push(new Promise(d=>setTimeout(d,a,null)));try{const d=await Ss(t,Promise.race(s));return We(t),d}finally{i()}};return(n,a)=>bs(r(n,a))},xs=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:i}=e;if(t)a=_e(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"?Y(21):"Creating or removing a listener requires one of the known fields for matching an action");return da(i,"options.listener"),{predicate:a,type:t,effect:i}},Ps=nt(e=>{const{type:t,predicate:r,effect:n}=xs(e);return{id:Rt(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Y(22):"Unsubscribe not initialized")}}},{withTypes:()=>Ps}),ni=(e,t)=>{const{type:r,effect:n,predicate:a}=xs(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===a)&&i.effect===n)},Tn=e=>{e.pending.forEach(t=>{t.abort(In)})},Oc=(e,t)=>()=>{for(const r of t.keys())Tn(r);e.clear()},ai=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},la=nt(_e(`${Lt}/add`),{withTypes:()=>la}),ws=_e(`${Lt}/removeAll`),ca=nt(_e(`${Lt}/remove`),{withTypes:()=>ca}),Ec=(...e)=>{console.error(`${Lt}/error`,...e)},jc=(e={})=>{const t=new Map,r=new Map,n=m=>{const v=r.get(m)??0;r.set(m,v+1)},a=m=>{const v=r.get(m)??1;v===1?r.delete(m):r.set(m,v-1)},{extra:i,onError:s=Ec}=e;da(s,"onError");const d=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),v=>{m.unsubscribe(),v?.cancelActive&&Tn(m)}),l=m=>d(ni(t,m)??Ps(m));nt(l,{withTypes:()=>l});const c=m=>{const v=ni(t,m);return v&&(v.unsubscribe(),m.cancelActive&&Tn(v)),!!v};nt(c,{withTypes:()=>c});const u=async(m,v,y,$)=>{const g=new AbortController,h=_c(l,g.signal),x=[];try{m.pending.add(g),n(m),await Promise.resolve(m.effect(v,nt({},y,{getOriginalState:$,condition:(P,b)=>h(P,b).then(Boolean),take:h,delay:Cs(g.signal),pause:$r(g.signal),extra:i,signal:g.signal,fork:wc(g.signal,x),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((P,b,N)=>{P!==g&&(P.abort(In),N.delete(P))})},cancel:()=>{g.abort(In),m.pending.delete(g)},throwIfCancelled:()=>{We(g.signal)}})))}catch(P){P instanceof Ft||ai(s,P,{raisedBy:"effect"})}finally{await Promise.all(x),g.abort(xc),a(m),m.pending.delete(g)}},f=Oc(t,r);return{middleware:m=>v=>y=>{if(!(0,$e.isAction)(y))return v(y);if(la.match(y))return l(y.payload);if(ws.match(y)){f();return}if(ca.match(y))return c(y.payload);let $=m.getState();const g=()=>{if($===ri)throw new Error(process.env.NODE_ENV==="production"?Y(23):`${Lt}: getOriginalState can only be called synchronously`);return $};let h;try{if(h=v(y),t.size>0){const x=m.getState(),P=Array.from(t.values());for(const b of P){let N=!1;try{N=b.predicate(y,x,$)}catch(E){N=!1,ai(s,E,{raisedBy:"predicate"})}N&&u(b,y,m,g)}}}finally{$=ri}return h},startListening:l,stopListening:c,clearListeners:f}},Ic=e=>({middleware:e,applied:new Map}),Tc=e=>t=>t?.meta?.instanceId===e,Ac=()=>{const e=Rt(),t=new Map,r=Object.assign(_e("dynamicMiddleware/add",(...d)=>({payload:d,meta:{instanceId:e}})),{withTypes:()=>r}),n=Object.assign(function(...l){l.forEach(c=>{Ge(t,c,Ic)})},{withTypes:()=>n}),a=d=>(0,$e.compose)(...Array.from(t.values()).map(l=>Ge(l.applied,d,l.middleware))),i=hr(r,Tc(e));return{middleware:d=>l=>c=>i(c)?(n(...c.payload),d.dispatch):a(d)(l)(c),addMiddleware:n,withMiddleware:r,instanceId:e}},Dc=e=>"reducerPath"in e&&typeof e.reducerPath=="string",Mc=e=>e.flatMap(t=>Dc(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),ua=Symbol.for("rtk-state-proxy-original"),kc=e=>!!e&&!!e[ua],Rc=new WeakMap,Fc=(e,t,r)=>Ge(Rc,e,()=>new Proxy(e,{get:(n,a,i)=>{if(a===ua)return n;const s=Reflect.get(n,a,i);if(typeof s>"u"){const d=r[a];if(typeof d<"u")return d;const l=t[a];if(l){const c=l(void 0,{type:Rt()});if(typeof c>"u")throw new Error(process.env.NODE_ENV==="production"?Y(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}})),Lc=e=>{if(!kc(e))throw new Error(process.env.NODE_ENV==="production"?Y(25):"original must be used on state Proxy");return e[ua]},Bc={},Uc=(e=Bc)=>e;function Vc(...e){const t=Object.fromEntries(Mc(e)),r=()=>Object.keys(t).length?(0,$e.combineReducers)(t):Uc;let n=r();function a(l,c){return n(l,c)}a.withLazyLoadedSlices=()=>a;const i={},s=(l,c={})=>{const{reducerPath:u,reducer:f}=l,p=t[u];return!c.overrideExisting&&p&&p!==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&&p!==f&&delete i[u],t[u]=f,n=r(),a)},d=Object.assign(function(c,u){return function(p,...m){return c(Fc(u?u(p,...m):p,t,i),...m)}},{original:Lc});return Object.assign(a,{inject:s,selector:d})}function Y(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. `}var sn=e=>e?["services","professionals","time","details","confirm","success"]:["professionals","services","time","details","confirm","success"],zc={currentStep:"services",completedSteps:["services"],isOrder:!0},_s=Ye({name:"breadcrumbs",initialState:zc,reducers:{setIsOrder:(e,t)=>{e.isOrder=t.payload},goToStep:(e,t)=>{const r=sn(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=sn(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=sn(e.isOrder),r=t[t.indexOf(e.currentStep)-1];r&&(e.currentStep=r)},clearSteps:e=>{e.currentStep="services",e.completedSteps=["services"]}}}),{setIsOrder:Gc,goToStep:An,completeStep:Oh,nextStep:ve,prevStep:Eh,clearSteps:jh}=_s.actions,Wc=_s.reducer,ii={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},Os=Ye({name:"outletDetails",initialState:ii,reducers:{clearBooking:()=>ii,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:qc,setOutletData:Hc,setOutletToken:Kc}=Os.actions,Yc=Os.reducer,oi={superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null},Es=Ye({name:"service",initialState:oi,reducers:{setServicePayload:(e,t)=>{e.superCategories=t.payload.superCategories,e.staff=t.payload.staff},setCategory:(e,t)=>{e.selectedCategory=t.payload},toggleService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload.id);r?r.qty<5&&(r.qty+=1):e.selectedServices.push({...t.payload,qty:1})},incrementService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload);r&&r.qty<5&&(r.qty+=1)},decrementService:(e,t)=>{const r=e.selectedServices.find(n=>n.id===t.payload);r&&(r.qty===1?e.selectedServices=e.selectedServices.filter(n=>n.id!==t.payload):r.qty-=1)},toggleProfessional:(e,t)=>{e.selectedProfessional=t.payload},clearServices:()=>oi}}),{setServicePayload:Zc,setCategory:Ih,toggleService:gr,clearServices:Th,incrementService:js,decrementService:br,toggleProfessional:Is}=Es.actions,Xc=Es.reducer,Fe="https://prod.aaravpos.com/api/v1",Ue=()=>({"Content-Type":"application/json",Authorization:`Bearer ${Gr.getState()?.outletDetails?.token}`}),si=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=`${Fe}/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()},Jc=async(e,t,r)=>{const n=await fetch(`${Fe}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`,{method:"GET",headers:Ue()});if(!n.ok)throw new Error("Failed to fetch services");return await n.json()},Qc=async e=>{const t=await fetch(`${Fe}/integration/appointment/create`,{method:"POST",headers:Ue(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to fetch services");return await t.json()},eu=async(e,t)=>{const r=await fetch(`${Fe}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`,{method:"GET",headers:Ue()});if(!r.ok)throw new Error("Failed to fetch appointment details");return await r.json()},tu=async({search:e,tenantId:t})=>{const r=await fetch(`${Fe}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e||"")}`,{method:"GET",headers:Ue()});if(!r.ok)throw new Error("Failed to fetch customers");return await r.json()},ru=async e=>{try{const t=await fetch(`${Fe}/payment/pay/customer/direct`,{method:"POST",headers:Ue(),body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},nu=async e=>{try{const t=await fetch(`${Fe}/payment/orders/${e}/invoicing/finalize`,{method:"POST",headers:Ue()}),r=await t.json();if(!t.ok)throw r;return r}catch(t){throw t}},di=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"},fa=e=>{const t=!!(e?.requires_consent??e?.requiresConsent),r=String(e?.consent_form_id??e?.consentFormId??"").trim();return t&&!!r},li=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},ci=async(e,t,r)=>{const n=await fetch(`${Fe}/concent/check/${e}/${t}?serviceId=${r}`,{method:"GET",headers:Ue()});if(!n.ok)throw new Error("Failed to check consent requirement");return n.json()},au=async e=>{const{tenantId:t,outletId:r,appointmentId:n,customerId:a,serviceId:i,formId:s,staffId:d,signatureType:l,isChecked:c,typedName:u,imageUrl:f}=e,p={tenantId:t,appointmentId:n,customerId:a,serviceIds:[i],outletId:r,concentFormId:s,signatureType:l,channel:"Online_Web",staffId:d};l==="CHECKBOX_ONLY"&&(p.isChecked=c??!0),u&&(p.typedName=u),f&&(p.imageUrl=f);const m=await fetch(`${Fe}/concent/customer-sign`,{method:"POST",headers:Ue(),body:JSON.stringify(p)}),v=await m.json();if(!m.ok)throw v;return v},tr=zr("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await Jc(e,t,r)),Ts=Ye({name:"slots",initialState:{selectedSlotIndexes:[],selectedSlotIds:[],selectedDate:null,selectedTime:null,slots:{morning:[],afternoon:[],evening:[]},loading:!1},reducers:{clearSlots:e=>{e.slots={morning:[],afternoon:[],evening:[]},e.selectedSlotIndexes=[],e.selectedSlotIds=[],e.selectedDate=null,e.selectedTime=null},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}},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:dn,clearSlots:Ah,setSelectedDate:at,setSelectedTime:ln}=Ts.actions,iu=Ts.reducer,rr=zr("appointment/create",async(e,{rejectWithValue:t})=>{try{return await Qc(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),ui={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking"},As=Ye({name:"appointment",initialState:ui,reducers:{resetAppointment:()=>ui,setBookingMode:(e,t)=>{e.bookingMode=t.payload},setUserDetails:(e,t)=>{e.userDetails=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(rr.pending,t=>{t.loading=!0,t.error=null}).addCase(rr.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(rr.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:Dh,setBookingMode:Mh,setUserDetails:fi,setTips:ou,setAppointmentId:cn,clearUserDetails:su}=As.actions,du=As.reducer,Ds=Ye({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:lu,clearOutletList:kh}=Ds.actions,cu=Ds.reducer;function nr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nr=function(r){return typeof r}:nr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nr(e)}function un(){}var uu={getItem:un,setItem:un,removeItem:un};function fu(e){if((typeof self>"u"?"undefined":nr(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 pu(e){var t="".concat(e,"Storage");return fu(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),uu)}function mu(e){var t=pu(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 pi=(0,Vo.combineReducers)({breadcrumbs:Wc,outletDetails:Yc,service:Xc,slots:iu,appointment:du,outletList:cu}),hu=(e,t)=>t.type==="RESET_ALL"?pi({breadcrumbs:void 0,outletDetails:void 0,service:void 0,slots:void 0,appointment:void 0,outletList:void 0},t):pi(e,t),vu=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),yu=(0,Le.persistReducer)({key:"root",storage:typeof window<"u"?mu("local"):vu()},hu),Gr=ns({reducer:yu,devTools:process.env.NODE_ENV!=="production",middleware:e=>e({serializableCheck:{ignoredActions:[Le.FLUSH,Le.REHYDRATE,Le.PAUSE,Le.PERSIST,Le.PURGE,Le.REGISTER]}})}),pa=(0,Le.persistStore)(Gr),Rh=Gr.getState;function $u({children:e}){return(0,o.jsx)(F.Provider,{store:Gr,children:(0,o.jsx)(jo,{loading:null,persistor:pa,children:e})})}var gu=e=>{if(!e)return;const t=document.documentElement;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)},Ms=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),bu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Nu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),mi=e=>{const t=Nu(e);return t.charAt(0).toUpperCase()+t.slice(1)},fn={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"},Su=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Cu=(0,S.createContext)({}),xu=()=>(0,S.useContext)(Cu),Pu=(0,S.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...d},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=xu()??{},v=n??f?Number(r??u)*24/Number(t??c):r??u;return(0,S.createElement)("svg",{ref:l,...fn,width:t??c??fn.width,height:t??c??fn.height,stroke:e??p,strokeWidth:v,className:Ms("lucide",m,a),...!i&&!Su(d)&&{"aria-hidden":"true"},...d},[...s.map(([y,$])=>(0,S.createElement)(y,$)),...Array.isArray(i)?i:[i]])}),Q=(e,t)=>{const r=(0,S.forwardRef)(({className:n,...a},i)=>(0,S.createElement)(Pu,{ref:i,iconNode:t,className:Ms(`lucide-${bu(mi(e))}`,`lucide-${e}`,n),...a}));return r.displayName=mi(e),r},wu=[["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"}]],_u=Q("calendar-1",wu),Ou=[["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"}]],Eu=Q("calendar-days",Ou),ju=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ma=Q("check",ju),Iu=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ks=Q("chevron-down",Iu),Tu=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Nr=Q("chevron-left",Tu),Au=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ze=Q("chevron-right",Au),Du=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dn=Q("circle-check",Du),Mu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Bt=Q("clock-3",Mu),ku=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ru=Q("credit-card",ku),Fu=[["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"}]],Rs=Q("dollar-sign",Fu),Lu=[["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"}]],Bu=Q("euro",Lu),Uu=[["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"}]],Vu=Q("indian-rupee",Uu),zu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Fs=Q("info",zu),Gu=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ls=Q("minus",Gu),Wu=[["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"}]],qu=Q("moon",Wu),Hu=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],hi=Q("move-left",Hu),Ku=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Yu=Q("move-right",Ku),Zu=[["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"}]],ha=Q("package-2",Zu),Xu=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],va=Q("plus",Xu),Ju=[["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"}]],Qu=Q("pound-sterling",Ju),ef=[["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"}]],tf=Q("rotate-cw",ef),rf=[["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"}]],Bs=Q("scissors",rf),nf=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ya=Q("search",nf),af=[["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"}]],of=Q("store",af),sf=[["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"}]],df=Q("sun",sf),lf=[["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"}]],cf=Q("sunrise",lf),uf=[["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"}]],Us=Q("user",uf),ff=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pt=Q("x",ff),pf=({status:e})=>(0,o.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),mf=({item:e,onSelect:t,selected:r})=>(0,o.jsxs)("div",{className:`aaravpos-outlet-card
|
|
24
16
|
${r?"selected":""}
|
|
25
17
|
${e.isOpen?"":"closed"}
|
|
26
|
-
`,onClick:()=>t(String(e?.id)),children:[(0,
|
|
27
|
-
${
|
|
28
|
-
${
|
|
29
|
-
`,children:[(0,c.jsx)("span",{className:`aaravpos-step-icon ${p?"active":"inactive"}`,children:f.icon}),(0,c.jsx)("span",{children:f.label})]},f.page)})})]})})}function Dt({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:i,isSidebarOpen:a=!1}){const{selectedServices:o,selectedProfessional:s}=(0,H.useSelector)(l=>l.service);return(0,c.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,c.jsxs)("div",{className:`aaravpos-layout-wrapper ${o?.length>0||s?.id?"with-sidebar":""}`,children:[(0,c.jsxs)("main",{className:"aaravpos-main-content",children:[e,(0,c.jsx)("div",{className:"aaravpos-mobile-button",children:n?(0,c.jsx)("button",{onClick:i,className:"aaravpos-view-order-btn",children:(0,c.jsx)("span",{children:"View Order"})}):r})]}),(0,c.jsx)("aside",{className:`aaravpos-sidebar ${a?"open":""}`,children:t})]}),a&&(0,c.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,c.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var Yh=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:i})=>{const{outletName:a}=(0,H.useSelector)(l=>l.outletDetails),{isService:o}=(0,H.useSelector)(l=>l.outletDetails),s=t.length>0;return(0,c.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,c.jsxs)("div",{className:"aaravpos-order-header",children:[(0,c.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,c.jsxs)("p",{className:"aaravpos-order-subtitle",children:[a||"-"," Outlet"]})]}),(0,c.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,c.jsxs)("div",{className:"aaravpos-order-body",children:[(0,c.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Services"}),(0,c.jsx)("ul",{className:"aaravpos-pro-order-list",children:s&&t?.length>0&&t.map(l=>(0,c.jsxs)("li",{className:"aaravpos-order-item",children:[(0,c.jsx)("p",{className:"aaravpos-order-service-name",children:l.name}),(0,c.jsxs)("div",{className:"aaravpos-order-details",children:[(0,c.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,c.jsx)(hs,{size:13}),(0,c.jsx)("span",{children:l.qty})]}),(0,c.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,c.jsx)(qr,{size:13}),(0,c.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,c.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,c.jsx)(he,{size:12}),l.price||l.min_price]})]})]},l.id))})]}),(0,c.jsx)("div",{className:"aaravpos-divider"}),(0,c.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,c.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,c.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,c.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,c.jsx)(he,{size:16}),r]})]}),(0,c.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,c.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Duration"}),(0,c.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[n," mins"]})]}),(0,c.jsx)("button",{disabled:o?!t.length:!e,onClick:()=>i("time"),className:"aaravpos-common-btn",children:(0,c.jsxs)("span",{className:"aaravpos-common-btn-content",children:[o?"Choose Time":"Choose Services",(0,c.jsx)(It,{size:16})]})})]})]})]})},E$={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function T$(){const{width:e}=vs(),t=(0,H.useDispatch)(),{staff:r,selectedProfessional:n}=(0,H.useSelector)(s=>s.service),i=e<768,a=!r||r.length===0,o=s=>{if(!s?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const l=new Date,u=s.futureLeaveDates.find(d=>{if(d.status!=="APPROVED"||d.leaveType!=="FULL_DAY")return!1;const f=new Date(d.startDate),h=new Date(d.endDate);return l>=f&&l<=h});return u?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(u.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Yh,{pro:n,goToStep:()=>t(Ee())}),children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,c.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),(0,c.jsx)(pt,{mode:"wait",children:a&&(0,c.jsx)(Ke.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"aaravpos-no-staff",children:"No staff available for selected services"},"no-staff")}),(0,c.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,c.jsx)("div",{className:"aaravpos-staff-grid",children:(0,c.jsx)(pt,{mode:"popLayout",children:r?.map((s,l)=>{const{isOnLeave:u,availableFrom:d}=o(s);return(0,c.jsxs)(Ke.div,{variants:E$,initial:"hidden",animate:"visible",exit:"exit",custom:l,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{t(Yd(s)),t(Ht(null)),i&&t(Ee())},className:`aaravpos-pro-card ${n?.id===s.id?"active":""}`,children:[(0,c.jsxs)("div",{className:"aaravpos-display-flex",children:[s.imageUrl?(0,c.jsx)("img",{src:s.imageUrl,alt:s.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:s.color||"#111"},children:Ti(s.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:s.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:s.staff_type})]})]}),u&&d&&(0,c.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,c.jsx)("span",{className:"aaravpos-available-dot"}),(0,c.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",d]})]})]},s.id)})})})})]})]})}var O$=e=>Number(e.price||e.min_price||0),no=(e,{perUnit:t=!1}={})=>{const r=O$(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((i,a)=>a.isActive?a.taxType==="FIXED"?i+a.taxRate*n:a.taxType==="PERCENTAGE"?i+r*n*a.taxRate/100:i:i,0)},_$={hidden:{opacity:0,transform:"translateY(14px)"},visible:e=>({opacity:1,transform:"translateY(0px)",transition:{delay:e*.05,duration:.32,ease:[.22,1,.36,1]}}),exit:{opacity:0,transform:"translateY(8px)",transition:{duration:.2}}};function A$(){const e=(0,H.useDispatch)(),{width:t}=vs(),{staff:r,selectedServices:n,selectedProfessional:i}=(0,H.useSelector)(y=>y.service),[a,o]=(0,$.useState)(!1),s=n.map(y=>y.id),l=(0,$.useMemo)(()=>{if(!i?.id)return[];const y=r.find(v=>v.id===i.id);return y?n.map(v=>{const g=y?.assignments?.find(x=>x.id===v?.id),b={...v,price:g?.price||v.price||v.min_price||0,duration:g?.duration||v.estimated_time||v.min_time||0};return{...b,tax:no(b)}}):[]},[i,r,n]),u=l.reduce((y,v)=>y+Number(v.price||0)*v.qty,0),d=l.reduce((y,v)=>y+(v?.duration||0)*v.qty,0),f=(0,$.useMemo)(()=>s.length?r.filter(y=>{const v=y.assignments??[];return s?.every(g=>v.some(b=>String(b.id)===String(g)&&!!b?.assigned))}):[],[r,s]),h=t<768,p=s.length>0;(0,$.useEffect)(()=>{if(p&&f.length===0){const y=setTimeout(()=>o(!0),300);return()=>clearTimeout(y)}else o(!1)},[p,f]);const m=y=>{if(!y?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const v=new Date,g=y.futureLeaveDates.find(b=>{if(b.status!=="APPROVED"||b.leaveType!=="FULL_DAY")return!1;const x=new Date(b.startDate),S=new Date(b.endDate);return v>=x&&v<=S});return g?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(g.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Yh,{pro:i,selectedStaffServices:l,totalPrice:u,totalDuration:d,goToStep:()=>e(Ee())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(Ee()),disabled:!n.length,className:"aaravpos-btn",children:(0,c.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,c.jsx)(It,{size:16})]})}),children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,c.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),(0,c.jsx)(pt,{mode:"wait",children:a&&(0,c.jsx)(Ke.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"aaravpos-no-staff",children:"No staff available for selected services"},"no-staff")}),(0,c.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,c.jsx)("div",{className:"aaravpos-staff-grid",children:(0,c.jsx)(pt,{mode:"popLayout",children:f.map((y,v)=>{const{isOnLeave:g,availableFrom:b}=m(y);return(0,c.jsxs)(Ke.div,{variants:_$,initial:"hidden",animate:"visible",exit:"exit",custom:v,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{e(Yd(y)),e(Ht(null)),h&&e(Ee())},className:`aaravpos-pro-card ${i?.id===y.id?"active":""}`,children:[(0,c.jsxs)("div",{className:"aaravpos-display-flex",children:[y.imageUrl?(0,c.jsx)("img",{src:y.imageUrl,alt:y.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:y.color||"#111"},children:Ti(y.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:y.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:y.staff_type})]})]}),g&&b&&(0,c.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,c.jsx)("span",{className:"aaravpos-available-dot"}),(0,c.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",b]})]})]},y.id)})})})})]})]})}function Xh({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,H.useSelector)(a=>a?.outletDetails),{isService:i}=(0,H.useSelector)(a=>a.outletDetails);return(0,c.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,c.jsxs)("div",{className:"aaravpos-order-header",children:[(0,c.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,c.jsxs)("p",{className:"aaravpos-order-subtitle",children:[n||"-"," Outlet"]})]}),(0,c.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,c.jsxs)("div",{className:"aaravpos-order-body",children:[(0,c.jsx)("p",{className:"aaravpos-order-section-title",children:"SELECTED SERVICES"}),(0,c.jsx)("ul",{className:"aaravpos-order-list",children:e?.length>0&&e?.map(a=>(0,c.jsxs)("li",{className:"aaravpos-order-item",children:[(0,c.jsx)("p",{className:"aaravpos-order-service-name",children:a.name}),(0,c.jsxs)("div",{className:"aaravpos-order-details",children:[(0,c.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,c.jsx)(hs,{size:13}),(0,c.jsx)("span",{children:a.qty})]}),(0,c.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,c.jsx)(qr,{size:13}),(0,c.jsxs)("span",{children:[a.min_time||a.estimated_time," min"]})]}),(0,c.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,c.jsx)(he,{size:12}),a.price||a.min_price]})]})]},a.id))})]}),(0,c.jsx)("div",{className:"aaravpos-divider"}),(0,c.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,c.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,c.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,c.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,c.jsx)(he,{size:16}),t]})]}),(0,c.jsx)("div",{children:(0,c.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"aaravpos-common-btn",children:(0,c.jsxs)("span",{className:"aaravpos-common-btn-content",children:[i?"Choose Professional":"Choose Time",(0,c.jsx)(It,{size:16})]})})})]})]})]})}function Zh(){return(0,c.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,c.jsx)("div",{className:"aaravpos-skeleton-shimmer",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}var j$={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function I$(){const e=(0,H.useDispatch)(),t=(0,$.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,selectedProfessional:o,loading:s}=(0,H.useSelector)(w=>w.service),[l,u]=(0,$.useState)("supercategory"),[d,f]=(0,$.useState)(null),[h,p]=(0,$.useState)(null),[m,y]=(0,$.useState)(""),v=new Set(o?o?.assignments?.map(w=>w.id):[]),g=new Set(o?o?.assignments?.map(w=>w.categoryId):[]),b=n.map(w=>({...w,services:w.services?.filter(F=>v.has(F.id))||[]})).filter(w=>g.has(w.id)&&w.services.length>0),x=r.map(w=>({...w,categories:w.categories?.map(F=>({...F,services:F.services?.filter(W=>v.has(W.id))||[]})).filter(F=>g.has(F.id)&&F.services.length>0)||[]})).filter(w=>w.categories.length>0),S=b.length>0,E=x.length>0,C=b?.flatMap(w=>w.services),_=i?i.services:C,T=(0,$.useMemo)(()=>d?h?h.services||[]:d.categories?.flatMap(w=>w.services||[]):[],[d,h]),M=l==="standalone"?_:T,N=(0,$.useMemo)(()=>{const w=b?.flatMap(W=>W.services||[]),F=x?.flatMap(W=>W.categories?.flatMap(q=>q.services||[]));return[...w,...F]},[b,x]),L=(0,$.useMemo)(()=>{const w=m.trim().toLowerCase();return w?N.filter(F=>F.name?.toLowerCase().includes(w)||F.description?.toLowerCase().includes(w)):M},[m,N,M]),G=w=>w.taxRows?.some(F=>F.isActive)||!1,R=a.reduce((w,F)=>w+Number(F.price||0)*F.qty,0);return(0,$.useEffect)(()=>{if(l==="supercategory"&&!E&&S){u("standalone");return}if(l==="standalone"&&!S&&E){u("supercategory");return}if(l==="supercategory"&&E&&x?.length>0&&!d){const w=x.find(F=>F?.categories?.some(W=>W?.services?.length>0));w&&(f(w),p(null))}},[l,x,d,S,E]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Xh,{selectedServices:a,totalPrice:R,goToStep:()=>e(Ee())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(Ee()),disabled:!a.length,className:"aaravpos-btn",children:(0,c.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,c.jsx)(It,{size:16})]})}),children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Service"}),(0,c.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",o?.name,"'s available services"]}),(0,c.jsxs)("div",{className:"aaravpos-topbar",children:[(0,c.jsxs)("div",{className:"aaravpos-tab-group",children:[E&&(0,c.jsx)("button",{onClick:()=>{u("supercategory"),p(null),f(null)},className:`aaravpos-tab-btn ${l==="supercategory"?"active":"inactive"}`,children:"Super Category"}),S&&(0,c.jsx)("button",{onClick:()=>{u("standalone")},className:`aaravpos-tab-btn ${l==="standalone"?"active":"inactive"}`,children:"Standalone"})]}),(0,c.jsxs)("div",{className:"aaravpos-search-wrapper aaravpos-mb-10",children:[(0,c.jsx)("span",{className:"aaravpos-search-icon",children:(0,c.jsx)(ms,{size:14})}),(0,c.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,onChange:w=>y(w.target.value),className:"aaravpos-search-input"}),(0,c.jsx)("div",{className:"aaravpos-search-actions",children:m&&(0,c.jsx)("button",{onClick:()=>y(""),className:"aaravpos-search-clear",children:(0,c.jsx)(sr,{size:16})})})]})]}),l==="supercategory"&&(0,c.jsxs)(c.Fragment,{children:[E&&(0,c.jsx)("div",{ref:t,onWheel:w=>{t.current&&(t.current.scrollLeft+=w.deltaY)},className:"aaravpos-supercategory-wrapper",children:x.map(w=>(0,c.jsxs)("button",{onClick:()=>{f(w),p(null)},className:`aaravpos-supercategory-btn ${d?.id===w.id?"active":""}`,children:[(0,c.jsx)("h3",{className:"aaravpos-supercategory-title",children:w.name}),(0,c.jsxs)("p",{className:"aaravpos-supercategory-count",children:[w?.categories?.length||0," Sub Categories"]})]},w.id))}),d?.categories?.some(w=>w?.services?.length>0)&&d&&(0,c.jsxs)("div",{ref:t,onWheel:w=>{t.current&&(t.current.scrollLeft+=w.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,c.jsxs)("button",{onClick:()=>p(null),className:`aaravpos-supercategory-btn ${h?"":"active"}`,children:["All Services (",d?.categories?.reduce((w,F)=>w+F.services.length,0),")"]}),d?.categories?.map(w=>(0,c.jsxs)("button",{onClick:()=>p(w),className:`aaravpos-supercategory-btn ${h?.id===w.id?"active":""}`,children:[w.name," (",w.services.length,")"]},w.id))]})]}),l==="standalone"&&(0,c.jsxs)("div",{ref:t,onWheel:w=>{t.current&&(t.current.scrollLeft+=w.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,c.jsxs)("button",{onClick:()=>e(Un(null)),className:`aaravpos-supercategory-btn ${i?"":"active"}`,children:["All Services (",b.reduce((w,F)=>w+F.services.length,0),")"]}),b.map(w=>(0,c.jsxs)("button",{onClick:()=>e(Un(w)),className:`aaravpos-supercategory-btn ${i?.id===w.id?"active":""}`,children:[w.name," (",w.services.length,")"]},w.id))]}),(0,c.jsx)("div",{className:`aaravpos-services-wrapper ${l}`,children:(0,c.jsx)("div",{className:"aaravpos-services-grid",children:s?Array.from({length:10}).map((w,F)=>(0,c.jsx)(Zh,{},F)):(0,c.jsx)(pt,{mode:"popLayout",children:L?.length?L?.map((w,F)=>{const W=a.some(q=>q.id===w.id);return(0,c.jsxs)(Ke.div,{variants:j$,initial:"hidden",animate:"visible",exit:"exit",custom:F,layout:!0,onClick:()=>{const q=a.find(Z=>Z.id===w.id);q&&q.qty===1?e(zn(String(w.id))):e(Wn({...w,price:w.price?Number(w.price):void 0}))},className:`aaravpos-service-card ${W?"active":""}`,children:[G(w)&&(0,c.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),Do(w)&&(0,c.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,c.jsx)("p",{className:"aaravpos-service-title",children:w.name}),(0,c.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,c.jsx)("p",{className:"aaravpos-service-description",children:w.description}),w.description?.length>30&&(0,c.jsx)("div",{className:"aaravpos-service-tooltip",children:w.description})]}),(0,c.jsxs)("p",{className:"aaravpos-service-price",children:[(0,c.jsx)("span",{children:w.estimated_time?`${w.estimated_time} min`:`${w.min_time}-${w.max_time} min`}),(0,c.jsx)("span",{className:"aaravpos-service-price-right",children:w.price?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),w.price]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),w.min_price," - ",(0,c.jsx)(he,{size:14}),w.max_price]})})]}),(0,c.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,c.jsx)("button",{onClick:q=>{q.stopPropagation(),e(zn(String(w.id)))},className:"aaravpos-service-action-btn",children:(0,c.jsx)(Hh,{size:14})}),(0,c.jsx)("span",{className:"aaravpos-service-qty",children:a.find(q=>q.id===w.id)?.qty||0}),(0,c.jsx)("button",{onClick:q=>{q.stopPropagation(),a.find(Z=>Z.id===w.id)?e(qd(String(w.id))):e(Wn({...w,price:w.price?Number(w.price):void 0}))},className:"aaravpos-service-action-btn plus",children:(0,c.jsx)(ps,{size:14})})]})]},w.id)}):(0,c.jsxs)(Ke.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0},className:"aaravpos-empty-services",children:[(0,c.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,c.jsx)("p",{className:"aaravpos-empty-services-text",children:m?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}var M$={hidden:{opacity:0,y:14},visible:e=>({opacity:1,y:0,transition:{delay:e*.05,duration:.15,ease:[.22,1,.36,1]}}),exit:{opacity:0,y:8,transition:{duration:.2}}};function D$(){const e=(0,H.useDispatch)(),t=(0,$.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,loading:o}=(0,H.useSelector)(N=>N.service),{outletName:s}=(0,H.useSelector)(N=>N?.outletDetails),[l,u]=(0,$.useState)("supercategory"),[d,f]=(0,$.useState)(null),[h,p]=(0,$.useState)(null),[m,y]=(0,$.useState)(""),v=n?.flatMap(N=>N.services),g=i?i.services:v,b=(0,$.useMemo)(()=>d?h?h.services||[]:d?.categories?.flatMap(N=>N.services||[]):[],[d,h]),x=l==="standalone"?g:b,S=(0,$.useMemo)(()=>{const N=n?.flatMap(G=>G.services||[]),L=r?.flatMap(G=>G?.categories?.flatMap(R=>R.services||[]));return[...N,...L]},[n,r]),E=(0,$.useMemo)(()=>{const N=m.trim().toLowerCase();return N?S.filter(L=>L.name?.toLowerCase().includes(N)||L.description?.toLowerCase().includes(N)):x},[m,S,x]),C=N=>N.taxRows?.some(L=>L.isActive)||!1,_=a.reduce((N,L)=>N+Number(L.price||0)*L.qty,0),T=(0,$.useMemo)(()=>r?.some(N=>N?.categories?.some(L=>L?.services?.length>0)),[r]),M=(0,$.useMemo)(()=>n?.some(N=>N?.services?.length>0),[n]);return(0,$.useEffect)(()=>{if(l==="supercategory"&&!T&&M){u("standalone");return}if(l==="standalone"&&!M&&T){u("supercategory");return}if(l==="supercategory"&&T&&r?.length>0&&!d){const N=r.find(L=>L?.categories?.some(G=>G?.services?.length>0));N&&(f(N),p(null))}},[l,r,d,T,M]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Xh,{selectedServices:a,totalPrice:_,goToStep:()=>e(Ee())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(Ee()),disabled:!a.length,className:"aaravpos-btn",children:(0,c.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,c.jsx)(It,{size:16})]})}),children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title",children:"Book A Service"}),(0,c.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",s," Outlet's available services"]}),(0,c.jsxs)("div",{className:"aaravpos-topbar",children:[(0,c.jsxs)("div",{className:"aaravpos-tab-group",children:[T&&(0,c.jsx)("button",{onClick:()=>{u("supercategory"),p(null),f(null)},className:`aaravpos-tab-btn ${l==="supercategory"?"active":"inactive"}`,children:"Super Category"}),M&&(0,c.jsx)("button",{onClick:()=>{u("standalone")},className:`aaravpos-tab-btn ${l==="standalone"?"active":"inactive"}`,children:"Standalone"})]}),(0,c.jsxs)("div",{className:"aaravpos-search-wrapper aaravpos-mb-10",children:[(0,c.jsx)("span",{className:"aaravpos-search-icon",children:(0,c.jsx)(ms,{size:14})}),(0,c.jsx)("input",{type:"text",placeholder:"Search services...",value:m,onChange:N=>y(N.target.value),className:"aaravpos-search-input"}),(0,c.jsx)("div",{className:"aaravpos-search-actions",children:m&&(0,c.jsx)("button",{onClick:()=>y(""),className:"aaravpos-search-clear",children:(0,c.jsx)(sr,{size:16})})})]})]}),l==="supercategory"&&(0,c.jsxs)(c.Fragment,{children:[T&&(0,c.jsx)("div",{ref:t,onWheel:N=>{t.current&&(t.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper",children:r.filter(N=>N?.categories?.some(L=>L?.services?.length>0)).map(N=>(0,c.jsxs)("button",{onClick:()=>{f(N),p(null)},className:`aaravpos-supercategory-btn ${d?.id===N.id?"active":""}`,children:[(0,c.jsx)("h3",{className:"aaravpos-supercategory-title",children:N.name}),(0,c.jsxs)("p",{className:"aaravpos-supercategory-count",children:[N?.categories?.length||0," Sub Categories"]})]},N.id))}),d?.categories?.some(N=>N?.services?.length>0)&&d&&(0,c.jsxs)("div",{ref:t,onWheel:N=>{t.current&&(t.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,c.jsxs)("button",{onClick:()=>p(null),className:`aaravpos-supercategory-btn ${h?"":"active"}`,children:["All Services (",d?.categories?.reduce((N,L)=>N+L.services.length,0),")"]}),d?.categories?.filter(N=>N?.services?.length>0).map(N=>(0,c.jsxs)("button",{onClick:()=>p(N),className:`aaravpos-supercategory-btn ${h?.id===N.id?"active":""}`,children:[N.name," (",N.services.length,")"]},N.id))]})]}),l==="standalone"&&(0,c.jsxs)("div",{ref:t,onWheel:N=>{t.current&&(t.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,c.jsxs)("button",{onClick:()=>e(Un(null)),className:`aaravpos-supercategory-btn ${i?"":"active"}`,children:["All Services (",n.reduce((N,L)=>N+L.services.length,0),")"]}),n.filter(N=>N?.services?.length>0).map(N=>(0,c.jsxs)("button",{onClick:()=>e(Un(N)),className:`aaravpos-supercategory-btn ${i?.id===N.id?"active":""}`,children:[N.name," (",N.services.length,")"]},N.id))]}),(0,c.jsx)("div",{className:`aaravpos-services-wrapper ${l}`,children:(0,c.jsx)("div",{className:"aaravpos-services-grid",children:o?Array.from({length:10}).map((N,L)=>(0,c.jsx)(Zh,{},L)):(0,c.jsx)(pt,{mode:"popLayout",children:E?.length?E?.map((N,L)=>{const G=a.some(R=>R.id===N.id);return(0,c.jsxs)(Ke.div,{variants:M$,initial:"hidden",animate:"visible",exit:"exit",custom:L,layout:!0,onClick:()=>{const R=a.find(w=>w.id===N.id);R&&R.qty===1?e(zn(String(N.id))):e(Wn(N))},className:`aaravpos-service-card ${G?"active":""}`,children:[C(N)&&(0,c.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),Do(N)&&(0,c.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,c.jsx)("p",{className:"aaravpos-service-title",children:N.name}),(0,c.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,c.jsx)("p",{className:"aaravpos-service-description",children:N.description}),N.description?.length>30&&(0,c.jsx)("div",{className:"aaravpos-service-tooltip",children:N.description})]}),(0,c.jsxs)("p",{className:"aaravpos-service-price",children:[(0,c.jsx)("span",{children:N.estimated_time?`${N.estimated_time} min`:`${N.min_time}-${N.max_time} min`}),(0,c.jsx)("span",{className:"aaravpos-service-price-right",children:N.price?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),N.price]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),N.min_price," - ",(0,c.jsx)(he,{size:14}),N.max_price]})})]}),(0,c.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,c.jsx)("button",{onClick:R=>{R.stopPropagation(),e(zn(String(N.id)))},className:"aaravpos-service-action-btn",children:(0,c.jsx)(Hh,{size:14})}),(0,c.jsx)("span",{className:"aaravpos-service-qty",children:a.find(R=>R.id===N.id)?.qty||0}),(0,c.jsx)("button",{onClick:R=>{R.stopPropagation(),a.find(w=>w.id===N.id)?e(qd(String(N.id))):e(Wn(N))},className:"aaravpos-service-action-btn plus",children:(0,c.jsx)(ps,{size:14})})]})]},N.id)}):(0,c.jsxs)(Ke.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0},className:"aaravpos-empty-services",children:[(0,c.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,c.jsx)("p",{className:"aaravpos-empty-services-text",children:m?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var R$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ys({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:i=0,onTipChange:a,consentRequired:o=!1,consentCompleted:s=0,totalConsents:l=0,checkingConsent:u=!1,loading:d=!1,isBookingDisabled:f=!1,handleSidebarOpen:h}){const{selectedSlotIndexes:p,slots:m,selectedDate:y}=(0,H.useSelector)(k=>k.slots),{staff:v,selectedServices:g,selectedProfessional:b}=(0,H.useSelector)(k=>k.service),{timeZone:x}=(0,H.useSelector)(k=>k.outletDetails),S=Ce.DateTime.now().setZone(x??"UTC"),[E,C]=(0,$.useState)(""),[_,T]=(0,$.useState)(!1),M=(0,$.useRef)(null),N=(0,$.useRef)(null),[L,G]=(0,$.useState)(0),R=[0,5,10,15,20],w=(0,$.useMemo)(()=>[...m?.morning||[],...m?.afternoon||[],...m?.evening||[]],[m]),F=15,W=(0,$.useMemo)(()=>{if(!b?.id)return[];const k=v?.find(A=>A.id===b.id);return k?g.map(A=>{const ie=k.assignments?.find(qe=>qe.id===A.id),ye={...A,price:ie?.price||A.price||A.min_price||0,duration:ie?.duration||A.estimated_time||A.min_time||0};return{...ye,tax:no(ye),unitTax:no(ye,{perUnit:!0})}}):[]},[b,v,g]),q=W.reduce((k,A)=>k+Number(A.price)*(A.qty||1),0),Z=W.reduce((k,A)=>k+Number(A.duration)*(A.qty||1),0),ne=Math.ceil(Z/F),$e=k=>{if(!w.length)return"";const A=w[k]?.start_time,ie=w[k+ne-1];return!A||!ie?"":`${A} - ${ie.end_time||ie.start_time}`},D=y||{day:S.day,month:S.month,year:S.year},P=p?.[0],j=P!==void 0?$e(P):null,U=D.month??0,z=j?`${R$[U]} ${D.day} at ${j}`:null,K=W.reduce((k,A)=>k+A.tax,0),Y=Number(i)||0,X=n?q*Y/100:0,J=q+K+X;(0,$.useEffect)(()=>{n&&i==null&&a?.(0)},[n,i,a]);const ee=(0,$.useMemo)(()=>d?"Processing...":u?"Checking consents...":o&&s<l?`Sign Consents (${s}/${l})`:(0,c.jsxs)(c.Fragment,{children:[e||"Book Appointment",(0,c.jsx)(r$,{})]}),[d,u,o,s,l,e]),Q=f||d||u||!j;return(0,$.useEffect)(()=>{const k=()=>{const ie=M.current?.offsetHeight||0,ye=N.current?.offsetHeight||0,qe=(ie+125||0)+ye;G(window.innerHeight-qe)};k();const A=new ResizeObserver(()=>{k()});return N.current&&A.observe(N.current),M.current&&A.observe(M.current),window.addEventListener("resize",k),()=>{A.disconnect(),window.removeEventListener("resize",k)}},[W,n,s,l,_]),(0,c.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,c.jsxs)("div",{className:"aaravpos-order-header",children:[(0,c.jsxs)("p",{className:"aaravpos-order-title",children:["Your Order",h&&(0,c.jsx)("button",{onClick:h,className:"aaravpos-sidebar-close-btn",children:(0,c.jsx)(sr,{})})]}),(0,c.jsxs)("div",{className:"aaravpos-date-time",children:[(0,c.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),z?(0,c.jsx)("span",{className:"aaravpos-date-time-value",children:z}):(0,c.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,c.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${L}px`},children:W?.length>0&&W.map(k=>(0,c.jsxs)("li",{className:"aaravpos-order-item",children:[(0,c.jsx)("p",{className:"aaravpos-order-service-name",children:k.name}),(0,c.jsxs)("div",{className:"aaravpos-order-details",children:[(0,c.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,c.jsx)(hs,{size:13}),(0,c.jsx)("span",{children:k.qty})]}),(0,c.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,c.jsx)(qr,{size:13}),(0,c.jsxs)("span",{children:[k.min_time||k.estimated_time," min"]})]}),(0,c.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,c.jsx)(he,{size:12}),k.price||k.min_price]})]})]},k.id))}),(0,c.jsxs)("div",{className:"third",ref:N,children:[n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{className:"aaravpos-tip-title",children:"Add Tip"}),(0,c.jsx)("div",{className:"aaravpos-tip-options",children:[...R,"custom"].map((k,A)=>{const ie=k==="custom",ye=ie?_:Y===k,qe=A===0,Yr=A===[...R,"custom"].length-1;return(0,c.jsx)("button",{onClick:()=>{ie?(T(!0),a?.(Number(E)||0)):(T(!1),C(""),a?.(Number(k)))},className:`aaravpos-tip-btn
|
|
30
|
-
${qe||Yr?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${ye?"aaravpos-tip-btn-active":""}`,children:ie?"Custom":k===0?"No tip":`${k}%`},k)})}),(0,c.jsx)(pt,{initial:!1,children:_&&(0,c.jsx)(Ke.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"aaravpos-tip-input-wrapper",children:(0,c.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:E,onChange:k=>{const A=k.target.value;(A===""||Number(A)>=0&&Number(A)<=100)&&(C(A),a?.(Number(A)||0))},className:"aaravpos-tip-input"})})})]}),o&&s<l&&(0,c.jsxs)("div",{className:"aaravpos-consent-box",children:[(0,c.jsxs)("p",{className:"aaravpos-consent-text",children:["Consent Required:"," ",s,"/",l," completed"]}),(0,c.jsx)("div",{className:"aaravpos-consent-progress",children:(0,c.jsx)("div",{className:"aaravpos-consent-progress-bar",style:{width:`${s/l*100}%`}})})]}),(0,c.jsxs)("div",{className:"aaravpos-mt-auto",children:[(0,c.jsx)(da,{label:"Service",value:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),q.toFixed(2)]})}),n&&(0,c.jsx)(da,{label:`Tip (${Y}%)`,value:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),X.toFixed(2)]})}),(!r||j)&&(0,c.jsx)(da,{label:"Taxes",value:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{size:14}),K.toFixed(2)]})}),(0,c.jsx)("div",{className:"aaravpos-divider"}),(0,c.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,c.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Total"}),(0,c.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,c.jsx)(he,{size:16}),J.toFixed(2)]})]}),(0,c.jsx)("button",{onClick:t,disabled:Q,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,c.jsx)("span",{className:"aaravpos-common-btn-content",children:ee})})]})]})]})}function da({label:e,value:t}){return(0,c.jsxs)("div",{className:"aaravpos-summary-row",children:[(0,c.jsx)("span",{className:"aaravpos-summary-label",children:e}),(0,c.jsx)("span",{className:"aaravpos-summary-value",children:t})]})}var mr=({dateObj:e,selectedProfessional:t,outletTimeZone:r})=>{if(!t)return!1;const n=Ce.DateTime.fromISO(e.fullDate||"").setZone(r),i=n.toFormat("yyyy-MM-dd");if((t?.futureLeaveDates||[]).some(u=>{if(u.status!=="APPROVED"||u.leaveType!=="FULL_DAY")return!1;const d=u?.leavePeriod?.date;return d?Ce.DateTime.fromISO(d).toFormat("yyyy-MM-dd")===i:!1}))return!0;const a=(t?.dateOverrides||[]).find(u=>Ce.DateTime.fromISO(u.date).toFormat("yyyy-MM-dd")===i);if(a?.type==="CLOSED")return!0;if(a?.type==="TIME")return!1;const o=t?.weeklyHours?.weeklyJson||{},s={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",7:"sun"}[n.weekday],l=o?.[s];return!!(!l||l.isClosed)},k$=e=>{try{if(!e)throw new Error("Missing timezone");const t=Ce.DateTime.now().setZone(e);if(!t.isValid)throw new Error("Invalid timezone");return Array.from({length:6},(r,n)=>{const i=t.plus({months:n}).startOf("month");return{label:i.toFormat("LLLL yyyy"),monthIdx:i.month,year:i.year,startDow:i.startOf("month").weekday%7,days:i.daysInMonth||0}})}catch(t){return console.error("generateMonths error:",t),[]}},L$=["S","M","T","W","T","F","S"];function F$({isOpen:e,onClose:t}){const r=(0,H.useDispatch)(),{selectedDate:n}=(0,H.useSelector)(h=>h.slots),{selectedProfessional:i}=(0,H.useSelector)(h=>h.service),{timeZone:a}=(0,H.useSelector)(h=>h.outletDetails),[o]=(0,$.useState)(k$(a||"")),[s,l]=(0,$.useState)(0),u=o[s];if(!e)return null;const d=Ce.DateTime.now().setZone(a??"UTC"),f=(h,p)=>{const m=Ce.DateTime.fromObject({year:u.year,month:h,day:p}),y={day:p,month:h,year:u.year,fullDate:m.toISODate()||""};m.startOf("day")<d.startOf("day")||mr({dateObj:y,selectedProfessional:i,outletTimeZone:a||"UTC"})||(r(Ht({month:h,day:p,year:u.year})),t())};return(0,c.jsx)("div",{className:"aaravpos-date-modal-overlay",onClick:h=>h.target===h.currentTarget&&t(),children:(0,c.jsxs)("div",{className:"aaravpos-date-modal",children:[(0,c.jsxs)("div",{className:"aaravpos-date-modal-header",children:[(0,c.jsx)("h2",{className:"aaravpos-date-modal-title",children:"Pick a Date"}),(0,c.jsx)("button",{onClick:t,className:"aaravpos-date-close-btn",children:(0,c.jsx)(sr,{})})]}),(0,c.jsxs)("div",{className:"aaravpos-date-modal-body",children:[(0,c.jsxs)("div",{className:"aaravpos-date-nav",children:[(0,c.jsx)("button",{disabled:s===0,onClick:()=>l(h=>Math.max(h-1,0)),className:"aaravpos-date-nav-btn",children:(0,c.jsx)(Qn,{})}),(0,c.jsx)("div",{className:"aaravpos-date-month-label",children:u?.label}),(0,c.jsx)("button",{disabled:s===o.length-1,onClick:()=>l(h=>Math.min(h+1,o.length-1)),className:"aaravpos-date-nav-btn",children:(0,c.jsx)(It,{})})]}),(0,c.jsxs)("div",{className:"aaravpos-calendar-grid",children:[L$.map((h,p)=>(0,c.jsx)("div",{className:"aaravpos-calendar-weekday",children:h},p)),Array.from({length:u?.startDow||0}).map((h,p)=>(0,c.jsx)("div",{},`e${p}`)),Array.from({length:u?.days||0},(h,p)=>p+1).map(h=>{const p=n?.month===u?.monthIdx&&n?.day===h,m=u?.monthIdx===d.month&&h===d.day,y=Ce.DateTime.fromObject({year:u.year,month:u.monthIdx,day:h}),v={day:h,month:u.monthIdx,year:u.year,fullDate:y.toISODate()||""},g=y.startOf("day")<d.startOf("day"),b=mr({dateObj:v,selectedProfessional:i,outletTimeZone:a||"UTC"});return(0,c.jsxs)("div",{onClick:()=>{b||f(u.monthIdx,h)},className:["aaravpos-calendar-day",!p&&!b&&"aaravpos-calendar-day-active",m&&!p&&"aaravpos-calendar-day-today",p&&"aaravpos-calendar-day-selected",b&&"aaravpos-calendar-day-disabled",g&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:[b&&(0,c.jsx)("div",{className:"aaravpos-calendar-day-slash"}),(0,c.jsx)("span",{className:"aaravpos-calendar-day-text",children:h})]},h)})]})]})]})})}var Mc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],V$=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function B$(){const e=(0,H.useDispatch)(),[t,r]=(0,$.useState)(11),{staff:n,selectedServices:i,selectedProfessional:a}=(0,H.useSelector)(D=>D.service),{tenantId:o,timeZone:s}=(0,H.useSelector)(D=>D?.outletDetails),{selectedSlotIndexes:l,selectedDate:u,selectedTime:d,slots:f,loading:h}=(0,H.useSelector)(D=>D.slots),[p,m]=(0,$.useState)(!1),[y,v]=(0,$.useState)(0),g=15,b=(0,$.useMemo)(()=>[f.morning,f.afternoon,f.evening].flat(),[f]),x=(0,$.useMemo)(()=>Ce.DateTime.now().setZone(s),[s]),S=D=>{try{if(!D.isValid)throw new Error("Invalid timezone or start date");return Array.from({length:180},(j,U)=>{const z=D.plus({days:U});return z.isValid?{day:z.day,month:z.month,year:z.year,fullDate:z.toISODate()}:null}).filter(Boolean)}catch(P){return console.error("generateDates error:",P),[]}},E=(0,$.useMemo)(()=>S(x),[x]),C=(0,$.useMemo)(()=>{if(!a?.id)return[];const D=n?.find(P=>P.id===a.id);return D?i.map(P=>{const j=D.assignments?.find(U=>U.id===P.id);return{...P,price:j?.price||P.price||P.min_price||0,duration:j?.duration||P.estimated_time||P.min_time||0,qty:j?.qty||1}}):[]},[a,n,i]),_=C.reduce((D,P)=>D+Number(P.duration)*(P.qty||1),0),T=Math.ceil(_/g),M=u?Ce.DateTime.fromObject(u).toFormat("yyyy-MM-dd"):null;(0,$.useEffect)(()=>{!a?.id||!M||e(mn({tenantId:o,staffId:a.id,date:M}))},[a?.id,M,e,o]);const N=D=>{v(P=>Math.max(0,Math.min(E.length-11,P+D*4)))};(0,$.useEffect)(()=>{u||e(Ht({day:x.day,month:x.month,year:x.year}))},[]),(0,$.useEffect)(()=>{if(!u||!E.length)return;const D=E.findIndex(P=>P.day===u.day&&P.month===u.month&&P.year===u.year);D!==-1&&v(Math.max(0,Math.min(E.length-t,D-Math.floor(t/2))))},[u,E,t]);const L=D=>{if(mr({dateObj:D,selectedProfessional:a,outletTimeZone:s||"UTC"})){ce.toast.warning("Staff is unavailable on this date");return}e(Ht({day:D.day,month:D.month,year:D.year})),e(Gi(null))},G=D=>{if(!b.length)return;const P=b.slice(D,D+T);if(P.length<T){ce.toast.warning("You don't have sufficient time for selected service");return}if(P.some(U=>U.isBooked||U.status!=="AVAILABLE")){ce.toast.warning("Selected time range is not fully available");return}e(Gi(b[D].start_time));const j=Array.from({length:T},(U,z)=>D+z);e(zi({indexes:j,ids:j.map(U=>b[U]?.id)}))};(0,$.useEffect)(()=>{if(!d||!b.length)return;const D=b.findIndex(j=>j.start_time===d);if(D===-1)return;const P=Array.from({length:T},(j,U)=>D+U);P.length===l.length&&P.every((j,U)=>j===l[U])||e(zi({indexes:P,ids:P.map(j=>b[j]?.id)}))},[d,b,T,l]),(0,$.useEffect)(()=>{if(!b.length||T===0)return;let D=!1;for(let P=0;P<=b.length-T;P++)if(b.slice(P,P+T).every(j=>!j.isBooked&&j.status==="AVAILABLE")){G(P),D=!0;break}D||(e(Gi(null)),e(zi({indexes:[],ids:[]})))},[b,T]),(0,$.useEffect)(()=>{const D=()=>{const P=window.innerWidth;P<1024?r(5):P<1280?r(7):r(11)};return D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const R=f?.morning||[],w=f?.afternoon||[],F=f?.evening||[],W=D=>D.some(P=>!P.isBooked&&P.status==="AVAILABLE"),q=()=>W(R)?"morning":W(w)?"afternoon":W(F)?"evening":null,[Z,ne]=(0,$.useState)(q()),$e=()=>{let D=null;for(let P=1;P<E.length;P++){const j=x.plus({days:P});if(!mr({dateObj:{day:j.day,month:j.month,year:j.year,fullDate:j.toISODate()},selectedProfessional:a,outletTimeZone:s||"UTC"})){D=j;break}}D&&e(Ht({day:D.day,month:D.month,year:D.year}))};return(0,$.useEffect)(()=>{const D=b[l[0]];D&&(R.some(P=>P.id===D.id)?ne("morning"):w.some(P=>P.id===D.id)?ne("afternoon"):F.some(P=>P.id===D.id)&&ne("evening"))},[l,b,R,w,F]),(0,$.useEffect)(()=>{const D=j=>j?.some(U=>!U.isBooked&&U.status==="AVAILABLE"),P=!D(R)&&!D(w)&&!D(F);!h&&P&&$e()},[R,w,F]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(ys,{buttonText:"Fill Details",onButtonClick:()=>{if(!d||!l.length){ce.toast.warning("Please select a time slot");return}e(Ee())},showTaxesOnlyIfTime:!0})}),renderButton:(0,c.jsx)("button",{onClick:()=>{if(!d||!l.length){ce.toast.warning("Please select a time slot");return}e(Ee())},disabled:!d||!l.length,className:"aaravpos-btn",children:(0,c.jsx)("span",{className:"aaravpos-btn-content",children:"Fill Details"})}),children:[(0,c.jsx)(Mt,{}),(0,c.jsx)("div",{style:{marginTop:15},children:(0,c.jsx)("h1",{className:"aaravpos-page-title",style:{marginBottom:10},children:"Choose a Time"})}),(0,c.jsxs)("div",{className:"arravpos-date-wrapper",children:[(0,c.jsxs)("div",{className:"arravpos-date-strip",children:[(0,c.jsx)(Dc,{onClick:()=>N(-1),children:(0,c.jsx)(Qn,{size:20})}),E.slice(y,y+t).map(D=>{const P=Ce.DateTime.fromISO(D.fullDate||""),j=P.weekday%7,U=Ce.DateTime.now().setZone(s).startOf("day"),z=P.hasSame(U,"day"),K=u?.day===D.day&&u?.month===D.month&&u?.year===D.year,Y=mr({dateObj:D,selectedProfessional:a,outletTimeZone:s||"UTC"});return(0,c.jsxs)("div",{onClick:()=>{Y||L(D)},className:["arravpos-date-card",Y?"arravpos-date-card-disabled":K?"arravpos-date-card-active":"arravpos-date-card-default"].filter(Boolean).join(" "),children:[Y&&(0,c.jsx)("div",{className:"arravpos-date-disabled-slash"}),(0,c.jsx)("span",{className:"arravpos-date-week",children:V$[j]}),(0,c.jsx)("span",{className:"arravpos-date-day",children:D.day}),z&&!K&&!Y&&(0,c.jsx)("span",{className:"arravpos-date-today",children:"TODAY"}),Y&&(0,c.jsx)("span",{className:"arravpos-date-unavailable",children:"UNAVAILABLE"})]},`${D.day}-${D.month}-${D.year}`)}),(0,c.jsx)(Dc,{onClick:()=>N(1),children:(0,c.jsx)(It,{size:20})})]}),(0,c.jsxs)("button",{onClick:()=>m(!0),className:"arravpos-calendar-btn",children:[(0,c.jsx)(M3,{size:16}),u?.month!=null?`${Mc[u.month-1]} ${u.year}`:`${Mc[x.month-1]} ${x.year}`]})]}),(0,c.jsxs)("div",{className:"arravpos-selected-professional",children:[a?.imageUrl?(0,c.jsx)("img",{src:a.imageUrl,alt:a.name,className:"arravpos-selected-professional-image"}):(0,c.jsx)("div",{className:"arravpos-selected-professional-avatar",style:{background:a?.color||"#111"},children:Ti(a?.name)}),(0,c.jsxs)("div",{className:"arravpos-selected-professional-content",children:[(0,c.jsx)("p",{className:"arravpos-selected-professional-name",children:a?.name}),(0,c.jsxs)("p",{className:"arravpos-selected-professional-services",children:[C.map(D=>D.name).join(", ")," ·"," ",_," mins"]})]})]}),(0,c.jsxs)("div",{className:"arravpos-scroll-area",children:[h?(0,c.jsx)("div",{className:"arravpos-loader-wrapper",children:(0,c.jsx)("div",{className:"arravpos-loader"})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(fa,{label:"Morning",icon:(0,c.jsx)(v$,{size:18,className:"arravpos-slot-icon"}),slots:R,allSlots:b,selectedSlotIndexes:l,handleSlotSelect:G,isOpen:Z==="morning",onToggle:()=>ne(Z==="morning"?null:"morning")}),(0,c.jsx)(fa,{label:"Afternoon",icon:(0,c.jsx)(p$,{size:18,className:"arravpos-slot-icon"}),slots:w,allSlots:b,selectedSlotIndexes:l,handleSlotSelect:G,isOpen:Z==="afternoon",onToggle:()=>ne(Z==="afternoon"?null:"afternoon")}),(0,c.jsx)(fa,{label:"Evening",icon:(0,c.jsx)(Q3,{size:18,className:"arravpos-slot-icon"}),slots:F,allSlots:b,selectedSlotIndexes:l,handleSlotSelect:G,isOpen:Z==="evening",onToggle:()=>ne(Z==="evening"?null:"evening")})]}),(0,c.jsx)(F$,{isOpen:p,onClose:()=>m(!1)})]})]})}function Dc({onClick:e,children:t}){return(0,c.jsx)("button",{onClick:e,className:"arravpos-date-nav-btn",children:t})}function fa({icon:e,label:t,slots:r,allSlots:n,selectedSlotIndexes:i,handleSlotSelect:a,isOpen:o,onToggle:s}){return!r||r?.length===0?null:(0,c.jsxs)("div",{className:"arravpos-slot-section",children:[(0,c.jsxs)("div",{onClick:s,className:"arravpos-slot-section-header",children:[(0,c.jsxs)("div",{className:"arravpos-slot-section-title",children:[(0,c.jsx)("span",{children:e}),t]}),(0,c.jsx)("span",{className:`arravpos-slot-section-arrow ${o?"arravpos-slot-section-arrow-open":""}`,children:(0,c.jsx)(Wh,{})})]}),o&&(0,c.jsx)("div",{className:"arravpos-slot-section-content",children:(0,c.jsx)("div",{className:"arravpos-slot-grid",children:r.map(l=>{const u=n.findIndex(h=>h.id===l.id),d=i.includes(u),f=l.isBooked||l.status!=="AVAILABLE";return(0,c.jsxs)("div",{onClick:()=>{f||a(u)},className:`arravpos-slot-card ${f?"arravpos-slot-card-disabled":d?"arravpos-slot-card-selected":"arravpos-slot-card-default"}`,children:[(0,c.jsx)("span",{className:"arravpos-slot-time",children:l.start_time}),(0,c.jsx)("span",{className:"arravpos-slot-status",children:f?"Booked":"Available"})]},l.id)})})})]})}var U$=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),W$=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},z$=e=>e.replace(/\D/g,"").slice(0,3);function G$({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,H.useSelector)(d=>d?.outletDetails),{control:i,handleSubmit:a,reset:o,formState:{errors:s,isSubmitting:l}}=(0,nt.useForm)({defaultValues:{name:"",number:"",expiry:"",cvv:""}}),u=async d=>{await t({name:d.name.trim(),number:d.number.trim(),expiry:d.expiry,cvv:d.cvv})&&e()};return(0,c.jsx)("div",{className:"arravpos-payment-overlay",children:(0,c.jsx)("form",{onSubmit:a(u),className:"arravpos-payment-form",children:(0,c.jsxs)("div",{className:"aaravpos-modal",children:[(0,c.jsxs)("div",{className:"arravpos-payment-header",children:[(0,c.jsx)("h2",{className:"arravpos-payment-title",children:"Make a payment"}),(0,c.jsxs)("span",{className:"arravpos-payment-amount",children:[(0,c.jsx)(he,{size:14}),r?.toFixed(2)]})]}),(0,c.jsxs)("div",{className:"arravpos-payment-fields",children:[(0,c.jsxs)("div",{className:"aaravpos-form-control",children:[(0,c.jsxs)("label",{htmlFor:"name",className:"arravpos-payment-label",children:["Card Holder Name ",(0,c.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{name:"name",control:i,rules:{required:"Name required",pattern:{value:/^[A-Za-z ]+$/,message:"Only letters allowed"}},render:({field:d})=>(0,c.jsx)("input",{...d,id:"name",autoComplete:"cc-name",placeholder:"Card Holder Name",onChange:f=>{const h=f.target.value.replace(/[^A-Za-z ]/g,"");d.onChange(h)},className:"arravpos-custom-input"})}),s.name&&(0,c.jsx)("p",{className:"arravpos-payment-error",children:s.name.message})]}),(0,c.jsxs)("div",{className:"aaravpos-form-control",children:[(0,c.jsxs)("label",{htmlFor:"number",className:"arravpos-payment-label",children:["Card Number ",(0,c.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{name:"number",control:i,rules:{required:"Card number required",validate:d=>d.replace(/\s/g,"").length===16||"Must be 16 digits"},render:({field:d})=>(0,c.jsx)("input",{...d,id:"number",placeholder:"4242 4242 4242 4242",onChange:f=>{d.onChange(U$(f.target.value))},className:"arravpos-custom-input"})}),s.number&&(0,c.jsx)("p",{className:"arravpos-payment-error",children:s.number.message})]}),(0,c.jsxs)("div",{className:"arravpos-payment-grid",children:[(0,c.jsxs)("div",{className:"aaravpos-form-control",children:[(0,c.jsxs)("label",{htmlFor:"expiry",className:"arravpos-payment-label",children:["Expiry Date ",(0,c.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{name:"expiry",control:i,rules:{required:"Expiry required",validate:d=>{if(!/^\d{2}\/\d{2}$/.test(d))return"Invalid format";const[f,h]=d.split("/").map(Number);if(f<1||f>12)return"Invalid month";const p=Ce.DateTime.now().setZone(n),m=p.year%100,y=p.month;return h<m||h===m&&f<y?"Card expired":!0}},render:({field:d})=>(0,c.jsx)("input",{...d,id:"expiry",placeholder:"MM/YY",onChange:f=>{d.onChange(W$(f.target.value))},className:"arravpos-custom-input"})}),s.expiry&&(0,c.jsx)("p",{className:"arravpos-payment-error",children:s.expiry.message})]}),(0,c.jsxs)("div",{className:"aaravpos-form-control",children:[(0,c.jsxs)("label",{htmlFor:"cvv",className:"arravpos-payment-label",children:["CVV ",(0,c.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{name:"cvv",control:i,rules:{required:"CVV required",minLength:{value:3,message:"3 digits required"}},render:({field:d})=>(0,c.jsx)("input",{...d,id:"cvv",placeholder:"CVV",onChange:f=>{d.onChange(z$(f.target.value))},className:"arravpos-custom-input"})}),s.cvv&&(0,c.jsx)("p",{className:"arravpos-payment-error",children:s.cvv.message})]})]})]}),(0,c.jsxs)("div",{className:"arravpos-payment-btn-grid",children:[(0,c.jsx)("button",{type:"button",onClick:()=>{o(),e()},className:"arravpos-payment-cancel-btn",children:"Cancel"}),(0,c.jsx)("button",{type:"submit",disabled:l,className:"arravpos-payment-submit-btn",children:l?"Processing...":"Proceed"})]})]})})})}function io(){return io=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},io.apply(null,arguments)}function H$(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 K$(e,t){if(e==null)return{};var r,n,i=H$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}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 q$(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 Y$(e){var t=q$(e,"string");return Jt(t)=="symbol"?t:t+""}function Rc(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,Y$(n.key),n)}}function X$(e,t,r){return t&&Rc(e.prototype,t),r&&Rc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ao(e,t)}function J$(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&&ao(e,t)}function ei(e){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ei(e)}function Jh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jh=function(){return!!e})()}function Q$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eb(e,t){if(t&&(Jt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q$(e)}function tb(e){var t=Jh();return function(){var r,n=ei(e);if(t){var i=ei(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eb(this,r)}}var rb=Le((e=>{var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function S(C){if(typeof C=="object"&&C!==null){var _=C.$$typeof;switch(_){case r:switch(C=C.type,C){case u:case d:case i:case o:case a:case h:return C;default:switch(C=C&&C.$$typeof,C){case l:case f:case y:case m:case s:return C;default:return _}}case n:return _}}}function E(C){return S(C)===d}e.AsyncMode=u,e.ConcurrentMode=d,e.ContextConsumer=l,e.ContextProvider=s,e.Element=r,e.ForwardRef=f,e.Fragment=i,e.Lazy=y,e.Memo=m,e.Portal=n,e.Profiler=o,e.StrictMode=a,e.Suspense=h,e.isAsyncMode=function(C){return E(C)||S(C)===u},e.isConcurrentMode=E,e.isContextConsumer=function(C){return S(C)===l},e.isContextProvider=function(C){return S(C)===s},e.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},e.isForwardRef=function(C){return S(C)===f},e.isFragment=function(C){return S(C)===i},e.isLazy=function(C){return S(C)===y},e.isMemo=function(C){return S(C)===m},e.isPortal=function(C){return S(C)===n},e.isProfiler=function(C){return S(C)===o},e.isStrictMode=function(C){return S(C)===a},e.isSuspense=function(C){return S(C)===h},e.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===i||C===d||C===o||C===a||C===h||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===m||C.$$typeof===s||C.$$typeof===l||C.$$typeof===f||C.$$typeof===g||C.$$typeof===b||C.$$typeof===x||C.$$typeof===v)},e.typeOf=S})),nb=Le((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,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function S(A){return typeof A=="string"||typeof A=="function"||A===i||A===d||A===o||A===a||A===h||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===y||A.$$typeof===m||A.$$typeof===s||A.$$typeof===l||A.$$typeof===f||A.$$typeof===g||A.$$typeof===b||A.$$typeof===x||A.$$typeof===v)}function E(A){if(typeof A=="object"&&A!==null){var ie=A.$$typeof;switch(ie){case r:var ye=A.type;switch(ye){case u:case d:case i:case o:case a:case h:return ye;default:var qe=ye&&ye.$$typeof;switch(qe){case l:case f:case y:case m:case s:return qe;default:return ie}}case n:return ie}}}var C=u,_=d,T=l,M=s,N=r,L=f,G=i,R=y,w=m,F=n,W=o,q=a,Z=h,ne=!1;function $e(A){return ne||(ne=!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.")),D(A)||E(A)===u}function D(A){return E(A)===d}function P(A){return E(A)===l}function j(A){return E(A)===s}function U(A){return typeof A=="object"&&A!==null&&A.$$typeof===r}function z(A){return E(A)===f}function K(A){return E(A)===i}function Y(A){return E(A)===y}function X(A){return E(A)===m}function J(A){return E(A)===n}function ee(A){return E(A)===o}function Q(A){return E(A)===a}function k(A){return E(A)===h}e.AsyncMode=C,e.ConcurrentMode=_,e.ContextConsumer=T,e.ContextProvider=M,e.Element=N,e.ForwardRef=L,e.Fragment=G,e.Lazy=R,e.Memo=w,e.Portal=F,e.Profiler=W,e.StrictMode=q,e.Suspense=Z,e.isAsyncMode=$e,e.isConcurrentMode=D,e.isContextConsumer=P,e.isContextProvider=j,e.isElement=U,e.isForwardRef=z,e.isFragment=K,e.isLazy=Y,e.isMemo=X,e.isPortal=J,e.isProfiler=ee,e.isStrictMode=Q,e.isSuspense=k,e.isValidElementType=S,e.typeOf=E})()})),Qh=Le(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=rb():t.exports=nb()})),ib=Le(((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var l={},u=0;u<10;u++)l["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(l).map(function(f){return l[f]}).join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=o()?Object.assign:function(s,l){for(var u,d=a(s),f,h=1;h<arguments.length;h++){u=Object(arguments[h]);for(var p in u)n.call(u,p)&&(d[p]=u[p]);if(r){f=r(u);for(var m=0;m<f.length;m++)i.call(u,f[m])&&(d[f[m]]=u[f[m]])}}return d}})),gs=Le(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),ep=Le(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),ab=Le(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=gs(),i={},a=ep();r=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function o(s,l,u,d,f){if(process.env.NODE_ENV!=="production"){for(var h in s)if(a(s,h)){var p;try{if(typeof s[h]!="function"){var m=Error((d||"React class")+": "+u+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}p=s[h](l,h,d,u,null,n)}catch(v){p=v}if(p&&!(p instanceof Error)&&r((d||"React class")+": type specification of "+u+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var y=f?f():"";r("Failed "+u+" type: "+p.message+(y??""))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},t.exports=o})),ob=Le(((e,t)=>{var r=Qh(),n=ib(),i=gs(),a=ep(),o=ab(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function l(){return null}t.exports=function(u,d){var f=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function p(P){var j=P&&(f&&P[f]||P[h]);if(typeof j=="function")return j}var m="<<anonymous>>",y={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:S(),arrayOf:E,element:C(),elementType:_(),instanceOf:T,node:G(),objectOf:N,oneOf:M,oneOfType:L,shape:w,exact:F};function v(P,j){return P===j?P!==0||1/P===1/j:P!==P&&j!==j}function g(P,j){this.message=P,this.data=j&&typeof j=="object"?j:{},this.stack=""}g.prototype=Error.prototype;function b(P){if(process.env.NODE_ENV!=="production")var j={},U=0;function z(Y,X,J,ee,Q,k,A){if(ee=ee||m,k=k||J,A!==i){if(d){var ie=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 ie.name="Invariant Violation",ie}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=ee+":"+J;!j[ye]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+k+"` prop on `"+ee+"`. 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."),j[ye]=!0,U++)}}return X[J]==null?Y?X[J]===null?new g("The "+Q+" `"+k+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new g("The "+Q+" `"+k+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:P(X,J,ee,Q,k)}var K=z.bind(null,!1);return K.isRequired=z.bind(null,!0),K}function x(P){function j(U,z,K,Y,X,J){var ee=U[z];if(Z(ee)!==P){var Q=ne(ee);return new g("Invalid "+Y+" `"+X+"` of type "+("`"+Q+"` supplied to `"+K+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return b(j)}function S(){return b(l)}function E(P){function j(U,z,K,Y,X){if(typeof P!="function")return new g("Property `"+X+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var J=U[z];if(!Array.isArray(J)){var ee=Z(J);return new g("Invalid "+Y+" `"+X+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected an array."))}for(var Q=0;Q<J.length;Q++){var k=P(J,Q,K,Y,X+"["+Q+"]",i);if(k instanceof Error)return k}return null}return b(j)}function C(){function P(j,U,z,K,Y){var X=j[U];if(!u(X)){var J=Z(X);return new g("Invalid "+K+" `"+Y+"` of type "+("`"+J+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return b(P)}function _(){function P(j,U,z,K,Y){var X=j[U];if(!r.isValidElementType(X)){var J=Z(X);return new g("Invalid "+K+" `"+Y+"` of type "+("`"+J+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return b(P)}function T(P){function j(U,z,K,Y,X){if(!(U[z]instanceof P)){var J=P.name||m,ee=D(U[z]);return new g("Invalid "+Y+" `"+X+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected ")+("instance of `"+J+"`."))}return null}return b(j)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),l;function j(U,z,K,Y,X){for(var J=U[z],ee=0;ee<P.length;ee++)if(v(J,P[ee]))return null;var Q=JSON.stringify(P,function(A,ie){return ne(ie)==="symbol"?String(ie):ie});return new g("Invalid "+Y+" `"+X+"` of value `"+String(J)+"` "+("supplied to `"+K+"`, expected one of "+Q+"."))}return b(j)}function N(P){function j(U,z,K,Y,X){if(typeof P!="function")return new g("Property `"+X+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var J=U[z],ee=Z(J);if(ee!=="object")return new g("Invalid "+Y+" `"+X+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected an object."));for(var Q in J)if(a(J,Q)){var k=P(J,Q,K,Y,X+"."+Q,i);if(k instanceof Error)return k}return null}return b(j)}function L(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var j=0;j<P.length;j++){var U=P[j];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$e(U)+" at index "+j+"."),l}function z(K,Y,X,J,ee){for(var Q=[],k=0;k<P.length;k++){var A=P[k],ie=A(K,Y,X,J,ee,i);if(ie==null)return null;ie.data&&a(ie.data,"expectedType")&&Q.push(ie.data.expectedType)}var ye=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new g("Invalid "+J+" `"+ee+"` supplied to "+("`"+X+"`"+ye+"."))}return b(z)}function G(){function P(j,U,z,K,Y){return W(j[U])?null:new g("Invalid "+K+" `"+Y+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return b(P)}function R(P,j,U,z,K){return new g((P||"React class")+": "+j+" type `"+U+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function w(P){function j(U,z,K,Y,X){var J=U[z],ee=Z(J);if(ee!=="object")return new g("Invalid "+Y+" `"+X+"` of type `"+ee+"` "+("supplied to `"+K+"`, expected `object`."));for(var Q in P){var k=P[Q];if(typeof k!="function")return R(K,Y,X,Q,ne(k));var A=k(J,Q,K,Y,X+"."+Q,i);if(A)return A}return null}return b(j)}function F(P){function j(U,z,K,Y,X){var J=U[z],ee=Z(J);if(ee!=="object")return new g("Invalid "+Y+" `"+X+"` of type `"+ee+"` "+("supplied to `"+K+"`, expected `object`."));for(var Q in n({},U[z],P)){var k=P[Q];if(a(P,Q)&&typeof k!="function")return R(K,Y,X,Q,ne(k));if(!k)return new g("Invalid "+Y+" `"+X+"` key `"+Q+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(U[z],null," ")+`
|
|
31
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var A=k(J,Q,K,Y,X+"."+Q,i);if(A)return A}return null}return b(j)}function W(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(W);if(P===null||u(P))return!0;var j=p(P);if(j){var U=j.call(P),z;if(j!==P.entries){for(;!(z=U.next()).done;)if(!W(z.value))return!1}else for(;!(z=U.next()).done;){var K=z.value;if(K&&!W(K[1]))return!1}}else return!1;return!0;default:return!1}}function q(P,j){return P==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function Z(P){var j=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":q(j,P)?"symbol":j}function ne(P){if(typeof P>"u"||P===null)return""+P;var j=Z(P);if(j==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return j}function $e(P){var j=ne(P);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function D(P){return!P.constructor||!P.constructor.name?m:P.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y}})),sb=Le(((e,t)=>{var r=gs();function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function a(l,u,d,f,h,p){if(p!==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}}a.isRequired=a;function o(){return a}var s={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return s.PropTypes=s,s}})),lb=Le(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=Qh(),n=!0;t.exports=ob()(r.isElement,n)}else t.exports=sb()()})),O=Lr(lb(),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 $s(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}$s.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,i=0;i<=e;i+=1){var a=i/e,o=this._point(a,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this._point(a,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){var l=o-r,u=s-n;t+=Math.sqrt(l*l+u*u)}r=o,n=s}return t};$s.prototype._point=function(e,t,r,n,i){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+i*e*e*e};function cb(e,t,r){var n,i,a,o=null,s=0;r||(r={});var l=function(){s=r.leading===!1?0:Date.now(),o=null,a=e.apply(n,i),o||(n=i=null)};return function(){var u=Date.now();!s&&r.leading===!1&&(s=u);var d=t-(u-s);return n=this,i=arguments,d<=0||d>t?(o&&(clearTimeout(o),o=null),s=u,a=e.apply(n,i),o||(n=i=null)):!o&&r.trailing!==!1&&(o=setTimeout(l,d)),a}}function se(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=cb(se.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=se.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(i){i.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(i))},this._handleMouseMove=function(i){r._mouseButtonDown&&r._strokeMoveUpdate(i)},this._handleMouseUp=function(i){i.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(i))},this._handleTouchStart=function(i){if(i.targetTouches.length===1){var a=i.changedTouches[0];r._strokeBegin(a)}},this._handleTouchMove=function(i){i.preventDefault();var a=i.targetTouches[0];r._strokeMoveUpdate(a)},this._handleTouchEnd=function(i){i.target===r._canvas&&(i.preventDefault(),r._strokeEnd(i))},this.on()}se.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};se.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,i=r.ratio||window.devicePixelRatio||1,a=r.width||this._canvas.width/i,o=r.height||this._canvas.height/i;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,a,o)},this._isEmpty=!1};se.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),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}};se.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};se.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)};se.prototype.isEmpty=function(){return this._isEmpty};se.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};se.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),i=this._data[this._data.length-1],a=i&&i[i.length-1],o=a&&n.distanceTo(a)<this.minDistance;if(!(a&&o)){var s=this._addPoint(n),l=s.curve,u=s.widths;l&&u&&this._drawCurve(l,u.start,u.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}};se.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],i=n[n.length-1];r.equals(i)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)};se.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};se.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)};se.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};se.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new At(e-n.left,t-n.top,r||new Date().getTime())};se.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 i=r.c1,a=new $s(t[1],n,i,t[2]),o=this._calculateCurveWidths(a);return t.shift(),{curve:a,widths:o}}return{}};se.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,i=e.y-t.y,a=t.x-r.x,o=t.y-r.y,s={x:(e.x+t.x)/2,y:(e.y+t.y)/2},l={x:(t.x+r.x)/2,y:(t.y+r.y)/2},u=Math.sqrt(n*n+i*i),d=Math.sqrt(a*a+o*o),f=s.x-l.x,h=s.y-l.y,p=d/(u+d),m={x:l.x+f*p,y:l.y+h*p},y=t.x-m.x,v=t.y-m.y;return{c1:new At(s.x+y,s.y+v),c2:new At(l.x+y,l.y+v)}};se.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},i=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,a=this._strokeWidth(i);return n.start=this._lastWidth,n.end=a,this._lastVelocity=i,this._lastWidth=a,n};se.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};se.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};se.prototype._drawCurve=function(e,t,r){var n=this._ctx,i=r-t,a=Math.floor(e.length());n.beginPath();for(var o=0;o<a;o+=1){var s=o/a,l=s*s,u=l*s,d=1-s,f=d*d,h=f*d,p=h*e.startPoint.x;p+=3*f*s*e.control1.x,p+=3*d*l*e.control2.x,p+=u*e.endPoint.x;var m=h*e.startPoint.y;m+=3*f*s*e.control1.y,m+=3*d*l*e.control2.y,m+=u*e.endPoint.y;var y=t+u*i;this._drawPoint(p,m,y)}n.closePath(),n.fill()};se.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()};se.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var i=e[n];if(i.length>1)for(var a=0;a<i.length;a+=1){var o=i[a],s=new At(o.x,o.y,o.time),l=o.color;if(a===0)this.penColor=l,this._reset(),this._addPoint(s);else if(a!==i.length-1){var u=this._addPoint(s),d=u.curve,f=u.widths;d&&f&&t(d,f,l)}}else{this._reset();var h=i[0];r(h)}}};se.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),i=0,a=0,o=r.width/n,s=r.height/n,l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttributeNS(null,"width",r.width),l.setAttributeNS(null,"height",r.height),this._fromData(t,function(v,g,b){var x=document.createElement("path");if(!isNaN(v.control1.x)&&!isNaN(v.control1.y)&&!isNaN(v.control2.x)&&!isNaN(v.control2.y)){var S="M "+v.startPoint.x.toFixed(3)+","+v.startPoint.y.toFixed(3)+" "+("C "+v.control1.x.toFixed(3)+","+v.control1.y.toFixed(3)+" ")+(v.control2.x.toFixed(3)+","+v.control2.y.toFixed(3)+" ")+(v.endPoint.x.toFixed(3)+","+v.endPoint.y.toFixed(3));x.setAttribute("d",S),x.setAttribute("stroke-width",(g.end*2.25).toFixed(3)),x.setAttribute("stroke",b),x.setAttribute("fill","none"),x.setAttribute("stroke-linecap","round"),l.appendChild(x)}},function(v){var g=document.createElement("circle"),b=typeof e.dotSize=="function"?e.dotSize():e.dotSize;g.setAttribute("r",b),g.setAttribute("cx",v.x),g.setAttribute("cy",v.y),g.setAttribute("fill",v.color),l.appendChild(g)});var u="data:image/svg+xml;base64,",d='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+i+" "+a+" "+o+" "+s+'"')+(' width="'+o+'"')+(' height="'+s+'"')+">",f=l.innerHTML;if(f===void 0){var h=document.createElement("dummy"),p=l.childNodes;h.innerHTML="";for(var m=0;m<p.length;m+=1)h.appendChild(p[m].cloneNode(!0));f=h.innerHTML}var y=d+f+"</svg>";return u+btoa(y)};se.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};se.prototype.toData=function(){return this._data};var ub=Le(((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(a){if(i[a])return i[a].exports;var o=i[a]={exports:{},id:a,loaded:!1};return r[a].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var i={};return n.m=r,n.c=i,n.p="",n(0)})([function(r,n){"use strict";function i(u){var d=u.getContext("2d"),f=u.width,h=u.height,p=d.getImageData(0,0,f,h).data,m=s(!0,f,h,p),y=s(!1,f,h,p),v=l(!0,f,h,p),g=l(!1,f,h,p)-v+1,b=y-m+1,x=d.getImageData(v,m,g,b);return u.width=g,u.height=b,d.clearRect(0,0,g,b),d.putImageData(x,0,0),u}function a(u,d,f,h){return{red:h[4*(f*d+u)],green:h[4*(f*d+u)+1],blue:h[4*(f*d+u)+2],alpha:h[4*(f*d+u)+3]}}function o(u,d,f,h){return a(u,d,f,h).alpha}function s(u,d,f,h){for(var p=u?1:-1,m=u?0:f-1;u?m<f:m>-1;m+=p)for(var y=0;y<d;y++)if(o(y,m,d,h))return m;return null}function l(u,d,f,h){for(var p=u?1:-1,m=u?0:d-1;u?m<d:m>-1;m+=p)for(var y=0;y<f;y++)if(o(m,y,d,h))return m;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=i}])})})),db=Lr(ub(),1),fb=["canvasProps","clearOnResize"],Oi=(function(e){J$(r,e);var t=tb(r);function r(){var n;Z$(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(s){n._canvas=s,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var s=n.props;return s.canvasProps,s.clearOnResize,K$(s,fb)},n.componentDidMount=function(){var s=n.getCanvas();n._sigPad=new se(s,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 s=n.getCanvas(),l=document.createElement("canvas");return l.width=s.width,l.height=s.height,l.getContext("2d").drawImage(s,0,0),(0,db.default)(l)},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 s,l,u=(s=n.props.canvasProps)!==null&&s!==void 0?s:{},d=u.width,f=u.height;if(!(typeof d<"u"&&typeof f<"u")){var h=n.getCanvas(),p=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof d>"u"&&(h.width=h.offsetWidth*p),typeof f>"u"&&(h.height=h.offsetHeight*p),h.getContext("2d").scale(p,p),n.clear()}},n.render=function(){var s=n.props.canvasProps;return $.default.createElement("canvas",io({ref:n.setRef},s))},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(s,l){return n.getSignaturePad().fromDataURL(s,l)},n.toDataURL=function(s,l){return n.getSignaturePad().toDataURL(s,l)},n.fromData=function(s){return n.getSignaturePad().fromData(s)},n.toData=function(){return n.getSignaturePad().toData()},n}return X$(r)})($.Component);Oi.propTypes={velocityFilterWeight:O.default.number,minWidth:O.default.number,maxWidth:O.default.number,minDistance:O.default.number,dotSize:O.default.oneOfType([O.default.number,O.default.func]),penColor:O.default.string,throttle:O.default.number,onEnd:O.default.func,onBegin:O.default.func,canvasProps:O.default.object,clearOnResize:O.default.bool};Oi.defaultProps={clearOnResize:!0};Oi.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var hb=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:i})=>{const a=(0,$.useRef)(null),{register:o,handleSubmit:s,control:l,reset:u,watch:d,setValue:f,formState:{errors:h,isSubmitting:p}}=(0,nt.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),m=d("accepted"),y=d("typedName"),v=d("signatureDataUrl"),g=()=>{u(),r==="DRAW_SIGNATURE"&&a.current?.clear()},b=()=>{g(),e()},x=()=>{a.current?.clear(),f("signatureDataUrl","")},S=C=>{let _="";if(r==="DRAW_SIGNATURE"){const T=a.current;if(T&&!T.isEmpty())_=T.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?C.accepted:!1,typedName:r==="TYPED_NAME"?C.typedName.trim():"",signatureDataUrl:_,emailMe:C.emailMe}),g(),e()},E=!p&&(r==="CHECKBOX_ONLY"?m:r==="TYPED_NAME"?y?.trim().length>2:r==="DRAW_SIGNATURE"?!!v:!1);return(0,c.jsxs)("div",{className:"arravpos-consent-overlay",children:[(0,c.jsx)("div",{className:"arravpos-consent-backdrop"}),(0,c.jsxs)("div",{className:"arravpos-consent-modal",children:[(0,c.jsxs)("div",{className:"arravpos-consent-header",children:[(0,c.jsx)("h3",{className:"arravpos-consent-title",children:n||"Consent Form"}),(0,c.jsx)("button",{onClick:b,className:"arravpos-consent-close-btn",children:(0,c.jsx)(sr,{})})]}),(0,c.jsx)("div",{className:"arravpos-consent-content-wrapper",children:(0,c.jsx)("div",{className:"arravpos-consent-content-box",children:(0,c.jsx)("div",{dangerouslySetInnerHTML:{__html:i},className:"arravpos-consent-content"})})}),(0,c.jsxs)("form",{onSubmit:s(S),children:[r==="CHECKBOX_ONLY"&&(0,c.jsxs)("label",{className:"arravpos-consent-checkbox-label",htmlFor:"accepted",children:[(0,c.jsx)("input",{type:"checkbox",...o("accepted",{required:"You must accept terms"}),id:"accepted",className:"arravpos-consent-checkbox"}),(0,c.jsx)("span",{className:"arravpos-consent-checkbox-text",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,c.jsxs)("div",{className:"arravpos-consent-typed-wrapper",children:[(0,c.jsxs)("label",{className:"arravpos-consent-input-label",htmlFor:"typedName",children:["Full Name",(0,c.jsx)("span",{className:"arravpos-consent-required",children:"*"})]}),(0,c.jsx)("input",{...o("typedName",{required:"Name is required",validate:C=>C.trim().length>2||"Enter full name"}),id:"typedName",placeholder:"Type your full name",className:`arravpos-consent-input ${h.typedName?"arravpos-consent-input-error":"arravpos-consent-input-normal"}`}),(0,c.jsx)("p",{className:"arravpos-consent-helper-text",children:"By typing your name, you agree to the consent above"}),h.typedName&&(0,c.jsx)("p",{className:"arravpos-consent-error",children:h.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,c.jsx)(nt.Controller,{control:l,name:"signatureDataUrl",rules:{validate:()=>a.current&&!a.current.isEmpty()?!0:"Signature required"},render:({field:C})=>(0,c.jsxs)("div",{className:"arravpos-consent-signature-wrapper",children:[(0,c.jsx)(Oi,{ref:a,canvasProps:{className:"arravpos-consent-signature-canvas"},onEnd:()=>{const _=a.current;if(!_)return;const T=_.getCanvas().toDataURL("image/png");C.onChange(T)}}),h.signatureDataUrl&&(0,c.jsx)("p",{className:"arravpos-consent-error arravpos-consent-error-signature",children:h.signatureDataUrl.message}),(0,c.jsxs)("div",{className:"arravpos-consent-signature-actions",children:[(0,c.jsxs)("button",{type:"button",onClick:x,className:"arravpos-consent-clear-btn",children:[(0,c.jsx)(l$,{size:14}),"Clear"]}),(0,c.jsxs)("label",{className:"arravpos-consent-email-label",htmlFor:"emailme",children:[(0,c.jsx)("input",{type:"checkbox",...o("emailMe"),id:"emailme",className:"arravpos-consent-email-checkbox"}),(0,c.jsx)("span",{className:"arravpos-consent-email-text",children:"Email me"})]})]})]})}),(0,c.jsxs)("div",{className:"arravpos-consent-footer",children:[(0,c.jsx)("button",{type:"button",onClick:b,className:"arravpos-consent-cancel-btn",children:"Cancel"}),(0,c.jsxs)("button",{type:"submit",disabled:!E,className:`arravpos-consent-submit-btn ${E?"arravpos-consent-submit-active":"arravpos-consent-submit-disabled"}`,children:[(0,c.jsx)(fs,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},pb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sn="consentDraftByService",mb=15,vb=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function yb(){const e=(0,H.useDispatch)(),{tenantId:t,id:r}=(0,H.useSelector)(I=>I.outletDetails),{timeZone:n,image:i,outletName:a,address:o}=(0,H.useSelector)(I=>I.outletDetails),{staff:s,selectedServices:l,selectedProfessional:u}=(0,H.useSelector)(I=>I.service),{selectedSlotIds:d,selectedDate:f,selectedTime:h}=(0,H.useSelector)(I=>I.slots),{userDetails:p,bookingMode:m,tipPct:y}=(0,H.useSelector)(I=>I.appointment),v=Array.isArray(l)?l:[l],{selectedSlotIndexes:g,slots:b}=(0,H.useSelector)(I=>I.slots),[x,S]=(0,$.useState)(!1),[E,C]=(0,$.useState)(!1),[_,T]=(0,$.useState)(null),[M,N]=(0,$.useState)("person"),[L,G]=(0,$.useState)(!1),[R,w]=(0,$.useState)(""),[F,W]=(0,$.useState)(""),[q,Z]=(0,$.useState)(null),[ne,$e]=(0,$.useState)(null),[D,P]=(0,$.useState)({}),[j,U]=(0,$.useState)({}),[z,K]=(0,$.useState)(!1),[Y,X]=(0,$.useState)(!1),J=(0,$.useRef)(!1),ee=(0,$.useRef)(""),Q=Ce.DateTime.now().setZone(n??"UTC"),k=v.map(I=>{const V=s?.find(le=>le.id===u?.id)?.assignments?.find(le=>le.id===I.id),te={...I,price:V?.price??I.price??I.min_price??0,duration:V?.duration??I.estimated_time??I.min_time??0};return{...te,duration:V?.duration??I.estimated_time??I.min_time??0,tax:Ic(te),unitTax:Ic(te,{perUnit:!0})}}),A=[...b?.morning??[],...b?.afternoon??[],...b?.evening??[]],ie=k.reduce((I,V)=>I+Number(V.duration??0),0),ye=Math.ceil(ie/mb),qe=I=>{if(!A.length)return"";const V=A[I]?.start_time,te=A[I+ye-1];return!V||!te?"":`${V} - ${te.end_time??te.start_time}`},Yr={day:Number(f?.day??Q.day),month:Number(f?.month??Q.month),year:Number(f?.year??Q.year)},Ps=g?.[0],Es=Ps!==void 0?qe(Ps):null,zp=Es?`${pb[Yr.month]} ${Yr.day} at ${Es}`:null,Ri=k.reduce((I,V)=>I+Number(V.price)*(V.qty??1),0),Ts=k.reduce((I,V)=>I+V.tax,0),Gp=Math.round(Ts*100),Os=Ri*y/100,Hp=Math.round(Os*100),_s=Ri+Os+Ts,De=(0,$.useMemo)(()=>v.filter(I=>!(!Do(I)||(I?.consent_rule?.enforcementMode??I?.enforcementMode)==="FIXED")),[v]),Kp=(0,$.useMemo)(()=>De.map(I=>String(I.id)).filter(Boolean),[De]),qp=I=>{const V=I?.consent_template??I?.consentTemplate??null;return{heading:String(V?.heading??"").trim(),consent:String(V?.consent??"").trim()}},ki=I=>{P(V=>({...V,[String(I)]:!0}))};(0,$.useEffect)(()=>{p&&De?.length>0&&Yp()},[p,De?.length]);const Yp=async()=>{const I=p?.id;if(I){K(!0);try{const V={};for(const te of De){const le=String(te.id),be=String(te.consent_form_id??"");if(!le||!be)continue;const pe=ol(te);if(!(pe==="EVERY_X_DAYS"||pe==="ONCE_PER_CUSTOMER")){V[le]={data:{checked:!0,needsSignature:!0}};continue}const Fe=!!(await ll(I,be,le))?.data?.needsSignature;V[le]={data:{checked:!0,needsSignature:Fe}},Fe||ki(le)}U(V)}catch(V){console.error(V)}finally{K(!1)}}},Li=(0,$.useMemo)(()=>De.filter(I=>{const V=String(I.id);if(D[V])return!1;const te=j[V];return!(te?.data?.checked&&te?.data?.needsSignature===!1)}),[De,D,j]),As=Kp.length,js=As-Li.length,Is=Li.length===0,Ms=async()=>{if(!J.current){J.current=!0;try{if(!p?.firstName){ce.toast.warn("Please enter First Name before signing consent.");return}if(!p?.email&&!p?.phone){ce.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const I=Li[0];if(!I){await Fi();return}const V=String(I.id);if(ee.current===V&&L)return;ee.current=V;const te=String(I.consent_form_id??"");if(!te){ce.toast.error("Consent form missing.");return}const le=sl(I);if(!le){ce.toast.error("Consent enforcement method not found.");return}const be=p?.id;if(ol(I)!=="EVERY_VISIT"&&be){const et=!!(await ll(be,te,V))?.data?.needsSignature;if(U(Xr=>({...Xr,[V]:{data:{checked:!0,needsSignature:et}}})),!et){ki(V),ce.toast.success("Consent already signed for this service."),setTimeout(()=>Ms(),250);return}}else U(Fe=>({...Fe,[V]:{data:{checked:!0,needsSignature:!0}}}));const{heading:pe,consent:Ie}=qp(I);if(!pe||!Ie){ce.toast.error("Consent template missing.");return}w(pe),W(Ie),Z(le),$e(V),G(!0)}catch(I){console.error(I),ce.toast.error(I?.message??"Consent check failed")}finally{J.current=!1}}},Xp=(I,V)=>{try{const te=localStorage.getItem(sn),le=te?JSON.parse(te):{};le[String(I)]=V,localStorage.setItem(sn,JSON.stringify(le))}catch(te){console.error("Failed to save consent draft",te)}},Zp=()=>{try{return JSON.parse(localStorage.getItem(sn)??"{}")}catch{return{}}},Jp=I=>{const V=String(ne);if(!V)return;const te=De.find(Ie=>String(Ie.id)===V);if(!te)return;const le=String(te.consent_form_id??""),be=sl(te);if(!le||!be){ce.toast.error("Consent form/method missing.");return}let pe="CHECKBOX_ONLY";be==="TYPED_NAME"?pe="TYPED_NAME":be==="DRAW_SIGNATURE"&&(pe="SIGNATURE_IMAGE"),Xp(V,{serviceId:V,concentFormId:le,signatureType:pe,typedName:I?.typedName,isChecked:I?.accepted,signatureDataUrl:I?.signatureDataUrl,emailMe:I?.emailMe}),ki(V),G(!1),ee.current="",ce.toast.success("Consent captured.")},Qp=()=>{G(!1),$e(null)},e0=async(I,V,te)=>{const le=Zp(),be=Object.entries(le).map(([pe,Ie])=>({serviceId:pe,concentFormId:Ie.concentFormId,captured:Ie})).filter(pe=>pe.serviceId&&pe.concentFormId);for(const pe of be){const{serviceId:Ie,concentFormId:Fe,captured:et}=pe,Xr=et.signatureType||(et.typedName?"TYPED_NAME":et.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Rs={tenantId:t,outletId:r,appointmentId:I,customerId:V,serviceId:Ie,formId:Fe,staffId:te,signatureType:Xr,typedName:et.typedName,imageUrl:et.signatureDataUrl};Xr==="CHECKBOX_ONLY"&&(Rs.isChecked=et.isChecked??!0),await d1(Rs)}localStorage.removeItem(sn)};let Ds="";f&&(Ds=`${f?.year}-${String(f?.month+1).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const t0={tenantId:t,outletId:r,staffId:u?.id,date:Ds,startTime:h,serviceIds:v.map(I=>I.id),slotIds:d,isWalkIn:!1,requiresConsent:De.length>0,customer:{first_name:p?.firstName,last_name:p?.lastName,email:p?.email,phone:p?.phone}},Fi=async()=>{if(De.length&&!Is){ce.toast.warn("Please complete all consent forms first");return}try{S(!0);const I=await e(vn(t0)).unwrap(),V=I?.data??I,te=V.id||"",le=V.customerId||V.customer?.id||"",be=V.staffId||u?.id||"";m==="booking"&&js>0&&await e0(te,le,be),M==="card"?(T({appointmentId:te,customerId:le}),C(!0)):(e(Hi(String(te))),e(Ee()))}catch(I){const V=I?.payload?.message||I?.data?.message||I?.message||"Staff not working on this day";ce.toast.error(V)}finally{S(!1)}},r0=async()=>{if(!h&&m==="booking")return void ce.toast.error("Select time");if(!p?.firstName)return void ce.toast.error("Enter first name");if(!p?.email&&!p?.phone)return void ce.toast.error("Email or phone required");De.length>0?Is?await Fi():await Ms():await Fi()},n0=I=>{const V=I.replace(/\s/g,"");return/^4/.test(V)?"VISA":/^5[1-5]/.test(V)?"MASTERCARD":/^3[47]/.test(V)?"AMEX":/^6/.test(V)?"DISCOVER":"UNKNOWN"},i0=async I=>{try{S(!0);const V=_?.appointmentId,te=String(_?.customerId);if(!V||!r)return ce.toast.error("Something went wrong."),!1;const le=n0(I.number),be=await c1({appointmentId:V,customerId:te,outletId:r,referenceNo:V,currency:"USD",amountCents:Math.round(_s*100),tipAmountCents:M==="card"?Hp:0,taxAmountCents:M==="card"?Gp:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:I.name,cardNumber:I.number.replace(/\s/g,""),cardType:le,cardExpiry:vb(I.expiry),cvData:I.cvv},billingContact:{name:{firstName:p?.firstName??"",lastName:p?.lastName??""},email:p?.email??""}}}),pe=be?.data?.data??be?.data??be??{},Ie=pe?.orderId;if(String(pe?.mappedStatus).toLowerCase()==="succeeded"||String(pe?.reasonMessage).toLowerCase()==="success"){if(ce.toast.success("Payment successful!"),Ie)try{await u1(Ie)}catch(Fe){ce.toast.warning(Fe instanceof Error?Fe.message:String(Fe??"Payment done, but finalize failed"))}}else ce.toast.warning("Payment pending");return C(!1),e(Hi(String(_?.appointmentId))),e(Ee()),!0}catch(V){return ce.toast.warning(V instanceof Error?V.message:"Payment failed, but appointment is booked"),C(!1),e(Hi(String(_?.appointmentId))),e(Ee()),!0}finally{S(!1)}},a0=()=>C(!1),o0=()=>!h||!p?.firstName||!p?.email&&!p?.phone;return(0,c.jsxs)(Dt,{isSidebarOpen:Y,handleSidebarOpen:()=>X(I=>!I),sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(ys,{buttonText:"Book Appointment",onButtonClick:r0,showTip:M==="card",tipPct:y,onTipChange:I=>e(h1(I??0)),consentRequired:De?.length>0,consentCompleted:js,totalConsents:As,checkingConsent:z,loading:x,isBookingDisabled:o0(),handleSidebarOpen:()=>X(I=>!I)})}),isConfirm:!0,children:[(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title",children:"Confirm Booking"}),(0,c.jsx)("p",{className:"aaravpos-sub-title",children:"Review your appointment details before booking"}),(0,c.jsxs)("div",{className:"arravpos-booking-wrapper",children:[(0,c.jsxs)("div",{className:"arravpos-outlet-info",children:[i&&(0,c.jsx)("div",{className:"arravpos-outlet-logo",children:(0,c.jsx)("img",{src:i??"/logo.svg",alt:"Logo",className:"arravpos-outlet-logo-img"})}),(0,c.jsxs)("div",{className:"arravpos-outlet-content",children:[(0,c.jsx)("p",{className:"arravpos-outlet-name",children:a??"-"}),(0,c.jsxs)("p",{className:"arravpos-outlet-address",children:[o??"-",(0,c.jsx)("br",{})]})]})]}),(0,c.jsx)("div",{className:"arravpos-booking-scroll",children:(0,c.jsxs)("div",{className:"arravpos-booking-grid",children:[(0,c.jsxs)("div",{className:"arravpos-booking-column",children:[(0,c.jsx)(kc,{children:"Appointment"}),(0,c.jsxs)(gb,{children:[(0,c.jsxs)("div",{className:"arravpos-appointment-header",children:[(0,c.jsx)($b,{pro:u}),(0,c.jsxs)("div",{className:"arravpos-appointment-content",children:[(0,c.jsx)("p",{className:"arravpos-appointment-name",children:u?.name}),(0,c.jsx)("p",{className:"arravpos-appointment-services",children:v.map(I=>I.name).join(", ")})]}),(0,c.jsxs)("span",{className:"arravpos-appointment-price",children:[(0,c.jsx)(he,{size:14}),Ri]})]}),(0,c.jsxs)("div",{className:"arravpos-appointment-date",children:[(0,c.jsx)(R3,{}),(0,c.jsx)("span",{className:"arravpos-appointment-date-text",children:zp??"No time selected"})]})]})]}),(0,c.jsxs)("div",{className:"arravpos-booking-column",children:[(0,c.jsx)(kc,{children:"Payment Method"}),(0,c.jsx)(Lc,{icon:(0,c.jsx)(f$,{}),label:"Pay in person",selected:M==="person",onClick:()=>N("person")}),(0,c.jsx)(Lc,{icon:(0,c.jsx)(z3,{}),label:"Pay with card",selected:M==="card",onClick:()=>N("card")})]})]})})]})]})]}),E&&(0,c.jsx)(G$,{onClose:a0,onPay:i0,amount:_s}),L&&ne&&(0,c.jsx)(hb,{enforcement:q,heading:R,consent:F,onClose:Qp,onConfirm:Jp},ne??"consent")]})}function gb({children:e}){return(0,c.jsx)("div",{className:"arravpos-card-box",children:e})}function $b({pro:e}){return(0,c.jsx)(c.Fragment,{children:e.imageUrl?(0,c.jsx)("img",{src:e.imageUrl,alt:e.name,className:"arravpos-profile-image"}):(0,c.jsx)("div",{className:"arravpos-profile-avatar",style:{background:e.color??"#111"},children:Ti(e.name)})})}function kc({children:e}){return(0,c.jsx)("p",{className:"arravpos-section-label",children:e})}function Lc({icon:e,label:t,selected:r,onClick:n}){return(0,c.jsxs)("div",{onClick:n,className:`arravpos-select-card ${r?"arravpos-select-card-active":"arravpos-select-card-default"}`,children:[(0,c.jsx)("div",{children:e}),t,(0,c.jsx)("span",{className:"arravpos-select-check",children:r&&(0,c.jsx)(fs,{})})]})}var tp={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}"]]]}},bb=Le(((e,t)=>{(function(){"use strict";var r={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(o=a(o,i(l)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var l in o)r.call(o,l)&&o[l]&&(s=a(s,l));return s}function a(o,s){return s?o?o+" "+s:o+s:o}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 xb(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 Sb(e,t,r){for(var n={},i="",a=0,o=0;o<e.length;){var s=r(e[o],i,n);s!==void 0&&(i+=s,t!==void 0&&(t===o?a=i.length-1:t>o&&(a=i.length))),o++}return t===void 0&&(a=i.length),{value:i,caret:a}}function Cb(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=Nb(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.
|
|
32
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eb(e,t){if(e){if(typeof e=="string")return Vc(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 Vc(e,t)}}function Vc(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 Tb(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(i){return{text:i}};var n=oo(t,e);return function(i){if(!i)return{text:"",template:e};for(var a=0,o="",s=Pb(e.split("")),l;!(l=s()).done;){var u=l.value;if(u!==t){o+=u;continue}if(o+=i[a],a++,a===i.length&&i.length<n)break}return r&&(o=wb(o,e)),{text:o,template:e}}}function Ob(e,t,r){typeof r=="string"&&(r=Tb(r));var n=r(e)||{},i=n.text,a=n.template;if(i===void 0&&(i=e),a)if(t===void 0)t=i.length;else{for(var o=0,s=!1,l=-1;o<i.length&&o<a.length;){if(i[o]!==a[o]){if(t===0){s=!0,t=o;break}l=o,t--}o++}s||(t=l+1)}return{text:i,caret:t}}function _b(e){return e.hasAttribute("readonly")}function Ab(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}var Bc={Backspace:8,Delete:46};function jb(e){switch(e.keyCode){case Bc.Backspace:return"Backspace";case Bc.Delete:return"Delete"}}function Ib(e){return e.selectionStart}function rp(e,t){t!==void 0&&(Mb()?setTimeout(function(){return e.setSelectionRange(t,t)},0):e.setSelectionRange(t,t))}function Mb(){if(typeof navigator<"u")return Db.test(navigator.userAgent)}var Db=/Android/i;function Rb(e,t,r,n,i){so(t,r,n,void 0,i)}function kb(e,t,r,n,i){if(!_b(t)){var a=jb(e);switch(a){case"Delete":case"Backspace":e.preventDefault();var o=Ab(t);return o?(Lb(t,o),so(t,r,n,void 0,i)):so(t,r,n,a,i);default:}}}function Lb(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,rp(e,t.start)}function so(e,t,r,n,i){var a=Sb(e.value,Ib(e),t),o=a.value,s=a.caret;if(n){var l=xb(o,s,n);o=l.value,s=l.caret}var u=Ob(o,s,r),d=u.text;s=u.caret,e.value=d,rp(e,s),i&&i(o)}var Fb=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(r),!0).forEach(function(n){Vb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bb(e,t){if(e==null)return{};var r=Ub(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ub(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Wb(e){var t=e.ref,r=e.parse,n=e.format,i=e.value,a=e.defaultValue,o=e.controlled,s=o===void 0?!0:o,l=e.onChange,u=e.onKeyDown,d=Bb(e,Fb),f=(0,$.useRef)(),h=(0,$.useCallback)(function(v){f.current=v,t&&(typeof t=="function"?t(v):t.current=v)},[t]),p=(0,$.useCallback)(function(v){return Rb(v,f.current,r,n,l)},[f,r,n,l]),m=(0,$.useCallback)(function(v){if(u&&u(v),!v.defaultPrevented)return kb(v,f.current,r,n,l)},[f,r,n,l,u]),y=Rt(Rt({},d),{},{ref:h,onChange:p,onKeyDown:m});return s?Rt(Rt({},y),{},{value:n(Wc(i)?"":i).text}):Rt(Rt({},y),{},{defaultValue:n(Wc(a)?"":a).text})}function Wc(e){return e==null}var zb=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zc(Object(r),!0).forEach(function(n){Hb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kb(e,t){if(e==null)return{};var r=qb(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qb(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function ti(e,t){var r=e.inputComponent,n=r===void 0?"input":r,i=e.parse,a=e.format,o=e.value,s=e.defaultValue,l=e.onChange,u=e.controlled,d=e.onKeyDown,f=e.type,h=f===void 0?"text":f,p=Kb(e,zb),m=Wb(Gb({ref:t,parse:i,format:a,value:o,defaultValue:s,onChange:l,controlled:u,onKeyDown:d,type:h},p));return $.default.createElement(n,m)}ti=$.default.forwardRef(ti);ti.propTypes={parse:O.default.func.isRequired,format:O.default.func.isRequired,inputComponent:O.default.elementType,type:O.default.string,value:O.default.string,defaultValue:O.default.string,onChange:O.default.func,controlled:O.default.bool,onKeyDown:O.default.func,onCut:O.default.func,onPaste:O.default.func};var Yb=ti;function Gc(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),i=0;i<3;i++){var a=Number(r[i]),o=Number(n[i]);if(a>o)return 1;if(o>a)return-1;if(!isNaN(a)&&isNaN(o))return 1;if(isNaN(a)&&!isNaN(o))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 Xb={}.constructor;function Ot(e){return e!=null&&e.constructor===Xb}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 _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hc(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,Zb(n.key),n)}}function Ai(e,t,r){return t&&Hc(e.prototype,t),r&&Hc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zb(e){var t=Jb(e,"string");return Qt(t)=="symbol"?t:t+""}function Jb(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 Qb="1.2.0",e4="1.7.35",Kc=" ext. ",t4=/^\d+$/,ve=(function(){function e(t){_i(this,e),np(t),this.metadata=t,ap.call(this,t)}return Ai(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&&t4.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new qc(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new qc(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 i=this.nonGeographic()[r];if(i)return i}else{var a=this.countryCallingCodes()[r];if(a&&a.length===1&&a[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}}])})(),qc=(function(){function e(t,r){_i(this,e),this.globalMetadataObject=r,this.metadata=t,ap.call(this,r.metadata)}return Ai(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 r4(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()&&Yc(this.types(),r))return new i4(Yc(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?Kc:this.metadata[13]||Kc}}])})(),r4=(function(){function e(t,r){_i(this,e),this._format=t,this.metadata=r}return Ai(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()&&!n4.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),n4=/^\(?\$1\)?$/,i4=(function(){function e(t,r){_i(this,e),this.type=t,this.metadata=r}return Ai(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 Yc(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 np(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Ot(e)||!Ot(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(Ot(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+a4(e)+": "+e,"."))}var a4=function(t){return Qt(t)};function yt(e,t){if(t=new ve(t),t.hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function ip(e,t){return t.countries.hasOwnProperty(e)}function ap(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?Gc(t,Qb)===-1?this.v2=!0:Gc(t,e4)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function o4(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=s4(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
|
|
35
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N4(e,t){if(e){if(typeof e=="string")return Jc(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)?Jc(e,t):void 0}}function Jc(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 cp(e,t){var r=t.countries,n=t.metadata;n=new ve(n);for(var i=C4(r),a;!(a=i()).done;){var o=a.value;if(n.selectNumberingPlan(o),n.leadingDigits()){if(e&&e.search(n.leadingDigits())===0)return o}else if(bs({phone:e,country:o},void 0,n.metadata))return o}}var w4=!1;function xs(e,t){var r=t.nationalNumber,n=t.metadata;if(w4&&n.isNonGeographicCallingCode(e))return"001";var i=n.getCountryCodesForCallingCode(e);if(i)return i.length===1?i[0]:cp(r,{countries:i,metadata:n.metadata})}function co(e,t,r){var n=lo(e,r),i=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!P4(e,a,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=xs(r.numberingPlan.callingCode(),{nationalNumber:a,metadata:r})),!E4(a,t,r)))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:i}}function P4(e,t,r){return!(ot(e,r.nationalNumberPattern())&&!ot(t,r.nationalNumberPattern()))}function E4(e,t,r){switch(ji(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function up(e,t,r,n,i){var a=t||r?yt(t||r,i):n;if(e.indexOf(a)===0){i=new ve(i),i.selectNumberingPlan(t||r,a);var o=e.slice(a.length),s=co(o,t,i).nationalNumber,l=co(e,t,i).nationalNumber;if(!ot(l,i.nationalNumberPattern())&&ot(s,i.nationalNumberPattern())||ji(l,t,i)==="TOO_LONG")return{countryCallingCode:a,number:o}}return{number:e}}function Ss(e,t,r,n,i){if(!e)return{};var a;if(e[0]!=="+"){var o=lp(e,t||r,n,i);if(o&&o!==e)a=!0,e="+"+o;else{if(t||r||n){var s=up(e,t,r,n,i),l=s.countryCallingCode,u=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:e}}}if(e[1]==="0")return{};i=new ve(i);for(var d=2;d-1<=3&&d<=e.length;){var f=e.slice(1,d);if(i.hasCallingCode(f))return i.selectNumberingPlan(f),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:f,number:e.slice(d)};d++}return{}}function dp(e){return e.replace(new RegExp("[".concat(Ge,"]+"),"g")," ").trim()}var fp=/(\$\d)/;function hp(e,t,r){var n=r.useInternationalFormat,i=r.withNationalPrefix;r.carrierCode,r.metadata;var a=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(fp,t.nationalPrefixFormattingRule()):t.format());return n?dp(a):a}var T4=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function O4(e,t,r){var n=new ve(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(T4.test(n.IDDPrefix()))return n.IDDPrefix()}var _4=";ext=",kt=function(t){return"([".concat(Te,"]{1,").concat(t,"})")};function pp(e){var t="20",r="15",n="9",i="6",a="[ \\t,]*",o="[:\\..]?[ \\t,-]*",s="#?",l="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",u="(?:[xx##~~]|int|int)",d="[- ]+",f="[ \\t]*",h="(?:,{2}|;)",p=_4+kt(t),m=a+l+o+kt(t)+s,y=a+u+o+kt(n)+s,v=d+kt(i)+"#",g=f+h+o+kt(r)+s,b=f+"(?:,)+"+o+kt(n)+s;return p+"|"+m+"|"+y+"|"+v+"|"+g+"|"+b}var A4="["+Te+"]{2}",j4="["+Ii+"]{0,1}(?:["+Ge+"]*["+Te+"]){3,}["+Ge+Te+"]*",I4=new RegExp("^["+Ii+"]{0,1}(?:["+Ge+"]*["+Te+"]){1,2}$","i"),M4=j4+"(?:"+pp()+")?",D4=new RegExp("^"+A4+"$|^"+M4+"$","i");function R4(e){return e.length>=2&&D4.test(e)}function k4(e){return I4.test(e)}function L4(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 Qc={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function F4(e,t,r,n){if(r?r=U4({},Qc,r):r=Qc,n=new ve(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 i=n.countryCallingCode(),a=r.v2?e.nationalNumber:e.phone,o;switch(t){case"NATIONAL":return a?(o=ri(a,e.carrierCode,"NATIONAL",n,r),pa(o,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return a?(o=ri(a,null,"INTERNATIONAL",n,r),o="+".concat(i," ").concat(o),pa(o,e.ext,n,r.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(a);case"RFC3966":return L4({number:"+".concat(i).concat(a),ext:e.ext});case"IDD":if(!r.fromCountry)return;var s=B4(a,e.carrierCode,i,r.fromCountry,n);return s?pa(s,e.ext,n,r.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function ri(e,t,r,n,i){var a=V4(n.formats(),e);return a?hp(e,a,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function V4(e,t){return W4(e,function(r){if(r.leadingDigitsPatterns().length>0){var n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(t.search(n)!==0)return!1}return ot(t,r.pattern())})}function pa(e,t,r,n){return t?n(e,t,r):e}function B4(e,t,r,n,i){if(yt(n,i.metadata)===r){var a=ri(e,t,"NATIONAL",i);return r==="1"?r+" "+a:a}var o=O4(n,void 0,i.metadata);if(o)return"".concat(o," ").concat(r," ").concat(ri(e,null,"INTERNATIONAL",i))}function U4(){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 i in r[e])r[0][i]=r[e][i];e++}return r[0]}function W4(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}function Nr(e){"@babel/helpers - typeof";return Nr=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},Nr(e)}function eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eu(Object(r),!0).forEach(function(n){z4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z4(e,t,r){return(t=mp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ru(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,mp(n.key),n)}}function H4(e,t,r){return t&&ru(e.prototype,t),r&&ru(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mp(e){var t=K4(e,"string");return Nr(t)=="symbol"?t:t+""}function K4(e,t){if(Nr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q4=!1,vp=(function(){function e(t,r,n){if(G4(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(Ot(r)&&Ot(r.countries)){n=r;var i=t;if(!Z4.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=Ss(i,void 0,void 0,void 0,n),o=a.countryCallingCode;if(r=a.number,t=o,!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");np(n);var s=X4(t,n),l=s.country,u=s.countryCallingCode;this.country=l,this.countryCallingCode=u,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}return H4(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:p4(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return c4(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return h4(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new ve(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return bs(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return F4(this,r,n?tu(tu({},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)}}])})(),Y4=function(t){return/^[A-Z]{2}$/.test(t)};function X4(e,t){var r,n,i=new ve(t);return Y4(e)?(r=e,i.selectNumberingPlan(r),n=i.countryCallingCode()):(n=e,q4&&i.isNonGeographicCallingCode(n)&&(r="001")),{country:r,countryCallingCode:n}}var Z4=/^\+\d+$/;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 nu(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,Q4(n.key),n)}}function J4(e,t,r){return t&&nu(e.prototype,t),r&&nu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q4(e){var t=e9(e,"string");return er(t)=="symbol"?t:t+""}function e9(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 t9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r9(e,t,r){return t=Pr(t),n9(e,Cs()?Reflect.construct(t,r||[],Pr(e).constructor):t.apply(e,r))}function n9(e,t){if(t&&(er(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i9(e)}function i9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a9(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&&wr(e,t)}function uo(e){var t=typeof Map=="function"?new Map:void 0;return uo=function(n){if(n===null||!s9(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,i)}function i(){return o9(n,arguments,Pr(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wr(i,n)},uo(e)}function o9(e,t,r){if(Cs())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&wr(i,r.prototype),i}function Cs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cs=function(){return!!e})()}function s9(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function wr(e,t){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},wr(e,t)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(e)}var rt=(function(e){function t(r){var n;return t9(this,t),n=r9(this,t,[r]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return a9(t,e),J4(t)})(uo(Error)),iu=new RegExp("(?:"+pp()+")$","i");function l9(e){var t=e.search(iu);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(iu),i=1;i<n.length;){if(n[i])return{number:r,ext:n[i]};i++}}function c9(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=u9(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
|
|
38
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
39
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
41
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
42
|
-
`.concat(JSON.stringify(
|
|
43
|
-
`.concat(JSON.stringify(
|
|
44
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
45
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
46
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n6(e,t){if(e){if(typeof e=="string")return Au(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)?Au(e,t):void 0}}function Au(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 i6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function a6(e){if(Array.isArray(e))return e}function o6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ju(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,l6(n.key),n)}}function s6(e,t,r){return t&&ju(e.prototype,t),r&&ju(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l6(e){var t=c6(e,"string");return Rr(t)=="symbol"?t:t+""}function c6(e,t){if(Rr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iu=!1,lr=(function(){function e(t,r){o6(this,e),this.metadata=new ve(r);var n=t6(this.getCountryAndCallingCode(t),2),i=n[0],a=n[1];this.defaultCountry=i,this.defaultCallingCode=a,this.reset()}return s6(e,[{key:"getCountryAndCallingCode",value:function(r){var n,i;return r&&(Ot(r)?(n=r.defaultCountry,i=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),i&&Iu&&this.metadata.isNonGeographicCallingCode(i)&&(n="001"),[n,i]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),i=n.digits;if(n.justLeadingPlus)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var a;if(this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(i,this.state)),a===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var o=this.state.getNationalDigits();o&&(a=this.formatter.format(o,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new i8({onCountryChange:function(i){r.country=i},onCallingCodeChange:function(i,a){r.metadata.selectNumberingPlan(a,i),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new k8({state:this.state,metadata:this.metadata}),this.parser=new Z8({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(!(Iu&&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 i=function(s){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!s})+s},a=this.state.callingCode;return i(a?r?"".concat(a," ").concat(r):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,a=r.nationalPrefix,o=n,s=i||a;return s&&(o=s+o),o}},{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(xs(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,i=r.callingCode,a=r.country,o=r.nationalSignificantNumber;if(n){if(this.isInternational())return i?"+"+i+o:"+"+n;if(a||i)return"+"+(a?this.metadata.countryCallingCode():i)+o}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.carrierCode,a=r.callingCode,o=this._getCountry();if(n&&!(!o&&!a)){if(o&&o===this.defaultCountry){var s=new ve(this.metadata.metadata);s.selectNumberingPlan(o);var l=s.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(l);if(u.length>1){var d=cp(n,{countries:u,metadata:this.metadata.metadata});d&&(o=d)}}var f=new vp(o||a,n,this.metadata.metadata);return i&&(f.carrierCode=i),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 Mu(e){return new ve(e).getCountries()}function u6(e,t,r){return r||(r=t,t=void 0),new lr(t,r).input(e)}var ai=Lr(bb(),1);function Sp(e){var t=e.inputFormat,r=e.country,n=e.metadata;return t==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(yt(r,n)):""}function yo(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}function d6(e,t,r){if(!(r&&r.ignoreRest))return gp(e,t,function(i){r&&i==="end"&&(r.ignoreRest=!0)})}function Cp(e){var t=e.onKeyDown,r=e.inputFormat;return(0,$.useCallback)(function(n){if(n.keyCode===h6&&r==="INTERNATIONAL"&&n.target instanceof HTMLInputElement&&f6(n.target)===p6.length){n.preventDefault();return}t&&t(n)},[t,r])}function f6(e){return e.selectionStart}var h6=8,p6="+",m6=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function go(){return go=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},go.apply(this,arguments)}function v6(e,t){if(e==null)return{};var r=y6(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function y6(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function g6(e){function t(r,n){var i=r.onKeyDown,a=r.country,o=r.inputFormat,s=r.metadata,l=s===void 0?e:s;r.international,r.withCountryCallingCode;var u=v6(r,m6),d=(0,$.useCallback)(function(h){var p=new lr(a,l),m=Sp({inputFormat:o,country:a,metadata:l}),y=p.input(m+h),v=p.getTemplate();return m&&(y=yo(y,m),v&&(v=yo(v,m))),{text:y,template:v}},[a,l]),f=Cp({onKeyDown:i,inputFormat:o});return $.default.createElement(Yb,go({},u,{ref:n,parse:d6,format:d,onKeyDown:f}))}return t=$.default.forwardRef(t),t.propTypes={value:O.default.string.isRequired,onChange:O.default.func.isRequired,onKeyDown:O.default.func,country:O.default.string,inputFormat:O.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:O.default.object},t}var $6=g6(),b6=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function $o(){return $o=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},$o.apply(this,arguments)}function x6(e,t){if(e==null)return{};var r=S6(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function S6(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function C6(e){function t(r,n){var i=r.value,a=r.onChange,o=r.onKeyDown,s=r.country,l=r.inputFormat,u=r.metadata,d=u===void 0?e:u,f=r.inputComponent,h=f===void 0?"input":f;r.international,r.withCountryCallingCode;var p=x6(r,b6),m=Sp({inputFormat:l,country:s,metadata:d}),y=(0,$.useCallback)(function(g){var b=fo(g.target.value);b===i&&Du(m,b,s,d).indexOf(g.target.value)===0&&(b=b.slice(0,-1)),a(b)},[m,i,a,s,d]),v=Cp({onKeyDown:o,inputFormat:l});return $.default.createElement(h,$o({},p,{ref:n,value:Du(m,i,s,d),onChange:y,onKeyDown:v}))}return t=$.default.forwardRef(t),t.propTypes={value:O.default.string.isRequired,onChange:O.default.func.isRequired,onKeyDown:O.default.func,country:O.default.string,inputFormat:O.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:O.default.object,inputComponent:O.default.elementType},t}var N6=C6();function Du(e,t,r,n){return yo(u6(e+t,r,n),e)}function w6(e){return Ru(e[0])+Ru(e[1])}function Ru(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var P6=["value","onChange","options","disabled","readOnly"],E6=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function T6(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=O6(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.
|
|
47
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
48
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
49
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X6(e,t){if(e){if(typeof e=="string")return Fu(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 Fu(e,t)}}function Fu(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 Z6(e,t){for(var r=Y6(e),n;!(n=r()).done;){var i=n.value;i&&J6(i,t)}}function J6(e,t){typeof e=="function"?e(t):e.current=t}var Ip=O.default.shape({country_calling_codes:O.default.object.isRequired,countries:O.default.object.isRequired}),Mp=O.default.objectOf(O.default.string);function it(e,t){return"+"+yt(e,t)}function Q6(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,i=e.getAnyCountry,a=e.countries,o=e.required,s=e.metadata,l;return r&&r.country?l=r.country:n&&(!t||Kt(t,n,s))&&(l=n),a&&a.indexOf(l)<0&&(l=void 0),!l&&o&&a&&a.length>0&&(l=i()),l}function e5(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,i=e.compareStringsLocales,a=e.compareStrings;a||(a=s5);var o=t.map(function(s){return{value:s,label:r[s]||s}});return o.sort(function(s,l){return a(s.label,l.label,i)}),n&&o.unshift({label:r.ZZ}),o}function Dp(e,t){return Y9(e||"",t)}function t5(e){return e.formatNational().replace(/\D/g,"")}function r5(e,t){var r=t.prevCountry,n=t.newCountry,i=t.metadata,a=t.useNationalFormat;if(r===n)return e;if(!e)return a?"":n?it(n,i):"";if(n){if(e[0]==="+"){if(a)return e.indexOf("+"+yt(n,i))===0?l5(e,n,i):"";if(r){var o=it(n,i);return e.indexOf(o)===0?e:o}else{var s=it(n,i);return e.indexOf(s)===0?e:s}}}else if(e[0]!=="+")return zt(e,r,i)||"";return e}function zt(e,t,r){if(e){if(e[0]==="+"){if(e==="+")return;var n=new lr(t,r);return n.input(e),n.getNumberValue()}if(t){var i=kp(e,t,r);return"+".concat(yt(t,r)).concat(i||"")}}}function n5(e,t,r){var n=kp(e,t,r);if(n){var i=n.length-i5(t,r);if(i>0)return e.slice(0,e.length-i)}return e}function i5(e,t){return t=new ve(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Rp(e,t){var r=t.country,n=t.countries,i=t.defaultCountry,a=t.latestCountrySelectedByUser,o=t.required,s=t.metadata;if(e==="+")return r;var l=o5(e,s);if(l)return!n||n.indexOf(l)>=0?l:void 0;if(r){if(Kt(e,r,s)){if(a&&Kt(e,a,s))return a;if(i&&Kt(e,i,s))return i;if(!o)return}else if(!o)return}return r}function a5(e,t){var r=t.prevPhoneDigits,n=t.country,i=t.defaultCountry,a=t.latestCountrySelectedByUser,o=t.countryRequired,s=t.getAnyCountry,l=t.countries,u=t.international,d=t.limitMaxLength,f=t.countryCallingCodeEditable,h=t.metadata;if(u&&f===!1&&n){var p=it(n,h);if(e.indexOf(p)!==0){var m;return e&&e[0]!=="+"?(e=p+e,m=zt(e,n,h)):e=p,{phoneDigits:e,value:m,country:n}}}u===!1&&n&&e&&e[0]==="+"&&(e=Vu(e,n,h)),e&&n&&d&&(e=n5(e,n,h)),e&&e[0]!=="+"&&(!n||u)&&(e="+"+e),!e&&r&&r[0]==="+"&&(u?n=void 0:n=i),e==="+"&&r&&r[0]==="+"&&r.length>1&&(n=void 0);var y;return e&&(e[0]==="+"&&(e==="+"||n&&it(n,h).indexOf(e)===0)?y=void 0:y=zt(e,n,h)),y&&(n=Rp(y,{country:n,countries:l,defaultCountry:i,latestCountrySelectedByUser:a,required:!1,metadata:h}),u===!1&&n&&e&&e[0]==="+"&&(e=Vu(e,n,h),y=zt(e,n,h))),!n&&o&&(n=i||s()),{phoneDigits:e,country:n,value:y}}function Vu(e,t,r){if(e.indexOf(it(t,r))===0){var n=new lr(t,r);n.input(e);var i=n.getNumber();return i?i.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function o5(e,t){var r=new lr(null,t);return r.input(e),r.getCountry()}function s5(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function l5(e,t,r){if(t){var n="+"+yt(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 i=0,a=Object.keys(r.country_calling_codes);i<a.length;i++){var o=a[i];if(e.indexOf(o)===1)return e.slice(1+o.length)}return""}function kp(e,t,r){var n=new lr(t,r);n.input(e);var i=n.getNumber();return i&&i.nationalNumber}function Kt(e,t,r){for(var n=it(t,r),i=0;i<e.length&&i<n.length;){if(e[i]!==n[i])return!1;i++}return!0}function Lp(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,i=e.international,a=e.useNationalFormat,o=e.metadata;return(i===!1||a)&&r&&r.country?t5(r):!t&&i&&n?it(n,o):t}function kr(e){"@babel/helpers - typeof";return kr=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},kr(e)}function Bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ln(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bu(Object(r),!0).forEach(function(n){c5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c5(e,t,r){return t=u5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u5(e){var t=d5(e,"string");return kr(t)=="symbol"?t:t+""}function d5(e,t){if(kr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f5(e,t,r){var n=e.metadata,i=e.countries,a=e.defaultCountry,o=e.value,s=e.reset,l=e.international,u=e.displayInitialValueAsLocalNumber,d=e.initialValueFormat,f=t.defaultCountry,h=t.value,p=t.reset;r.country;var m=r.value,y=r.hasUserSelectedACountry,v=r.latestCountrySelectedByUser,g=function(M){return Lp(ln(ln({},M),{},{international:l,useNationalFormat:u||d==="national",metadata:n}))};if(s!==p)return{phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0,country:a,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(a!==f){var b=!a||Di(a,n),x=!m||l&&m===g({value:void 0,defaultCountry:f});if(!y&&b&&!o&&x)return{country:a,phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0}}if(!Uu(o,h)&&!Uu(o,m)){var S,E;if(o){o&&_p(o),S=Dp(o,n);var C=Ap(i,n);S&&S.country?(!C||C.indexOf(S.country)>=0)&&(E=S.country):(E=Rp(o,{country:void 0,countries:C,metadata:n}),E||a&&o.indexOf(it(a,n))===0&&(E=a))}var _;return o?v&&((E?v===E:Kt(o,v,n))?E||(E=v):_={latestCountrySelectedByUser:void 0}):_={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},ln(ln({},_),{},{phoneDigits:g({phoneNumber:S,value:o,defaultCountry:a}),value:o,country:o?E:a})}}function Uu(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}var h5=["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 tr(e){"@babel/helpers - typeof";return tr=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},tr(e)}function Wu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wu(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qt(){return qt=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},qt.apply(this,arguments)}function p5(e,t){if(e==null)return{};var r=m5(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m5(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function v5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zu(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,Bp(n.key),n)}}function y5(e,t,r){return t&&zu(e.prototype,t),r&&zu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g5(e,t,r){return t=li(t),$5(e,Vp()?Reflect.construct(t,r||[],li(e).constructor):t.apply(e,r))}function $5(e,t){if(t&&(tr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b5(e)}function b5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vp=function(){return!!e})()}function li(e){return li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},li(e)}function x5(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&&So(e,t)}function So(e,t){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},So(e,t)}function Be(e,t,r){return t=Bp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bp(e){var t=S5(e,"string");return tr(t)=="symbol"?t:t+""}function S5(e,t){if(tr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C5=(function(e){function t(r){var n;v5(this,t),n=g5(this,t,[r]),Be(n,"setInputRef",function(v){Z6([n.props.inputRef,n.inputRef],v)}),Be(n,"isCountrySupportedWithError",function(v){var g=n.props.metadata;return Di(v,g)}),Be(n,"onCountryChange",function(v){var g=n.props,b=g.international,x=g.metadata,S=g.onChange,E=g.focusInputOnCountrySelection,C=n.state,_=C.phoneDigits,T=C.country,M=r5(_,{prevCountry:T,newCountry:v,metadata:x,useNationalFormat:!b}),N=zt(M,v,x);E&&n.inputRef.current.focus(),n.setState({country:v,latestCountrySelectedByUser:v,hasUserSelectedACountry:!0,phoneDigits:M,value:N},function(){S(N)})}),Be(n,"onChange",function(v){var g=n.props,b=g.defaultCountry,x=g.onChange,S=g.addInternationalOption,E=g.international,C=g.limitMaxLength,_=g.countryCallingCodeEditable,T=g.metadata,M=n.state,N=M.countries,L=M.phoneDigits,G=M.country,R=M.latestCountrySelectedByUser,w=a5(v,{prevPhoneDigits:L,country:G,countryRequired:!S,defaultCountry:b,latestCountrySelectedByUser:R,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:N})},countries:N,international:E,limitMaxLength:C,countryCallingCodeEditable:_,metadata:T}),F=w.phoneDigits,W=w.country,q=w.value,Z={phoneDigits:F,value:q,country:W};R&&q&&!Kt(q,R,T)&&(Z.latestCountrySelectedByUser=void 0),_===!1&&!q&&F===n.state.phoneDigits&&(Z.forceRerender={}),n.setState(Z,function(){return x(q)})}),Be(n,"_onFocus",function(){return n.setState({isFocused:!0})}),Be(n,"_onBlur",function(){return n.setState({isFocused:!1})}),Be(n,"onFocus",function(v){n._onFocus();var g=n.props.onFocus;g&&g(v)}),Be(n,"onBlur",function(v){var g=n.props.onBlur;n._onBlur(),g&&g(v)}),Be(n,"onCountryFocus",function(v){n._onFocus();var g=n.props.countrySelectProps;if(g){var b=g.onFocus;b&&b(v)}}),Be(n,"onCountryBlur",function(v){n._onBlur();var g=n.props.countrySelectProps;if(g){var b=g.onBlur;b&&b(v)}}),n.inputRef=$.default.createRef();var i=n.props,a=i.value;i.labels;var o=i.international,s=i.addInternationalOption,l=i.displayInitialValueAsLocalNumber,u=i.initialValueFormat,d=i.metadata,f=n.props,h=f.defaultCountry,p=f.countries;h&&(n.isCountrySupportedWithError(h)||(h=void 0)),a&&_p(a),p=Ap(p,d);var m=Dp(a,d);n.CountryIcon=jp(n.props);var y=Q6({value:a,phoneNumber:m,defaultCountry:h,required:!s,countries:p||Mu(d),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:p})},metadata:d});return n.state={props:n.props,country:y,countries:p,phoneDigits:Lp({value:a,phoneNumber:m,defaultCountry:h,international:o,useNationalFormat:l||u==="national",metadata:d}),value:a},n}return x5(t,e),y5(t,[{key:"componentDidMount",value:function(){var n=this.props.onCountryChange,i=this.props.defaultCountry,a=this.state.country;n&&(i&&(this.isCountrySupportedWithError(i)||(i=void 0)),a!==i&&n(a))}},{key:"componentDidUpdate",value:function(n,i){var a=this.props.onCountryChange,o=this.state.country;a&&o!==i.country&&a(o)}},{key:"getCountrySelectOptions",value:function(n){var i=n.countries,a=this.props,o=a.international,s=a.countryCallingCodeEditable,l=a.countryOptionsOrder,u=a.addInternationalOption,d=a.labels,f=a.locales,h=a.metadata;return this.useMemoCountrySelectOptions(function(){return z6(e5({countries:i||Mu(h),countryNames:d,addInternationalOption:o&&s===!1?!1:u,compareStringsLocales:f}),G6(l,h))},[i,l,u,d,h])}},{key:"useMemoCountrySelectOptions",value:function(n,i){return(!this.countrySelectOptionsMemoDependencies||!w5(i,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=n(),this.countrySelectOptionsMemoDependencies=i),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(n){var i=n.countries;return this.getCountrySelectOptions({countries:i})[0].value}},{key:"render",value:function(){var n=this.props,i=n.name,a=n.disabled,o=n.readOnly,s=n.autoComplete,l=n.style,u=n.className;n.inputRef;var d=n.inputComponent,f=n.numberInputProps,h=n.smartCaret,p=n.countrySelectComponent,m=n.countrySelectProps,y=n.containerComponent,v=n.containerComponentProps;n.defaultCountry,n.countries,n.countryOptionsOrder;var g=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,x=n.international;n.locales;var S=p5(n,h5),E=this.state,C=E.country,_=E.countries,T=E.phoneDigits,M=E.isFocused,N=h?$6:N6,L=this.getCountrySelectOptions({countries:_});return $.default.createElement(y,qt({style:l,className:(0,ai.default)(u,"PhoneInput",{"PhoneInput--focus":M,"PhoneInput--disabled":a,"PhoneInput--readOnly":o})},v),$.default.createElement(p,qt({name:i?"".concat(i,"Country"):void 0,"aria-label":g.country},m,{value:C,options:L,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:a||m&&m.disabled,readOnly:o||m&&m.readOnly,iconComponent:this.CountryIcon})),$.default.createElement(N,qt({ref:this.setInputRef,type:"tel",autoComplete:s},f,S,{inputFormat:x===!0?"INTERNATIONAL":x===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:x?!0:void 0,withCountryCallingCode:x?!0:void 0,name:i,metadata:b,country:C,value:T||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:a,readOnly:o,inputComponent:d,className:(0,ai.default)("PhoneInputInput",f&&f.className,S.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return Fp({props:n},f5(n,i.props,i))}}])})($.default.PureComponent),Up=$.default.forwardRef(function(e,t){return $.default.createElement(C5,qt({},N5(e),{inputRef:t}))});Up.propTypes={value:O.default.string,onChange:O.default.func.isRequired,onFocus:O.default.func,onBlur:O.default.func,disabled:O.default.bool,readOnly:O.default.bool,autoComplete:O.default.string,initialValueFormat:O.default.oneOf(["national"]),displayInitialValueAsLocalNumber:O.default.bool,defaultCountry:O.default.string,countries:O.default.arrayOf(O.default.string),labels:Mp,locales:O.default.oneOfType([O.default.string,O.default.arrayOf(O.default.string)]),flagUrl:O.default.string,flags:O.default.objectOf(O.default.elementType),flagComponent:O.default.elementType,addInternationalOption:O.default.bool,internationalIcon:O.default.elementType,countryOptionsOrder:O.default.arrayOf(O.default.string),style:O.default.object,className:O.default.string,countrySelectComponent:O.default.elementType,countrySelectProps:O.default.object,inputComponent:O.default.elementType,numberInputProps:O.default.object,containerComponent:O.default.elementType,containerComponentProps:O.default.object,smartCaret:O.default.bool,international:O.default.bool,limitMaxLength:O.default.bool,countryCallingCodeEditable:O.default.bool,metadata:Ip,onCountryChange:O.default.func,focusInputOnCountrySelection:O.default.bool};var Gu={autoComplete:"tel",countrySelectComponent:Pp,flagComponent:Ns,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:Mi,inputComponent:"input",containerComponent:"div",reset:O.default.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function N5(e){e=Fp({},e);for(var t in Gu)e[t]===void 0&&(e[t]=Gu[t]);return e}function w5(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 P5={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"},E5=["metadata","labels"];function Co(){return Co=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},Co.apply(this,arguments)}function T5(e,t){if(e==null)return{};var r=O5(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function O5(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Wp(e){var t=$.default.forwardRef(function(r,n){var i=r.metadata,a=i===void 0?e:i,o=r.labels,s=o===void 0?P5:o,l=T5(r,E5);return $.default.createElement(Up,Co({},l,{ref:n,metadata:a,labels:s}))});return t.propTypes={metadata:Ip,labels:Mp},t}var J5=Wp();function _5(e,t){var r=Array.prototype.slice.call(t);return r.push(tp),e.apply(this,r)}var A5=Wp(tp);function ya(){return _5(Q9,arguments)}var j5=["IN","US","CA","PH","NZ","AU","CN"];function I5(){const e=(0,H.useDispatch)(),{tenantId:t}=(0,H.useSelector)(R=>R?.outletDetails),{userDetails:r}=(0,H.useSelector)(R=>R.appointment),[n,i]=(0,$.useState)(!1),[a,o]=(0,$.useState)(null),[s,l]=(0,$.useState)(!1),u=(0,$.useRef)(""),d=(0,$.useRef)(null),{register:f,handleSubmit:h,control:p,watch:m,reset:y,trigger:v,setValue:g,formState:{errors:b,isSubmitted:x,isSubmitting:S}}=(0,nt.useForm)({defaultValues:{firstName:"",lastName:"",phone:"",email:""},mode:"onSubmit"}),E=m("phone"),C=m("email");(0,$.useEffect)(()=>{y({...r,phone:r?.phone||""},{keepErrors:!0,keepDirty:!1})},[r,y]),(0,$.useEffect)(()=>{x&&v(["phone","email"])},[E,C,x,v]);const _=R=>R?.replace(/\s+/g,"")||"",T=R=>/^\S+@\S+\.\S+$/.test(R),M=R=>{e(ul({...R,phone:R?.phone??""})),e(Ee())},N=(0,$.useCallback)(async({value:R,type:w})=>{if(!R)return;let F="";if(w==="phone"){if(!ya(R))return;F=_(R)}if(w==="email"){if(!T(R))return;F=R.trim()}if(F&&!(u.current===F&&s)){u.current=F,i(!0),o(w);try{const W=(await l1({search:F,tenantId:t}))?.data?.[0];W?(g("firstName",W.first_name||"",{shouldValidate:!0}),g("lastName",W.last_name||""),W.phone&&ya(W.phone)&&g("phone",W.phone),W.email&&g("email",W.email),e(ul({email:W.email,firstName:W.first_name,lastName:W.last_name,phone:W.phone})),l(!0)):l(!1)}catch(W){console.error(W)}finally{i(!1),o(null)}}},[e,g,s]),L=()=>{y({firstName:"",lastName:"",email:"",phone:""}),l(!1),u.current="",e(p1())};(0,$.useEffect)(()=>(d.current=(0,p0.debounce)(N,800),()=>{d.current?.cancel?.()}),[N]);const G=(R,w,F)=>{if(w&&w(R),!R){d.current?.cancel?.(),u.current="",l(!1),o(null);return}o(F),d.current?.({value:R,type:F})};return(0,c.jsx)(Dt,{sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(ys,{buttonText:"Confirm Details",onButtonClick:h(M)})}),renderButton:(0,c.jsx)("button",{onClick:h(M),disabled:S,className:"aaravpos-btn",children:(0,c.jsx)("span",{className:"aaravpos-btn-content",children:S?"Submitting...":"Confirm Details"})}),children:(0,c.jsxs)("form",{children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"arravpos-details-section aaravpos-margin-top-20",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title aaravpos-margin-bottom-20",children:"Your Details"}),(0,c.jsx)("div",{className:"arravpos-details-scroll",children:(0,c.jsxs)("div",{className:"arravpos-details-grid",children:[(0,c.jsxs)("div",{className:"arravpos-form-group",children:[(0,c.jsxs)("label",{className:"arravpos-form-label",htmlFor:"phone",children:["Phone ",!C&&(0,c.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{control:p,name:"phone",rules:{validate:R=>{const w=!!_(R),F=!!C?.trim();return!w&&!F?"Enter phone or email":w&&!ya(R)?"Enter valid phone number":!0}},render:({field:R})=>(0,c.jsxs)("div",{className:"arravpos-input-wrapper",children:[(0,c.jsx)(A5,{...R,id:"phone",international:!0,countries:j5,defaultCountry:"US",value:R.value||"",onChange:w=>G(w??"",R.onChange,"phone"),countryCallingCodeEditable:!1,className:"arravpos-custom-input"}),n&&a==="phone"&&(0,c.jsx)("div",{className:"arravpos-loader-wrapper",children:(0,c.jsx)("div",{className:"arravpos-loader"})})]})}),b.phone&&(0,c.jsx)("p",{className:"arravpos-error-text",children:b.phone.message}),s&&(0,c.jsxs)("div",{className:"arravpos-autofill-text",children:["Using existing customer",(0,c.jsx)("span",{onClick:L,className:"arravpos-clear-text",children:"Clear"})]})]}),(0,c.jsxs)("div",{className:"arravpos-form-group",children:[(0,c.jsxs)("label",{htmlFor:"email",className:"arravpos-form-label",children:["Email ",!E&&(0,c.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,c.jsx)("input",{id:"email",...f("email",{validate:R=>{const w=!!R?.trim(),F=!!_(E);return!w&&!F?"Enter phone or email":w&&!/^\S+@\S+\.\S+$/.test(R)?"Invalid email":!0},onChange:R=>{G(R.target.value,null,"email")}}),autoComplete:"email",placeholder:"Email address",className:"arravpos-custom-input"}),b.firstName&&(0,c.jsx)("p",{className:"arravpos-error-text",children:b.firstName.message})]}),(0,c.jsxs)("div",{className:"arravpos-form-group",children:[(0,c.jsxs)("label",{htmlFor:"first_name",className:"arravpos-form-label",children:["First Name"," ",(0,c.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,c.jsx)("input",{id:"first_name",...f("firstName",{required:"First name required",pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"}}),autoComplete:"given-name",placeholder:"First Name",className:"arravpos-custom-input"}),b.firstName&&(0,c.jsx)("p",{className:"arravpos-error-text",children:b.firstName.message})]}),(0,c.jsxs)("div",{className:"arravpos-form-group",children:[(0,c.jsx)("label",{htmlFor:"last_name",className:"arravpos-form-label",children:"Last Name"}),(0,c.jsx)("input",{id:"last_name",autoComplete:"family-name",...f("lastName"),placeholder:"Last Name",className:"arravpos-custom-input"})]})]})})]})]})})}var M5={hidden:{opacity:0},visible:{opacity:1,transition:{duration:.5,delay:.3}}};function D5(){const e=(0,H.useDispatch)(),t=(0,H.useSelector)(C=>C.appointment.appointmentId),{tenantId:r}=(0,H.useSelector)(C=>C.outletDetails),[n,i]=(0,$.useState)(null),[a,o]=(0,$.useState)(!0),[s,l]=(0,$.useState)(null),[u,d]=(0,$.useState)(!1);(0,$.useEffect)(()=>{if(!t){l("No appointment ID provided"),o(!1);return}(async()=>{try{const _=await s1(t,r);_.success?i(_?.data?.appointment):l("Failed to load appointment details")}catch(_){console.error(_),l("An error occurred while fetching appointment details")}finally{o(!1)}})()},[t]);const f=()=>{e({type:"RESET_ALL"}),Ro.purge()};if(a)return(0,c.jsx)("div",{className:"aaravpos-loading-container",children:(0,c.jsx)("p",{className:"aaravpos-loading-text",children:"Loading appointment details..."})});if(s||!n)return(0,c.jsxs)("div",{className:"aaravpos-error-container",children:[(0,c.jsx)("p",{className:"aaravpos-error-text",children:s||"Appointment not found"}),(0,c.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,c.jsx)(jc,{}),"Book Another Appointment"]})]});const{staff:h,outlet:p,services:m}=n,y=m?.reduce((C,_)=>C+Number(_.price||0),0),v=(n.tipsCents||0)/100,g=(n.taxCents||0)/100,b=(n.totalCents||0)/100,x=b>0?b.toFixed(2):(y+v+g).toFixed(2),S=u?m:m.slice(0,5),E=m.length-5;return(0,c.jsx)("div",{className:"arravpos-success-wrapper",children:(0,c.jsxs)(Ke.div,{initial:"hidden",animate:"visible",variants:M5,className:"arravpos-success-motion",children:[(0,c.jsx)("div",{className:"arravpos-success-icon success-pulse",children:(0,c.jsx)(fs,{})}),(0,c.jsx)("h1",{className:"arravpos-success-title",children:"You're Booked!"}),(0,c.jsxs)("p",{className:"arravpos-success-description",children:["Your appointment has been confirmed.",(0,c.jsx)("br",{}),"A confirmation has been sent to your email."]}),(0,c.jsxs)("div",{className:"arravpos-success-content",children:[(0,c.jsxs)("div",{className:"arravpos-success-card",children:[(0,c.jsxs)("div",{className:"arravpos-success-row arravpos-success-row-first",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Outlet Name"}),(0,c.jsx)("span",{className:"arravpos-value",children:p?.outletName||"-"})]}),(0,c.jsxs)("div",{className:"arravpos-success-row",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Professional"}),(0,c.jsx)("span",{className:"arravpos-value",children:h?`${h?.firstName} ${h?.lastName}`:"-"})]}),(0,c.jsxs)("div",{className:"arravpos-success-row arravpos-services-header",children:[(0,c.jsxs)("span",{className:"arravpos-services-label",children:["Services (",m.length,")"]}),m.length>5&&(0,c.jsx)("button",{onClick:()=>d(C=>!C),className:"arravpos-show-btn",children:u?"Hide":(0,c.jsxs)("span",{className:"arravpos-show-btn-inner",children:["Show",(0,c.jsx)(Wh,{size:16})]})})]}),(0,c.jsxs)("div",{className:"arravpos-services-list",children:[S?.map(C=>(0,c.jsxs)("div",{className:"arravpos-service-row",children:[(0,c.jsx)("span",{className:"arravpos-service-name",children:C.serviceName}),(0,c.jsxs)("span",{className:"arravpos-service-price",children:[(0,c.jsx)(he,{size:14}),Number(C.price).toFixed(2)]})]},C.id)),!u&&E>0&&(0,c.jsxs)("div",{className:"arravpos-more-services",children:[(0,c.jsx)(ps,{size:14}),E," more services"]})]}),(0,c.jsxs)("div",{className:"arravpos-success-row",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Date & Time"}),(0,c.jsxs)("span",{className:"arravpos-value",children:[n.appointmentDate," at"," ",n.startTime]})]}),(0,c.jsxs)("div",{className:"arravpos-success-row",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Tip"}),(0,c.jsxs)("span",{className:"arravpos-price",children:[(0,c.jsx)(he,{size:14}),v.toFixed(2)]})]}),(0,c.jsxs)("div",{className:"arravpos-success-row",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Tax"}),(0,c.jsxs)("span",{className:"arravpos-price",children:[(0,c.jsx)(he,{size:14}),g.toFixed(2)]})]}),(0,c.jsxs)("div",{className:"arravpos-total-row",children:[(0,c.jsx)("span",{className:"arravpos-label",children:"Total Amount"}),(0,c.jsxs)("span",{className:"arravpos-total-price",children:[(0,c.jsx)(he,{size:14}),x]})]})]}),(0,c.jsxs)("button",{onClick:f,className:"arravpos-book-btn",children:[(0,c.jsx)(jc,{}),"Book Another Appointment"]})]})]})})}function R5(){const{currentStep:e}=(0,H.useSelector)(n=>n.breadcrumbs),{isService:t}=(0,H.useSelector)(n=>n.outletDetails),r={services:t?D$:I$,professionals:t?A$:T$,time:B$,details:I5,confirm:yb,success:D5}[e];return(0,c.jsx)("div",{className:"aaravpos-layout",children:(0,c.jsx)("div",{className:"aaravpos-layout-content",children:(0,c.jsx)("div",{className:"aaravpos-layout-page",children:(0,c.jsx)(r,{})},e)})})}function k5(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(R5,{}),(0,c.jsx)(ce.ToastContainer,{position:"top-right",autoClose:3e3})]})}var L5=({bookingCode:e})=>{const t=(0,H.useDispatch)(),r=(0,H.useSelector)(f=>f.outletList.outlets),[n,i]=(0,$.useState)(!1),[a,o]=(0,$.useState)(null),{id:s}=(0,H.useSelector)(f=>f.outletDetails),l=(0,$.useCallback)(async()=>{try{i(!0),o(null);const f=await al(e);if(f?.success){const h=f?.data?.data?.outlets||[];t(v1(h)),P1(f?.data?.result),h.length===1&&d(h[0])}else o(f?.message||"Failed to fetch data")}catch(f){console.error(f),o(f?.message||"Something went wrong")}finally{i(!1)}},[e,t]),u=async(f,h)=>{try{const p=await al(e,f,h);p?.success||o(p?.message||"Failed to fetch outlet data"),t(t1(p?.data?.token)),t(Zm(p?.data?.data?.outlets[0]?.isService)),t(n1({standaloneCategories:p?.data?.data?.standaloneCategories,superCategories:p?.data?.data?.superCategories,staff:p?.data?.data?.staff}))}catch(p){console.error(p),o(p?.message||"Something went wrong")}},d=async f=>{f&&(await u(String(f?.tenantId),String(f?.id)),t(e1({...f,tenantId:f.tenantId??"",currency:f.currency??"",outletTimeZoneDate:Ce.DateTime.now().setZone(f?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:Ce.DateTime.fromISO(f?.createdAt,{zone:"utc"}).setZone(f?.timeZone).year})),t(_a(f?.isService?"services":"professionals")))};return(0,$.useEffect)(()=>{Array.isArray(r)&&r.length===0&&l()},[r?.length,l]),a?(0,c.jsx)("div",{className:"arravpos-error-box",children:a}):n?(0,c.jsx)("div",{className:"aaravpos-loader-wrapper",children:(0,c.jsx)("div",{className:"aaravpos-loader"})}):(0,c.jsx)("div",{children:r.length>1&&!s?(0,c.jsx)(S$,{outlets:r,onSelectOutlet:f=>{f?.id&&d(f)}}):(0,c.jsx)(k5,{})})},F5=({...e})=>(0,c.jsx)(w1,{children:(0,c.jsx)(L5,{...e})});exports.AppointmentBookingPlugin=F5;
|
|
18
|
+
`,onClick:()=>t(String(e?.id)),children:[(0,o.jsx)("div",{className:"aaravpos-outlet-card-top",children:(0,o.jsx)(pf,{status:e.isOpen})}),(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 hf({outlets:e,onSelectOutlet:t}){const[r,n]=(0,S.useState)(null),[a,i]=(0,S.useState)(""),s=l=>{n(l);const c=e.find(u=>u.id==l);c&&setTimeout(()=>{t(c)},100)},d=(0,S.useMemo)(()=>{if(!a.trim())return e;const l=a.toLowerCase();return e.filter(c=>c.outletName?.toLowerCase().includes(l)||c.address?.toLowerCase().includes(l))},[e,a]);return(0,o.jsxs)("div",{className:"arravpos-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)(ya,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search outlet...",value:a,onChange:l=>i(l.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:a&&(0,o.jsx)("button",{onClick:()=>i(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{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((l,c)=>(0,o.jsx)("div",{children:(0,o.jsx)(mf,{item:l,onSelect:s,selected:r===l.id})},c))}):(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 vf={USD:Rs,INR:Vu,EUR:Bu,GBP:Qu},de=({size:e=20})=>{const t=(0,F.useSelector)(r=>r.outletDetails?.currency);return(0,o.jsx)(t?vf[t]:Rs,{size:e})},Wr=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},yf=e=>Number(e.price||e.min_price||0),vi=(e,{perUnit:t=!1}={})=>{const r=yf(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)};function $a(){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 $f=[{label:"Services",page:"services",icon:(0,o.jsx)(Bs,{size:16})},{label:"Professional",page:"professionals",icon:(0,o.jsx)(Us,{size:16})},{label:"Time Slot",page:"time",icon:(0,o.jsx)(Bt,{size:16})},{label:"Details",page:"details",icon:(0,o.jsx)(Fs,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,o.jsx)(Dn,{size:16})}],gf=[{label:"Professional",page:"professionals",icon:(0,o.jsx)(Us,{size:16})},{label:"Service",page:"services",icon:(0,o.jsx)(Bs,{size:16})},{label:"Time",page:"time",icon:(0,o.jsx)(Bt,{size:16})},{label:"Details",page:"details",icon:(0,o.jsx)(Fs,{size:16})},{label:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,o.jsx)(Dn,{size:13})]}),page:"confirm",icon:(0,o.jsx)(Dn,{size:16})}];function Xe(){const e=(0,F.useDispatch)(),{width:t}=$a(),{isService:r}=(0,F.useSelector)(f=>f.outletDetails),n=(0,F.useSelector)(f=>f.outletList.outlets),{currentStep:a,completedSteps:i}=(0,F.useSelector)(f=>f.breadcrumbs),s=r?$f:gf,d=s.findIndex(f=>f.page===a),l=()=>{e({type:"RESET_ALL"}),pa.purge()},c=()=>{if(d===0&&n.length>1){l(),e(qc());return}if(d<=0)return;const f=s[d-1];e(An(f.page))},u=s[d];return(0,o.jsx)(o.Fragment,{children:t<991?(0,o.jsxs)("div",{className:"aaravpos-mobile-stepper",children:[(0,o.jsx)("button",{onClick:c,disabled:!1,className:"aaravpos-mobile-back-btn",children:(0,o.jsx)(Nr,{size:20})}),(0,o.jsx)("span",{className:"aaravpos-mobile-step-label",children:u?.label})]}):(0,o.jsxs)("div",{className:"aaravpos-desktop-stepper",children:[n.length>1&&(0,o.jsx)("button",{onClick:c,className:"aaravpos-desktop-back-btn",children:(0,o.jsx)(Nr,{size:20})}),(0,o.jsx)("nav",{className:"aaravpos-step-nav",children:s.map((f,p)=>{const m=a===f.page,v=i?.includes(f.page)||p<=d;return(0,o.jsxs)("button",{onClick:()=>{v&&e(An(f.page))},className:`aaravpos-step-btn
|
|
19
|
+
${v?"clickable":"disabled"}
|
|
20
|
+
${m?"active":"inactive"}
|
|
21
|
+
`,children:[(0,o.jsx)("span",{className:`aaravpos-step-icon ${m?"active":"inactive"}`,children:f.icon}),(0,o.jsx)("span",{children:f.label})]},f.page)})})]})})}function Je({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:a,isSidebarOpen:i=!1}){const{selectedServices:s,selectedProfessional:d}=(0,F.useSelector)(l=>l.service);return(0,o.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,o.jsxs)("div",{className:`aaravpos-layout-wrapper ${s?.length>0||d?.id?"with-sidebar":""}`,children:[(0,o.jsxs)("main",{className:"aaravpos-main-content",children:[e,n?(0,o.jsx)("button",{onClick:a,className:"aaravpos-btn",children:(0,o.jsx)("span",{children:"View Order"})}):r]}),(0,o.jsx)("aside",{className:`aaravpos-sidebar ${i?"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 Vs=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:a})=>{const{outletName:i}=(0,F.useSelector)(l=>l.outletDetails),{isService:s}=(0,F.useSelector)(l=>l.outletDetails),d=t.length>0;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:[i||"-"," Outlet"]})]}),(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-pro-order-list",children:d&&t?.length>0&&t.map(l=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:l.name}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:l.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Bt,{size:13}),(0,o.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),l.price||l.min_price]})]})]},l.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)(de,{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," mins"]})]}),(0,o.jsx)("button",{disabled:s?!t.length:!e,onClick:()=>a("time"),className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[s?"Choose Time":"Choose Services",(0,o.jsx)(Ze,{size:16})]})})]})]})]})};function bf(){const{width:e}=$a(),t=(0,F.useDispatch)(),{staff:r,selectedProfessional:n}=(0,F.useSelector)(d=>d.service),a=e<768,i=!r||r.length===0,s=d=>{if(!d?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const l=new Date,c=d.futureLeaveDates.find(u=>{if(u.status!=="APPROVED"||u.leaveType!=="FULL_DAY")return!1;const f=new Date(u.startDate),p=new Date(u.endDate);return l>=f&&l<=p});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}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:n,goToStep:()=>t(ve())}),children:[(0,o.jsx)(Xe,{}),(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"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",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:r?.map((d,l)=>{const{isOnLeave:c,availableFrom:u}=s(d);return(0,o.jsxs)("div",{onClick:()=>{t(Is(d)),t(at(null)),a&&t(ve())},className:`aaravpos-pro-card ${n?.id===d.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[d.imageUrl?(0,o.jsx)("img",{src:d.imageUrl,alt:d.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:d.color||"#111"},children:Wr(d.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:d.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:d.staff_type})]})]}),c&&u&&(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 ",u]})]})]},l)})})})]})]})}var Nf=e=>Number(e.price||e.min_price||0),Mn=(e,{perUnit:t=!1}={})=>{const r=Nf(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)};function Sf(){const e=(0,F.useDispatch)(),{width:t}=$a(),{staff:r,selectedServices:n,selectedProfessional:a}=(0,F.useSelector)(y=>y.service),[i,s]=(0,S.useState)(!1),d=n.map(y=>y.id),l=(0,S.useMemo)(()=>{if(!a?.id)return[];const y=r.find($=>$.id===a.id);return y?n.map($=>{const g=y?.assignments?.find(x=>x.id===$?.id),h={...$,price:g?.price||$.price||$.min_price||0,duration:g?.duration||$.estimated_time||$.min_time||0};return{...h,tax:Mn(h)}}):[]},[a,r,n]),c=l.reduce((y,$)=>y+Number($.price||0)*$.qty,0),u=l.reduce((y,$)=>y+($?.duration||0)*$.qty,0),f=(0,S.useMemo)(()=>d.length?r.filter(y=>{const $=y.assignments??[];return d?.every(g=>$.some(h=>String(h.id)===String(g)&&!!h?.assigned))}):[],[r,d]),p=t<768,m=d.length>0;(0,S.useEffect)(()=>{if(m&&f.length===0){const y=setTimeout(()=>s(!0),300);return()=>clearTimeout(y)}else s(!1)},[m,f]);const v=y=>{if(!y?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const $=new Date,g=y.futureLeaveDates.find(h=>{if(h.status!=="APPROVED"||h.leaveType!=="FULL_DAY")return!1;const x=new Date(h.startDate),P=new Date(h.endDate);return $>=x&&$<=P});return g?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(g.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:a,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!n.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(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"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",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:f.map((y,$)=>{const{isOnLeave:g,availableFrom:h}=v(y);return(0,o.jsxs)("div",{onClick:()=>{e(Is(y)),e(at(null)),p&&e(ve())},className:`aaravpos-pro-card ${a?.id===y.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[y.imageUrl?(0,o.jsx)("img",{src:y.imageUrl,alt:y.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:y.color||"#111"},children:Wr(y.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:y.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:y.staff_type})]})]}),g&&h&&(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 ",h]})]})]},$)})})})]})]})}function zs({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,F.useSelector)(i=>i?.outletDetails),{isService:a}=(0,F.useSelector)(i=>i.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:[n||"-"," Outlet"]})]}),(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(i=>(0,o.jsxs)("li",{className:"aaravpos-order-item",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",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:i.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Bt,{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)(de,{size:12}),i.price||i.min_price]})]})]},i.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)(de,{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:[a?"Choose Professional":"Choose Time",(0,o.jsx)(Ze,{size:16})]})})})]})]})]})}function Gs(){return(0,o.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}function Cf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,selectedProfessional:i,loading:s}=(0,F.useSelector)(b=>b.service),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=new Set(i?i?.assignments?.map(b=>b.id):[]),v=new Set(i?i?.assignments?.map(b=>b.categoryId):[]),y=n?.map(b=>({...b,categories:b.categories?.map(N=>({...N,services:N.services?.filter(E=>m.has(E.id))||[]})).filter(N=>v.has(N.id)&&N.services.length>0)||[]})).filter(b=>b.categories.length>0)||[],$=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(b=>b.services||[])||[]:[],[d,c]),g=(0,S.useMemo)(()=>y?.flatMap(b=>b.categories?.flatMap(N=>N.services||[]))||[],[y]),h=(0,S.useMemo)(()=>{const b=f.trim().toLowerCase();return b?g.filter(N=>N.name?.toLowerCase().includes(b)||N.description?.toLowerCase().includes(b)):$},[f,g,$]),x=b=>b.taxRows?.some(N=>N.isActive)||!1,P=a.reduce((b,N)=>b+Number(N.price||0)*N.qty,0);return(0,S.useEffect)(()=>{if(!y?.length)return;const b=y.find(N=>N?.categories?.some(E=>E?.services?.length>0));b&&!d&&(l(b),u(null))},[y,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:P,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(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)(ya,{size:14})}),(0,o.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:f,onChange:b=>p(b.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:b=>{t.current&&(t.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:y?.map(b=>(0,o.jsx)("button",{onClick:()=>{l(b),u(null)},className:`aaravpos-supercategory-btn ${d?.id===b.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:b?.isStandAloneCategory?"Standalone":b.name})},b.id))}),d?.categories?.some(b=>b?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:b=>{r.current&&(r.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((b,N)=>b+(N?.services?.length||0),0),")"]}),d?.categories?.map(b=>(0,o.jsxs)("button",{onClick:()=>u(b),className:`aaravpos-supercategory-btn ${c?.id===b.id?"active":""}`,children:[b.name," (",b.services.length,")"]},b.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((b,N)=>(0,o.jsx)(Gs,{},N)):(0,o.jsx)(o.Fragment,{children:h?.length?h?.map((b,N)=>(0,o.jsxs)("div",{onClick:()=>{const E=a.find(A=>A.id===b.id);E&&E.qty===1?e(br(String(b.id))):e(gr({...b,price:b.price?Number(b.price):void 0}))},className:`aaravpos-service-card ${a.some(E=>E.id===b.id)?"active":""}`,children:[x(b)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(b)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:b.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:b.description}),b.description&&b.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:b.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:b.estimated_time?`${b.estimated_time} min`:`${b.min_time}-${b.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:b.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.min_price," - ",(0,o.jsx)(de,{size:14}),b.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),e(br(String(b.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(E=>E.id===b.id)?.qty||0}),(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),a.find(A=>A.id===b.id)?e(js(String(b.id))):e(gr({...b,price:b.price?Number(b.price):void 0}))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},N)):(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."})]})})})})]})]})}function xf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,loading:i}=(0,F.useSelector)(h=>h.service),{outletName:s}=(0,F.useSelector)(h=>h?.outletDetails),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(h=>h.services||[])||[]:[],[d,c]),v=(0,S.useMemo)(()=>n?.flatMap(h=>h?.categories?.flatMap(x=>x.services||[]))||[],[n]),y=(0,S.useMemo)(()=>{const h=f.trim().toLowerCase();return h?v.filter(x=>x.name?.toLowerCase().includes(h)||x.description?.toLowerCase().includes(h)):m},[f,v,m]),$=h=>h.taxRows?.some(x=>x.isActive)||!1,g=a.reduce((h,x)=>h+Number(x.price||0)*x.qty,0);return(0,S.useEffect)(()=>{if(!n?.length)return;const h=n.find(x=>x?.categories?.some(P=>P?.services?.length>0));h&&!d&&(l(h),u(null))},[n,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:g,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(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)(ya,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search services...",value:f,onChange:h=>p(h.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:h=>{t.current&&(t.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:n?.filter(h=>h?.categories?.some(x=>x?.services?.length>0))?.map(h=>(0,o.jsx)("button",{onClick:()=>{l(h),u(null)},className:`aaravpos-supercategory-btn ${d?.id===h.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:h?.isStandAloneCategory?"Standalone":h.name})},h.id))}),d?.categories?.some(h=>h?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:h=>{r.current&&(r.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((h,x)=>h+(x?.services?.length||0),0),")"]}),d?.categories?.filter(h=>h?.services?.length>0)?.map(h=>(0,o.jsxs)("button",{onClick:()=>u(h),className:`aaravpos-supercategory-btn ${c?.id===h.id?"active":""}`,children:[h.name," (",h.services.length,")"]},h.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((h,x)=>(0,o.jsx)(Gs,{},x)):(0,o.jsx)(o.Fragment,{children:y?.length?y?.map((h,x)=>(0,o.jsxs)("div",{onClick:()=>{const P=a.find(b=>b.id===h.id);P&&P.qty===1?e(br(String(h.id))):e(gr(h))},className:`aaravpos-service-card ${a.some(P=>P.id===h.id)?"active":""}`,children:[$(h)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(h)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:h.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:h.description}),h.description&&h.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:h.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:h.estimated_time?`${h.estimated_time} min`:`${h.min_time}-${h.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:h.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.min_price," - ",(0,o.jsx)(de,{size:14}),h.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),e(br(String(h.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(P=>P.id===h.id)?.qty||0}),(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),a.find(b=>b.id===h.id)?e(js(String(h.id))):e(gr(h))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},x)):(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 Pf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ga({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:a=0,onTipChange:i,consentRequired:s=!1,consentCompleted:d=0,totalConsents:l=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:p}){const{selectedSlotIndexes:m,slots:v,selectedDate:y}=(0,F.useSelector)(T=>T.slots),{staff:$,selectedServices:g,selectedProfessional:h}=(0,F.useSelector)(T=>T.service),{timeZone:x}=(0,F.useSelector)(T=>T.outletDetails),P=me.DateTime.now().setZone(x??"UTC"),[b,N]=(0,S.useState)(""),[E,A]=(0,S.useState)(!1),z=(0,S.useRef)(null),Z=(0,S.useRef)(null),[ae,ie]=(0,S.useState)(0),k=[0,5,10,15,20],H=(0,S.useMemo)(()=>[...v?.morning||[],...v?.afternoon||[],...v?.evening||[]],[v]),X=15,q=(0,S.useMemo)(()=>{if(!h?.id)return[];const T=$?.find(_=>_.id===h.id);return T?g.map(_=>{const J=T.assignments?.find(Ie=>Ie.id===_.id),ue={..._,price:J?.price||_.price||_.min_price||0,duration:J?.duration||_.estimated_time||_.min_time||0};return{...ue,tax:Mn(ue),unitTax:Mn(ue,{perUnit:!0})}}):[]},[h,$,g]),fe=q.reduce((T,_)=>T+Number(_.price)*(_.qty||1),0),te=q.reduce((T,_)=>T+Number(_.duration)*(_.qty||1),0),oe=Math.ceil(te/X),je=T=>{if(!H.length)return"";const _=H[T]?.start_time,J=H[T+oe-1];return!_||!J?"":`${_} - ${J.end_time||J.start_time}`},I=y||{day:P.day,month:P.month,year:P.year},C=m?.[0],O=C!==void 0?je(C):null,M=I.month??0,R=O?`${Pf[M]} ${I.day} at ${O}`:null,L=q.reduce((T,_)=>T+_.tax,0),B=Number(a)||0,U=n?fe*B/100:0,V=fe+L+U;(0,S.useEffect)(()=>{n&&a==null&&i?.(0)},[n,a,i]);const W=(0,S.useMemo)(()=>u?"Processing...":c?"Checking consents...":s&&d<l?`Sign Consents (${d}/${l})`:(0,o.jsxs)(o.Fragment,{children:[e||"Book Appointment",(0,o.jsx)(Yu,{})]}),[u,c,s,d,l,e]),G=f||u||c||!O;return(0,S.useEffect)(()=>{const T=()=>{const J=z.current?.offsetHeight||0,ue=Z.current?.offsetHeight||0,Ie=(J+120||0)+ue;ie(window.innerHeight-Ie)};T();const _=new ResizeObserver(()=>{T()});return Z.current&&_.observe(Z.current),z.current&&_.observe(z.current),window.addEventListener("resize",T),()=>{_.disconnect(),window.removeEventListener("resize",T)}},[q,n,d,l,E]),(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",p&&(0,o.jsx)("button",{onClick:p,className:"aaravpos-sidebar-close-btn",children:(0,o.jsx)(pt,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-date-time",children:[(0,o.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),R?(0,o.jsx)("span",{className:"aaravpos-date-time-value",children:R}):(0,o.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,o.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${ae}px`},children:q?.length>0&&q.map(T=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:T.name}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:T.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Bt,{size:13}),(0,o.jsxs)("span",{children:[T.min_time||T.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),T.price||T.min_price]})]})]},T.id))}),(0,o.jsxs)("div",{className:"third",ref:Z,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:[...k,"custom"].map((T,_)=>{const J=T==="custom",ue=J?E:B===T,Ie=_===0,Ut=_===[...k,"custom"].length-1;return(0,o.jsx)("button",{onClick:()=>{J?(A(!0),i?.(Number(b)||0)):(A(!1),N(""),i?.(Number(T)))},className:`aaravpos-tip-btn
|
|
22
|
+
${Ie||Ut?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${ue?"aaravpos-tip-btn-active":""}`,children:J?"Custom":T===0?"No tip":`${T}%`},T)})}),E&&(0,o.jsx)("div",{className:"aaravpos-tip-input-wrapper",children:(0,o.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:b,onChange:T=>{const _=T.target.value;(_===""||Number(_)>=0&&Number(_)<=100)&&(N(_),i?.(Number(_)||0))},className:"aaravpos-tip-input"})})]}),s&&d<l&&(0,o.jsxs)("div",{className:"aaravpos-consent-box",children:[(0,o.jsxs)("p",{className:"aaravpos-consent-text",children:["Consent Required:"," ",d,"/",l," completed"]}),(0,o.jsx)("div",{className:"aaravpos-consent-progress",children:(0,o.jsx)("div",{className:"aaravpos-consent-progress-bar",style:{width:`${d/l*100}%`}})})]}),(0,o.jsxs)("div",{className:"aaravpos-mt-auto",children:[(0,o.jsx)(pn,{label:"Service",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),fe.toFixed(2)]})}),n&&(0,o.jsx)(pn,{label:`Tip (${B}%)`,value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),U.toFixed(2)]})}),(!r||O)&&(0,o.jsx)(pn,{label:"Taxes",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),L.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)(de,{size:16}),V.toFixed(2)]})]}),(0,o.jsx)("button",{onClick:t,disabled:G,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,o.jsx)("span",{className:"aaravpos-common-btn-content",children:W})})]})]})]})}function pn({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})]})}var vt=({dateObj:e,selectedProfessional:t,outletTimeZone:r})=>{if(!t)return!1;const n=me.DateTime.fromISO(e.fullDate||"").setZone(r),a=n.toFormat("yyyy-MM-dd");if((t?.futureLeaveDates||[]).some(c=>{if(c.status!=="APPROVED"||c.leaveType!=="FULL_DAY")return!1;const u=c?.leavePeriod?.date;return u?me.DateTime.fromISO(u).toFormat("yyyy-MM-dd")===a:!1}))return!0;const i=(t?.dateOverrides||[]).find(c=>me.DateTime.fromISO(c.date).toFormat("yyyy-MM-dd")===a);if(i?.type==="CLOSED")return!0;if(i?.type==="TIME")return!1;const s=t?.weeklyHours?.weeklyJson||{},d={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",7:"sun"}[n.weekday],l=s?.[d];return!!(!l||l.isClosed)},wf=e=>{try{if(!e)throw new Error("Missing timezone");const t=me.DateTime.now().setZone(e);if(!t.isValid)throw new Error("Invalid timezone");return Array.from({length:6},(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),[]}},_f=["S","M","T","W","T","F","S"];function Of({isOpen:e,onClose:t}){const r=(0,F.useDispatch)(),{selectedDate:n}=(0,F.useSelector)(p=>p.slots),{selectedProfessional:a}=(0,F.useSelector)(p=>p.service),{timeZone:i}=(0,F.useSelector)(p=>p.outletDetails),[s]=(0,S.useState)(wf(i||"")),[d,l]=(0,S.useState)(0),c=s[d];if(!e)return null;const u=me.DateTime.now().setZone(i??"UTC"),f=(p,m)=>{const v=me.DateTime.fromObject({year:c.year,month:p,day:m}),y={day:m,month:p,year:c.year,fullDate:v.toISODate()||""};v.startOf("day")<u.startOf("day")||vt({dateObj:y,selectedProfessional:a,outletTimeZone:i||"UTC"})||(r(at({month:p,day:m,year:c.year})),t())};return(0,o.jsx)("div",{className:"aaravpos-date-modal-overlay",onClick:p=>p.target===p.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)(pt,{})})]}),(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:()=>l(p=>Math.max(p-1,0)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(Nr,{})}),(0,o.jsx)("div",{className:"aaravpos-date-month-label",children:c?.label}),(0,o.jsx)("button",{disabled:d===s.length-1,onClick:()=>l(p=>Math.min(p+1,s.length-1)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(Ze,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-calendar-grid",children:[_f.map((p,m)=>(0,o.jsx)("div",{className:"aaravpos-calendar-weekday",children:p},m)),Array.from({length:c?.startDow||0}).map((p,m)=>(0,o.jsx)("div",{},`e${m}`)),Array.from({length:c?.days||0},(p,m)=>m+1).map(p=>{const m=n?.month===c?.monthIdx&&n?.day===p,v=c?.monthIdx===u.month&&p===u.day,y=me.DateTime.fromObject({year:c.year,month:c.monthIdx,day:p}),$={day:p,month:c.monthIdx,year:c.year,fullDate:y.toISODate()||""},g=y.startOf("day")<u.startOf("day"),h=vt({dateObj:$,selectedProfessional:a,outletTimeZone:i||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{h||f(c.monthIdx,p)},className:["aaravpos-calendar-day",!m&&!h&&"aaravpos-calendar-day-active",v&&!m&&"aaravpos-calendar-day-today",m&&"aaravpos-calendar-day-selected",h&&"aaravpos-calendar-day-disabled",g&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:[h&&(0,o.jsx)("div",{className:"aaravpos-calendar-day-slash"}),(0,o.jsx)("span",{className:"aaravpos-calendar-day-text",children:p})]},p)})]})]})]})})}var yi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ef=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function jf(){const e=(0,F.useDispatch)(),[t,r]=(0,S.useState)(11),{staff:n,selectedServices:a,selectedProfessional:i}=(0,F.useSelector)(I=>I.service),{tenantId:s,timeZone:d}=(0,F.useSelector)(I=>I?.outletDetails),{selectedSlotIndexes:l,selectedDate:c,selectedTime:u,slots:f,loading:p}=(0,F.useSelector)(I=>I.slots),[m,v]=(0,S.useState)(!1),[y,$]=(0,S.useState)(0),g=15,h=(0,S.useMemo)(()=>[f.morning,f.afternoon,f.evening].flat(),[f]),x=(0,S.useMemo)(()=>me.DateTime.now().setZone(d),[d]),P=I=>{try{if(!I.isValid)throw new Error("Invalid timezone or start date");return Array.from({length:180},(O,M)=>{const R=I.plus({days:M});return R.isValid?{day:R.day,month:R.month,year:R.year,fullDate:R.toISODate()}:null}).filter(Boolean)}catch(C){return console.error("generateDates error:",C),[]}},b=(0,S.useMemo)(()=>P(x),[x]),N=(0,S.useMemo)(()=>{if(!i?.id)return[];const I=n?.find(C=>C.id===i.id);return I?a.map(C=>{const O=I.assignments?.find(M=>M.id===C.id);return{...C,price:O?.price||C.price||C.min_price||0,duration:O?.duration||C.estimated_time||C.min_time||0,qty:O?.qty||1}}):[]},[i,n,a]),E=N.reduce((I,C)=>I+Number(C.duration)*(C.qty||1),0),A=Math.ceil(E/g),z=c?me.DateTime.fromObject(c).toFormat("yyyy-MM-dd"):null;(0,S.useEffect)(()=>{!i?.id||!z||e(tr({tenantId:s,staffId:i.id,date:z}))},[i?.id,z,e,s]);const Z=I=>{$(C=>Math.max(0,Math.min(b.length-11,C+I*4)))};(0,S.useEffect)(()=>{c||e(at({day:x.day,month:x.month,year:x.year}))},[]),(0,S.useEffect)(()=>{if(!c||!b.length)return;const I=b.findIndex(C=>C.day===c.day&&C.month===c.month&&C.year===c.year);I!==-1&&$(Math.max(0,Math.min(b.length-t,I-Math.floor(t/2))))},[c,b,t]);const ae=I=>{if(vt({dateObj:I,selectedProfessional:i,outletTimeZone:d||"UTC"})){ne.toast.warning("Staff is unavailable on this date");return}e(at({day:I.day,month:I.month,year:I.year})),e(ln(null))},ie=I=>{if(!h.length)return;const C=h.slice(I,I+A);if(C.length<A){ne.toast.warning("You don't have sufficient time for selected service");return}if(C.some(M=>M.isBooked||M.status!=="AVAILABLE")){ne.toast.warning("Selected time range is not fully available");return}e(ln(h[I].start_time));const O=Array.from({length:A},(M,R)=>I+R);e(dn({indexes:O,ids:O.map(M=>h[M]?.id)}))};(0,S.useEffect)(()=>{if(!u||!h.length)return;const I=h.findIndex(O=>O.start_time===u);if(I===-1)return;const C=Array.from({length:A},(O,M)=>I+M);C.length===l.length&&C.every((O,M)=>O===l[M])||e(dn({indexes:C,ids:C.map(O=>h[O]?.id)}))},[u,h,A,l]),(0,S.useEffect)(()=>{if(!h.length||A===0)return;let I=!1;for(let C=0;C<=h.length-A;C++)if(h.slice(C,C+A).every(O=>!O.isBooked&&O.status==="AVAILABLE")){ie(C),I=!0;break}I||(e(ln(null)),e(dn({indexes:[],ids:[]})))},[h,A]),(0,S.useEffect)(()=>{const I=()=>{const C=window.innerWidth;C<1024?r(5):C<1280?r(7):r(11)};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const k=f?.morning||[],H=f?.afternoon||[],X=f?.evening||[],q=I=>I.some(C=>!C.isBooked&&C.status==="AVAILABLE"),fe=()=>q(k)?"morning":q(H)?"afternoon":q(X)?"evening":null,[te,oe]=(0,S.useState)(fe()),je=()=>{let I=null;for(let C=1;C<b.length;C++){const O=x.plus({days:C});if(!vt({dateObj:{day:O.day,month:O.month,year:O.year,fullDate:O.toISODate()},selectedProfessional:i,outletTimeZone:d||"UTC"})){I=O;break}}I&&e(at({day:I.day,month:I.month,year:I.year}))};return(0,S.useEffect)(()=>{const I=h[l[0]];I&&(k.some(C=>C.id===I.id)?oe("morning"):H.some(C=>C.id===I.id)?oe("afternoon"):X.some(C=>C.id===I.id)&&oe("evening"))},[l,h,k,H,X]),(0,S.useEffect)(()=>{const I=O=>O?.some(M=>!M.isBooked&&M.status==="AVAILABLE"),C=!I(k)&&!I(H)&&!I(X);!p&&C&&je()},[k,H,X]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(ga,{buttonText:"Fill Details",onButtonClick:()=>{if(!u||!l.length){ne.toast.warning("Please select a time slot");return}e(ve())},showTaxesOnlyIfTime:!0})}),renderButton:(0,o.jsx)("button",{onClick:()=>{if(!u||!l.length){ne.toast.warning("Please select a time slot");return}e(ve())},disabled:!u||!l.length,className:"aaravpos-btn",children:(0,o.jsx)("span",{className:"aaravpos-btn-content",children:"Fill Details"})}),children:[(0,o.jsx)(Xe,{}),(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:"arravpos-date-wrapper",children:[(0,o.jsxs)("div",{className:"arravpos-date-strip",children:[(0,o.jsx)($i,{onClick:()=>Z(-1),children:(0,o.jsx)(Nr,{size:20})}),b.slice(y,y+t).map(I=>{const C=me.DateTime.fromISO(I.fullDate||""),O=C.weekday%7,M=me.DateTime.now().setZone(d).startOf("day"),R=C.hasSame(M,"day"),L=c?.day===I.day&&c?.month===I.month&&c?.year===I.year,B=vt({dateObj:I,selectedProfessional:i,outletTimeZone:d||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{B||ae(I)},className:["arravpos-date-card",B?"arravpos-date-card-disabled":L?"arravpos-date-card-active":"arravpos-date-card-default"].filter(Boolean).join(" "),children:[B&&(0,o.jsx)("div",{className:"arravpos-date-disabled-slash"}),(0,o.jsx)("span",{className:"arravpos-date-week",children:Ef[O]}),(0,o.jsx)("span",{className:"arravpos-date-day",children:I.day}),R&&!L&&!B&&(0,o.jsx)("span",{className:"arravpos-date-today",children:"TODAY"}),B&&(0,o.jsx)("span",{className:"arravpos-date-unavailable",children:"UNAVAILABLE"})]},`${I.day}-${I.month}-${I.year}`)}),(0,o.jsx)($i,{onClick:()=>Z(1),children:(0,o.jsx)(Ze,{size:20})})]}),(0,o.jsxs)("button",{onClick:()=>v(!0),className:"arravpos-calendar-btn",children:[(0,o.jsx)(_u,{size:16}),c?.month!=null?`${yi[c.month-1]} ${c.year}`:`${yi[x.month-1]} ${x.year}`]})]}),(0,o.jsxs)("div",{className:"arravpos-selected-professional",children:[i?.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,alt:i.name,className:"arravpos-selected-professional-image"}):(0,o.jsx)("div",{className:"arravpos-selected-professional-avatar",style:{background:i?.color||"#111"},children:Wr(i?.name)}),(0,o.jsxs)("div",{className:"arravpos-selected-professional-content",children:[(0,o.jsx)("p",{className:"arravpos-selected-professional-name",children:i?.name}),(0,o.jsxs)("p",{className:"arravpos-selected-professional-services",children:[N.map(I=>I.name).join(", ")," ·"," ",E," mins"]})]})]}),(0,o.jsxs)("div",{className:"arravpos-scroll-area",style:p?{height:300}:{},children:[p?(0,o.jsx)("div",{className:"arravpos-loader-wrapper",children:(0,o.jsx)("div",{className:"arravpos-loader"})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(mn,{label:"Morning",icon:(0,o.jsx)(cf,{size:18,className:"arravpos-slot-icon"}),slots:k,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="morning",onToggle:()=>oe(te==="morning"?null:"morning")}),(0,o.jsx)(mn,{label:"Afternoon",icon:(0,o.jsx)(df,{size:18,className:"arravpos-slot-icon"}),slots:H,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="afternoon",onToggle:()=>oe(te==="afternoon"?null:"afternoon")}),(0,o.jsx)(mn,{label:"Evening",icon:(0,o.jsx)(qu,{size:18,className:"arravpos-slot-icon"}),slots:X,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="evening",onToggle:()=>oe(te==="evening"?null:"evening")})]}),(0,o.jsx)(Of,{isOpen:m,onClose:()=>v(!1)})]})]})}function $i({onClick:e,children:t}){return(0,o.jsx)("button",{onClick:e,className:"arravpos-date-nav-btn",children:t})}function mn({icon:e,label:t,slots:r,allSlots:n,selectedSlotIndexes:a,handleSlotSelect:i,isOpen:s,onToggle:d}){return!r||r?.length===0?null:(0,o.jsxs)("div",{className:"arravpos-slot-section",children:[(0,o.jsxs)("div",{onClick:d,className:"arravpos-slot-section-header",children:[(0,o.jsxs)("div",{className:"arravpos-slot-section-title",children:[(0,o.jsx)("span",{children:e}),t]}),(0,o.jsx)("span",{className:`arravpos-slot-section-arrow ${s?"arravpos-slot-section-arrow-open":""}`,children:(0,o.jsx)(ks,{})})]}),s&&(0,o.jsx)("div",{className:"arravpos-slot-section-content",children:(0,o.jsx)("div",{className:"arravpos-slot-grid",children:r.map(l=>{const c=n.findIndex(p=>p.id===l.id),u=a.includes(c),f=l.isBooked||l.status!=="AVAILABLE";return(0,o.jsxs)("div",{onClick:()=>{f||i(c)},className:`arravpos-slot-card ${f?"arravpos-slot-card-disabled":u?"arravpos-slot-card-selected":"arravpos-slot-card-default"}`,children:[(0,o.jsx)("span",{className:"arravpos-slot-time",children:l.start_time}),(0,o.jsx)("span",{className:"arravpos-slot-status",children:f?"Booked":"Available"})]},l.id)})})})]})}var If=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),Tf=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},Af=e=>e.replace(/\D/g,"").slice(0,3);function Df({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,F.useSelector)(u=>u?.outletDetails),{control:a,handleSubmit:i,reset:s,formState:{errors:d,isSubmitting:l}}=(0,Me.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:"arravpos-payment-overlay",children:(0,o.jsx)("form",{onSubmit:i(c),className:"arravpos-payment-form",children:(0,o.jsxs)("div",{className:"aaravpos-modal",children:[(0,o.jsxs)("div",{className:"arravpos-payment-header",children:[(0,o.jsx)("h2",{className:"arravpos-payment-title",children:"Make a payment"}),(0,o.jsxs)("span",{className:"arravpos-payment-amount",children:[(0,o.jsx)(de,{size:14}),r?.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"arravpos-payment-fields",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"name",className:"arravpos-payment-label",children:["Card Holder Name ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.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 p=f.target.value.replace(/[^A-Za-z ]/g,"");u.onChange(p)},className:"arravpos-custom-input"})}),d.name&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.name.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"number",className:"arravpos-payment-label",children:["Card Number ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.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(If(f.target.value))},className:"arravpos-custom-input"})}),d.number&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.number.message})]}),(0,o.jsxs)("div",{className:"arravpos-payment-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"expiry",className:"arravpos-payment-label",children:["Expiry Date ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{name:"expiry",control:a,rules:{required:"Expiry required",validate:u=>{if(!/^\d{2}\/\d{2}$/.test(u))return"Invalid format";const[f,p]=u.split("/").map(Number);if(f<1||f>12)return"Invalid month";const m=me.DateTime.now().setZone(n),v=m.year%100,y=m.month;return p<v||p===v&&f<y?"Card expired":!0}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"expiry",placeholder:"MM/YY",onChange:f=>{u.onChange(Tf(f.target.value))},className:"arravpos-custom-input"})}),d.expiry&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.expiry.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"cvv",className:"arravpos-payment-label",children:["CVV ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.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(Af(f.target.value))},className:"arravpos-custom-input"})}),d.cvv&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.cvv.message})]})]})]}),(0,o.jsxs)("div",{className:"arravpos-payment-btn-grid",children:[(0,o.jsx)("button",{type:"button",onClick:()=>{s(),e()},className:"arravpos-payment-cancel-btn",children:"Cancel"}),(0,o.jsx)("button",{type:"submit",disabled:l,className:"arravpos-payment-submit-btn",children:l?"Processing...":"Proceed"})]})]})})})}function kn(){return kn=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},kn.apply(null,arguments)}function Mf(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 kf(e,t){if(e==null)return{};var r,n,a=Mf(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 dt(e){"@babel/helpers - typeof";return dt=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},dt(e)}function Rf(e,t){if(dt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ff(e){var t=Rf(e,"string");return dt(t)=="symbol"?t:t+""}function gi(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,Ff(n.key),n)}}function Lf(e,t,r){return t&&gi(e.prototype,t),r&&gi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Rn(e,t)}function Uf(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&&Rn(e,t)}function Sr(e){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sr(e)}function Ws(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ws=function(){return!!e})()}function Vf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zf(e,t){if(t&&(dt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vf(e)}function Gf(e){var t=Ws();return function(){var r,n=Sr(e);if(t){var a=Sr(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return zf(this,r)}}var Wf=xe((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,d=t?Symbol.for("react.provider"):60109,l=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,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,$=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function P(N){if(typeof N=="object"&&N!==null){var E=N.$$typeof;switch(E){case r:switch(N=N.type,N){case c:case u:case a:case s:case i:case p:return N;default:switch(N=N&&N.$$typeof,N){case l:case f:case y:case v:case d:return N;default:return E}}case n:return E}}}function b(N){return P(N)===u}e.AsyncMode=c,e.ConcurrentMode=u,e.ContextConsumer=l,e.ContextProvider=d,e.Element=r,e.ForwardRef=f,e.Fragment=a,e.Lazy=y,e.Memo=v,e.Portal=n,e.Profiler=s,e.StrictMode=i,e.Suspense=p,e.isAsyncMode=function(N){return b(N)||P(N)===c},e.isConcurrentMode=b,e.isContextConsumer=function(N){return P(N)===l},e.isContextProvider=function(N){return P(N)===d},e.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===r},e.isForwardRef=function(N){return P(N)===f},e.isFragment=function(N){return P(N)===a},e.isLazy=function(N){return P(N)===y},e.isMemo=function(N){return P(N)===v},e.isPortal=function(N){return P(N)===n},e.isProfiler=function(N){return P(N)===s},e.isStrictMode=function(N){return P(N)===i},e.isSuspense=function(N){return P(N)===p},e.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===u||N===s||N===i||N===p||N===m||typeof N=="object"&&N!==null&&(N.$$typeof===y||N.$$typeof===v||N.$$typeof===d||N.$$typeof===l||N.$$typeof===f||N.$$typeof===g||N.$$typeof===h||N.$$typeof===x||N.$$typeof===$)},e.typeOf=P})),qf=xe((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,d=t?Symbol.for("react.provider"):60109,l=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,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,$=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function P(_){return typeof _=="string"||typeof _=="function"||_===a||_===u||_===s||_===i||_===p||_===m||typeof _=="object"&&_!==null&&(_.$$typeof===y||_.$$typeof===v||_.$$typeof===d||_.$$typeof===l||_.$$typeof===f||_.$$typeof===g||_.$$typeof===h||_.$$typeof===x||_.$$typeof===$)}function b(_){if(typeof _=="object"&&_!==null){var J=_.$$typeof;switch(J){case r:var ue=_.type;switch(ue){case c:case u:case a:case s:case i:case p:return ue;default:var Ie=ue&&ue.$$typeof;switch(Ie){case l:case f:case y:case v:case d:return Ie;default:return J}}case n:return J}}}var N=c,E=u,A=l,z=d,Z=r,ae=f,ie=a,k=y,H=v,X=n,q=s,fe=i,te=p,oe=!1;function je(_){return oe||(oe=!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.")),I(_)||b(_)===c}function I(_){return b(_)===u}function C(_){return b(_)===l}function O(_){return b(_)===d}function M(_){return typeof _=="object"&&_!==null&&_.$$typeof===r}function R(_){return b(_)===f}function L(_){return b(_)===a}function B(_){return b(_)===y}function U(_){return b(_)===v}function V(_){return b(_)===n}function W(_){return b(_)===s}function G(_){return b(_)===i}function T(_){return b(_)===p}e.AsyncMode=N,e.ConcurrentMode=E,e.ContextConsumer=A,e.ContextProvider=z,e.Element=Z,e.ForwardRef=ae,e.Fragment=ie,e.Lazy=k,e.Memo=H,e.Portal=X,e.Profiler=q,e.StrictMode=fe,e.Suspense=te,e.isAsyncMode=je,e.isConcurrentMode=I,e.isContextConsumer=C,e.isContextProvider=O,e.isElement=M,e.isForwardRef=R,e.isFragment=L,e.isLazy=B,e.isMemo=U,e.isPortal=V,e.isProfiler=W,e.isStrictMode=G,e.isSuspense=T,e.isValidElementType=P,e.typeOf=b})()})),qs=xe(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=Wf():t.exports=qf()})),Hf=xe(((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function s(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var l={},c=0;c<10;c++)l["_"+String.fromCharCode(c)]=c;if(Object.getOwnPropertyNames(l).map(function(f){return l[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(d,l){for(var c,u=i(d),f,p=1;p<arguments.length;p++){c=Object(arguments[p]);for(var m in c)n.call(c,m)&&(u[m]=c[m]);if(r){f=r(c);for(var v=0;v<f.length;v++)a.call(c,f[v])&&(u[f[v]]=c[f[v]])}}return u}})),ba=xe(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),Hs=xe(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Kf=xe(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=ba(),a={},i=Hs();r=function(d){var l="Warning: "+d;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function s(d,l,c,u,f){if(process.env.NODE_ENV!=="production"){for(var p in d)if(i(d,p)){var m;try{if(typeof d[p]!="function"){var v=Error((u||"React class")+": "+c+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}m=d[p](l,p,u,c,null,n)}catch($){m=$}if(m&&!(m instanceof Error)&&r((u||"React class")+": type specification of "+c+" `"+p+"` 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})),Yf=xe(((e,t)=>{var r=qs(),n=Hf(),a=ba(),i=Hs(),s=Kf(),d=function(){};process.env.NODE_ENV!=="production"&&(d=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function l(){return null}t.exports=function(c,u){var f=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function m(C){var O=C&&(f&&C[f]||C[p]);if(typeof O=="function")return O}var v="<<anonymous>>",y={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:P(),arrayOf:b,element:N(),elementType:E(),instanceOf:A,node:ie(),objectOf:Z,oneOf:z,oneOfType:ae,shape:H,exact:X};function $(C,O){return C===O?C!==0||1/C===1/O:C!==C&&O!==O}function g(C,O){this.message=C,this.data=O&&typeof O=="object"?O:{},this.stack=""}g.prototype=Error.prototype;function h(C){if(process.env.NODE_ENV!=="production")var O={},M=0;function R(B,U,V,W,G,T,_){if(W=W||v,T=T||V,_!==a){if(u){var J=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 J.name="Invariant Violation",J}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+V;!O[ue]&&M<3&&(d("You are manually calling a React.PropTypes validation function for the `"+T+"` prop on `"+W+"`. 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."),O[ue]=!0,M++)}}return U[V]==null?B?U[V]===null?new g("The "+G+" `"+T+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+G+" `"+T+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:C(U,V,W,G,T)}var L=R.bind(null,!1);return L.isRequired=R.bind(null,!0),L}function x(C){function O(M,R,L,B,U,V){var W=M[R];if(te(W)!==C){var G=oe(W);return new g("Invalid "+B+" `"+U+"` of type "+("`"+G+"` supplied to `"+L+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return h(O)}function P(){return h(l)}function b(C){function O(M,R,L,B,U){if(typeof C!="function")return new g("Property `"+U+"` of component `"+L+"` has invalid PropType notation inside arrayOf.");var V=M[R];if(!Array.isArray(V)){var W=te(V);return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected an array."))}for(var G=0;G<V.length;G++){var T=C(V,G,L,B,U+"["+G+"]",a);if(T instanceof Error)return T}return null}return h(O)}function N(){function C(O,M,R,L,B){var U=O[M];if(!c(U)){var V=te(U);return new g("Invalid "+L+" `"+B+"` of type "+("`"+V+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return h(C)}function E(){function C(O,M,R,L,B){var U=O[M];if(!r.isValidElementType(U)){var V=te(U);return new g("Invalid "+L+" `"+B+"` of type "+("`"+V+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return h(C)}function A(C){function O(M,R,L,B,U){if(!(M[R]instanceof C)){var V=C.name||v,W=I(M[R]);return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected ")+("instance of `"+V+"`."))}return null}return h(O)}function z(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?d("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])."):d("Invalid argument supplied to oneOf, expected an array.")),l;function O(M,R,L,B,U){for(var V=M[R],W=0;W<C.length;W++)if($(V,C[W]))return null;var G=JSON.stringify(C,function(_,J){return oe(J)==="symbol"?String(J):J});return new g("Invalid "+B+" `"+U+"` of value `"+String(V)+"` "+("supplied to `"+L+"`, expected one of "+G+"."))}return h(O)}function Z(C){function O(M,R,L,B,U){if(typeof C!="function")return new g("Property `"+U+"` of component `"+L+"` has invalid PropType notation inside objectOf.");var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected an object."));for(var G in V)if(i(V,G)){var T=C(V,G,L,B,U+"."+G,a);if(T instanceof Error)return T}return null}return h(O)}function ae(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&d("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var O=0;O<C.length;O++){var M=C[O];if(typeof M!="function")return d("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(M)+" at index "+O+"."),l}function R(L,B,U,V,W){for(var G=[],T=0;T<C.length;T++){var _=C[T],J=_(L,B,U,V,W,a);if(J==null)return null;J.data&&i(J.data,"expectedType")&&G.push(J.data.expectedType)}var ue=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new g("Invalid "+V+" `"+W+"` supplied to "+("`"+U+"`"+ue+"."))}return h(R)}function ie(){function C(O,M,R,L,B){return q(O[M])?null:new g("Invalid "+L+" `"+B+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return h(C)}function k(C,O,M,R,L){return new g((C||"React class")+": "+O+" type `"+M+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+L+"`.")}function H(C){function O(M,R,L,B,U){var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type `"+W+"` "+("supplied to `"+L+"`, expected `object`."));for(var G in C){var T=C[G];if(typeof T!="function")return k(L,B,U,G,oe(T));var _=T(V,G,L,B,U+"."+G,a);if(_)return _}return null}return h(O)}function X(C){function O(M,R,L,B,U){var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type `"+W+"` "+("supplied to `"+L+"`, expected `object`."));for(var G in n({},M[R],C)){var T=C[G];if(i(C,G)&&typeof T!="function")return k(L,B,U,G,oe(T));if(!T)return new g("Invalid "+B+" `"+U+"` key `"+G+"` supplied to `"+L+"`.\nBad object: "+JSON.stringify(M[R],null," ")+`
|
|
23
|
+
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var _=T(V,G,L,B,U+"."+G,a);if(_)return _}return null}return h(O)}function q(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(q);if(C===null||c(C))return!0;var O=m(C);if(O){var M=O.call(C),R;if(O!==C.entries){for(;!(R=M.next()).done;)if(!q(R.value))return!1}else for(;!(R=M.next()).done;){var L=R.value;if(L&&!q(L[1]))return!1}}else return!1;return!0;default:return!1}}function fe(C,O){return C==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function te(C){var O=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":fe(O,C)?"symbol":O}function oe(C){if(typeof C>"u"||C===null)return""+C;var O=te(C);if(O==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return O}function je(C){var O=oe(C);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function I(C){return!C.constructor||!C.constructor.name?v:C.constructor.name}return y.checkPropTypes=s,y.resetWarningCache=s.resetWarningCache,y.PropTypes=y,y}})),Zf=xe(((e,t)=>{var r=ba();function n(){}function a(){}a.resetWarningCache=n,t.exports=function(){function i(l,c,u,f,p,m){if(m!==r){var v=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 v.name="Invariant Violation",v}}i.isRequired=i;function s(){return i}var d={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 d.PropTypes=d,d}})),Xf=xe(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=qs(),n=!0;t.exports=Yf()(r.isElement,n)}else t.exports=Zf()()})),w=Dt(Xf(),1);function Ke(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}Ke.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1};Ke.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))};Ke.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function Na(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}Na.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),d=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(a>0){var l=s-r,c=d-n;t+=Math.sqrt(l*l+c*c)}r=s,n=d}return t};Na.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 Jf(e,t,r){var n,a,i,s=null,d=0;r||(r={});var l=function(){d=r.leading===!1?0:Date.now(),s=null,i=e.apply(n,a),s||(n=a=null)};return function(){var c=Date.now();!d&&r.leading===!1&&(d=c);var u=t-(c-d);return n=this,a=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),d=c,i=e.apply(n,a),s||(n=a=null)):!s&&r.trailing!==!1&&(s=setTimeout(l,u)),i}}function ee(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=Jf(ee.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=ee.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()}ee.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};ee.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};ee.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))}};ee.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};ee.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)};ee.prototype.isEmpty=function(){return this._isEmpty};ee.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};ee.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 d=this._addPoint(n),l=d.curve,c=d.widths;l&&c&&this._drawCurve(l,c.start,c.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}};ee.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)};ee.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};ee.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)};ee.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};ee.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new Ke(e-n.left,t-n.top,r||new Date().getTime())};ee.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 Na(t[1],n,a,t[2]),s=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:s}}return{}};ee.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,d={x:(e.x+t.x)/2,y:(e.y+t.y)/2},l={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=d.x-l.x,p=d.y-l.y,m=u/(c+u),v={x:l.x+f*m,y:l.y+p*m},y=t.x-v.x,$=t.y-v.y;return{c1:new Ke(d.x+y,d.y+$),c2:new Ke(l.x+y,l.y+$)}};ee.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};ee.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};ee.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};ee.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 d=s/i,l=d*d,c=l*d,u=1-d,f=u*u,p=f*u,m=p*e.startPoint.x;m+=3*f*d*e.control1.x,m+=3*u*l*e.control2.x,m+=c*e.endPoint.x;var v=p*e.startPoint.y;v+=3*f*d*e.control1.y,v+=3*u*l*e.control2.y,v+=c*e.endPoint.y;var y=t+c*a;this._drawPoint(m,v,y)}n.closePath(),n.fill()};ee.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()};ee.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],d=new Ke(s.x,s.y,s.time),l=s.color;if(i===0)this.penColor=l,this._reset(),this._addPoint(d);else if(i!==a.length-1){var c=this._addPoint(d),u=c.curve,f=c.widths;u&&f&&t(u,f,l)}}else{this._reset();var p=a[0];r(p)}}};ee.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,d=r.height/n,l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttributeNS(null,"width",r.width),l.setAttributeNS(null,"height",r.height),this._fromData(t,function($,g,h){var x=document.createElement("path");if(!isNaN($.control1.x)&&!isNaN($.control1.y)&&!isNaN($.control2.x)&&!isNaN($.control2.y)){var P="M "+$.startPoint.x.toFixed(3)+","+$.startPoint.y.toFixed(3)+" "+("C "+$.control1.x.toFixed(3)+","+$.control1.y.toFixed(3)+" ")+($.control2.x.toFixed(3)+","+$.control2.y.toFixed(3)+" ")+($.endPoint.x.toFixed(3)+","+$.endPoint.y.toFixed(3));x.setAttribute("d",P),x.setAttribute("stroke-width",(g.end*2.25).toFixed(3)),x.setAttribute("stroke",h),x.setAttribute("fill","none"),x.setAttribute("stroke-linecap","round"),l.appendChild(x)}},function($){var g=document.createElement("circle"),h=typeof e.dotSize=="function"?e.dotSize():e.dotSize;g.setAttribute("r",h),g.setAttribute("cx",$.x),g.setAttribute("cy",$.y),g.setAttribute("fill",$.color),l.appendChild(g)});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+" "+d+'"')+(' width="'+s+'"')+(' height="'+d+'"')+">",f=l.innerHTML;if(f===void 0){var p=document.createElement("dummy"),m=l.childNodes;p.innerHTML="";for(var v=0;v<m.length;v+=1)p.appendChild(m[v].cloneNode(!0));f=p.innerHTML}var y=u+f+"</svg>";return c+btoa(y)};ee.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};ee.prototype.toData=function(){return this._data};var Qf=xe(((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,p=c.height,m=u.getImageData(0,0,f,p).data,v=d(!0,f,p,m),y=d(!1,f,p,m),$=l(!0,f,p,m),g=l(!1,f,p,m)-$+1,h=y-v+1,x=u.getImageData($,v,g,h);return c.width=g,c.height=h,u.clearRect(0,0,g,h),u.putImageData(x,0,0),c}function i(c,u,f,p){return{red:p[4*(f*u+c)],green:p[4*(f*u+c)+1],blue:p[4*(f*u+c)+2],alpha:p[4*(f*u+c)+3]}}function s(c,u,f,p){return i(c,u,f,p).alpha}function d(c,u,f,p){for(var m=c?1:-1,v=c?0:f-1;c?v<f:v>-1;v+=m)for(var y=0;y<u;y++)if(s(y,v,u,p))return v;return null}function l(c,u,f,p){for(var m=c?1:-1,v=c?0:u-1;c?v<u:v>-1;v+=m)for(var y=0;y<f;y++)if(s(v,y,u,p))return v;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=a}])})})),e0=Dt(Qf(),1),t0=["canvasProps","clearOnResize"],qr=(function(e){Uf(r,e);var t=Gf(r);function r(){var n;Bf(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(d){n._canvas=d,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var d=n.props;return d.canvasProps,d.clearOnResize,kf(d,t0)},n.componentDidMount=function(){var d=n.getCanvas();n._sigPad=new ee(d,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 d=n.getCanvas(),l=document.createElement("canvas");return l.width=d.width,l.height=d.height,l.getContext("2d").drawImage(d,0,0),(0,e0.default)(l)},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 d,l,c=(d=n.props.canvasProps)!==null&&d!==void 0?d:{},u=c.width,f=c.height;if(!(typeof u<"u"&&typeof f<"u")){var p=n.getCanvas(),m=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof u>"u"&&(p.width=p.offsetWidth*m),typeof f>"u"&&(p.height=p.offsetHeight*m),p.getContext("2d").scale(m,m),n.clear()}},n.render=function(){var d=n.props.canvasProps;return S.default.createElement("canvas",kn({ref:n.setRef},d))},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(d,l){return n.getSignaturePad().fromDataURL(d,l)},n.toDataURL=function(d,l){return n.getSignaturePad().toDataURL(d,l)},n.fromData=function(d){return n.getSignaturePad().fromData(d)},n.toData=function(){return n.getSignaturePad().toData()},n}return Lf(r)})(S.Component);qr.propTypes={velocityFilterWeight:w.default.number,minWidth:w.default.number,maxWidth:w.default.number,minDistance:w.default.number,dotSize:w.default.oneOfType([w.default.number,w.default.func]),penColor:w.default.string,throttle:w.default.number,onEnd:w.default.func,onBegin:w.default.func,canvasProps:w.default.object,clearOnResize:w.default.bool};qr.defaultProps={clearOnResize:!0};qr.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var r0=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:a})=>{const i=(0,S.useRef)(null),{register:s,handleSubmit:d,control:l,reset:c,watch:u,setValue:f,formState:{errors:p,isSubmitting:m}}=(0,Me.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),v=u("accepted"),y=u("typedName"),$=u("signatureDataUrl"),g=()=>{c(),r==="DRAW_SIGNATURE"&&i.current?.clear()},h=()=>{g(),e()},x=()=>{i.current?.clear(),f("signatureDataUrl","")},P=N=>{let E="";if(r==="DRAW_SIGNATURE"){const A=i.current;if(A&&!A.isEmpty())E=A.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?N.accepted:!1,typedName:r==="TYPED_NAME"?N.typedName.trim():"",signatureDataUrl:E,emailMe:N.emailMe}),g(),e()},b=!m&&(r==="CHECKBOX_ONLY"?v:r==="TYPED_NAME"?y?.trim().length>2:r==="DRAW_SIGNATURE"?!!$:!1);return(0,o.jsxs)("div",{className:"arravpos-consent-overlay",children:[(0,o.jsx)("div",{className:"arravpos-consent-backdrop"}),(0,o.jsxs)("div",{className:"arravpos-consent-modal",children:[(0,o.jsxs)("div",{className:"arravpos-consent-header",children:[(0,o.jsx)("h3",{className:"arravpos-consent-title",children:n||"Consent Form"}),(0,o.jsx)("button",{onClick:h,className:"arravpos-consent-close-btn",children:(0,o.jsx)(pt,{})})]}),(0,o.jsx)("div",{className:"arravpos-consent-content-wrapper",children:(0,o.jsx)("div",{className:"arravpos-consent-content-box",children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a},className:"arravpos-consent-content"})})}),(0,o.jsxs)("form",{onSubmit:d(P),children:[r==="CHECKBOX_ONLY"&&(0,o.jsxs)("label",{className:"arravpos-consent-checkbox-label",htmlFor:"accepted",children:[(0,o.jsx)("input",{type:"checkbox",...s("accepted",{required:"You must accept terms"}),id:"accepted",className:"arravpos-consent-checkbox"}),(0,o.jsx)("span",{className:"arravpos-consent-checkbox-text",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,o.jsxs)("div",{className:"arravpos-consent-typed-wrapper",children:[(0,o.jsxs)("label",{className:"arravpos-consent-input-label",htmlFor:"typedName",children:["Full Name",(0,o.jsx)("span",{className:"arravpos-consent-required",children:"*"})]}),(0,o.jsx)("input",{...s("typedName",{required:"Name is required",validate:N=>N.trim().length>2||"Enter full name"}),id:"typedName",placeholder:"Type your full name",className:`arravpos-consent-input ${p.typedName?"arravpos-consent-input-error":"arravpos-consent-input-normal"}`}),(0,o.jsx)("p",{className:"arravpos-consent-helper-text",children:"By typing your name, you agree to the consent above"}),p.typedName&&(0,o.jsx)("p",{className:"arravpos-consent-error",children:p.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,o.jsx)(Me.Controller,{control:l,name:"signatureDataUrl",rules:{validate:()=>i.current&&!i.current.isEmpty()?!0:"Signature required"},render:({field:N})=>(0,o.jsxs)("div",{className:"arravpos-consent-signature-wrapper",children:[(0,o.jsx)(qr,{ref:i,canvasProps:{className:"arravpos-consent-signature-canvas"},onEnd:()=>{const E=i.current;if(!E)return;const A=E.getCanvas().toDataURL("image/png");N.onChange(A)}}),p.signatureDataUrl&&(0,o.jsx)("p",{className:"arravpos-consent-error arravpos-consent-error-signature",children:p.signatureDataUrl.message}),(0,o.jsxs)("div",{className:"arravpos-consent-signature-actions",children:[(0,o.jsxs)("button",{type:"button",onClick:x,className:"arravpos-consent-clear-btn",children:[(0,o.jsx)(tf,{size:14}),"Clear"]}),(0,o.jsxs)("label",{className:"arravpos-consent-email-label",htmlFor:"emailme",children:[(0,o.jsx)("input",{type:"checkbox",...s("emailMe"),id:"emailme",className:"arravpos-consent-email-checkbox"}),(0,o.jsx)("span",{className:"arravpos-consent-email-text",children:"Email me"})]})]})]})}),(0,o.jsxs)("div",{className:"arravpos-consent-footer",children:[(0,o.jsx)("button",{type:"button",onClick:h,className:"arravpos-consent-cancel-btn",children:"Cancel"}),(0,o.jsxs)("button",{type:"submit",disabled:!b,className:`arravpos-consent-submit-btn ${b?"arravpos-consent-submit-active":"arravpos-consent-submit-disabled"}`,children:[(0,o.jsx)(ma,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},n0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ht="consentDraftByService",a0=15,i0=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function o0(){const e=(0,F.useDispatch)(),{tenantId:t,id:r}=(0,F.useSelector)(j=>j.outletDetails),{timeZone:n,image:a,outletName:i,address:s}=(0,F.useSelector)(j=>j.outletDetails),{staff:d,selectedServices:l,selectedProfessional:c}=(0,F.useSelector)(j=>j.service),{selectedSlotIds:u,selectedDate:f,selectedTime:p}=(0,F.useSelector)(j=>j.slots),{userDetails:m,bookingMode:v,tipPct:y}=(0,F.useSelector)(j=>j.appointment),$=Array.isArray(l)?l:[l],{selectedSlotIndexes:g,slots:h}=(0,F.useSelector)(j=>j.slots),[x,P]=(0,S.useState)(!1),[b,N]=(0,S.useState)(!1),[E,A]=(0,S.useState)(null),[z,Z]=(0,S.useState)("person"),[ae,ie]=(0,S.useState)(!1),[k,H]=(0,S.useState)(""),[X,q]=(0,S.useState)(""),[fe,te]=(0,S.useState)(null),[oe,je]=(0,S.useState)(null),[I,C]=(0,S.useState)({}),[O,M]=(0,S.useState)({}),[R,L]=(0,S.useState)(!1),[B,U]=(0,S.useState)(!1),V=(0,S.useRef)(!1),W=(0,S.useRef)(""),G=me.DateTime.now().setZone(n??"UTC"),T=$.map(j=>{const D=d?.find(re=>re.id===c?.id)?.assignments?.find(re=>re.id===j.id),K={...j,price:D?.price??j.price??j.min_price??0,duration:D?.duration??j.estimated_time??j.min_time??0};return{...K,duration:D?.duration??j.estimated_time??j.min_time??0,tax:vi(K),unitTax:vi(K,{perUnit:!0})}}),_=[...h?.morning??[],...h?.afternoon??[],...h?.evening??[]],J=T.reduce((j,D)=>j+Number(D.duration??0),0),ue=Math.ceil(J/a0),Ie=j=>{if(!_.length)return"";const D=_[j]?.start_time,K=_[j+ue-1];return!D||!K?"":`${D} - ${K.end_time??K.start_time}`},Ut={day:Number(f?.day??G.day),month:Number(f?.month??G.month),year:Number(f?.year??G.year)},Oa=g?.[0],Ea=Oa!==void 0?Ie(Oa):null,Rd=Ea?`${n0[Ut.month]} ${Ut.day} at ${Ea}`:null,Qr=T.reduce((j,D)=>j+Number(D.price)*(D.qty??1),0),ja=T.reduce((j,D)=>j+D.tax,0),Fd=Math.round(ja*100),Ia=Qr*y/100,Ld=Math.round(Ia*100),Ta=Qr+Ia+ja,Ce=(0,S.useMemo)(()=>$.filter(j=>!(!fa(j)||(j?.consent_rule?.enforcementMode??j?.enforcementMode)==="FIXED")),[$]),Bd=(0,S.useMemo)(()=>Ce.map(j=>String(j.id)).filter(Boolean),[Ce]),Ud=j=>{const D=j?.consent_template??j?.consentTemplate??null;return{heading:String(D?.heading??"").trim(),consent:String(D?.consent??"").trim()}},en=j=>{C(D=>({...D,[String(j)]:!0}))};(0,S.useEffect)(()=>{m&&Ce?.length>0&&Vd()},[m,Ce?.length]);const Vd=async()=>{const j=m?.id;if(j){L(!0);try{const D={};for(const K of Ce){const re=String(K.id),pe=String(K.consent_form_id??"");if(!re||!pe)continue;const le=di(K);if(!(le==="EVERY_X_DAYS"||le==="ONCE_PER_CUSTOMER")){D[re]={data:{checked:!0,needsSignature:!0}};continue}const Pe=!!(await ci(j,pe,re))?.data?.needsSignature;D[re]={data:{checked:!0,needsSignature:Pe}},Pe||en(re)}M(D)}catch(D){console.error(D)}finally{L(!1)}}},tn=(0,S.useMemo)(()=>Ce.filter(j=>{const D=String(j.id);if(I[D])return!1;const K=O[D];return!(K?.data?.checked&&K?.data?.needsSignature===!1)}),[Ce,I,O]),Aa=Bd.length,Da=Aa-tn.length,Ma=tn.length===0,ka=async()=>{if(!V.current){V.current=!0;try{if(!m?.firstName){ne.toast.warn("Please enter First Name before signing consent.");return}if(!m?.email&&!m?.phone){ne.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const j=tn[0];if(!j){await rn();return}const D=String(j.id);if(W.current===D&&ae)return;W.current=D;const K=String(j.consent_form_id??"");if(!K){ne.toast.error("Consent form missing.");return}const re=li(j);if(!re){ne.toast.error("Consent enforcement method not found.");return}const pe=m?.id;if(di(j)!=="EVERY_VISIT"&&pe){const Te=!!(await ci(pe,K,D))?.data?.needsSignature;if(M(Vt=>({...Vt,[D]:{data:{checked:!0,needsSignature:Te}}})),!Te){en(D),ne.toast.success("Consent already signed for this service."),setTimeout(()=>ka(),250);return}}else M(Pe=>({...Pe,[D]:{data:{checked:!0,needsSignature:!0}}}));const{heading:le,consent:Ne}=Ud(j);if(!le||!Ne){ne.toast.error("Consent template missing.");return}H(le),q(Ne),te(re),je(D),ie(!0)}catch(j){console.error(j),ne.toast.error(j?.message??"Consent check failed")}finally{V.current=!1}}},zd=(j,D)=>{try{const K=localStorage.getItem(Ht),re=K?JSON.parse(K):{};re[String(j)]=D,localStorage.setItem(Ht,JSON.stringify(re))}catch(K){console.error("Failed to save consent draft",K)}},Gd=()=>{try{return JSON.parse(localStorage.getItem(Ht)??"{}")}catch{return{}}},Wd=j=>{const D=String(oe);if(!D)return;const K=Ce.find(Ne=>String(Ne.id)===D);if(!K)return;const re=String(K.consent_form_id??""),pe=li(K);if(!re||!pe){ne.toast.error("Consent form/method missing.");return}let le="CHECKBOX_ONLY";pe==="TYPED_NAME"?le="TYPED_NAME":pe==="DRAW_SIGNATURE"&&(le="SIGNATURE_IMAGE"),zd(D,{serviceId:D,concentFormId:re,signatureType:le,typedName:j?.typedName,isChecked:j?.accepted,signatureDataUrl:j?.signatureDataUrl,emailMe:j?.emailMe}),en(D),ie(!1),W.current="",ne.toast.success("Consent captured.")},qd=()=>{ie(!1),je(null)},Hd=async(j,D,K)=>{const re=Gd(),pe=Object.entries(re).map(([le,Ne])=>({serviceId:le,concentFormId:Ne.concentFormId,captured:Ne})).filter(le=>le.serviceId&&le.concentFormId);for(const le of pe){const{serviceId:Ne,concentFormId:Pe,captured:Te}=le,Vt=Te.signatureType||(Te.typedName?"TYPED_NAME":Te.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Fa={tenantId:t,outletId:r,appointmentId:j,customerId:D,serviceId:Ne,formId:Pe,staffId:K,signatureType:Vt,typedName:Te.typedName,imageUrl:Te.signatureDataUrl};Vt==="CHECKBOX_ONLY"&&(Fa.isChecked=Te.isChecked??!0),await au(Fa)}localStorage.removeItem(Ht)};let Ra="";f&&(Ra=`${f?.year}-${String(f?.month+1).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const Kd={tenantId:t,outletId:r,staffId:c?.id,date:Ra,startTime:p,serviceIds:$.map(j=>j.id),slotIds:u,isWalkIn:!1,requiresConsent:Ce.length>0,customer:{first_name:m?.firstName,last_name:m?.lastName,email:m?.email,phone:m?.phone}},rn=async()=>{if(Ce.length&&!Ma){ne.toast.warn("Please complete all consent forms first");return}try{P(!0);const j=await e(rr(Kd)).unwrap(),D=j?.data??j,K=D.id||"",re=D.customerId||D.customer?.id||"",pe=D.staffId||c?.id||"";v==="booking"&&Da>0&&await Hd(K,re,pe),z==="card"?(A({appointmentId:K,customerId:re}),N(!0)):(e(cn(String(K))),e(ve()))}catch(j){const D=j?.payload?.message||j?.data?.message||j?.message||"Staff not working on this day";ne.toast.error(D)}finally{P(!1)}},Yd=async()=>{if(!p&&v==="booking")return void ne.toast.error("Select time");if(!m?.firstName)return void ne.toast.error("Enter first name");if(!m?.email&&!m?.phone)return void ne.toast.error("Email or phone required");Ce.length>0?Ma?await rn():await ka():await rn()},Zd=j=>{const D=j.replace(/\s/g,"");return/^4/.test(D)?"VISA":/^5[1-5]/.test(D)?"MASTERCARD":/^3[47]/.test(D)?"AMEX":/^6/.test(D)?"DISCOVER":"UNKNOWN"},Xd=async j=>{try{P(!0);const D=E?.appointmentId,K=String(E?.customerId);if(!D||!r)return ne.toast.error("Something went wrong."),!1;const re=Zd(j.number),pe=await ru({appointmentId:D,customerId:K,outletId:r,referenceNo:D,currency:"USD",amountCents:Math.round(Ta*100),tipAmountCents:z==="card"?Ld:0,taxAmountCents:z==="card"?Fd:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:j.name,cardNumber:j.number.replace(/\s/g,""),cardType:re,cardExpiry:i0(j.expiry),cvData:j.cvv},billingContact:{name:{firstName:m?.firstName??"",lastName:m?.lastName??""},email:m?.email??""}}}),le=pe?.data?.data??pe?.data??pe??{},Ne=le?.orderId;if(String(le?.mappedStatus).toLowerCase()==="succeeded"||String(le?.reasonMessage).toLowerCase()==="success"){if(ne.toast.success("Payment successful!"),Ne)try{await nu(Ne)}catch(Pe){ne.toast.warning(Pe instanceof Error?Pe.message:String(Pe??"Payment done, but finalize failed"))}}else ne.toast.warning("Payment pending");return N(!1),e(cn(String(E?.appointmentId))),e(ve()),!0}catch(D){return ne.toast.warning(D instanceof Error?D.message:"Payment failed, but appointment is booked"),N(!1),e(cn(String(E?.appointmentId))),e(ve()),!0}finally{P(!1)}},Jd=()=>N(!1),Qd=()=>!p||!m?.firstName||!m?.email&&!m?.phone;return(0,o.jsxs)(Je,{isSidebarOpen:B,handleSidebarOpen:()=>U(j=>!j),sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(ga,{buttonText:"Book Appointment",onButtonClick:Yd,showTip:z==="card",tipPct:y,onTipChange:j=>e(ou(j??0)),consentRequired:Ce?.length>0,consentCompleted:Da,totalConsents:Aa,checkingConsent:R,loading:x,isBookingDisabled:Qd(),handleSidebarOpen:()=>U(j=>!j)})}),isConfirm:!0,children:[(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Xe,{}),(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:"arravpos-booking-wrapper",children:[(0,o.jsxs)("div",{className:"arravpos-outlet-info",children:[a&&(0,o.jsx)("div",{className:"arravpos-outlet-logo",children:(0,o.jsx)("img",{src:a??"/logo.svg",alt:"Logo",className:"arravpos-outlet-logo-img"})}),(0,o.jsxs)("div",{className:"arravpos-outlet-content",children:[(0,o.jsx)("p",{className:"arravpos-outlet-name",children:i??"-"}),(0,o.jsxs)("p",{className:"arravpos-outlet-address",children:[s??"-",(0,o.jsx)("br",{})]})]})]}),(0,o.jsx)("div",{className:"arravpos-booking-scroll",children:(0,o.jsxs)("div",{className:"arravpos-booking-grid",children:[(0,o.jsxs)("div",{className:"arravpos-booking-column",children:[(0,o.jsx)(bi,{children:"Appointment"}),(0,o.jsxs)(s0,{children:[(0,o.jsxs)("div",{className:"arravpos-appointment-header",children:[(0,o.jsx)(d0,{pro:c}),(0,o.jsxs)("div",{className:"arravpos-appointment-content",children:[(0,o.jsx)("p",{className:"arravpos-appointment-name",children:c?.name}),(0,o.jsx)("p",{className:"arravpos-appointment-services",children:$.map(j=>j.name).join(", ")})]}),(0,o.jsxs)("span",{className:"arravpos-appointment-price",children:[(0,o.jsx)(de,{size:14}),Qr]})]}),(0,o.jsxs)("div",{className:"arravpos-appointment-date",children:[(0,o.jsx)(Eu,{}),(0,o.jsx)("span",{className:"arravpos-appointment-date-text",children:Rd??"No time selected"})]})]})]}),(0,o.jsxs)("div",{className:"arravpos-booking-column",children:[(0,o.jsx)(bi,{children:"Payment Method"}),(0,o.jsx)(Ni,{icon:(0,o.jsx)(of,{}),label:"Pay in person",selected:z==="person",onClick:()=>Z("person")}),(0,o.jsx)(Ni,{icon:(0,o.jsx)(Ru,{}),label:"Pay with card",selected:z==="card",onClick:()=>Z("card")})]})]})})]})]})]}),b&&(0,o.jsx)(Df,{onClose:Jd,onPay:Xd,amount:Ta}),ae&&oe&&(0,o.jsx)(r0,{enforcement:fe,heading:k,consent:X,onClose:qd,onConfirm:Wd},oe??"consent")]})}function s0({children:e}){return(0,o.jsx)("div",{className:"arravpos-card-box",children:e})}function d0({pro:e}){return(0,o.jsx)(o.Fragment,{children:e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"arravpos-profile-image"}):(0,o.jsx)("div",{className:"arravpos-profile-avatar",style:{background:e.color??"#111"},children:Wr(e.name)})})}function bi({children:e}){return(0,o.jsx)("p",{className:"arravpos-section-label",children:e})}function Ni({icon:e,label:t,selected:r,onClick:n}){return(0,o.jsxs)("div",{onClick:n,className:`arravpos-select-card ${r?"arravpos-select-card-active":"arravpos-select-card-default"}`,children:[(0,o.jsx)("div",{children:e}),t,(0,o.jsx)("span",{className:"arravpos-select-check",children:r&&(0,o.jsx)(ma,{})})]})}var Ks={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}"]]]}},l0=xe(((e,t)=>{(function(){"use strict";var r={}.hasOwnProperty;function n(){for(var s="",d=0;d<arguments.length;d++){var l=arguments[d];l&&(s=i(s,a(l)))}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 d="";for(var l in s)r.call(s,l)&&s[l]&&(d=i(d,l));return d}function i(s,d){return d?s?s+" "+d:s+d: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 c0(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 u0(e,t,r){for(var n={},a="",i=0,s=0;s<e.length;){var d=r(e[s],a,n);d!==void 0&&(a+=d,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 f0(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=p0(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 p0(e,t){if(e){if(typeof e=="string")return Si(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 Si(e,t)}}function Si(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 Fn(e,t){for(var r=0,n=f0(t.split("")),a;!(a=n()).done;)a.value===e&&r++;return r}function m0(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=Fn("(",e)-Fn(")",e);i>0&&a<t.length;)e+=t[a].replace(r,n),t[a]===")"&&i--,a++;return e}function h0(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=v0(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 v0(e,t){if(e){if(typeof e=="string")return Ci(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 Ci(e,t)}}function Ci(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 y0(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=Fn(t,e);return function(a){if(!a)return{text:"",template:e};for(var i=0,s="",d=h0(e.split("")),l;!(l=d()).done;){var c=l.value;if(c!==t){s+=c;continue}if(s+=a[i],i++,i===a.length&&a.length<n)break}return r&&(s=m0(s,e)),{text:s,template:e}}}function $0(e,t,r){typeof r=="string"&&(r=y0(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,d=!1,l=-1;s<a.length&&s<i.length;){if(a[s]!==i[s]){if(t===0){d=!0,t=s;break}l=s,t--}s++}d||(t=l+1)}return{text:a,caret:t}}function g0(e){return e.hasAttribute("readonly")}function b0(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}var xi={Backspace:8,Delete:46};function N0(e){switch(e.keyCode){case xi.Backspace:return"Backspace";case xi.Delete:return"Delete"}}function S0(e){return e.selectionStart}function Ys(e,t){t!==void 0&&(C0()?setTimeout(function(){return e.setSelectionRange(t,t)},0):e.setSelectionRange(t,t))}function C0(){if(typeof navigator<"u")return x0.test(navigator.userAgent)}var x0=/Android/i;function P0(e,t,r,n,a){Ln(t,r,n,void 0,a)}function w0(e,t,r,n,a){if(!g0(t)){var i=N0(e);switch(i){case"Delete":case"Backspace":e.preventDefault();var s=b0(t);return s?(_0(t,s),Ln(t,r,n,void 0,a)):Ln(t,r,n,i,a);default:}}}function _0(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,Ys(e,t.start)}function Ln(e,t,r,n,a){var i=u0(e.value,S0(e),t),s=i.value,d=i.caret;if(n){var l=c0(s,d,n);s=l.value,d=l.caret}var c=$0(s,d,r),u=c.text;d=c.caret,e.value=u,Ys(e,d),a&&a(s)}var O0=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Pi(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 Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pi(Object(r),!0).forEach(function(n){E0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E0(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j0(e,t){if(e==null)return{};var r=I0(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 I0(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 T0(e){var t=e.ref,r=e.parse,n=e.format,a=e.value,i=e.defaultValue,s=e.controlled,d=s===void 0?!0:s,l=e.onChange,c=e.onKeyDown,u=j0(e,O0),f=(0,S.useRef)(),p=(0,S.useCallback)(function($){f.current=$,t&&(typeof t=="function"?t($):t.current=$)},[t]),m=(0,S.useCallback)(function($){return P0($,f.current,r,n,l)},[f,r,n,l]),v=(0,S.useCallback)(function($){if(c&&c($),!$.defaultPrevented)return w0($,f.current,r,n,l)},[f,r,n,l,c]),y=Qe(Qe({},u),{},{ref:p,onChange:m,onKeyDown:v});return d?Qe(Qe({},y),{},{value:n(wi(a)?"":a).text}):Qe(Qe({},y),{},{defaultValue:n(wi(i)?"":i).text})}function wi(e){return e==null}var A0=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function _i(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 D0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_i(Object(r),!0).forEach(function(n){M0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M0(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k0(e,t){if(e==null)return{};var r=R0(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 R0(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 Cr(e,t){var r=e.inputComponent,n=r===void 0?"input":r,a=e.parse,i=e.format,s=e.value,d=e.defaultValue,l=e.onChange,c=e.controlled,u=e.onKeyDown,f=e.type,p=f===void 0?"text":f,m=k0(e,A0),v=T0(D0({ref:t,parse:a,format:i,value:s,defaultValue:d,onChange:l,controlled:c,onKeyDown:u,type:p},m));return S.default.createElement(n,v)}Cr=S.default.forwardRef(Cr);Cr.propTypes={parse:w.default.func.isRequired,format:w.default.func.isRequired,inputComponent:w.default.elementType,type:w.default.string,value:w.default.string,defaultValue:w.default.string,onChange:w.default.func,controlled:w.default.bool,onKeyDown:w.default.func,onCut:w.default.func,onPaste:w.default.func};var F0=Cr;function Oi(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 L0={}.constructor;function qe(e){return e!=null&&e.constructor===L0}function lt(e){"@babel/helpers - typeof";return lt=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},lt(e)}function Hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(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,B0(n.key),n)}}function Kr(e,t,r){return t&&Ei(e.prototype,t),r&&Ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function B0(e){var t=U0(e,"string");return lt(t)=="symbol"?t:t+""}function U0(e,t){if(lt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V0="1.2.0",z0="1.7.35",ji=" ext. ",G0=/^\d+$/,ce=(function(){function e(t){Hr(this,e),Zs(t),this.metadata=t,Js.call(this,t)}return Kr(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&&G0.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Ii(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Ii(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}}])})(),Ii=(function(){function e(t,r){Hr(this,e),this.globalMetadataObject=r,this.metadata=t,Js.call(this,r.metadata)}return Kr(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 W0(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()&&Ti(this.types(),r))return new H0(Ti(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?ji:this.metadata[13]||ji}}])})(),W0=(function(){function e(t,r){Hr(this,e),this._format=t,this.metadata=r}return Kr(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()&&!q0.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),q0=/^\(?\$1\)?$/,H0=(function(){function e(t,r){Hr(this,e),this.type=t,this.metadata=r}return Kr(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 Ti(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 Zs(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!qe(e)||!qe(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(qe(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+K0(e)+": "+e,"."))}var K0=function(t){return lt(t)};function Ve(e,t){if(t=new ce(t),t.hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Xs(e,t){return t.countries.hasOwnProperty(e)}function Js(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?Oi(t,V0)===-1?this.v2=!0:Oi(t,z0)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function Y0(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=Z0(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 Z0(e,t){if(e){if(typeof e=="string")return Ai(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)?Ai(e,t):void 0}}function Ai(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 X0(e,t){for(var r=e.slice(),n=Y0(t),a;!(a=n()).done;){var i=a.value;e.indexOf(i)<0&&r.push(i)}return r.sort(function(s,d){return s-d})}function Yr(e,t,r){return Qs(e,t,void 0,r)}function Qs(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 Qs(e,t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=X0(i,s.possibleLengths()))}else if(r&&!a)return"INVALID_LENGTH";var d=e.length,l=i[0];return l===d?"IS_POSSIBLE":l>d?"TOO_SHORT":i[i.length-1]<d?"TOO_LONG":i.indexOf(d,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function J0(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 ed(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 ed(e,t,r){return Yr(e,t,r)==="IS_POSSIBLE"}function Re(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Q0(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.
|
|
27
|
+
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 Di(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)?Di(e,t):void 0}}function Di(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 t1=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Sa(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(Re(n,r.nationalNumberPattern())){if(hn(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||hn(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=Q0(t1),i;!(i=a()).done;){var s=i.value;if(hn(n,s,r))return s}}}}function hn(e,t,r){var n=r.type(t);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0?!1:Re(e,n.pattern())}function r1(e,t,r){return t=t||{},r=new ce(r),r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?Sa(e,t,r.metadata)!==void 0:Re(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}function n1(e,t,r){var n=new ce(r).getCountryCodesForCallingCode(e);return n?n.filter(function(a){return a1(t,a,r)}):[]}function a1(e,t,r){var n=new ce(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}var ye="0-90-9٠-٩۰-۹",i1="-‐-―−ー-",o1="//",s1="..",d1=" ",l1="()()[]\\[\\]",c1="~⁓∼~",Oe="".concat(i1).concat(o1).concat(s1).concat(d1).concat(l1).concat(c1),Zr="++",u1=new RegExp("(["+ye+"])");function td(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(u1);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return e}}}function Bn(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,d=s>0&&n[s];if(t.nationalPrefixTransformRule()&&d)a=e.replace(r,t.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{var l=n[0];a=e.slice(l.length),d&&(i=n[1])}var c;if(d){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 f1(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=p1(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.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p1(e,t){if(e){if(typeof e=="string")return Mi(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)?Mi(e,t):void 0}}function Mi(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 rd(e,t){var r=t.countries,n=t.metadata;n=new ce(n);for(var a=f1(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(Sa({phone:e,country:s},void 0,n.metadata))return s}}var m1=!1;function Ca(e,t){var r=t.nationalNumber,n=t.metadata;if(m1&&n.isNonGeographicCallingCode(e))return"001";var a=n.getCountryCodesForCallingCode(e);if(a)return a.length===1?a[0]:rd(r,{countries:a,metadata:n.metadata})}function Un(e,t,r){var n=Bn(e,r),a=n.carrierCode,i=n.nationalNumber;if(i!==e){if(!h1(e,i,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=Ca(r.numberingPlan.callingCode(),{nationalNumber:i,metadata:r})),!v1(i,t,r)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:a}}function h1(e,t,r){return!(Re(e,r.nationalNumberPattern())&&!Re(t,r.nationalNumberPattern()))}function v1(e,t,r){switch(Yr(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function nd(e,t,r,n,a){var i=t||r?Ve(t||r,a):n;if(e.indexOf(i)===0){a=new ce(a),a.selectNumberingPlan(t||r,i);var s=e.slice(i.length),d=Un(s,t,a).nationalNumber,l=Un(e,t,a).nationalNumber;if(!Re(l,a.nationalNumberPattern())&&Re(d,a.nationalNumberPattern())||Yr(l,t,a)==="TOO_LONG")return{countryCallingCode:i,number:s}}return{number:e}}function xa(e,t,r,n,a){if(!e)return{};var i;if(e[0]!=="+"){var s=td(e,t||r,n,a);if(s&&s!==e)i=!0,e="+"+s;else{if(t||r||n){var d=nd(e,t,r,n,a),l=d.countryCallingCode,c=d.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}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 ad(e){return e.replace(new RegExp("[".concat(Oe,"]+"),"g")," ").trim()}var id=/(\$\d)/;function od(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(id,t.nationalPrefixFormattingRule()):t.format());return n?ad(i):i}var y1=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function $1(e,t,r){var n=new ce(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(y1.test(n.IDDPrefix()))return n.IDDPrefix()}var g1=";ext=",et=function(t){return"([".concat(ye,"]{1,").concat(t,"})")};function sd(e){var t="20",r="15",n="9",a="6",i="[ \\t,]*",s="[:\\..]?[ \\t,-]*",d="#?",l="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[ \\t]*",p="(?:,{2}|;)",m=g1+et(t),v=i+l+s+et(t)+d,y=i+c+s+et(n)+d,$=u+et(a)+"#",g=f+p+s+et(r)+d,h=f+"(?:,)+"+s+et(n)+d;return m+"|"+v+"|"+y+"|"+$+"|"+g+"|"+h}var b1="["+ye+"]{2}",N1="["+Zr+"]{0,1}(?:["+Oe+"]*["+ye+"]){3,}["+Oe+ye+"]*",S1=new RegExp("^["+Zr+"]{0,1}(?:["+Oe+"]*["+ye+"]){1,2}$","i"),C1=N1+"(?:"+sd()+")?",x1=new RegExp("^"+b1+"$|^"+C1+"$","i");function P1(e){return e.length>=2&&x1.test(e)}function w1(e){return S1.test(e)}function _1(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 ki={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function O1(e,t,r,n){if(r?r=I1({},ki,r):r=ki,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=xr(i,e.carrierCode,"NATIONAL",n,r),vn(s,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return i?(s=xr(i,null,"INTERNATIONAL",n,r),s="+".concat(a," ").concat(s),vn(s,e.ext,n,r.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(i);case"RFC3966":return _1({number:"+".concat(a).concat(i),ext:e.ext});case"IDD":if(!r.fromCountry)return;var d=j1(i,e.carrierCode,a,r.fromCountry,n);return d?vn(d,e.ext,n,r.formatExtension):void 0;default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function xr(e,t,r,n,a){var i=E1(n.formats(),e);return i?od(e,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&a&&a.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function E1(e,t){return T1(e,function(r){if(r.leadingDigitsPatterns().length>0){var n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(t.search(n)!==0)return!1}return Re(t,r.pattern())})}function vn(e,t,r,n){return t?n(e,t,r):e}function j1(e,t,r,n,a){if(Ve(n,a.metadata)===r){var i=xr(e,t,"NATIONAL",a);return r==="1"?r+" "+i:i}var s=$1(n,void 0,a.metadata);if(s)return"".concat(s," ").concat(r," ").concat(xr(e,null,"INTERNATIONAL",a))}function I1(){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 T1(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}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 Ri(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 Fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ri(Object(r),!0).forEach(function(n){A1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ri(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A1(e,t,r){return(t=dd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Li(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,dd(n.key),n)}}function M1(e,t,r){return t&&Li(e.prototype,t),r&&Li(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dd(e){var t=k1(e,"string");return bt(t)=="symbol"?t:t+""}function k1(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)}var R1=!1,ld=(function(){function e(t,r,n){if(D1(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(qe(r)&&qe(r.countries)){n=r;var a=t;if(!B1.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=xa(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");Zs(n);var d=L1(t,n),l=d.country,c=d.countryCallingCode;this.country=l,this.countryCallingCode=c,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}return M1(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:n1(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return J0(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return r1(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 Sa(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return O1(this,r,n?Fi(Fi({},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)}}])})(),F1=function(t){return/^[A-Z]{2}$/.test(t)};function L1(e,t){var r,n,a=new ce(t);return F1(e)?(r=e,a.selectNumberingPlan(r),n=a.countryCallingCode()):(n=e,R1&&a.isNonGeographicCallingCode(n)&&(r="001")),{country:r,countryCallingCode:n}}var B1=/^\+\d+$/;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 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,V1(n.key),n)}}function U1(e,t,r){return t&&Bi(e.prototype,t),r&&Bi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V1(e){var t=z1(e,"string");return ct(t)=="symbol"?t:t+""}function z1(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)}function G1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W1(e,t,r){return t=St(t),q1(e,Pa()?Reflect.construct(t,r||[],St(e).constructor):t.apply(e,r))}function q1(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 H1(e)}function H1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K1(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&&Nt(e,t)}function Vn(e){var t=typeof Map=="function"?new Map:void 0;return Vn=function(n){if(n===null||!Z1(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 Y1(n,arguments,St(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Nt(a,n)},Vn(e)}function Y1(e,t,r){if(Pa())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&Nt(a,r.prototype),a}function Pa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pa=function(){return!!e})()}function Z1(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Nt(e,t)}function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},St(e)}var De=(function(e){function t(r){var n;return G1(this,t),n=W1(this,t,[r]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return K1(t,e),U1(t)})(Vn(Error)),Ui=new RegExp("(?:"+sd()+")$","i");function X1(e){var t=e.search(Ui);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Ui),a=1;a<n.length;){if(n[a])return{number:r,ext:n[a]};a++}}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=Q1(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 Q1(e,t){if(e){if(typeof e=="string")return Vi(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)?Vi(e,t):void 0}}function Vi(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 ep={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 cd(e){return ep[e]}function Pr(e){for(var t="",r=J1(e.split("")),n;!(n=r()).done;){var a=n.value,i=cd(a);i&&(t+=i)}return t}function tp(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=rp(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 rp(e,t){if(e){if(typeof e=="string")return zi(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)?zi(e,t):void 0}}function zi(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 zn(e){for(var t="",r=tp(e.split("")),n;!(n=r()).done;){var a=n.value;t+=ud(a,t)||""}return t}function ud(e,t,r){if(e==="+"){if(t){typeof r=="function"&&r("end");return}return"+"}return cd(e)}var Gi="(["+ye+"]|[\\-\\.\\(\\)]?)",np="^\\+"+Gi+"*["+ye+"]"+Gi+"*$",ap=new RegExp(np,"g"),Gn=ye,ip="["+Gn+"]+((\\-)*["+Gn+"])*",op="[a-zA-Z]+((\\-)*["+Gn+"])*",sp="^("+ip+"\\.)*"+op+"\\.?$",dp=new RegExp(sp,"g"),Wi="tel:",Wn=";phone-context=",lp=";isub=";function cp(e){var t=e.indexOf(Wn);if(t<0)return null;var r=t+Wn.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}function up(e){return e===null?!0:e.length===0?!1:ap.test(e)||dp.test(e)}function fp(e,t){var r=t.extractFormattedPhoneNumber,n=cp(e);if(!up(n))throw new De("NOT_A_NUMBER");var a;if(n===null)a=r(e)||"";else{a="",n.charAt(0)==="+"&&(a+=n);var i=e.indexOf(Wi),s;i>=0?s=i+Wi.length:s=0;var d=e.indexOf(Wn);a+=e.substring(s,d)}var l=a.indexOf(lp);if(l>0&&(a=a.substring(0,l)),a!=="")return a}var pp=250,mp=new RegExp("["+Zr+ye+"]"),hp=new RegExp("[^"+ye+"#]+$"),vp=!1;function yp(e,t,r){if(t=t||{},r=new ce(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new De("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=gp(e,t.v2,t.extract),a=n.number,i=n.ext,s=n.error;if(!a){if(t.v2)throw s==="TOO_SHORT"?new De("TOO_SHORT"):new De("NOT_A_NUMBER");return{}}var d=Np(a,t.defaultCountry,t.defaultCallingCode,r),l=d.country,c=d.nationalNumber,u=d.countryCallingCode,f=d.countryCallingCodeSource,p=d.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new De("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new De("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new De("TOO_LONG");return{}}if(t.v2){var m=new ld(u,c,r.metadata);return l&&(m.country=l),p&&(m.carrierCode=p),i&&(m.ext=i),m.__countryCallingCodeSource=f,m}var v=(t.extended?r.hasSelectedNumberingPlan():l)?Re(c,r.nationalNumberPattern()):!1;return t.extended?{country:l,countryCallingCode:u,carrierCode:p,valid:v,possible:v?!0:!!(t.extended===!0&&r.possibleLengths()&&ed(c,l,r)),phone:c,ext:i}:v?bp(l,c,i):{}}function $p(e,t,r){if(e){if(e.length>pp){if(r)throw new De("TOO_LONG");return}if(t===!1)return e;var n=e.search(mp);if(!(n<0))return e.slice(n).replace(hp,"")}}function gp(e,t,r){var n=fp(e,{extractFormattedPhoneNumber:function(s){return $p(s,r,t)}});if(!n)return{};if(!P1(n))return w1(n)?{error:"TOO_SHORT"}:{};var a=X1(n);return a.ext?a:{number:n}}function bp(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function Np(e,t,r,n){var a=xa(zn(e),void 0,t,r,n.metadata),i=a.countryCallingCodeSource,s=a.countryCallingCode,d=a.number,l;if(s)n.selectNumberingPlan(s);else if(d&&(t||r))n.selectNumberingPlan(t,r),t?l=t:vp&&n.isNonGeographicCallingCode(r)&&(l="001"),s=r||Ve(t,n.metadata);else return{};if(!d)return{countryCallingCodeSource:i,countryCallingCode:s};var c=Un(zn(d),l,n),u=c.nationalNumber,f=c.carrierCode,p=Ca(s,{nationalNumber:u,metadata:n});return p&&(l=p,p==="001"||n.selectNumberingPlan(l)),{country:l,countryCallingCode:s,countryCallingCodeSource:i,nationalNumber:u,carrierCode:f}}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 qi(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 Hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qi(Object(r),!0).forEach(function(n){Sp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sp(e,t,r){return(t=Cp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cp(e){var t=xp(e,"string");return Ct(t)=="symbol"?t:t+""}function xp(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)}function Pp(e,t,r){return yp(e,Hi(Hi({},t),{},{v2:!0}),r)}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 Ki(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 wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ki(Object(r),!0).forEach(function(n){_p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ki(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _p(e,t,r){return(t=Op(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Op(e){var t=Ep(e,"string");return xt(t)=="symbol"?t:t+""}function Ep(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 jp(e,t){return Dp(e)||Ap(e,t)||Tp(e,t)||Ip()}function Ip(){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 Tp(e,t){if(e){if(typeof e=="string")return Yi(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)?Yi(e,t):void 0}}function Yi(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 Ap(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,d=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(d.push(n.value),d.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return d}}function Dp(e){if(Array.isArray(e))return e}function fd(e){var t=jp(Array.prototype.slice.call(e),4),r=t[0],n=t[1],a=t[2],i=t[3],s,d,l;if(typeof r=="string")s=r;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")i?(d=a,l=i):(d=void 0,l=a),n&&(d=wp({defaultCountry:n},d));else if(qe(n))a?(d=n,l=a):l=n;else throw new Error("Invalid second argument: ".concat(n));return{text:s,options:d,metadata:l}}function Pt(e){"@babel/helpers - typeof";return Pt=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},Pt(e)}function Zi(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 Xi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zi(Object(r),!0).forEach(function(n){Mp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mp(e,t,r){return(t=kp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kp(e){var t=Rp(e,"string");return Pt(t)=="symbol"?t:t+""}function Rp(e,t){if(Pt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pd(e,t,r){t&&t.defaultCountry&&!Xs(t.defaultCountry,r)&&(t=Xi(Xi({},t),{},{defaultCountry:void 0}));try{return Pp(e,t,r)}catch(n){if(!(n instanceof De))throw n}}function Fp(){var e=fd(arguments),t=e.text,r=e.options,n=e.metadata;return pd(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 Ji(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 Qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ji(Object(r),!0).forEach(function(n){Lp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ji(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lp(e,t,r){return(t=Bp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bp(e){var t=Up(e,"string");return wt(t)=="symbol"?t:t+""}function Up(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 Vp(){var e=fd(arguments),t=e.text,r=e.options,n=e.metadata;r=Qi(Qi({},r),{},{extract:!1});var a=pd(t,r,n);return a&&a.isValid()||!1}function _t(e){"@babel/helpers - typeof";return _t=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},_t(e)}function zp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eo(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,Wp(n.key),n)}}function Gp(e,t,r){return t&&eo(e.prototype,t),r&&eo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wp(e){var t=qp(e,"string");return _t(t)=="symbol"?t:t+""}function qp(e,t){if(_t(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_t(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hp=(function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;zp(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return Gp(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 Kp(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=Yp(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.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yp(e,t){if(e){if(typeof e=="string")return to(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)?to(e,t):void 0}}function to(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 yn=new RegExp("x");function ar(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function ro(e,t){return e[t]===")"&&t++,Zp(e.slice(0,t))}function Zp(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 d=s[i];a+=e.slice(n,d),n=d+1}return a}function Xp(e,t,r){for(var n=Kp(r.split("")),a;!(a=n()).done;){var i=a.value;if(e.slice(t+1).search(yn)<0)return;t=e.search(yn),e=e.replace(yn,i)}return[e,t]}function Jp(e,t,r){var n=r.metadata,a=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return e2(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:a,getSeparatorAfterNationalPrefix:i})}function Qp(e,t,r){return Yr(e,t,r)==="IS_POSSIBLE"}function e2(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=no(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:i,metadata:n});if(s)return s}return no(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:i,metadata:n})}function no(e,t,r){var n=r.metadata,a=r.useNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix,s=od(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)),t2(s,e))return s}function t2(e,t){return Pr(e)===t.getNationalDigits()}function Ot(e){"@babel/helpers - typeof";return Ot=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},Ot(e)}function r2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(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 n2(e,t,r){return t&&ao(e.prototype,t),r&&ao(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a2(e){var t=i2(e,"string");return Ot(t)=="symbol"?t:t+""}function i2(e,t){if(Ot(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ot(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o2=(function(){function e(){r2(this,e)}return n2(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([$n(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(l2);if(!n){if(d2.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 d=this.getContext().branches;d.push($n(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:d});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($n(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:s2(i)});break;default:throw new Error("Unknown operator: ".concat(a))}s&&this.parsePattern(s)}}])})();function s2(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 d2=/[\(\)\[\]\?\:\|]/,l2=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function $n(e){return e.length===1?e[0]:e}function io(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=c2(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 c2(e,t){if(e){if(typeof e=="string")return oo(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)?oo(e,t):void 0}}function oo(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 Et(e){"@babel/helpers - typeof";return Et=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},Et(e)}function u2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function so(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,p2(n.key),n)}}function f2(e,t,r){return t&&so(e.prototype,t),r&&so(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p2(e){var t=m2(e,"string");return Et(t)=="symbol"?t:t+""}function m2(e,t){if(Et(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Et(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var h2=(function(){function e(t){u2(this,e),this.matchTree=new o2().parse(t)}return f2(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=qn(r.split(""),this.matchTree,!0);if(a&&a.match&&delete a.matchedChars,!(a&&a.overflow&&!n))return a}}])})();function qn(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],d=qn(a,s,r&&i===t.length-1);if(d){if(d.overflow)return d;if(d.match){if(a=a.slice(d.matchedChars.length),a.length===0)return i===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(d.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
|
|
34
|
+
`.concat(JSON.stringify(d,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 l,c=io(t.args),u;!(u=c()).done;){var f=u.value,p=qn(e,f,r);if(p){if(p.overflow)return p;if(p.match)return{match:!0,matchedChars:p.matchedChars};if(p.partialMatch)l=!0;else throw new Error(`Unsupported match result:
|
|
35
|
+
`.concat(JSON.stringify(p,null,2)))}}return l?{partialMatch:!0}:void 0;case"[]":for(var m=io(t.args),v;!(v=m()).done;){var y=v.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 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 lo(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=v2(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 v2(e,t){if(e){if(typeof e=="string")return co(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)?co(e,t):void 0}}function co(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 y2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(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,g2(n.key),n)}}function $2(e,t,r){return t&&uo(e.prototype,t),r&&uo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g2(e){var t=b2(e,"string");return jt(t)=="symbol"?t:t+""}function b2(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 Hn="9",N2=ar(Hn,15),S2=/[- ]/,wr=!0,C2=wr&&function(){return/\[([^\[\]])*\]/g},x2=wr&&function(){return/\d(?=[^,}][^,}])/g},P2=new RegExp("["+Oe+"]*\\$1["+Oe+"]*(\\$\\d["+Oe+"]*)*$"),fo=3,w2=(function(){function e(t){t.state;var r=t.metadata;y2(this,e),this.metadata=r,this.resetFormat()}return $2(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(Qp(n.nationalSignificantNumber,n.country,this.metadata))for(var i=lo(this.matchingFormats),s;!(s=i()).done;){var d=s.value,l=Jp(n,d,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return a.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return a.getSeparatorAfterNationalPrefix(u)}});if(l)return this.resetFormat(),this.chosenFormat=d,this.setNationalNumberTemplate(l.replace(/\d/g,"x"),n),this.populatedNationalNumberTemplate=l,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),l}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,d=a,l=d.length-fo;l<0&&(l=0),this.matchingFormats=this.matchingFormats.filter(function(c){return n.formatSuits(c,s,i)&&n.formatMatches(c,d,l)}),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<fo)try{return new h2(s).match(n,{allowOverflow:!0})!==void 0}catch(d){return console.error(d),!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=d.value;return n.chosenFormat===c?0:P2.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=lo(this.matchingFormats.slice()),d;!(d=s()).done&&(i=a(),i!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(wr&&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()&&S2.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 ro(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")+ar("x",n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var a=n.nationalSignificantNumber,i=n.international,s=n.nationalPrefix,d=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,l=r.pattern();wr&&(l=l.replace(C2(),"\\d").replace(x2(),"\\d"));var c=N2.match(l)[0];if(!(a.length>c.length)){var u=new RegExp("^"+l+"$"),f=a.replace(/\d/g,Hn);u.test(f)&&(c=f);var p=this.getFormatFormat(r,i),m;if(this.shouldTryNationalPrefixFormattingRule(r,{international:i,nationalPrefix:s})){var v=p.replace(id,r.nationalPrefixFormattingRule());if(Pr(r.nationalPrefixFormattingRule())===(s||"")+Pr("$1")&&(p=v,m=!0,s))for(var y=s.length;y>0;)p=p.replace(/\d/,"x"),y--}var $=c.replace(new RegExp(l),p).replace(new RegExp(Hn,"g"),"x");return m||(d?$=ar("x",d.length)+" "+$:s&&($=ar("x",s.length)+this.getSeparatorAfterNationalPrefix(r)+$)),i&&($=ad($)),$}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=Xp(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],ro(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 It(e){"@babel/helpers - typeof";return It=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},It(e)}function md(e,t){return j2(e)||E2(e,t)||O2(e,t)||_2()}function _2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O2(e,t){if(e){if(typeof e=="string")return po(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)?po(e,t):void 0}}function po(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 E2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,d=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(d.push(n.value),d.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return d}}function j2(e){if(Array.isArray(e))return e}function I2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mo(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&&mo(e.prototype,t),r&&mo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function A2(e){var t=D2(e,"string");return It(t)=="symbol"?t:t+""}function D2(e,t){if(It(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(It(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M2="["+Oe+ye+"]+",k2=new RegExp("^"+M2+"$","i"),R2="(?:["+Zr+"]["+Oe+ye+"]*|["+Oe+ye+"]+)",F2=new RegExp("[^"+Oe+ye+"]+.*$"),L2=/[^\d\[\]]/,B2=(function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,a=t.metadata,i=t.onNationalSignificantNumberChange;I2(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=a,this.onNationalSignificantNumberChange=i}return T2(e,[{key:"input",value:function(r,n){var a=md(z2(r),2),i=a[0],s=a[1],d=Pr(i),l;return s&&(n.digits||(n.startInternationalNumber(void 0,void 0),d||(l=!0))),d&&this.inputDigits(d,n),{digits:d,justLeadingPlus:l}}},{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=xa("+"+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&&L2.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(this.hasSelectedNumberingPlan){var a=Bn(r,this.metadata),i=a.nationalPrefix,s=a.nationalNumber,d=a.carrierCode;if(s!==r)return this.onExtractedNationalNumber(i,d,s,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,a){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,a);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var i=Bn(r,this.metadata),s=i.nationalPrefix,d=i.nationalNumber,l=i.carrierCode;if(d!==n)return this.onExtractedNationalNumber(s,l,d,r,a),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,a,i,s){var d=!1,l,c=i.lastIndexOf(a);if(c<0||c!==i.length-a.length)d=!0;else{var u=i.slice(0,c);u&&u!==r&&(l=u)}s({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:a,nationalSignificantNumberIsModified:d,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:l}),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=td(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=nd(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 U2(e){var t=e.search(R2);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(F2,""),r&&(e="+"+e),e}}function V2(e){var t=U2(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function z2(e){var t=md(V2(e),2),r=t[0],n=t[1];return k2.test(r)||(r=""),[r,n]}function Tt(e){"@babel/helpers - typeof";return Tt=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},Tt(e)}function G2(e,t){return K2(e)||H2(e,t)||q2(e,t)||W2()}function W2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q2(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}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,d=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(d.push(n.value),d.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw a}}return d}}function K2(e){if(Array.isArray(e))return e}function Y2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vo(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,X2(n.key),n)}}function Z2(e,t,r){return t&&vo(e.prototype,t),r&&vo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function X2(e){var t=J2(e,"string");return Tt(t)=="symbol"?t:t+""}function J2(e,t){if(Tt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yo=!1,mt=(function(){function e(t,r){Y2(this,e),this.metadata=new ce(r);var n=G2(this.getCountryAndCallingCode(t),2),a=n[0],i=n[1];this.defaultCountry=a,this.defaultCallingCode=i,this.reset()}return Z2(e,[{key:"getCountryAndCallingCode",value:function(r){var n,a;return r&&(qe(r)?(n=r.defaultCountry,a=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),a&&yo&&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 Hp({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 w2({state:this.state,metadata:this.metadata}),this.parser=new B2({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(!(yo&&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(d){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!d})+d},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,d=a||i;return d&&(s=d+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(Ca(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 d=new ce(this.metadata.metadata);d.selectNumberingPlan(s);var l=d.numberingPlan.callingCode(),c=this.metadata.getCountryCodesForCallingCode(l);if(c.length>1){var u=rd(n,{countries:c,metadata:this.metadata.metadata});u&&(s=u)}}var f=new ld(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 $o(e){return new ce(e).getCountries()}function Q2(e,t,r){return r||(r=t,t=void 0),new mt(t,r).input(e)}var _r=Dt(l0(),1);function hd(e){var t=e.inputFormat,r=e.country,n=e.metadata;return t==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(Ve(r,n)):""}function Kn(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}function em(e,t,r){if(!(r&&r.ignoreRest))return ud(e,t,function(a){r&&a==="end"&&(r.ignoreRest=!0)})}function vd(e){var t=e.onKeyDown,r=e.inputFormat;return(0,S.useCallback)(function(n){if(n.keyCode===rm&&r==="INTERNATIONAL"&&n.target instanceof HTMLInputElement&&tm(n.target)===nm.length){n.preventDefault();return}t&&t(n)},[t,r])}function tm(e){return e.selectionStart}var rm=8,nm="+",am=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function Yn(){return Yn=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},Yn.apply(this,arguments)}function im(e,t){if(e==null)return{};var r=om(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 om(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 sm(e){function t(r,n){var a=r.onKeyDown,i=r.country,s=r.inputFormat,d=r.metadata,l=d===void 0?e:d;r.international,r.withCountryCallingCode;var c=im(r,am),u=(0,S.useCallback)(function(p){var m=new mt(i,l),v=hd({inputFormat:s,country:i,metadata:l}),y=m.input(v+p),$=m.getTemplate();return v&&(y=Kn(y,v),$&&($=Kn($,v))),{text:y,template:$}},[i,l]),f=vd({onKeyDown:a,inputFormat:s});return S.default.createElement(F0,Yn({},c,{ref:n,parse:em,format:u,onKeyDown:f}))}return t=S.default.forwardRef(t),t.propTypes={value:w.default.string.isRequired,onChange:w.default.func.isRequired,onKeyDown:w.default.func,country:w.default.string,inputFormat:w.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:w.default.object},t}var dm=sm(),lm=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function Zn(){return Zn=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},Zn.apply(this,arguments)}function cm(e,t){if(e==null)return{};var r=um(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 um(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 fm(e){function t(r,n){var a=r.value,i=r.onChange,s=r.onKeyDown,d=r.country,l=r.inputFormat,c=r.metadata,u=c===void 0?e:c,f=r.inputComponent,p=f===void 0?"input":f;r.international,r.withCountryCallingCode;var m=cm(r,lm),v=hd({inputFormat:l,country:d,metadata:u}),y=(0,S.useCallback)(function(g){var h=zn(g.target.value);h===a&&go(v,h,d,u).indexOf(g.target.value)===0&&(h=h.slice(0,-1)),i(h)},[v,a,i,d,u]),$=vd({onKeyDown:s,inputFormat:l});return S.default.createElement(p,Zn({},m,{ref:n,value:go(v,a,d,u),onChange:y,onKeyDown:$}))}return t=S.default.forwardRef(t),t.propTypes={value:w.default.string.isRequired,onChange:w.default.func.isRequired,onKeyDown:w.default.func,country:w.default.string,inputFormat:w.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:w.default.object,inputComponent:w.default.elementType},t}var pm=fm();function go(e,t,r,n){return Kn(Q2(e+t,r,n),e)}function mm(e){return bo(e[0])+bo(e[1])}function bo(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var hm=["value","onChange","options","disabled","readOnly"],vm=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function ym(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=$m(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.
|
|
39
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $m(e,t){if(e){if(typeof e=="string")return No(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 No(e,t)}}function No(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 Or(){return Or=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},Or.apply(this,arguments)}function yd(e,t){if(e==null)return{};var r=gm(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 gm(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 $d(e){var t=e.value,r=e.onChange,n=e.options,a=e.disabled,i=e.readOnly,s=yd(e,hm),d=(0,S.useCallback)(function(l){var c=l.target.value;r(c==="ZZ"?void 0:c)},[r]);return(0,S.useMemo)(function(){return bd(n,t)},[n,t]),S.default.createElement("select",Or({},s,{disabled:a||i,readOnly:i,value:t||"ZZ",onChange:d}),n.map(function(l){var c=l.value,u=l.label,f=l.divider;return S.default.createElement("option",{key:f?"|":c||"ZZ",value:f?"|":c||"ZZ",disabled:!!f,style:f?bm:void 0},u)}))}$d.propTypes={value:w.default.string,onChange:w.default.func.isRequired,options:w.default.arrayOf(w.default.shape({value:w.default.string,label:w.default.string,divider:w.default.bool})).isRequired,disabled:w.default.bool,readOnly:w.default.bool};var bm={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function gd(e){var t=e.value,r=e.options,n=e.className,a=e.iconComponent;e.getIconAspectRatio;var i=e.arrowComponent,s=i===void 0?Nm:i,d=e.unicodeFlags,l=yd(e,vm),c=(0,S.useMemo)(function(){return bd(r,t)},[r,t]);return S.default.createElement("div",{className:"PhoneInputCountry"},S.default.createElement($d,Or({},l,{value:t,options:r,className:(0,_r.default)("PhoneInputCountrySelect",n)})),c&&(d&&t?S.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},mm(t)):S.default.createElement(a,{"aria-hidden":!0,country:t,label:c.label,aspectRatio:d?1:void 0})),S.default.createElement(s,null))}gd.propTypes={iconComponent:w.default.elementType,arrowComponent:w.default.elementType,unicodeFlags:w.default.bool};function Nm(){return S.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function bd(e,t){for(var r=ym(e),n;!(n=r()).done;){var a=n.value;if(!a.divider&&Sm(a.value,t))return a}}function Sm(e,t){return e==null?t==null:e===t}var Cm=["country","countryName","flags","flagUrl"];function Xn(){return Xn=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},Xn.apply(this,arguments)}function xm(e,t){if(e==null)return{};var r=Pm(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 Pm(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 wa(e){var t=e.country,r=e.countryName,n=e.flags,a=e.flagUrl,i=xm(e,Cm);return n&&n[t]?n[t]({title:r}):S.default.createElement("img",Xn({},i,{alt:r,role:r?void 0:"presentation",src:a.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}wa.propTypes={country:w.default.string.isRequired,countryName:w.default.string.isRequired,flags:w.default.objectOf(w.default.elementType),flagUrl:w.default.string.isRequired};var wm=["aspectRatio"],_m=["title"],Om=["title"];function Er(){return Er=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},Er.apply(this,arguments)}function _a(e,t){if(e==null)return{};var r=Em(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 Em(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 Xr(e){var t=e.aspectRatio,r=_a(e,wm);return t===1?S.default.createElement(Sd,r):S.default.createElement(Nd,r)}Xr.propTypes={title:w.default.string.isRequired,aspectRatio:w.default.number};function Nd(e){var t=e.title,r=_a(e,_m);return S.default.createElement("svg",Er({},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"}))}Nd.propTypes={title:w.default.string.isRequired};function Sd(e){var t=e.title,r=_a(e,Om);return S.default.createElement("svg",Er({},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"}))}Sd.propTypes={title:w.default.string.isRequired};function jm(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 Cd(e){jm(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}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=Tm(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.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tm(e,t){if(e){if(typeof e=="string")return So(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 So(e,t)}}function So(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 Am(e,t){if(!t)return e;for(var r=[],n=[],a=r,i=function(){var c=d.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]),p=e[f];e.splice(f,1),a.push(p)}},s=Im(t),d;!(d=s()).done;)i();return r.concat(e).concat(n)}function Dm(e,t){if(e&&(e=e.filter(function(r){switch(r){case"🌐":case"|":case"...":case"…":return!0;default:return Jr(r,t)}}),e.length>0))return e}function Jr(e,t){return Xs(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function xd(e,t){return e&&(e=e.filter(function(r){return Jr(r,t)}),e.length===0&&(e=void 0)),e}var Mm=["country","label","aspectRatio"];function Jn(){return Jn=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},Jn.apply(this,arguments)}function km(e,t){if(e==null)return{};var r=Rm(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 Rm(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 Pd(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,a=e.internationalIcon;function i(s){var d=s.country,l=s.label,c=s.aspectRatio,u=km(s,Mm),f=a===Xr?c:void 0;return S.default.createElement("div",Jn({},u,{className:(0,_r.default)("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":f===1,"PhoneInputCountryIcon--border":d})}),d?S.default.createElement(n,{country:d,countryName:l,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):S.default.createElement(a,{title:l,aspectRatio:f,className:"PhoneInputCountryIconImg"}))}return i.propTypes={country:w.default.string,label:w.default.string.isRequired,aspectRatio:w.default.number},i}var Fh=Pd({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:wa,internationalIcon:Xr});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=Lm(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.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lm(e,t){if(e){if(typeof e=="string")return Co(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 Co(e,t)}}function Co(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 Bm(e,t){for(var r=Fm(e),n;!(n=r()).done;){var a=n.value;a&&Um(a,t)}}function Um(e,t){typeof e=="function"?e(t):e.current=t}var wd=w.default.shape({country_calling_codes:w.default.object.isRequired,countries:w.default.object.isRequired}),_d=w.default.objectOf(w.default.string);function ke(e,t){return"+"+Ve(e,t)}function Vm(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,a=e.getAnyCountry,i=e.countries,s=e.required,d=e.metadata,l;return r&&r.country?l=r.country:n&&(!t||it(t,n,d))&&(l=n),i&&i.indexOf(l)<0&&(l=void 0),!l&&s&&i&&i.length>0&&(l=a()),l}function zm(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,a=e.compareStringsLocales,i=e.compareStrings;i||(i=Zm);var s=t.map(function(d){return{value:d,label:r[d]||d}});return s.sort(function(d,l){return i(d.label,l.label,a)}),n&&s.unshift({label:r.ZZ}),s}function Od(e,t){return Fp(e||"",t)}function Gm(e){return e.formatNational().replace(/\D/g,"")}function Wm(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?ke(n,a):"";if(n){if(e[0]==="+"){if(i)return e.indexOf("+"+Ve(n,a))===0?Xm(e,n,a):"";if(r){var s=ke(n,a);return e.indexOf(s)===0?e:s}else{var d=ke(n,a);return e.indexOf(d)===0?e:d}}}else if(e[0]!=="+")return rt(e,r,a)||"";return e}function rt(e,t,r){if(e){if(e[0]==="+"){if(e==="+")return;var n=new mt(t,r);return n.input(e),n.getNumberValue()}if(t){var a=jd(e,t,r);return"+".concat(Ve(t,r)).concat(a||"")}}}function qm(e,t,r){var n=jd(e,t,r);if(n){var a=n.length-Hm(t,r);if(a>0)return e.slice(0,e.length-a)}return e}function Hm(e,t){return t=new ce(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Ed(e,t){var r=t.country,n=t.countries,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.required,d=t.metadata;if(e==="+")return r;var l=Ym(e,d);if(l)return!n||n.indexOf(l)>=0?l:void 0;if(r){if(it(e,r,d)){if(i&&it(e,i,d))return i;if(a&&it(e,a,d))return a;if(!s)return}else if(!s)return}return r}function Km(e,t){var r=t.prevPhoneDigits,n=t.country,a=t.defaultCountry,i=t.latestCountrySelectedByUser,s=t.countryRequired,d=t.getAnyCountry,l=t.countries,c=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,p=t.metadata;if(c&&f===!1&&n){var m=ke(n,p);if(e.indexOf(m)!==0){var v;return e&&e[0]!=="+"?(e=m+e,v=rt(e,n,p)):e=m,{phoneDigits:e,value:v,country:n}}}c===!1&&n&&e&&e[0]==="+"&&(e=xo(e,n,p)),e&&n&&u&&(e=qm(e,n,p)),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&&ke(n,p).indexOf(e)===0)?y=void 0:y=rt(e,n,p)),y&&(n=Ed(y,{country:n,countries:l,defaultCountry:a,latestCountrySelectedByUser:i,required:!1,metadata:p}),c===!1&&n&&e&&e[0]==="+"&&(e=xo(e,n,p),y=rt(e,n,p))),!n&&s&&(n=a||d()),{phoneDigits:e,country:n,value:y}}function xo(e,t,r){if(e.indexOf(ke(t,r))===0){var n=new mt(t,r);n.input(e);var a=n.getNumber();return a?a.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function Ym(e,t){var r=new mt(null,t);return r.input(e),r.getCountry()}function Zm(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function Xm(e,t,r){if(t){var n="+"+Ve(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 jd(e,t,r){var n=new mt(t,r);n.input(e);var a=n.getNumber();return a&&a.nationalNumber}function it(e,t,r){for(var n=ke(t,r),a=0;a<e.length&&a<n.length;){if(e[a]!==n[a])return!1;a++}return!0}function Id(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?Gm(r):!t&&a&&n?ke(n,s):t}function At(e){"@babel/helpers - typeof";return At=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},At(e)}function Po(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 Kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Po(Object(r),!0).forEach(function(n){Jm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Po(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jm(e,t,r){return t=Qm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qm(e){var t=eh(e,"string");return At(t)=="symbol"?t:t+""}function eh(e,t){if(At(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(At(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function th(e,t,r){var n=e.metadata,a=e.countries,i=e.defaultCountry,s=e.value,d=e.reset,l=e.international,c=e.displayInitialValueAsLocalNumber,u=e.initialValueFormat,f=t.defaultCountry,p=t.value,m=t.reset;r.country;var v=r.value,y=r.hasUserSelectedACountry,$=r.latestCountrySelectedByUser,g=function(z){return Id(Kt(Kt({},z),{},{international:l,useNationalFormat:c||u==="national",metadata:n}))};if(d!==m)return{phoneDigits:g({value:void 0,defaultCountry:i}),value:void 0,country:i,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(i!==f){var h=!i||Jr(i,n),x=!v||l&&v===g({value:void 0,defaultCountry:f});if(!y&&h&&!s&&x)return{country:i,phoneDigits:g({value:void 0,defaultCountry:i}),value:void 0}}if(!wo(s,p)&&!wo(s,v)){var P,b;if(s){s&&Cd(s),P=Od(s,n);var N=xd(a,n);P&&P.country?(!N||N.indexOf(P.country)>=0)&&(b=P.country):(b=Ed(s,{country:void 0,countries:N,metadata:n}),b||i&&s.indexOf(ke(i,n))===0&&(b=i))}var E;return s?$&&((b?$===b:it(s,$,n))?b||(b=$):E={latestCountrySelectedByUser:void 0}):E={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},Kt(Kt({},E),{},{phoneDigits:g({phoneNumber:P,value:s,defaultCountry:i}),value:s,country:s?b:i})}}function wo(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}var rh=["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 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 _o(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 Td(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_o(Object(r),!0).forEach(function(n){we(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_o(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ot(){return ot=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},ot.apply(this,arguments)}function nh(e,t){if(e==null)return{};var r=ah(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 ah(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 ih(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oo(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,Dd(n.key),n)}}function oh(e,t,r){return t&&Oo(e.prototype,t),r&&Oo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sh(e,t,r){return t=jr(t),dh(e,Ad()?Reflect.construct(t,r||[],jr(e).constructor):t.apply(e,r))}function dh(e,t){if(t&&(ut(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lh(e)}function lh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ad(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ad=function(){return!!e})()}function jr(e){return jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jr(e)}function ch(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&&Qn(e,t)}function Qn(e,t){return Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qn(e,t)}function we(e,t,r){return t=Dd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dd(e){var t=uh(e,"string");return ut(t)=="symbol"?t:t+""}function uh(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 fh=(function(e){function t(r){var n;ih(this,t),n=sh(this,t,[r]),we(n,"setInputRef",function($){Bm([n.props.inputRef,n.inputRef],$)}),we(n,"isCountrySupportedWithError",function($){var g=n.props.metadata;return Jr($,g)}),we(n,"onCountryChange",function($){var g=n.props,h=g.international,x=g.metadata,P=g.onChange,b=g.focusInputOnCountrySelection,N=n.state,E=N.phoneDigits,A=N.country,z=Wm(E,{prevCountry:A,newCountry:$,metadata:x,useNationalFormat:!h}),Z=rt(z,$,x);b&&n.inputRef.current.focus(),n.setState({country:$,latestCountrySelectedByUser:$,hasUserSelectedACountry:!0,phoneDigits:z,value:Z},function(){P(Z)})}),we(n,"onChange",function($){var g=n.props,h=g.defaultCountry,x=g.onChange,P=g.addInternationalOption,b=g.international,N=g.limitMaxLength,E=g.countryCallingCodeEditable,A=g.metadata,z=n.state,Z=z.countries,ae=z.phoneDigits,ie=z.country,k=z.latestCountrySelectedByUser,H=Km($,{prevPhoneDigits:ae,country:ie,countryRequired:!P,defaultCountry:h,latestCountrySelectedByUser:k,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:Z})},countries:Z,international:b,limitMaxLength:N,countryCallingCodeEditable:E,metadata:A}),X=H.phoneDigits,q=H.country,fe=H.value,te={phoneDigits:X,value:fe,country:q};k&&fe&&!it(fe,k,A)&&(te.latestCountrySelectedByUser=void 0),E===!1&&!fe&&X===n.state.phoneDigits&&(te.forceRerender={}),n.setState(te,function(){return x(fe)})}),we(n,"_onFocus",function(){return n.setState({isFocused:!0})}),we(n,"_onBlur",function(){return n.setState({isFocused:!1})}),we(n,"onFocus",function($){n._onFocus();var g=n.props.onFocus;g&&g($)}),we(n,"onBlur",function($){var g=n.props.onBlur;n._onBlur(),g&&g($)}),we(n,"onCountryFocus",function($){n._onFocus();var g=n.props.countrySelectProps;if(g){var h=g.onFocus;h&&h($)}}),we(n,"onCountryBlur",function($){n._onBlur();var g=n.props.countrySelectProps;if(g){var h=g.onBlur;h&&h($)}}),n.inputRef=S.default.createRef();var a=n.props,i=a.value;a.labels;var s=a.international,d=a.addInternationalOption,l=a.displayInitialValueAsLocalNumber,c=a.initialValueFormat,u=a.metadata,f=n.props,p=f.defaultCountry,m=f.countries;p&&(n.isCountrySupportedWithError(p)||(p=void 0)),i&&Cd(i),m=xd(m,u);var v=Od(i,u);n.CountryIcon=Pd(n.props);var y=Vm({value:i,phoneNumber:v,defaultCountry:p,required:!d,countries:m||$o(u),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:m})},metadata:u});return n.state={props:n.props,country:y,countries:m,phoneDigits:Id({value:i,phoneNumber:v,defaultCountry:p,international:s,useNationalFormat:l||c==="national",metadata:u}),value:i},n}return ch(t,e),oh(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,d=i.countryCallingCodeEditable,l=i.countryOptionsOrder,c=i.addInternationalOption,u=i.labels,f=i.locales,p=i.metadata;return this.useMemoCountrySelectOptions(function(){return Am(zm({countries:a||$o(p),countryNames:u,addInternationalOption:s&&d===!1?!1:c,compareStringsLocales:f}),Dm(l,p))},[a,l,c,u,p])}},{key:"useMemoCountrySelectOptions",value:function(n,a){return(!this.countrySelectOptionsMemoDependencies||!mh(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,d=n.autoComplete,l=n.style,c=n.className;n.inputRef;var u=n.inputComponent,f=n.numberInputProps,p=n.smartCaret,m=n.countrySelectComponent,v=n.countrySelectProps,y=n.containerComponent,$=n.containerComponentProps;n.defaultCountry,n.countries,n.countryOptionsOrder;var g=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 h=n.metadata,x=n.international;n.locales;var P=nh(n,rh),b=this.state,N=b.country,E=b.countries,A=b.phoneDigits,z=b.isFocused,Z=p?dm:pm,ae=this.getCountrySelectOptions({countries:E});return S.default.createElement(y,ot({style:l,className:(0,_r.default)(c,"PhoneInput",{"PhoneInput--focus":z,"PhoneInput--disabled":i,"PhoneInput--readOnly":s})},$),S.default.createElement(m,ot({name:a?"".concat(a,"Country"):void 0,"aria-label":g.country},v,{value:N,options:ae,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:i||v&&v.disabled,readOnly:s||v&&v.readOnly,iconComponent:this.CountryIcon})),S.default.createElement(Z,ot({ref:this.setInputRef,type:"tel",autoComplete:d},f,P,{inputFormat:x===!0?"INTERNATIONAL":x===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:x?!0:void 0,withCountryCallingCode:x?!0:void 0,name:a,metadata:h,country:N,value:A||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:i,readOnly:s,inputComponent:u,className:(0,_r.default)("PhoneInputInput",f&&f.className,P.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return Td({props:n},th(n,a.props,a))}}])})(S.default.PureComponent),Md=S.default.forwardRef(function(e,t){return S.default.createElement(fh,ot({},ph(e),{inputRef:t}))});Md.propTypes={value:w.default.string,onChange:w.default.func.isRequired,onFocus:w.default.func,onBlur:w.default.func,disabled:w.default.bool,readOnly:w.default.bool,autoComplete:w.default.string,initialValueFormat:w.default.oneOf(["national"]),displayInitialValueAsLocalNumber:w.default.bool,defaultCountry:w.default.string,countries:w.default.arrayOf(w.default.string),labels:_d,locales:w.default.oneOfType([w.default.string,w.default.arrayOf(w.default.string)]),flagUrl:w.default.string,flags:w.default.objectOf(w.default.elementType),flagComponent:w.default.elementType,addInternationalOption:w.default.bool,internationalIcon:w.default.elementType,countryOptionsOrder:w.default.arrayOf(w.default.string),style:w.default.object,className:w.default.string,countrySelectComponent:w.default.elementType,countrySelectProps:w.default.object,inputComponent:w.default.elementType,numberInputProps:w.default.object,containerComponent:w.default.elementType,containerComponentProps:w.default.object,smartCaret:w.default.bool,international:w.default.bool,limitMaxLength:w.default.bool,countryCallingCodeEditable:w.default.bool,metadata:wd,onCountryChange:w.default.func,focusInputOnCountrySelection:w.default.bool};var Eo={autoComplete:"tel",countrySelectComponent:gd,flagComponent:wa,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:Xr,inputComponent:"input",containerComponent:"div",reset:w.default.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function ph(e){e=Td({},e);for(var t in Eo)e[t]===void 0&&(e[t]=Eo[t]);return e}function mh(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 hh={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"},vh=["metadata","labels"];function ea(){return ea=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},ea.apply(this,arguments)}function yh(e,t){if(e==null)return{};var r=$h(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 $h(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 kd(e){var t=S.default.forwardRef(function(r,n){var a=r.metadata,i=a===void 0?e:a,s=r.labels,d=s===void 0?hh:s,l=yh(r,vh);return S.default.createElement(Md,ea({},l,{ref:n,metadata:i,labels:d}))});return t.propTypes={metadata:wd,labels:_d},t}var Lh=kd();function gh(e,t){var r=Array.prototype.slice.call(t);return r.push(Ks),e.apply(this,r)}var bh=kd(Ks);function gn(){return gh(Vp,arguments)}var Nh=["IN","US","CA","PH","NZ","AU","CN"];function Sh(){const e=(0,F.useDispatch)(),{tenantId:t}=(0,F.useSelector)(k=>k?.outletDetails),{userDetails:r}=(0,F.useSelector)(k=>k.appointment),[n,a]=(0,S.useState)(!1),[i,s]=(0,S.useState)(null),[d,l]=(0,S.useState)(!1),c=(0,S.useRef)(""),u=(0,S.useRef)(null),{register:f,handleSubmit:p,control:m,watch:v,reset:y,trigger:$,setValue:g,formState:{errors:h,isSubmitted:x,isSubmitting:P}}=(0,Me.useForm)({defaultValues:{firstName:"",lastName:"",phone:"",email:""},mode:"onSubmit"}),b=v("phone"),N=v("email");(0,S.useEffect)(()=>{y({...r,phone:r?.phone||""},{keepErrors:!0,keepDirty:!1})},[r,y]),(0,S.useEffect)(()=>{x&&$(["phone","email"])},[b,N,x,$]);const E=k=>k?.replace(/\s+/g,"")||"",A=k=>/^\S+@\S+\.\S+$/.test(k),z=k=>{e(fi({...k,phone:k?.phone??""})),e(ve())},Z=(0,S.useCallback)(async({value:k,type:H})=>{if(!k)return;let X="";if(H==="phone"){if(!gn(k))return;X=E(k)}if(H==="email"){if(!A(k))return;X=k.trim()}if(X&&!(c.current===X&&d)){c.current=X,a(!0),s(H);try{const q=(await tu({search:X,tenantId:t}))?.data?.[0];q?(g("firstName",q.first_name||"",{shouldValidate:!0}),g("lastName",q.last_name||""),q.phone&&gn(q.phone)&&g("phone",q.phone),q.email&&g("email",q.email),e(fi({email:q.email,firstName:q.first_name,lastName:q.last_name,phone:q.phone})),l(!0)):l(!1)}catch(q){console.error(q)}finally{a(!1),s(null)}}},[e,g,d]),ae=()=>{y({firstName:"",lastName:"",email:"",phone:""}),l(!1),c.current="",e(su())};(0,S.useEffect)(()=>(u.current=(0,sl.debounce)(Z,800),()=>{u.current?.cancel?.()}),[Z]);const ie=(k,H,X)=>{if(H&&H(k),!k){u.current?.cancel?.(),c.current="",l(!1),s(null);return}s(X),u.current?.({value:k,type:X})};return(0,o.jsx)(Je,{sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(ga,{buttonText:"Confirm Details",onButtonClick:p(z)})}),renderButton:(0,o.jsx)("button",{onClick:p(z),disabled:P,className:"aaravpos-btn",children:(0,o.jsx)("span",{className:"aaravpos-btn-content",children:P?"Submitting...":"Confirm Details"})}),children:(0,o.jsxs)("form",{children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"arravpos-details-section aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title aaravpos-margin-bottom-20",children:"Your Details"}),(0,o.jsx)("div",{className:"arravpos-details-scroll",children:(0,o.jsxs)("div",{className:"arravpos-details-grid",children:[(0,o.jsxs)("div",{className:"arravpos-form-group",children:[(0,o.jsxs)("label",{className:"arravpos-form-label",htmlFor:"phone",children:["Phone ",!N&&(0,o.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{control:m,name:"phone",rules:{validate:k=>{const H=!!E(k),X=!!N?.trim();return!H&&!X?"Enter phone or email":H&&!gn(k)?"Enter valid phone number":!0}},render:({field:k})=>(0,o.jsxs)("div",{className:"arravpos-input-wrapper",children:[(0,o.jsx)(bh,{...k,id:"phone",international:!0,countries:Nh,defaultCountry:"US",value:k.value||"",onChange:H=>ie(H??"",k.onChange,"phone"),countryCallingCodeEditable:!1,className:"arravpos-custom-input"}),n&&i==="phone"&&(0,o.jsx)("div",{className:"arravpos-loader-wrapper",children:(0,o.jsx)("div",{className:"arravpos-loader"})})]})}),h.phone&&(0,o.jsx)("p",{className:"arravpos-error-text",children:h.phone.message}),d&&(0,o.jsxs)("div",{className:"arravpos-autofill-text",children:["Using existing customer",(0,o.jsx)("span",{onClick:ae,className:"arravpos-clear-text",children:"Clear"})]})]}),(0,o.jsxs)("div",{className:"arravpos-form-group",children:[(0,o.jsxs)("label",{htmlFor:"email",className:"arravpos-form-label",children:["Email ",!b&&(0,o.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,o.jsx)("input",{id:"email",...f("email",{validate:k=>{const H=!!k?.trim(),X=!!E(b);return!H&&!X?"Enter phone or email":H&&!/^\S+@\S+\.\S+$/.test(k)?"Invalid email":!0},onChange:k=>{ie(k.target.value,null,"email")}}),autoComplete:"email",placeholder:"Email address",className:"arravpos-custom-input"}),h.firstName&&(0,o.jsx)("p",{className:"arravpos-error-text",children:h.firstName.message})]}),(0,o.jsxs)("div",{className:"arravpos-form-group",children:[(0,o.jsxs)("label",{htmlFor:"first_name",className:"arravpos-form-label",children:["First Name"," ",(0,o.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,o.jsx)("input",{id:"first_name",...f("firstName",{required:"First name required",pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"}}),autoComplete:"given-name",placeholder:"First Name",className:"arravpos-custom-input"}),h.firstName&&(0,o.jsx)("p",{className:"arravpos-error-text",children:h.firstName.message})]}),(0,o.jsxs)("div",{className:"arravpos-form-group",children:[(0,o.jsx)("label",{htmlFor:"last_name",className:"arravpos-form-label",children:"Last Name"}),(0,o.jsx)("input",{id:"last_name",autoComplete:"family-name",...f("lastName"),placeholder:"Last Name",className:"arravpos-custom-input"})]})]})})]})]})})}function Ch(){const e=(0,F.useDispatch)(),t=(0,F.useSelector)(N=>N.appointment.appointmentId),{tenantId:r}=(0,F.useSelector)(N=>N.outletDetails),[n,a]=(0,S.useState)(null),[i,s]=(0,S.useState)(!0),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(!1);(0,S.useEffect)(()=>{if(!t){l("No appointment ID provided"),s(!1);return}(async()=>{try{const E=await eu(t,r);E.success?a(E?.data?.appointment):l("Failed to load appointment details")}catch(E){console.error(E),l("An error occurred while fetching appointment details")}finally{s(!1)}})()},[t]);const f=()=>{e({type:"RESET_ALL"}),pa.purge()};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(d||!n)return(0,o.jsxs)("div",{className:"aaravpos-error-container",children:[(0,o.jsx)("p",{className:"aaravpos-error-text",children:d||"Appointment not found"}),(0,o.jsxs)("button",{onClick:f,className:"aaravpos-book-btn",children:[(0,o.jsx)(hi,{}),"Book Another Appointment"]})]});const{staff:p,outlet:m,services:v}=n,y=v?.reduce((N,E)=>N+Number(E.price||0),0),$=(n.tipsCents||0)/100,g=(n.taxCents||0)/100,h=(n.totalCents||0)/100,x=h>0?h.toFixed(2):(y+$+g).toFixed(2),P=c?v:v.slice(0,5),b=v.length-5;return(0,o.jsx)("div",{className:"arravpos-success-wrapper",children:(0,o.jsxs)("div",{className:"arravpos-success-motion",children:[(0,o.jsx)("div",{className:"arravpos-success-icon success-pulse",children:(0,o.jsx)(ma,{})}),(0,o.jsx)("h1",{className:"arravpos-success-title",children:"You're Booked!"}),(0,o.jsxs)("p",{className:"arravpos-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:"arravpos-success-content",children:[(0,o.jsxs)("div",{className:"arravpos-success-card",children:[(0,o.jsxs)("div",{className:"arravpos-success-row arravpos-success-row-first",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Outlet Name"}),(0,o.jsx)("span",{className:"arravpos-value",children:m?.outletName||"-"})]}),(0,o.jsxs)("div",{className:"arravpos-success-row",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Professional"}),(0,o.jsx)("span",{className:"arravpos-value",children:p?`${p?.firstName} ${p?.lastName}`:"-"})]}),(0,o.jsxs)("div",{className:"arravpos-success-row arravpos-services-header",children:[(0,o.jsxs)("span",{className:"arravpos-services-label",children:["Services (",v.length,")"]}),v.length>5&&(0,o.jsx)("button",{onClick:()=>u(N=>!N),className:"arravpos-show-btn",children:c?"Hide":(0,o.jsxs)("span",{className:"arravpos-show-btn-inner",children:["Show",(0,o.jsx)(ks,{size:16})]})})]}),(0,o.jsxs)("div",{className:"arravpos-services-list",children:[P?.map(N=>(0,o.jsxs)("div",{className:"arravpos-service-row",children:[(0,o.jsx)("span",{className:"arravpos-service-name",children:N.serviceName}),(0,o.jsxs)("span",{className:"arravpos-service-price",children:[(0,o.jsx)(de,{size:14}),Number(N.price).toFixed(2)]})]},N.id)),!c&&b>0&&(0,o.jsxs)("div",{className:"arravpos-more-services",children:[(0,o.jsx)(va,{size:14}),b," more services"]})]}),(0,o.jsxs)("div",{className:"arravpos-success-row",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Date & Time"}),(0,o.jsxs)("span",{className:"arravpos-value",children:[n.appointmentDate," at"," ",n.startTime]})]}),(0,o.jsxs)("div",{className:"arravpos-success-row",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Tip"}),(0,o.jsxs)("span",{className:"arravpos-price",children:[(0,o.jsx)(de,{size:14}),$.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"arravpos-success-row",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Tax"}),(0,o.jsxs)("span",{className:"arravpos-price",children:[(0,o.jsx)(de,{size:14}),g.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"arravpos-total-row",children:[(0,o.jsx)("span",{className:"arravpos-label",children:"Total Amount"}),(0,o.jsxs)("span",{className:"arravpos-total-price",children:[(0,o.jsx)(de,{size:14}),x]})]})]}),(0,o.jsxs)("button",{onClick:f,className:"arravpos-book-btn",children:[(0,o.jsx)(hi,{}),"Book Another Appointment"]})]})]})})}function xh(){const{currentStep:e}=(0,F.useSelector)(n=>n.breadcrumbs),{isService:t}=(0,F.useSelector)(n=>n.outletDetails),r={services:t?xf:Cf,professionals:t?Sf:bf,time:jf,details:Sh,confirm:o0,success:Ch}[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 Ph(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xh,{}),(0,o.jsx)(ne.ToastContainer,{position:"top-right",autoClose:3e3})]})}var wh=({bookingCode:e})=>{const t=(0,F.useDispatch)(),r=(0,F.useSelector)(f=>f.outletList.outlets),[n,a]=(0,S.useState)(!1),[i,s]=(0,S.useState)(null),{id:d}=(0,F.useSelector)(f=>f.outletDetails),l=(0,S.useCallback)(async()=>{try{a(!0),s(null);const f=await si(e);if(f?.success){const p=f?.data?.data?.outlets||[];t(lu(p)),gu(f?.data?.result),p.length===1&&u(p[0])}else s(f?.message||"Failed to fetch data")}catch(f){console.error(f),s(f?.message||"Something went wrong")}finally{a(!1)}},[e,t]),c=async(f,p)=>{try{const m=await si(e,f,p);m?.success||s(m?.message||"Failed to fetch outlet data"),t(Kc(m?.data?.token)),t(Gc(m?.data?.data?.outlets[0]?.isService)),t(Zc({superCategories:m?.data?.data?.superCategories,staff:m?.data?.data?.staff}))}catch(m){console.error(m),s(m?.message||"Something went wrong")}},u=async f=>{f&&(await c(String(f?.tenantId),String(f?.id)),t(Hc({...f,tenantId:f.tenantId??"",currency:f.currency??"",outletTimeZoneDate:me.DateTime.now().setZone(f?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:me.DateTime.fromISO(f?.createdAt,{zone:"utc"}).setZone(f?.timeZone).year})),t(An(f?.isService?"services":"professionals")))};return(0,S.useEffect)(()=>{Array.isArray(r)&&r.length===0&&l()},[r?.length,l]),i?(0,o.jsx)("div",{className:"arravpos-error-box",children:i}):!r.length&&n?(0,o.jsx)("div",{className:"aaravpos-loader-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-loader"})}):(0,o.jsx)("div",{className:"aaravpos-overflow-hidden",children:r.length>1&&!d?(0,o.jsx)(hf,{outlets:r,onSelectOutlet:f=>{f?.id&&u(f)}}):(0,o.jsx)(Ph,{})})},_h=({...e})=>(0,o.jsx)($u,{children:(0,o.jsx)(wh,{...e})});exports.AppointmentBookingPlugin=_h;
|