@aaravpos/appointment-booking-plugin 1.0.3 → 1.0.4
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 +31 -34
- package/dist/index.js +7661 -7584
- package/dist/styles.css +2521 -95
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,52 +1,49 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var op=Object.create,yr=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,lp=Object.getOwnPropertyNames,dp=Object.getPrototypeOf,Wc=Object.prototype.hasOwnProperty,cp=(e,t)=>()=>(e&&(t=e(e=0)),t),Le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Gc=(e,t)=>{let r={};for(var n in e)yr(r,n,{get:e[n],enumerable:!0});return t||yr(r,Symbol.toStringTag,{value:"Module"}),r},Tn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=lp(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Wc.call(e,s)&&s!==r&&yr(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(n=sp(t,s))||n.enumerable});return e},up=(e,t,r)=>(Tn(e,t,"default"),r&&Tn(r,t,"default")),Lr=(e,t,r)=>(r=e!=null?op(dp(e)):{},Tn(t||!e||!e.__esModule?yr(r,"default",{value:e,enumerable:!0}):r,e)),fp=e=>Wc.call(e,"module.exports")?e["module.exports"]:Tn(yr({},"__esModule",{value:!0}),e);let jn=require("react"),b=Lr(jn,1);jn=Lr(jn);let K=require("react-redux"),Te=require("redux"),dt=require("redux-persist"),d=require("react/jsx-runtime"),ke=require("luxon"),de=require("react-toastify"),rt=require("react-hook-form"),hp=require("lodash");function dn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dn=function(r){return typeof r}:dn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dn(e)}function pp(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 mp(e,t,r){return t&&ks(e.prototype,t),r&&ks(e,r),e}function yp(e,t){return t&&(dn(t)==="object"||typeof t=="function")?t:cn(e)}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},va(e)}function cn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gp(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&&ba(e,t)}function ba(e,t){return ba=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ba(e,t)}function un(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Hc=(function(e){gp(t,e);function t(){var r,n;pp(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=yp(this,(r=va(t)).call.apply(r,[this].concat(a))),un(cn(n),"state",{bootstrapped:!1}),un(cn(n),"_unsubscribe",void 0),un(cn(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 mp(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})(jn.PureComponent);un(Hc,"defaultProps",{children:null,loading:null});var Kc=Symbol.for("immer-nothing"),Ds=Symbol.for("immer-draftable"),we=Symbol.for("immer-state"),vp=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 je(e,...t){if(process.env.NODE_ENV!=="production"){const r=vp[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 Ie=Object,Xt=Ie.getPrototypeOf,On="constructor",di="prototype",$a="configurable",_n="enumerable",fn="writable",gr="value",_e=e=>!!e&&!!e[we];function He(e){return e?qc(e)||ui(e)||!!e[Ds]||!!e[On]?.[Ds]||fi(e)||hi(e):!1}var bp=Ie[di][On].toString(),Rs=new WeakMap;function qc(e){if(!e||!Co(e))return!1;const t=Xt(e);if(t===null||t===Ie[di])return!0;const r=Ie.hasOwnProperty.call(t,On)&&t[On];if(r===Object)return!0;if(!xt(r))return!1;let n=Rs.get(r);return n===void 0&&(n=Function.toString.call(r),Rs.set(r,n)),n===bp}function $p(e){return _e(e)||je(15,e),e[we].base_}function ci(e,t,r=!0){Fr(e)===0?(r?Reflect.ownKeys(e):Ie.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function Fr(e){const t=e[we];return t?t.type_:ui(e)?1:fi(e)?2:hi(e)?3:0}var Ls=(e,t,r=Fr(e))=>r===2?e.has(t):Ie[di].hasOwnProperty.call(e,t),xa=(e,t,r=Fr(e))=>r===2?e.get(t):e[t],An=(e,t,r,n=Fr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function xp(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ui=Array.isArray,fi=e=>e instanceof Map,hi=e=>e instanceof Set,Co=e=>typeof e=="object",xt=e=>typeof e=="function",Vi=e=>typeof e=="boolean";function wp(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var et=e=>e.copy_||e.base_,No=e=>e.modified_?e.copy_:e.base_;function wa(e,t){if(fi(e))return new Map(e);if(hi(e))return new Set(e);if(ui(e))return Array[di].slice.call(e);const r=qc(e);if(t===!0||t==="class_only"&&!r){const n=Ie.getOwnPropertyDescriptors(e);delete n[we];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[$a]=!0),(s.get||s.set)&&(n[o]={[$a]:!0,[fn]:!0,[_n]:s[_n],[gr]:e[o]})}return Ie.create(Xt(e),n)}else{const n=Xt(e);if(n!==null&&r)return{...e};const i=Ie.create(n);return Ie.assign(i,e)}}function pi(e,t=!1){return mi(e)||_e(e)||!He(e)||(Fr(e)>1&&Ie.defineProperties(e,{set:Zr,add:Zr,clear:Zr,delete:Zr}),Ie.freeze(e),t&&ci(e,(r,n)=>{pi(n,!0)},!1)),e}function Sp(){je(2)}var Zr={[gr]:Sp};function mi(e){return e===null||!Co(e)?!0:Ie.isFrozen(e)}var In="MapSet",Sa="Patches",Fs="ArrayMethods",Yc={};function Ot(e){const t=Yc[e];return t||je(0,e),t}var Vs=e=>!!Yc[e],vr,Xc=()=>vr,Cp=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Vs(In)?Ot(In):void 0,arrayMethodsPlugin_:Vs(Fs)?Ot(Fs):void 0});function Bs(e,t){t&&(e.patchPlugin_=Ot(Sa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ca(e){Na(e),e.drafts_.forEach(Np),e.drafts_=null}function Na(e){e===vr&&(vr=e.parent_)}var Us=e=>vr=Cp(vr,e);function Np(e){const t=e[we];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zs(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[we].modified_&&(Ca(t),je(4)),He(e)&&(e=Ws(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[we].base_,e,t)}else e=Ws(t,r);return Pp(t,e,!0),Ca(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kc?e:void 0}function Ws(e,t){if(mi(t))return t;const r=t[we];if(!r)return Mn(t,e.handledSet_,e);if(!yi(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);Qc(r,e)}return r.copy_}function Pp(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pi(t,r)}function Zc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yi=(e,t)=>e.scope_===t,Ep=[];function Jc(e,t,r,n){const i=et(e),a=e.type_;if(n!==void 0&&xa(i,n,a)===t){An(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;ci(i,(l,c)=>{if(_e(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const o=e.draftLocations_.get(t)??Ep;for(const s of o)An(i,s,r,a)}function Tp(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!yi(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=No(a);Jc(e,a.draft_??a,o,r),Qc(a,i)})}function Qc(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)}Zc(e)}}function jp(e,t,r){const{scope_:n}=e;if(_e(r)){const i=r[we];yi(i,n)&&i.callbacks_.push(function(){hn(e),Jc(e,r,No(i),t)})}else He(r)&&e.callbacks_.push(function(){const a=et(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||_e(e)||t.has(e)||!He(e)||mi(e)||(t.add(e),ci(e,(n,i)=>{if(_e(i)){const a=i[we];yi(a,r)&&(An(e,n,No(a),e.type_),Zc(a))}else He(i)&&Mn(i,t,r)})),e}function Op(e,t){const r=ui(e),n={type_:r?1:0,scope_:t?t.scope_:Xc(),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=kn;r&&(i=[n],a=br);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var kn={get(e,t){if(t===we)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=et(e);if(!Ls(i,t,e.type_))return _p(e,i,t);const a=i[t];if(e.finalized_||!He(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&wp(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 et(e)},ownKeys(e){return Reflect.ownKeys(et(e))},set(e,t,r){const n=eu(et(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Bi(et(e),t),a=i?.[we];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(xp(r,i)&&(r!==void 0||Ls(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),jp(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=et(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[fn]:!0,[$a]:e.type_!==1||t!=="length",[_n]:n[_n],[gr]:r[t]}},defineProperty(){je(11)},getPrototypeOf(e){return Xt(e.base_)},setPrototypeOf(){je(12)}},br={};for(let e in kn){let t=kn[e];br[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}br.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&je(13),br.set.call(this,e,t,void 0)};br.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&je(14),kn.set.call(this,e[0],t,r,e[0])};function Bi(e,t){const r=e[we];return(r?et(r):e)[t]}function _p(e,t,r){const n=eu(t,r);return n?gr in n?n[gr]:n.get?.call(e.draft_):void 0}function eu(e,t){if(!(t in e))return;let r=Xt(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Xt(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_=wa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ap=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,...c){return o.produce(l,u=>r.call(this,u,...c))}}xt(r)||je(6),n!==void 0&&!xt(n)&&je(7);let i;if(He(t)){const a=Us(this),o=Ea(a,t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Ca(a):Na(a)}return Bs(a,n),zs(i,a)}else if(!t||!Co(t)){if(i=r(t),i===void 0&&(i=t),i===Kc&&(i=void 0),this.autoFreeze_&&pi(i,!0),n){const a=[],o=[];Ot(Sa).generateReplacementPatches_(t,i,{patches_:a,inversePatches_:o}),n(a,o)}return i}else je(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)||je(8),_e(e)&&(e=gi(e));const t=Us(this),r=Ea(t,e,void 0);return r[we].isManual_=!0,Na(t),r}finishDraft(e,t){const r=e&&e[we];(!r||!r.isManual_)&&je(9);const{scope_:n}=r;return Bs(n,t),zs(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=Ot(Sa).applyPatches_;return _e(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Ea(e,t,r,n){const[i,a]=fi(t)?Ot(In).proxyMap_(t,r):hi(t)?Ot(In).proxySet_(t,r):Op(t,r);return(r?.scope_??Xc()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?Tp(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 gi(e){return _e(e)||je(10,e),tu(e)}function tu(e){if(!He(e)||mi(e))return e;const t=e[we];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wa(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=wa(e,!0);return ci(r,(i,a)=>{An(r,i,tu(a))},n),t&&(t.finalized_=!1),r}var Ip=new Ap,vi=Ip.produce,Mp=(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 o0=Object.create,vr=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,l0=Object.getOwnPropertyNames,c0=Object.getPrototypeOf,Gu=Object.prototype.hasOwnProperty,u0=(e,t)=>()=>(e&&(t=e(e=0)),t),Fe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Hu=(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},On=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=l0(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Gu.call(e,s)&&s!==r&&vr(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(n=s0(t,s))||n.enumerable});return e},d0=(e,t,r)=>(On(e,t,"default"),r&&On(r,t,"default")),Fr=(e,t,r)=>(r=e!=null?o0(c0(e)):{},On(t||!e||!e.__esModule?vr(r,"default",{value:e,enumerable:!0}):r,e)),f0=e=>Gu.call(e,"module.exports")?e["module.exports"]:On(vr({},"__esModule",{value:!0}),e);let _n=require("react"),$=Fr(_n,1);_n=Fr(_n);let G=require("react-redux"),Te=require("redux"),ct=require("redux-persist"),c=require("react/jsx-runtime"),De=require("luxon"),ce=require("react-toastify"),nt=require("react-hook-form"),h0=require("lodash");function un(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?un=function(r){return typeof r}:un=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},un(e)}function p0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rs(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 m0(e,t,r){return t&&Rs(e.prototype,t),r&&Rs(e,r),e}function v0(e,t){return t&&(un(t)==="object"||typeof t=="function")?t:dn(e)}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function dn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y0(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 fn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ku=(function(e){y0(t,e);function t(){var r,n;p0(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=v0(this,(r=ga(t)).call.apply(r,[this].concat(a))),fn(dn(n),"state",{bootstrapped:!1}),fn(dn(n),"_unsubscribe",void 0),fn(dn(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 m0(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})(_n.PureComponent);fn(Ku,"defaultProps",{children:null,loading:null});var qu=Symbol.for("immer-nothing"),ks=Symbol.for("immer-draftable"),Se=Symbol.for("immer-state"),g0=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 Oe(e,...t){if(process.env.NODE_ENV!=="production"){const r=g0[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 Ie=Object,Yt=Ie.getPrototypeOf,An="constructor",ui="prototype",ba="configurable",jn="enumerable",hn="writable",yr="value",Ae=e=>!!e&&!!e[Se];function He(e){return e?Yu(e)||fi(e)||!!e[ks]||!!e[An]?.[ks]||hi(e)||pi(e):!1}var $0=Ie[ui][An].toString(),Fs=new WeakMap;function Yu(e){if(!e||!No(e))return!1;const t=Yt(e);if(t===null||t===Ie[ui])return!0;const r=Ie.hasOwnProperty.call(t,An)&&t[An];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===$0}function b0(e){return Ae(e)||Oe(15,e),e[Se].base_}function di(e,t,r=!0){Lr(e)===0?(r?Reflect.ownKeys(e):Ie.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function Lr(e){const t=e[Se];return t?t.type_:fi(e)?1:hi(e)?2:pi(e)?3:0}var Ls=(e,t,r=Lr(e))=>r===2?e.has(t):Ie[ui].hasOwnProperty.call(e,t),xa=(e,t,r=Lr(e))=>r===2?e.get(t):e[t],In=(e,t,r,n=Lr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function x0(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var fi=Array.isArray,hi=e=>e instanceof Map,pi=e=>e instanceof Set,No=e=>typeof e=="object",xt=e=>typeof e=="function",Vi=e=>typeof e=="boolean";function S0(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(hi(e))return new Map(e);if(pi(e))return new Set(e);if(fi(e))return Array[ui].slice.call(e);const r=Yu(e);if(t===!0||t==="class_only"&&!r){const n=Ie.getOwnPropertyDescriptors(e);delete n[Se];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[hn]===!1&&(s[hn]=!0,s[ba]=!0),(s.get||s.set)&&(n[o]={[ba]:!0,[hn]:!0,[jn]:s[jn],[yr]:e[o]})}return Ie.create(Yt(e),n)}else{const n=Yt(e);if(n!==null&&r)return{...e};const i=Ie.create(n);return Ie.assign(i,e)}}function mi(e,t=!1){return vi(e)||Ae(e)||!He(e)||(Lr(e)>1&&Ie.defineProperties(e,{set:Jr,add:Jr,clear:Jr,delete:Jr}),Ie.freeze(e),t&&di(e,(r,n)=>{mi(n,!0)},!1)),e}function C0(){Oe(2)}var Jr={[yr]:C0};function vi(e){return e===null||!No(e)?!0:Ie.isFrozen(e)}var Mn="MapSet",Ca="Patches",Vs="ArrayMethods",Xu={};function _t(e){const t=Xu[e];return t||Oe(0,e),t}var Bs=e=>!!Xu[e],gr,Zu=()=>gr,N0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Bs(Mn)?_t(Mn):void 0,arrayMethodsPlugin_:Bs(Vs)?_t(Vs):void 0});function Us(e,t){t&&(e.patchPlugin_=_t(Ca),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Na(e){wa(e),e.drafts_.forEach(w0),e.drafts_=null}function wa(e){e===gr&&(gr=e.parent_)}var Ws=e=>gr=N0(gr,e);function w0(e){const t=e[Se];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zs(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Se].modified_&&(Na(t),Oe(4)),He(e)&&(e=Gs(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[Se].base_,e,t)}else e=Gs(t,r);return P0(t,e,!0),Na(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function Gs(e,t){if(vi(t))return t;const r=t[Se];if(!r)return Dn(t,e.handledSet_,e);if(!yi(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);ed(r,e)}return r.copy_}function P0(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mi(t,r)}function Ju(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yi=(e,t)=>e.scope_===t,E0=[];function Qu(e,t,r,n){const i=tt(e),a=e.type_;if(n!==void 0&&xa(i,n,a)===t){In(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;di(i,(l,u)=>{if(Ae(u)){const d=s.get(u)||[];d.push(l),s.set(u,d)}})}const o=e.draftLocations_.get(t)??E0;for(const s of o)In(i,s,r,a)}function T0(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!yi(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=wo(a);Qu(e,a.draft_??a,o,r),ed(a,i)})}function ed(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)}Ju(e)}}function O0(e,t,r){const{scope_:n}=e;if(Ae(r)){const i=r[Se];yi(i,n)&&i.callbacks_.push(function(){pn(e),Qu(e,r,wo(i),t)})}else He(r)&&e.callbacks_.push(function(){const a=tt(e);e.type_===3?a.has(r)&&Dn(r,n.handledSet_,n):xa(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Dn(xa(e.copy_,t,e.type_),n.handledSet_,n)})}function Dn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ae(e)||t.has(e)||!He(e)||vi(e)||(t.add(e),di(e,(n,i)=>{if(Ae(i)){const a=i[Se];yi(a,r)&&(In(e,n,wo(a),e.type_),Ju(a))}else He(i)&&Dn(i,t,r)})),e}function _0(e,t){const r=fi(e),n={type_:r?1:0,scope_:t?t.scope_:Zu(),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=Rn;r&&(i=[n],a=$r);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var Rn={get(e,t){if(t===Se)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(!Ls(i,t,e.type_))return A0(e,i,t);const a=i[t];if(e.finalized_||!He(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&S0(t))return a;if(a===Bi(e.base_,t)){pn(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=td(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?.[Se];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(x0(r,i)&&(r!==void 0||Ls(e.base_,t,e.type_)))return!0;pn(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),O0(e,t,r)),!0},deleteProperty(e,t){return pn(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&&{[hn]:!0,[ba]:e.type_!==1||t!=="length",[jn]:n[jn],[yr]:r[t]}},defineProperty(){Oe(11)},getPrototypeOf(e){return Yt(e.base_)},setPrototypeOf(){Oe(12)}},$r={};for(let e in Rn){let t=Rn[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))&&Oe(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))&&Oe(14),Rn.set.call(this,e[0],t,r,e[0])};function Bi(e,t){const r=e[Se];return(r?tt(r):e)[t]}function A0(e,t,r){const n=td(t,r);return n?yr in n?n[yr]:n.get?.call(e.draft_):void 0}function td(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 pn(e){e.copy_||(e.assigned_=new Map,e.copy_=Sa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var j0=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)||Oe(6),n!==void 0&&!xt(n)&&Oe(7);let i;if(He(t)){const a=Ws(this),o=Ea(a,t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Na(a):wa(a)}return Us(a,n),zs(i,a)}else if(!t||!No(t)){if(i=r(t),i===void 0&&(i=t),i===qu&&(i=void 0),this.autoFreeze_&&mi(i,!0),n){const a=[],o=[];_t(Ca).generateReplacementPatches_(t,i,{patches_:a,inversePatches_:o}),n(a,o)}return i}else Oe(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)||Oe(8),Ae(e)&&(e=gi(e));const t=Ws(this),r=Ea(t,e,void 0);return r[Se].isManual_=!0,wa(t),r}finishDraft(e,t){const r=e&&e[Se];(!r||!r.isManual_)&&Oe(9);const{scope_:n}=r;return Us(n,t),zs(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 Ae(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Ea(e,t,r,n){const[i,a]=hi(t)?_t(Mn).proxyMap_(t,r):pi(t)?_t(Mn).proxySet_(t,r):_0(t,r);return(r?.scope_??Zu()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?T0(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 gi(e){return Ae(e)||Oe(10,e),rd(e)}function rd(e){if(!He(e)||vi(e))return e;const t=e[Se];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 di(r,(i,a)=>{In(r,i,rd(a))},n),t&&(t.finalized_=!1),r}var I0=new j0,$i=I0.produce,M0=(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
|
|
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:i})}}},
|
|
4
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},D0=(e,t,r)=>{const{memoize:n,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=n(()=>({}),...i);if(s.apply(null,a)!==s.apply(null,o)){let l;try{throw new Error}catch(u){({stack:l}=u)}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:a,secondInputs:o,stack:l})}},
|
|
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:a,secondInputs:o,stack:l})}},R0={inputStabilityCheck:"once",identityFunctionCheck:"once"},kn=Symbol("NOT_FOUND");function k0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function F0(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function L0(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 Hs=e=>Array.isArray(e)?e:[e];function V0(e){const t=Array.isArray(e[0])?e[0]:e;return L0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ks(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var B0=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...R0,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:M0},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:D0}}};function U0(e){let t;return{get(r){return t&&e(t.key,r)?t.value:kn},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function W0(e,t){let r=[];function n(s){const l=r.findIndex(u=>t(s,u.key));if(l>-1){const u=r[l];return l>0&&(r.splice(l,1),r.unshift(u)),u.value}return kn}function i(s,l){n(s)===kn&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function a(){return r}function o(){r=[]}return{get:n,put:i,getEntries:a,clear:o}}var z0=(e,t)=>e===t;function G0(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:i}=r;for(let a=0;a<i;a++)if(!e(r[a],n[a]))return!1;return!0}}function H0(e,t){const{equalityCheck:r=z0,maxSize:n=1,resultEqualityCheck:i}=typeof t=="object"?t:{equalityCheck:t},a=G0(r);let o=0;const s=n<=1?U0(a):W0(n,a);function l(){let u=s.get(arguments);if(u===kn){if(u=e.apply(null,arguments),o++,i){const d=s.getEntries().find(f=>i(f.value,u));d&&(u=d.value,o!==0&&o--)}s.put(arguments,u)}return u}return l.clearCache=()=>{s.clear(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}var K0=class{constructor(e){this.value=e}deref(){return this.value}},q0=typeof WeakRef<"u"?WeakRef:K0,Y0=0,qs=1;function Qr(){return{s:Y0,v:void 0,o:null,p:null}}function bi(e,t={}){let r=Qr();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let s=r;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const v=p.get(m);v===void 0?(s=Qr(),p.set(m,s)):s=v}else{let p=s.p;p===null&&(s.p=p=new Map);const v=p.get(m);v===void 0?(s=Qr(),p.set(m,s)):s=v}}const u=s;let d;if(s.s===qs)d=s.v;else if(d=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,d)&&(d=f,a!==0&&a--),i=typeof d=="object"&&d!==null||typeof d=="function"?new q0(d):d}return u.s=qs,u.v=d,d}return o.clearCache=()=>{r=Qr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Po(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),k0(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const{memoize:d,memoizeOptions:f=[],argsMemoize:h=bi,argsMemoizeOptions:m=[],devModeChecks:p={}}={...r,...l},v=Hs(f),y=Hs(m),g=V0(i),x=d(function(){return a++,u.apply(null,arguments)},...v);let b=!0;const S=h(function(){o++;const C=Ks(g,arguments);if(s=x.apply(null,C),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:A,inputStabilityCheck:N}=B0(b,p);if(A.shouldRun&&A.run(u,C,s),N.shouldRun){const O=Ks(g,arguments);N.run({inputSelectorResults:C,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:v},arguments)}b&&(b=!1)}return s},...y);return Object.assign(S,{resultFunc:u,memoizedResultFunc:x,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var nd=Po(bi),X0=Object.assign((e,t=nd)=>{F0(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e);return t(r.map(n=>e[n]),(...n)=>n.reduce((i,a,o)=>(i[r[o]]=a,i),{}))},{withTypes:()=>X0});function id(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var Z0=id(),J0=id,ad=Hu({ReducerType:()=>Ad,SHOULD_AUTOBATCH:()=>Oo,TaskAbortError:()=>Ur,Tuple:()=>Eo,addListener:()=>jo,asyncThunkCreator:()=>um,autoBatchEnhancer:()=>$d,buildCreateSlice:()=>jd,clearAllListeners:()=>Wd,combineSlices:()=>qm,configureStore:()=>bd,createAction:()=>We,createActionCreatorInvariantMiddleware:()=>dd,createAsyncThunk:()=>Si,createDraftSafeSelector:()=>sd,createDraftSafeSelectorCreator:()=>od,createDynamicMiddleware:()=>Lm,createEntityAdapter:()=>Pm,createImmutableStateInvariantMiddleware:()=>vd,createListenerMiddleware:()=>Rm,createNextState:()=>$i,createReducer:()=>Sd,createSelector:()=>nd,createSelectorCreator:()=>Po,createSerializableStateInvariantMiddleware:()=>gd,createSlice:()=>jt,current:()=>gi,findNonSerializableValue:()=>Fn,formatProdErrorMessage:()=>ee,freeze:()=>mi,isActionCreator:()=>cd,isAllOf:()=>Ln,isAnyOf:()=>rr,isAsyncThunkAction:()=>Ed,isDraft:()=>Ae,isFluxStandardAction:()=>ud,isFulfilled:()=>Pd,isImmutableDefault:()=>hd,isPending:()=>Nd,isPlain:()=>To,isRejected:()=>Vn,isRejectedWithValue:()=>wd,lruMemoize:()=>H0,miniSerializeError:()=>Td,nanoid:()=>Br,original:()=>b0,prepareAutoBatched:()=>im,removeListener:()=>Io,unwrapResult:()=>Od,weakMapMemoize:()=>bi});d0(ad,require("redux"));var od=(...e)=>{const t=Po(...e),r=Object.assign((...n)=>{const i=t(...n),a=(o,...s)=>i(Ae(o)?gi(o):o,...s);return Object.assign(a,i),a},{withTypes:()=>r});return r},sd=od(bi),Q0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Te.compose:Te.compose.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var ld=e=>e&&typeof e.match=="function";function We(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?ee(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>(0,Te.isAction)(n)&&n.type===e,r}function cd(e){return typeof e=="function"&&"type"in e&&ld(e)}function ud(e){return(0,Te.isAction)(e)&&Object.keys(e).every(em)}function em(e){return["type","payload","error","meta"].indexOf(e)>-1}function tm(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 dd(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=cd}=e;return()=>r=>n=>(t(n)&&console.warn(tm(n.type)),r(n))}function fd(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{r+=Date.now()-i}},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 Eo=class
|
|
10
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var Eo=class dr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,dr.prototype)}static get[Symbol.species](){return dr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new dr(...t[0].concat(this)):new dr(...t.concat(this))}};function Ys(e){return He(e)?$i(e,()=>{}):e}function St(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function hd(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function rm(e,t,r){const n=pd(e,t,r);return{detectMutations(){return md(e,t,n,r)}}}function pd(e,t=[],r,n="",i=new Set){const a={value:r};if(!e(r)&&!i.has(r)){i.add(r),a.children={};const o=t.length>0;for(const s in r){const l=n?n+"."+s:s;o&&t.some(u=>u instanceof RegExp?u.test(l):l===u)||(a.children[s]=pd(e,t,r[s],l))}}return a}function md(e,t=[],r,n,i=!1,a=""){const o=r?r.value:void 0,s=o===n;if(i&&!s&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(o)||e(n))return{wasMutated:!1};const l={};for(let d in r.children)l[d]=!0;for(let d in n)l[d]=!0;const u=t.length>0;for(let d in l){const f=a?a+"."+d:d;if(u&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const h=md(e,t,r.children[d],n[d],s,f);if(h.wasMutated)return h}return{wasMutated:!1}}function vd(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(s,l,u,d){return JSON.stringify(s,r(l,d),u)},r=function(s,l){let u=[],d=[];return l||(l=function(f,h){return u[0]===h?"[Circular ~]":"[Circular ~."+d.slice(0,u.indexOf(h)).join(".")+"]"}),function(f,h){if(u.length>0){var m=u.indexOf(this);~m?u.splice(m+1):u.push(this),~m?d.splice(m,1/0,f):d.push(f),~u.indexOf(h)&&(h=l.call(this,f,h))}else u.push(h);return s==null?h:s.call(this,f,h)}},{isImmutable:n=hd,ignoredPaths:i,warnAfter:a=32}=e;const o=rm.bind(null,n,i);return({getState:s})=>{let l=s(),u=o(l),d;return f=>h=>{const m=fd(a,"ImmutableStateInvariantMiddleware");m.measureTime(()=>{if(l=s(),d=u.detectMutations(),u=o(l),d.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ee(19):`A state mutation was detected between dispatches, in the path '${d.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const p=f(h);return m.measureTime(()=>{if(l=s(),d=u.detectMutations(),u=o(l),d.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ee(20):`A state mutation was detected inside a dispatch, in the path: ${d.path||""}. Take a look at the reducer(s) handling the action ${t(h)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),m.warnIfExceeded(),p}}}}function To(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||(0,Te.isPlainObject)(e)}function Fn(e,t="",r=To,n,i=[],a){let o;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||a?.has(e))return!1;const s=n!=null?n(e):Object.entries(e),l=i.length>0;for(const[u,d]of s){const f=t?t+"."+u:u;if(!(l&&i.some(h=>h instanceof RegExp?h.test(f):f===h))){if(!r(d))return{keyPath:f,value:d};if(typeof d=="object"&&(o=Fn(d,f,r,n,i,a),o))return o}}return a&&yd(e)&&a.add(e),!1}function yd(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!yd(t))return!1;return!0}function gd(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=To,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:o=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:u=!1}=e,d=!u&&WeakSet?new WeakSet:void 0;return f=>h=>m=>{if(!(0,Te.isAction)(m))return h(m);const p=h(m),v=fd(o,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(m.type)!==-1)&&v.measureTime(()=>{const y=Fn(m,"",t,r,i,d);if(y){const{keyPath:g,value:x}=y;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,x,`
|
|
11
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)`)}}),s||(
|
|
13
|
+
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(v.measureTime(()=>{const y=Fn(f.getState(),"",t,r,a,d);if(y){const{keyPath:g,value:x}=y;console.error(`A non-serializable value was detected in the state, in the path: \`${g}\`. Value:`,x,`
|
|
14
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()),p}}}function Qr(e){return typeof e=="boolean"}var nm=()=>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(Zp):o.push(Jp(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};Qr(n)||(s=n),o.unshift(mu(s))}if(i){let s={};Qr(i)||(s=i),o.push(gu(s))}if(a){let s={};Qr(a)||(s=a),o.unshift(cu(s))}}return o},jo="RTK_autoBatch",im=()=>e=>({payload:e,meta:{[jo]:!0}}),Ys=e=>t=>{setTimeout(t,e)},vu=(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:Ys(10):e.type==="callback"?e.queueNotification:Ys(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>i&&u(),h=n.subscribe(f);return s.add(u),()=>{h(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[jo],a=!i,a&&(o||(o=!0,l(c))),n.dispatch(u)}finally{i=!0}}})},am=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Eo(e);return n&&i.push(vu(typeof n=="object"?n:void 0)),i};function bu(e){const t=nm(),{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,Te.isPlainObject)(r))l=(0,Te.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(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"?ee(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"?ee(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let y=new Set;c.forEach(g=>{if(y.has(g))throw new Error(process.env.NODE_ENV==="production"?ee(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");y.add(g)})}let u=Te.compose;i&&(u=Qp({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=(0,Te.applyMiddleware)(...c),h=am(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?ee(5):"`enhancers` field must be a callback");let m=typeof s=="function"?s(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(m))throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(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 p=u(...m);return(0,Te.createStore)(l,o,p)}function $u(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"?ee(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(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"?ee(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"?ee(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function om(e){return typeof e=="function"}function xu(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?ee(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]=$u(t),a;if(om(e))a=()=>qs(e());else{const s=qs(e);a=()=>s}function o(s=a(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(_e(u)){const h=f(u,l);return h===void 0?u:h}else{if(He(u))return vi(u,h=>f(h,l));{const h=f(u,l);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},s)}return o.getInitialState=a,o}var wu=(e,t)=>su(e)?e.match(t):e(t);function nr(...e){return t=>e.some(r=>wu(r,t))}function Ln(...e){return t=>e.every(r=>wu(r,t))}function $i(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 Su(...e){return e.length===0?t=>$i(t,["pending"]):Vr(e)?nr(...e.map(t=>t.pending)):Su()(e[0])}function Fn(...e){return e.length===0?t=>$i(t,["rejected"]):Vr(e)?nr(...e.map(t=>t.rejected)):Fn()(e[0])}function Cu(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ln(Fn(...e),t):Vr(e)?Ln(Fn(...e),t):Cu()(e[0])}function Nu(...e){return e.length===0?t=>$i(t,["fulfilled"]):Vr(e)?nr(...e.map(t=>t.fulfilled)):Nu()(e[0])}function Pu(...e){return e.length===0?t=>$i(t,["pending","fulfilled","rejected"]):Vr(e)?nr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Pu()(e[0])}var sm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Br=(e=21)=>{let t="",r=e;for(;r--;)t+=sm[Math.random()*64|0];return t},lm=["name","message","stack","code"],Ui=class{constructor(e,t){this.payload=e,this.meta=t}_type},Xs=class{constructor(e,t){this.payload=e,this.meta=t}_type},Eu=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of lm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Zs="External signal was aborted",xi=(()=>{function e(t,r,n){const i=ze(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),a=ze(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=ze(t+"/rejected",(l,c,u,f,h)=>({payload:f,error:(n&&n.serializeError||Eu)(l||"Rejected"),meta:{...h||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function s(l,{signal:c}={}){return(u,f,h)=>{const m=n?.idGenerator?n.idGenerator(l):Br(),p=new AbortController;let y,g;function v($){g=$,p.abort()}c&&(c.aborted?v(Zs):c.addEventListener("abort",()=>v(Zs),{once:!0}));const x=(async function(){let $;try{let w=n?.condition?.(l,{getState:f,extra:h});if(dm(w)&&(w=await w),w===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,_)=>{y=()=>{_({name:"AbortError",message:g||"Aborted"})},p.signal.addEventListener("abort",y,{once:!0})});u(a(m,l,n?.getPendingMeta?.({requestId:m,arg:l},{getState:f,extra:h}))),$=await Promise.race([E,Promise.resolve(r(l,{dispatch:u,getState:f,extra:h,requestId:m,signal:p.signal,abort:v,rejectWithValue:(C,_)=>new Ui(C,_),fulfillWithValue:(C,_)=>new Xs(C,_)})).then(C=>{if(C instanceof Ui)throw C;return C instanceof Xs?i(C.payload,m,l,C.meta):i(C,m,l)})])}catch(w){$=w instanceof Ui?o(null,m,l,w.payload,w.meta):o(w,m,l)}finally{y&&p.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&o.match($)&&$.meta.condition||u($),$})();return Object.assign(x,{abort:v,requestId:m,arg:l,unwrap(){return x.then(Tu)}})}}return Object.assign(s,{pending:a,rejected:o,fulfilled:i,settled:nr(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Tu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function dm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ju=Symbol.for("rtk-slice-createasyncthunk"),cm={[ju]:xi},Ou=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Ou||{});function um(e,t){return`${e}/${t}`}function _u({creators:e}={}){const t=e?.asyncThunk?.[ju];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?ee(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(hm()):n.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase($,w){const E=typeof $=="string"?$:$.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?ee(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?ee(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=w,c},addMatcher($,w){return l.sliceMatchers.push({matcher:$,reducer:w}),c},exposeAction($,w){return l.actionCreators[$]=w,c},exposeCaseReducer($,w){return l.sliceCaseReducersByName[$]=w,c}};s.forEach($=>{const w=o[$],E={reducerName:$,type:um(i,$),createNotation:typeof n.reducers=="function"};mm(w)?gm(E,w,c,t):pm(E,w,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?ee(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[$={},w=[],E=void 0]=typeof n.extraReducers=="function"?$u(n.extraReducers):[n.extraReducers],C={...$,...l.sliceCaseReducersByType};return xu(n.initialState,_=>{for(let S in C)_.addCase(S,C[S]);for(let S of l.sliceMatchers)_.addMatcher(S.matcher,S.reducer);for(let S of w)_.addMatcher(S.matcher,S.reducer);E&&_.addDefaultCase(E)})}const f=$=>$,h=new Map,m=new WeakMap;let p;function y($,w){return p||(p=u()),p($,w)}function g(){return p||(p=u()),p.getInitialState()}function v($,w=!1){function E(_){let S=_[$];if(typeof S>"u"){if(w)S=wt(m,E,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ee(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function C(_=f){return wt(wt(h,w,()=>new WeakMap),_,()=>{const S={};for(const[j,M]of Object.entries(n.selectors??{}))S[j]=fm(M,_,()=>wt(m,_,g),w);return S})}return{reducerPath:$,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const x={name:i,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto($,{reducerPath:w,...E}={}){const C=w??a;return $.inject({reducerPath:C,reducer:y},E),{...x,...v(C,!0)}}};return x}}function fm(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"?ee(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...o)}return i.unwrapped=e,i}var It=_u();function hm(){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 pm({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"?ee(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?ze(e,o):ze(e))}function mm(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"?ee(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:c,options:u}=r,f=i(e,a,u);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:o||en,pending:s||en,rejected:l||en,settled:c||en})}function en(){}function vm(){return{ids:[],entities:{}}}function bm(e){function t(r={},n){const i=Object.assign(vm(),r);return n?e.setAll(i,n):i}return{getInitialState:t}}function $m(){function e(t,r={}){const{createSelector:n=ou}=r,i=f=>f.ids,a=f=>f.entities,o=n(i,a,(f,h)=>f.map(m=>h[m])),s=(f,h)=>h,l=(f,h)=>f[h],c=n(i,f=>f.length);if(!t)return{selectIds:i,selectEntities:a,selectAll:o,selectTotal:c,selectById:n(a,s,l)};const u=n(t,a);return{selectIds:n(t,i),selectEntities:u,selectAll:n(t,o),selectTotal:n(t,c),selectById:n(u,s,l)}}return{getSelectors:e}}var xm=_e;function wm(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 du(o)}const a=o=>{i(n)?e(n.payload,o):e(n,o)};return xm(r)?(a(r),r):vi(r,a)}}function Vt(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 ct(e){return Array.isArray(e)||(e=Object.values(e)),e}function pn(e){return _e(e)?gi(e):e}function Au(e,t,r){e=ct(e);const n=pn(r.ids),i=new Set(n),a=[],o=new Set([]),s=[];for(const l of e){const c=Vt(l,t);i.has(c)||o.has(c)?s.push({id:c,changes:l}):(o.add(c),a.push(l))}return[a,s,n]}function Iu(e){function t(p,y){const g=Vt(p,e);g in y.entities||(y.ids.push(g),y.entities[g]=p)}function r(p,y){p=ct(p);for(const g of p)t(g,y)}function n(p,y){const g=Vt(p,e);g in y.entities||y.ids.push(g),y.entities[g]=p}function i(p,y){p=ct(p);for(const g of p)n(g,y)}function a(p,y){p=ct(p),y.ids=[],y.entities={},r(p,y)}function o(p,y){return s([p],y)}function s(p,y){let g=!1;p.forEach(v=>{v in y.entities&&(delete y.entities[v],g=!0)}),g&&(y.ids=y.ids.filter(v=>v in y.entities))}function l(p){Object.assign(p,{ids:[],entities:{}})}function c(p,y,g){const v=g.entities[y.id];if(v===void 0)return!1;const x=Object.assign({},v,y.changes),$=Vt(x,e),w=$!==y.id;return w&&(p[y.id]=$,delete g.entities[y.id]),g.entities[$]=x,w}function u(p,y){return f([p],y)}function f(p,y){const g={},v={};p.forEach(x=>{x.id in y.entities&&(v[x.id]={id:x.id,changes:{...v[x.id]?.changes,...x.changes}})}),p=Object.values(v),p.length>0&&p.filter(x=>c(g,x,y)).length>0&&(y.ids=Object.values(y.entities).map(x=>Vt(x,e)))}function h(p,y){return m([p],y)}function m(p,y){const[g,v]=Au(p,e,y);r(g,y),f(v,y)}return{removeAll:wm(l),addOne:fe(t),addMany:fe(r),setOne:fe(n),setMany:fe(i),setAll:fe(a),updateOne:fe(u),updateMany:fe(f),upsertOne:fe(h),upsertMany:fe(m),removeOne:fe(o),removeMany:fe(s)}}function Sm(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 Cm(e,t,r){const n=Sm(e,t,r);return e.splice(n,0,t),e}function Nm(e,t){const{removeOne:r,removeMany:n,removeAll:i}=Iu(e);function a(g,v){return o([g],v)}function o(g,v,x){g=ct(g);const $=new Set(x??pn(v.ids)),w=new Set,E=g.filter(C=>{const _=Vt(C,e),S=!w.has(_);return S&&w.add(_),!$.has(_)&&S});E.length!==0&&y(v,E)}function s(g,v){return l([g],v)}function l(g,v){let x={};if(g=ct(g),g.length!==0){for(const $ of g){const w=e($);x[w]=$,delete v.entities[w]}g=ct(x),y(v,g)}}function c(g,v){g=ct(g),v.entities={},v.ids=[],o(g,v,[])}function u(g,v){return f([g],v)}function f(g,v){let x=!1,$=!1;for(let w of g){const E=v.entities[w.id];if(!E)continue;x=!0,Object.assign(E,w.changes);const C=e(E);if(w.id!==C){$=!0,delete v.entities[w.id];const _=v.ids.indexOf(w.id);v.ids[_]=C,v.entities[C]=E}}x&&y(v,[],x,$)}function h(g,v){return m([g],v)}function m(g,v){const[x,$,w]=Au(g,e,v);x.length&&o(x,v,w),$.length&&f($,v)}function p(g,v){if(g.length!==v.length)return!1;for(let x=0;x<g.length;x++)if(g[x]!==v[x])return!1;return!0}const y=(g,v,x,$)=>{const w=pn(g.entities),E=pn(g.ids),C=g.entities;let _=E;$&&(_=new Set(E));let S=[];for(const V of _){const P=w[V];P&&S.push(P)}const j=S.length===0;for(const V of v)C[e(V)]=V,j||Cm(S,V,t);j?S=v.slice().sort(t):x&&S.sort(t);const M=S.map(e);p(E,M)||(g.ids=M)};return{removeOne:r,removeMany:n,removeAll:i,addOne:fe(a),updateOne:fe(u),upsertOne:fe(h),setOne:fe(s),setMany:fe(l),setAll:fe(c),addMany:fe(o),updateMany:fe(f),upsertMany:fe(m)}}function Pm(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:o=>o.id,...e},n=r?Nm(t,r):Iu(t),i=bm(n),a=$m();return{selectId:t,sortComparer:r,...i,...a,...n}}var Em="task",Mu="listener",ku="completed",Oo="cancelled",Tm=`task-${Oo}`,jm=`task-${ku}`,Ta=`${Mu}-${Oo}`,Om=`${Mu}-${ku}`,Ur=class{constructor(e){this.code=e,this.message=`${Em} ${Oo} (reason: ${e})`}name="TaskAbortError";message},_o=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?ee(32):`${t} is not a function`)},Vn=()=>{},Du=(e,t=Vn)=>(e.catch(t),e),Ru=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Nt=e=>{if(e.aborted)throw new Ur(e.reason)};function Lu(e,t){let r=Vn;return new Promise((n,i)=>{const a=()=>i(new Ur(e.reason));if(e.aborted){a();return}r=Ru(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Vn})}var _m=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=>Du(Lu(e,t).then(r=>(Nt(e),r))),Fu=e=>{const t=Bn(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ht}=Object,Js={},zr="listenerMiddleware",Am=(e,t)=>{const r=n=>Ru(e,()=>n.abort(e.reason));return(n,i)=>{_o(n,"taskExecutor");const a=new AbortController;r(a);const o=_m(async()=>{Nt(e),Nt(a.signal);const s=await n({pause:Bn(a.signal),delay:Fu(a.signal),signal:a.signal});return Nt(a.signal),s},()=>a.abort(jm));return i?.autoJoin&&t.push(o.catch(Vn)),{result:Bn(e)(o),cancel(){a.abort(Tm)}}}},Im=(e,t)=>{const r=async(n,i)=>{Nt(t);let a=()=>{};const o=[new Promise((s,l)=>{let c=e({predicate:n,effect:(u,f)=>{f.unsubscribe(),s([u,f.getState(),f.getOriginalState()])}});a=()=>{c(),l()}})];i!=null&&o.push(new Promise(s=>setTimeout(s,i,null)));try{const s=await Lu(t,Promise.race(o));return Nt(t),s}finally{a()}};return(n,i)=>Du(r(n,i))},Vu=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=ze(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"?ee(21):"Creating or removing a listener requires one of the known fields for matching an action");return _o(a,"options.listener"),{predicate:i,type:t,effect:a}},Bu=Ht(e=>{const{type:t,predicate:r,effect:n}=Vu(e);return{id:Br(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?ee(22):"Unsubscribe not initialized")}}},{withTypes:()=>Bu}),Qs=(e,t)=>{const{type:r,effect:n,predicate:i}=Vu(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},ja=e=>{e.pending.forEach(t=>{t.abort(Ta)})},Mm=(e,t)=>()=>{for(const r of t.keys())ja(r);e.clear()},el=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Ao=Ht(ze(`${zr}/add`),{withTypes:()=>Ao}),Uu=ze(`${zr}/removeAll`),Io=Ht(ze(`${zr}/remove`),{withTypes:()=>Io}),km=(...e)=>{console.error(`${zr}/error`,...e)},Dm=(e={})=>{const t=new Map,r=new Map,n=m=>{const p=r.get(m)??0;r.set(m,p+1)},i=m=>{const p=r.get(m)??1;p===1?r.delete(m):r.set(m,p-1)},{extra:a,onError:o=km}=e;_o(o,"onError");const s=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),p=>{m.unsubscribe(),p?.cancelActive&&ja(m)}),l=m=>s(Qs(t,m)??Bu(m));Ht(l,{withTypes:()=>l});const c=m=>{const p=Qs(t,m);return p&&(p.unsubscribe(),m.cancelActive&&ja(p)),!!p};Ht(c,{withTypes:()=>c});const u=async(m,p,y,g)=>{const v=new AbortController,x=Im(l,v.signal),$=[];try{m.pending.add(v),n(m),await Promise.resolve(m.effect(p,Ht({},y,{getOriginalState:g,condition:(w,E)=>x(w,E).then(Boolean),take:x,delay:Fu(v.signal),pause:Bn(v.signal),extra:a,signal:v.signal,fork:Am(v.signal,$),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((w,E,C)=>{w!==v&&(w.abort(Ta),C.delete(w))})},cancel:()=>{v.abort(Ta),m.pending.delete(v)},throwIfCancelled:()=>{Nt(v.signal)}})))}catch(w){w instanceof Ur||el(o,w,{raisedBy:"effect"})}finally{await Promise.all($),v.abort(Om),i(m),m.pending.delete(v)}},f=Mm(t,r);return{middleware:m=>p=>y=>{if(!(0,Te.isAction)(y))return p(y);if(Ao.match(y))return l(y.payload);if(Uu.match(y)){f();return}if(Io.match(y))return c(y.payload);let g=m.getState();const v=()=>{if(g===Js)throw new Error(process.env.NODE_ENV==="production"?ee(23):`${zr}: getOriginalState can only be called synchronously`);return g};let x;try{if(x=p(y),t.size>0){const $=m.getState(),w=Array.from(t.values());for(const E of w){let C=!1;try{C=E.predicate(y,$,g)}catch(_){C=!1,el(o,_,{raisedBy:"predicate"})}C&&u(E,y,m,v)}}}finally{g=Js}return x},startListening:l,stopListening:c,clearListeners:f}},Rm=e=>({middleware:e,applied:new Map}),Lm=e=>t=>t?.meta?.instanceId===e,Fm=()=>{const e=Br(),t=new Map,r=Object.assign(ze("dynamicMiddleware/add",(...s)=>({payload:s,meta:{instanceId:e}})),{withTypes:()=>r}),n=Object.assign(function(...l){l.forEach(c=>{wt(t,c,Rm)})},{withTypes:()=>n}),i=s=>(0,Te.compose)(...Array.from(t.values()).map(l=>wt(l.applied,s,l.middleware))),a=Ln(r,Lm(e));return{middleware:s=>l=>c=>a(c)?(n(...c.payload),s.dispatch):i(s)(l)(c),addMiddleware:n,withMiddleware:r,instanceId:e}},Vm=e=>"reducerPath"in e&&typeof e.reducerPath=="string",Bm=e=>e.flatMap(t=>Vm(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),Mo=Symbol.for("rtk-state-proxy-original"),Um=e=>!!e&&!!e[Mo],zm=new WeakMap,Wm=(e,t,r)=>wt(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 c=l(void 0,{type:Br()});if(typeof c>"u")throw new Error(process.env.NODE_ENV==="production"?ee(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]=c,c}}return o}})),Gm=e=>{if(!Um(e))throw new Error(process.env.NODE_ENV==="production"?ee(25):"original must be used on state Proxy");return e[Mo]},Hm={},Km=(e=Hm)=>e;function qm(...e){const t=Object.fromEntries(Bm(e)),r=()=>Object.keys(t).length?(0,Te.combineReducers)(t):Km;let n=r();function i(l,c){return n(l,c)}i.withLazyLoadedSlices=()=>i;const a={},o=(l,c={})=>{const{reducerPath:u,reducer:f}=l,h=t[u];return!c.overrideExisting&&h&&h!==f?(typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`inject\` to override already-existing reducer ${u} without specifying \`overrideExisting: true\``),i):(c.overrideExisting&&h!==f&&delete a[u],t[u]=f,n=r(),i)},s=Object.assign(function(c,u){return function(h,...m){return c(Wm(u?u(h,...m):h,t,a),...m)}},{original:Gm});return Object.assign(i,{inject:o,selector:s})}function ee(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 zi=e=>e?["services","professionals","time","details","confirm","success"]:["professionals","services","time","details","confirm","success"],Ym={currentStep:"services",completedSteps:["services"],isOrder:!0},zu=It({name:"breadcrumbs",initialState:Ym,reducers:{setIsOrder:(e,t)=>{e.isOrder=t.payload},goToStep:(e,t)=>{const r=zi(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=zi(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=zi(e.isOrder),r=t[t.indexOf(e.currentStep)-1];r&&(e.currentStep=r)},clearSteps:e=>{e.currentStep="services",e.completedSteps=["services"]}}}),{setIsOrder:Xm,goToStep:Oa,completeStep:V5,nextStep:Ne,prevStep:B5,clearSteps:U5}=zu.actions,Zm=zu.reducer,tl={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},Wu=It({name:"outletDetails",initialState:tl,reducers:{clearBooking:()=>tl,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:Jm,setOutletData:Qm,setOutletToken:e1}=Wu.actions,t1=Wu.reducer,rl={standaloneCategories:[],superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null},Gu=It({name:"service",initialState:rl,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:()=>rl}}),{setServicePayload:r1,setCategory:Un,toggleService:zn,clearServices:z5,incrementService:Hu,decrementService:Wn,toggleProfessional:Ku}=Gu.actions,n1=Gu.reducer,st="https://prod.aaravpos.com/api/v1",mt=()=>({"Content-Type":"application/json",Authorization:`Bearer ${wi.getState()?.outletDetails?.token}`}),nl=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()},i1=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()},a1=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()},o1=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()},s1=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()},l1=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}},d1=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}},il=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"},ko=e=>{const t=!!(e?.requires_consent??e?.requiresConsent),r=String(e?.consent_form_id??e?.consentFormId??"").trim();return t&&!!r},al=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},ol=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()},c1=async e=>{const{tenantId:t,outletId:r,appointmentId:n,customerId:i,serviceId:a,formId:o,staffId:s,signatureType:l,isChecked:c,typedName:u,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=c??!0),u&&(h.typedName=u),f&&(h.imageUrl=f);const m=await fetch(`${st}/concent/customer-sign`,{method:"POST",headers:mt(),body:JSON.stringify(h)}),p=await m.json();if(!m.ok)throw p;return p},mn=xi("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await i1(e,t,r)),qu=It({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:Wi,clearSlots:W5,setSelectedDate:Kt,setSelectedTime:Gi}=qu.actions,u1=qu.reducer,yn=xi("appointment/create",async(e,{rejectWithValue:t})=>{try{return await a1(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),sl={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking"},Yu=It({name:"appointment",initialState:sl,reducers:{resetAppointment:()=>sl,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(yn.pending,t=>{t.loading=!0,t.error=null}).addCase(yn.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(yn.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:G5,setBookingMode:H5,setUserDetails:ll,setTips:f1,setAppointmentId:Hi,clearUserDetails:h1}=Yu.actions,p1=Yu.reducer,Xu=It({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:m1,clearOutletList:K5}=Xu.actions,y1=Xu.reducer;function gn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gn=function(r){return typeof r}:gn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gn(e)}function Ki(){}var g1={getItem:Ki,setItem:Ki,removeItem:Ki};function v1(e){if((typeof self>"u"?"undefined":gn(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 v1(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),g1)}function $1(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,iu.combineReducers)({breadcrumbs:Zm,outletDetails:t1,service:n1,slots:u1,appointment:p1,outletList:y1}),x1=(e,t)=>t.type==="RESET_ALL"?dl({breadcrumbs:void 0,outletDetails:void 0,service:void 0,slots:void 0,appointment:void 0,outletList:e?.outletList},t):dl(e,t),w1=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),S1=(0,dt.persistReducer)({key:"root",storage:typeof window<"u"?$1("local"):w1()},x1),wi=bu({reducer:S1,devTools:process.env.NODE_ENV!=="production",middleware:e=>e({serializableCheck:{ignoredActions:[dt.FLUSH,dt.REHYDRATE,dt.PAUSE,dt.PERSIST,dt.PURGE,dt.REGISTER]}})}),Do=(0,dt.persistStore)(wi),q5=wi.getState;function C1({children:e}){return(0,d.jsx)(K.Provider,{store:wi,children:(0,d.jsx)(Hc,{loading:null,persistor:Do,children:e})})}var N1=e=>{if(!e)return;console.log("------15",e);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)},Ro=(0,b.createContext)({});function Lo(e){const t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var P1=typeof window<"u",Zu=P1?b.useLayoutEffect:b.useEffect,Si=(0,b.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 Je=(e,t,r)=>r>t?t:r<e?e:r;function _a(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var ir=()=>{},it=()=>{};typeof process<"u"&&process.env.NODE_ENV!=="production"&&(ir=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(_a(t,r))},it=(e,t,r)=>{if(!e)throw new Error(_a(t,r))});var ft={},Ju=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Qu(e){return typeof e=="object"&&e!==null}var ef=e=>/^0[^.\s]+$/u.test(e);function tf(e){let t;return()=>(t===void 0&&(t=e()),t)}var Re=e=>e,E1=(e,t)=>r=>t(e(r)),Wr=(...e)=>e.reduce(E1),$r=(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}},Oe=e=>e*1e3,De=e=>e/1e3;function rf(e,t){return t?e*(1e3/t):0}var cl=new Set;function Bo(e,t,r){e||cl.has(t)||(console.warn(_a(t,r)),cl.add(t))}var nf=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,T1=1e-7,j1=12;function O1(e,t,r,n,i){let a,o,s=0;do o=t+(r-t)/2,a=nf(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>T1&&++s<j1);return o}function Gr(e,t,r,n){if(e===t&&r===n)return Re;const i=a=>O1(a,0,1,e,r);return a=>a===0||a===1?a:nf(i(a),t,n)}var af=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,of=e=>t=>1-e(1-t),sf=Gr(.33,1.53,.69,.99),Uo=of(sf),lf=af(Uo),df=e=>e>=1?1:(e*=2)<1?.5*Uo(e):.5*(2-Math.pow(2,-10*(e-1))),zo=e=>1-Math.sin(Math.acos(e)),cf=of(zo),uf=af(zo),_1=Gr(.42,0,1,1),A1=Gr(0,0,.58,1),ff=Gr(.42,0,.58,1),I1=e=>Array.isArray(e)&&typeof e[0]!="number",hf=e=>Array.isArray(e)&&typeof e[0]=="number",ul={linear:Re,easeIn:_1,easeInOut:ff,easeOut:A1,circIn:zo,circInOut:uf,circOut:cf,backIn:Uo,backInOut:lf,backOut:sf,anticipate:df},M1=e=>typeof e=="string",fl=e=>{if(hf(e)){it(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(M1(e))return it(ul[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ul[e];return e},tn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Xe={value:null,addProjectionMetrics:null};function k1(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 c(f){o.has(f)&&(u.schedule(f),e()),l++,f(s)}const u={schedule:(f,h=!1,m=!1)=>{const p=m&&i?r:n;return h&&o.add(f),p.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(c),t&&Xe.value&&Xe.value.frameloop[t].push(l),l=0,r.clear(),i=!1,a&&(a=!1,u.process(f))}};return u}var D1=40;function pf(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=tn.reduce(($,w)=>($[w]=k1(a,t?w:void 0),$),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:h,render:m,postRender:p}=o,y=()=>{const $=ft.useManualTiming,w=$?i.timestamp:performance.now();r=!1,$||(i.delta=n?1e3/60:Math.max(Math.min(w-i.timestamp,D1),1)),i.timestamp=w,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),u.process(i),f.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(y))},g=()=>{r=!0,n=!0,i.isProcessing||e(y)};return{schedule:tn.reduce(($,w)=>{const E=o[w];return $[w]=(C,_=!1,S=!1)=>(r||g(),E.schedule(C,_,S)),$},{}),cancel:$=>{for(let w=0;w<tn.length;w++)o[tn[w]].cancel($)},state:i,steps:o}}var{schedule:ae,cancel:ht,state:be,steps:qi}=pf(typeof requestAnimationFrame<"u"?requestAnimationFrame:Re,!0),vn;function R1(){vn=void 0}var Se={now:()=>(vn===void 0&&Se.set(be.isProcessing||ft.useManualTiming?be.timestamp:performance.now()),vn),set:e=>{vn=e,queueMicrotask(R1)}},Pt={layout:0,mainThread:0,waapi:0},mf=e=>t=>typeof t=="string"&&t.startsWith(e),yf=mf("--"),L1=mf("var(--"),Wo=e=>L1(e)?F1.test(e.split("/*")[0].trim()):!1,F1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hl(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var ar={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xr={...ar,transform:e=>Je(0,1,e)},rn={...ar,default:1},hr=e=>Math.round(e*1e5)/1e5,Go=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V1(e){return e==null}var B1=/^(?:#[\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"&&B1.test(r)&&r.startsWith(e)||t&&!V1(r)&&Object.prototype.hasOwnProperty.call(r,t)),gf=(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}},U1=e=>Je(0,255,e),Yi={...ar,transform:e=>Math.round(U1(e))},St={test:Ho("rgb","red"),parse:gf("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Yi.transform(e)+", "+Yi.transform(t)+", "+Yi.transform(r)+", "+hr(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 Aa={test:Ho("#"),parse:z1,transform:St.transform},Hr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lt=Hr("deg"),Ze=Hr("%"),L=Hr("px"),W1=Hr("vh"),G1=Hr("vw"),pl={...Ze,parse:e=>Ze.parse(e)/100,transform:e=>Ze.transform(e*100)},Bt={test:Ho("hsl","hue"),parse:gf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Ze.transform(hr(t))+", "+Ze.transform(hr(r))+", "+hr(xr.transform(n))+")"},pe={test:e=>St.test(e)||Aa.test(e)||Bt.test(e),parse:e=>St.test(e)?St.parse(e):Bt.test(e)?Bt.parse(e):Aa.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?St.transform(e):Bt.transform(e),getAnimatableNone:e=>{const t=pe.parse(e);return t.alpha=0,pe.transform(t)}},H1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function K1(e){return isNaN(e)&&typeof e=="string"&&(e.match(Go)?.length||0)+(e.match(H1)?.length||0)>0}var vf="number",bf="color",q1="var",Y1="var(",ml="${}",X1=/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 Zt(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;return{values:r,split:t.replace(X1,o=>(pe.test(o)?(n.color.push(a),i.push(bf),r.push(pe.parse(o))):o.startsWith(Y1)?(n.var.push(a),i.push(q1),r.push(o)):(n.number.push(a),i.push(vf),r.push(parseFloat(o))),++a,ml)).split(ml),indexes:n,types:i}}function Z1(e){return Zt(e).values}function $f({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===vf?i+=hr(n[a]):o===bf?i+=pe.transform(n[a]):i+=n[a]}return i}}function J1(e){return $f(Zt(e))}var Q1=e=>typeof e=="number"?0:pe.test(e)?pe.getAnimatableNone(e):e,ey=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Q1(e);function ty(e){const t=Zt(e);return $f(t)(t.values.map((r,n)=>ey(r,t.split[n])))}var We={test:K1,parse:Z1,createTransformer:J1,getAnimatableNone:ty};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 ry({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 le=(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)},ny=[Aa,St,Bt],iy=e=>ny.find(t=>t.test(e));function yl(e){const t=iy(e);if(ir(!!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===Bt&&(r=ry(r)),r}var gl=(e,t)=>{const r=yl(e),n=yl(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=le(r.alpha,n.alpha,a),St.transform(i))},Ia=new Set(["none","hidden"]);function ay(e,t){return Ia.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function oy(e,t){return r=>le(e,t,r)}function Ko(e){return typeof e=="number"?oy:typeof e=="string"?Wo(e)?Hn:pe.test(e)?gl:dy:Array.isArray(e)?xf:typeof e=="object"?pe.test(e)?gl:sy:Hn}function xf(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 sy(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 ly(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 dy=(e,t)=>{const r=We.createTransformer(t),n=Zt(e),i=Zt(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?ay(e,t):Wr(xf(ly(n,i),i.values),r):(ir(!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 wf(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?le(e,t,r):Ko(e)(e,t)}var cy=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>ae.update(t,r),stop:()=>ht(t),now:()=>be.isProcessing?be.timestamp:Se.now()}},Sf=(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)})`},Cf=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 uy(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(qo(n),Cf);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:De(i)}}var ce={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 fy=12;function hy(e,t,r){let n=r;for(let i=1;i<fy;i++)n=n-e(n)/t(n);return n}var Ji=.001;function py({duration:e=ce.duration,bounce:t=ce.bounce,velocity:r=ce.velocity,mass:n=ce.mass}){let i,a;ir(e<=Oe(ce.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Je(ce.minDamping,ce.maxDamping,o),e=Je(ce.minDuration,ce.maxDuration,De(e)),o<1?(i=c=>{const u=c*o,f=u*e,h=u-r,m=Ma(c,o),p=Math.exp(-f);return Ji-h/m*p},a=c=>{const u=c*o*e,f=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),p=Ma(Math.pow(c,2),o);return(-i(c)+Ji>0?-1:1)*((f-h)*m)/p}):(i=c=>{const u=Math.exp(-c*e),f=(c-r)*e+1;return-Ji+u*f},a=c=>Math.exp(-c*e)*((r-c)*(e*e)));const s=5/e,l=hy(i,a,s);if(e=Oe(e),isNaN(l))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:e}}}var my=["duration","bounce"],yy=["stiffness","damping","mass"];function vl(e,t){return t.some(r=>e[r]!==void 0)}function gy(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!vl(e,yy)&&vl(e,my))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*Je(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ce.mass,stiffness:i,damping:a}}else{const r=py({...e,velocity:0});t={...t,...r,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Kn(e=ce.visualDuration,t=ce.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:c,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=gy({...r,velocity:-De(r.velocity||0)}),p=h||0,y=c/(2*Math.sqrt(l*u)),g=o-a,v=De(Math.sqrt(l/u)),x=Math.abs(g)<5;n||(n=x?ce.restSpeed.granular:ce.restSpeed.default),i||(i=x?ce.restDelta.granular:ce.restDelta.default);let $,w,E,C,_,S;if(y<1)E=Ma(v,y),C=(p+y*v*g)/E,$=M=>o-Math.exp(-y*v*M)*(C*Math.sin(E*M)+g*Math.cos(E*M)),_=y*v*C+g*E,S=y*v*g-C*E,w=M=>Math.exp(-y*v*M)*(_*Math.sin(E*M)+S*Math.cos(E*M));else if(y===1){$=V=>o-Math.exp(-v*V)*(g+(p+v*g)*V);const M=p+v*g;w=V=>Math.exp(-v*V)*(v*M*V-p)}else{const M=v*Math.sqrt(y*y-1);$=k=>{const W=Math.exp(-y*v*k),G=Math.min(M*k,300);return o-W*((p+y*v*g)*Math.sinh(G)+M*g*Math.cosh(G))/M};const V=(p+y*v*g)/M,P=y*v*V-g*M,U=y*v*g-V*M;w=k=>{const W=Math.exp(-y*v*k),G=Math.min(M*k,300);return W*(P*Math.sinh(G)+U*Math.cosh(G))}}const j={calculatedDuration:m&&f||null,velocity:M=>Oe(w(M)),next:M=>{if(!m&&y<1){const P=Math.exp(-y*v*M),U=Math.sin(E*M),k=Math.cos(E*M),W=o-P*(C*U+g*k),G=Oe(P*(_*U+S*k));return s.done=Math.abs(G)<=n&&Math.abs(o-W)<=i,s.value=s.done?o:W,s}const V=$(M);if(m)s.done=M>=f;else{const P=Oe(w(M));s.done=Math.abs(P)<=n&&Math.abs(o-V)<=i}return s.value=s.done?o:V,s},toString:()=>{const M=Math.min(qo(j),Cf),V=Sf(P=>j.next(M*P).value,M,30);return M+"ms "+V},toTransition:()=>{}};return j}Kn.applyToOptions=e=>{const t=uy(e,100,Kn);return e.ease=t.ease,e.duration=Oe(t.duration),e.type="keyframes",e};var vy=5;function Nf(e,t,r){const n=Math.max(t-vy,0);return rf(r-e(n),t-n)}function ka({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=S=>s!==void 0&&S<s||l!==void 0&&S>l,p=S=>s===void 0?l:l===void 0||Math.abs(s-S)<Math.abs(l-S)?s:l;let y=r*t;const g=f+y,v=o===void 0?g:o(g);v!==g&&(y=v-f);const x=S=>-y*Math.exp(-S/n),$=S=>v+x(S),w=S=>{const j=x(S),M=$(S);h.done=Math.abs(j)<=c,h.value=h.done?v:M};let E,C;const _=S=>{m(h.value)&&(E=S,C=Kn({keyframes:[h.value,p(h.value)],velocity:Nf($,S,h.value),damping:i,stiffness:a,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:S=>{let j=!1;return!C&&E===void 0&&(j=!0,w(S),_(S)),E!==void 0&&S>=E?C.next(S-E):(!j&&w(S),h)}}}function by(e,t,r){const n=[],i=r||ft.mix||wf,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);t&&(s=Wr(Array.isArray(t)?t[o]||Re:t,s)),n.push(s)}return n}function $y(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(it(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=by(t,n,i),l=s.length,c=u=>{if(o&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=$r(e[f],e[f+1],u);return s[f](h)};return r?u=>c(Je(e[0],e[a-1],u)):c}function xy(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=$r(0,t,n);e.push(le(r,1,i))}}function wy(e){const t=[0];return xy(t,e.length-1),t}function Sy(e,t){return e.map(r=>r*t)}function Cy(e,t){return e.map(()=>t||ff).splice(0,e.length-1)}function Ut({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=I1(n)?n.map(fl):fl(n),a={done:!1,value:t[0]},o=$y(Sy(r&&r.length===t.length?r:wy(t),e),t,{ease:Array.isArray(i)?i:Cy(t,i)});return{calculatedDuration:e,next:s=>(a.value=o(s),a.done=s>=e,a)}}var Ny=e=>e!==null;function Ci(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(Ny),o=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}var Py={decay:ka,inertia:ka,tween:Ut,keyframes:Ut,spring:Kn};function Pf(e){typeof e.type=="string"&&(e.type=Py[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)}},Ey=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!==Se.now()&&this.tick(Se.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;Pf(e);const{type:t=Ut,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Ut;process.env.NODE_ENV!=="production"&&s!==Ut&&it(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),s!==Ut&&typeof o[0]!="number"&&(this.mixKeyframes=Wr(Ey,wf(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:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+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:c,repeat:u,repeatType:f,repeatDelay:h,type:m,onUpdate:p,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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let x=this.currentTime,$=r;if(u){const _=Math.min(this.currentTime,n)/o;let S=Math.floor(_),j=_%1;!j&&_>=1&&(j=1),j===1&&S--,S=Math.min(S,u+1),S%2&&(f==="reverse"?(j=1-j,h&&(j-=h/o)):f==="mirror"&&($=a)),x=Je(0,1,j)*o}let w;v?(this.delayState.value=c[0],w=this.delayState):w=$.next(x),i&&!v&&(w.value=i(w.value));let{done:E}=w;!v&&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&&m!==ka&&(w.value=Ci(c,this.options,y,this.speed)),p&&p(w.value),C&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return De(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+De(e)}get time(){return De(this.currentTime)}set time(e){e=Oe(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 Nf(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(Se.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=De(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=cy,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(Se.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 Ty(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Ct=e=>e*180/Math.PI,Da=e=>Ra(Ct(Math.atan2(e[1],e[0]))),jy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Da,rotateZ:Da,skewX:e=>Ct(Math.atan(e[1])),skewY:e=>Ct(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ra=e=>(e=e%360,e<0&&(e+=360),e),bl=Da,$l=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Oy={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$l,scaleY:xl,scale:e=>($l(e)+xl(e))/2,rotateX:e=>Ra(Ct(Math.atan2(e[6],e[5]))),rotateY:e=>Ra(Ct(Math.atan2(-e[2],e[0]))),rotateZ:bl,rotate:bl,skewX:e=>Ct(Math.atan(e[4])),skewY:e=>Ct(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=Oy,i=r;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=jy,i=s}if(!i)return La(t);const a=n[t],o=i[1].split(",").map(Ay);return typeof a=="function"?a(o):o[a]}var _y=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Fa(r,t)};function Ay(e){return parseFloat(e.trim())}var or=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],sr=new Set(or),wl=e=>e===ar||e===L,Iy=new Set(["x","y","z"]),My=or.filter(e=>!Iy.has(e));function ky(e){const t=[];return My.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var ut={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")};ut.translateX=ut.x;ut.translateY=ut.y;var Et=new Set,Va=!1,Ba=!1,Ua=!1;function Ef(){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=ky(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 Tf(){Et.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ba=!0)})}function Dy(){Ua=!0,Tf(),Ef(),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,ae.read(Tf),ae.resolveKeyframes(Ef))):(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])}Ty(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()}},Ry=e=>e.startsWith("--");function jf(e,t,r){Ry(t)?e.style.setProperty(t,r):e.style[t]=r}var Ly={};function Of(e,t){const r=tf(e);return()=>Ly[t]??r()}var Fy=Of(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_f=Of(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fr=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,Sl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fr([0,.65,.55,1]),circOut:fr([.55,0,1,.45]),backIn:fr([.31,.01,.66,-.59]),backOut:fr([.33,1.53,.69,.99])};function Af(e,t){if(e)return typeof e=="function"?_f()?Sf(e,t):"ease-out":hf(e)?fr(e):Array.isArray(e)?e.map(r=>Af(r,t)||Sl.easeOut):Sl[e]}function Vy(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:r};l&&(u.offset=l);const f=Af(s,i);Array.isArray(f)&&(u.easing=f),Xe.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"};c&&(h.pseudoElement=c);const m=e.animate(u,h);return Xe.value&&m.finished.finally(()=>{Pt.waapi--}),m}function If(e){return typeof e=="function"&&"applyToOptions"in e}function By({type:e,...t}){return If(e)&&_f()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Mf=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,it(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=By(e);this.animation=Vy(t,r,n,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=Ci(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(c),jf(t,r,c),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 De(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+De(e)}get time(){return De(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Oe(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&&Fy()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),Re):n(this)}},kf={anticipate:df,backInOut:lf,circInOut:uf};function Uy(e){return e in kf}function zy(e){typeof e.ease=="string"&&Uy(e.ease)&&(e.ease=kf[e.ease])}var Qi=10,Wy=class extends Mf{constructor(e){zy(e),Pf(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,Se.now()-this.startTime),l=Je(0,Qi,s-Qi),c=o.sample(s).value,{name:u}=this.options;i&&u&&jf(i,u,c),t.setWithVelocity(o.sample(Math.max(0,s-l)).value,c,l),o.stop()}},Cl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(We.test(e)||e==="0")&&!e.startsWith("url("));function Gy(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 Hy(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=Cl(i,t),s=Cl(a,t);return ir(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:Gy(e)||(r==="spring"||If(r))&&n}function za(e){e.duration=0,e.type="keyframes"}var Df=new Set(["opacity","clipPath","filter","transform"]),Ky=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function qy(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ky.test(e[t]))return!0;return!1}var Yy=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Xy=tf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zy(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:c}=t.owner.getProps();return Xy()&&r&&(Df.has(r)||Yy.has(r)&&qy(s))&&(r!=="transform"||!c)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}var Jy=40,Qy=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:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Se.now();const f={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:c,...u},h=c?.KeyframeResolver||Xo;this.keyframeResolver=new h(o,(m,p,y)=>this.onKeyframesResolved(m,p,f,!y),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,r,n){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:l,onUpdate:c}=r;this.resolvedAt=Se.now();let u=!0;Hy(e,i,a,o)||(u=!1,(ft.instantAnimations||!s)&&c?.(Ci(e,r,t)),e[0]=e[e.length-1],za(r),r.repeat=0);const f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Jy?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=u&&!l&&Zy(f),m=f.motionValue?.owner?.current;let p;if(h)try{p=new Wy({...f,element:m})}catch{p=new qn(f)}else p=new qn(f);p.finished.then(()=>{this.notifyFinished()}).catch(Re),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),Dy()),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 Rf(e,t,r,n=0,i=1){const a=Array.from(e).sort((l,c)=>l.sortNodePosition(c)).indexOf(t),o=e.size,s=(o-1)*n;return typeof r=="function"?r(a,o):i===1?a*n:s-a*n}var eg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tg(e){const t=eg.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}var rg=4;function Lf(e,t,r=1){it(r<=rg,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,i]=tg(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return Ju(o)?parseFloat(o):o}return Wo(i)?Lf(i,t,r+1):i}var ng={type:"spring",stiffness:500,damping:25,restSpeed:10},ig=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ag={type:"keyframes",duration:.8},og={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sg=(e,{keyframes:t})=>t.length>2?ag:sr.has(e)?e.startsWith("scale")?ig(t[1]):ng:og;function Ff(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?Ff(r,e):r}var lg=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function dg(e){for(const t in e)if(!lg.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:c=0}=n;c=c-Oe(l);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,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};dg(s)||Object.assign(u,sg(e,u)),u.duration&&(u.duration=Oe(u.duration)),u.repeatDelay&&(u.repeatDelay=Oe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(za(u),u.delay===0&&(f=!0)),(ft.instantAnimations||ft.skipAnimations||i?.shouldSkipAnimations)&&(f=!0,za(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,f&&!a&&t.get()!==void 0){const h=Ci(u.keyframes,s);if(h!==void 0){ae.update(()=>{u.onUpdate(h),u.onComplete()});return}}return s.isSync?new qn(u):new Qy(u)};function Nl(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]=Nl(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]=Nl(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 Vf=new Set(["width","height","top","left","right","bottom",...or]),Pl=30,cg=e=>!isNaN(parseFloat(e)),El={current:void 0},ug=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const n=Se.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=Se.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=cg(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(),ae.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 El.current&&El.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Se.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Pl)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Pl);return rf(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 Jt(e,t){return new ug(e,t)}var Wa=e=>Array.isArray(e);function fg(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Jt(r))}function hg(e){return Wa(e)?e[e.length-1]||0:e}function pg(e,t){let{transitionEnd:r={},transition:n={},...i}=Tt(e,t)||{};i={...i,...r};for(const a in i)fg(e,a,hg(i[a]))}var xe=e=>!!(e&&e.getVelocity);function mg(e){return!!(xe(e)&&e.add)}function Ga(e,t){const r=e.getValue("willChange");if(mg(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 yg="framerAppearId",Bf="data-"+es(yg);function Uf(e){return e.props[Bf]}function gg({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function zf(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Ff(a,l):l;const c=a?.reduceMotion;n&&(a=n);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in s){const m=e.getValue(h,e.latestValues[h]??null),p=s[h];if(p===void 0||f&&gg(f,h))continue;const y={delay:r,...Zo(a||{},h)},g=m.get();if(g!==void 0&&!m.isAnimating()&&!Array.isArray(p)&&p===g&&!y.velocity){ae.update(()=>m.set(p));continue}let v=!1;if(window.MotionHandoffAnimation){const w=Uf(e);if(w){const E=window.MotionHandoffAnimation(w,h,ae);E!==null&&(y.startTime=E,v=!0)}}Ga(e,h);const x=c??e.shouldReduceMotion;m.start(Jo(h,m,p,x&&Vf.has(h)?{type:!1}:y,e,v));const $=m.animation;$&&u.push($)}if(o){const h=()=>ae.update(()=>{o&&pg(e,o)});u.length?Promise.all(u).then(h):h()}return u}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(zf(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return vg(e,t,l,c,u,f,r)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,c]=s==="beforeChildren"?[a,o]:[o,a];return l().then(()=>c())}else return Promise.all([a(),o(r.delay)])}function vg(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)+Rf(e.variantChildren,l,n,i,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function bg(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(zf(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var $g={test:e=>e==="auto",parse:e=>e},Wf=e=>t=>t.test(e),Gf=[ar,L,Ze,lt,G1,W1,$g],Tl=e=>Gf.find(Wf(e));function xg(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ef(e):!0}var wg=new Set(["brightness","contrast","saturate","opacity"]);function Sg(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=wg.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}var Cg=/\b([a-z-]*)\(.*?\)/gu,Ka={...We,getAnimatableNone:e=>{const t=e.match(Cg);return t?t.map(Sg).join(" "):e}},qa={...We,getAnimatableNone:e=>{const t=We.parse(e);return We.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},jl={...ar,transform:Math.round},Ng={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:rn,scaleX:rn,scaleY:rn,scaleZ:rn,skew:lt,skewX:lt,skewY:lt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:xr,originX:pl,originY:pl,originZ:L},ts={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,...Ng,zIndex:jl,fillOpacity:xr,strokeOpacity:xr,numOctaves:jl},Pg={...ts,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:Ka,WebkitFilter:Ka,mask:qa,WebkitMask:qa},Hf=e=>Pg[e],Eg=new Set([Ka,qa]);function Kf(e,t){let r=Hf(e);return Eg.has(r)||(r=We),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Tg=new Set(["auto","none","0"]);function jg(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!Tg.has(a)&&Zt(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=Kf(r,i)}var Og=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(),Wo(l))){const c=Lf(l,t.current);c!==void 0&&(e[s]=c),s===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Vf.has(r)||e.length!==2)return;const[n,i]=e,a=Tl(n),o=Tl(i);if(hl(n)!==hl(i)&&ut[r]){this.needsMeasurement=!0;return}if(a!==o)if(wl(a)&&wl(o))for(let s=0;s<e.length;s++){const l=e[s];typeof l=="string"&&(e[s]=parseFloat(l))}else ut[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let n=0;n<e.length;n++)(e[n]===null||xg(e[n]))&&r.push(n);r.length&&jg(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=ut[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]=ut[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 qf(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 Yf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function bn(e){return Qu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:rs,cancel:Y5}=pf(queueMicrotask,!1),Ue={x:!1,y:!1};function Xf(){return Ue.x||Ue.y}function _g(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 Zf(e,t){const r=qf(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Ag(e){return!(e.pointerType==="touch"||Xf())}function Ig(e,t,r={}){const[n,i,a]=Zf(e,r);return n.forEach(o=>{let s=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",p)},f=g=>{c&&(c(g),c=void 0),u()},h=g=>{s=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,f(g))},m=()=>{s=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=g=>{if(g.pointerType!=="touch"){if(s){l=!0;return}f(g)}},y=g=>{if(!Ag(g))return;l=!1;const v=t(o,g);typeof v=="function"&&(c=v,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",m,i)}),a}var Jf=(e,t)=>t?e===t?!0:Jf(e,t.parentElement):!1,ns=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function kg(e){return Mg.has(e.tagName)||e.isContentEditable===!0}var Dg=new Set(["INPUT","SELECT","TEXTAREA"]);function Rg(e){return Dg.has(e.tagName)||e.isContentEditable===!0}var $n=new WeakSet;function Ol(e){return t=>{t.key==="Enter"&&e(t)}}function ea(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Lg=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=Ol(()=>{if($n.has(r))return;ea(r,"down");const i=Ol(()=>{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 _l(e){return ns(e)&&!Xf()}var Al=new WeakSet;function Fg(e,t,r={}){const[n,i,a]=Zf(e,r),o=s=>{const l=s.currentTarget;if(!_l(s)||Al.has(s))return;$n.add(l),r.stopPropagation&&Al.add(s);const c=t(l,s),u=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),$n.has(l)&&$n.delete(l),_l(m)&&typeof c=="function"&&c(m,{success:p})},f=m=>{u(m,l===window||l===document||r.useGlobalTarget||Jf(l,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),bn(s)&&(s.addEventListener("focus",l=>Lg(l,i)),!kg(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function is(e){return Qu(e)&&"ownerSVGElement"in e}var xn=new WeakMap,wn,Qf=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:is(n)&&"getBBox"in n?n.getBBox()[t]:n[r],Vg=Qf("inline","width","offsetWidth"),Bg=Qf("block","height","offsetHeight");function Ug({target:e,borderBoxSize:t}){xn.get(e)?.forEach(r=>{r(e,{get width(){return Vg(e,t)},get height(){return Bg(e,t)}})})}function zg(e){e.forEach(Ug)}function Wg(){typeof ResizeObserver>"u"||(wn=new ResizeObserver(zg))}function Gg(e,t){wn||Wg();const r=qf(e);return r.forEach(n=>{let i=xn.get(n);i||(i=new Set,xn.set(n,i)),i.add(t),wn?.observe(n)}),()=>{r.forEach(n=>{const i=xn.get(n);i?.delete(t),i?.size||wn?.unobserve(n)})}}var Sn=new Set,zt;function Hg(){zt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Sn.forEach(t=>t(e))},window.addEventListener("resize",zt)}function Kg(e){return Sn.add(e),zt||Hg(),()=>{Sn.delete(e),!Sn.size&&typeof zt=="function"&&(window.removeEventListener("resize",zt),zt=void 0)}}function Il(e,t){return typeof e=="function"?Kg(e):Gg(e,t)}function qg(e){return is(e)&&e.tagName==="svg"}var Yg=[...Gf,pe,We],Xg=e=>Yg.find(Wf(e)),Ml=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:Ml(),y:Ml()}),kl=()=>({min:0,max:0}),ge=()=>({x:kl(),y:kl()}),Zg=new WeakMap;function Ni(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wr(e){return typeof e=="string"||Array.isArray(e)}var as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],os=["initial",...as];function Pi(e){return Ni(e.animate)||os.some(t=>wr(e[t]))}function eh(e){return!!(Pi(e)||e.variants)}function Jg(e,t,r){for(const n in t){const i=t[n],a=r[n];if(xe(i))e.addValue(n,i);else if(xe(a))e.addValue(n,Jt(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,Jt(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},th={current:!1},Qg=typeof window<"u";function ev(){if(th.current=!0,!!Qg)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 Dl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Yn={};function rh(e){Yn=e}function tv(){return Yn}var rv=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=Se.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ae.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,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=eh(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in f){const m=f[h];l[h]!==void 0&&xe(m)&&m.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,Zg.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:(th.current||ev(),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&&Df.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:s,ease:l,duration:c}=t.accelerate,u=new Mf({element:this.current,name:e,keyframes:o,times:s,ease:l,duration:Oe(c)}),f=a(u);this.valueSubscriptions.set(e,()=>{f(),u.cancel()});return}const r=sr.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&ae.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<Dl.length;r++){const n=Dl[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=Jg(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=Jt(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"&&(Ju(r)||ef(r))?r=parseFloat(r):!Xg(r)&&We.test(t)&&(r=Kf(e,t)),this.setBaseTarget(e,xe(r)?r.get():r)),xe(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&&!xe(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)}},nh=class extends rv{constructor(){super(...arguments),this.KeyframeResolver=Og}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;xe(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}},yt=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function ih({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function nv({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function iv(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 bt(e){return Xa(e)||ah(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ah(e){return Rl(e.x)||Rl(e.y)}function Rl(e){return e&&e!=="0%"}function Xn(e,t,r){return r+t*(e-r)}function Ll(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=Ll(e.min,t,r,n,i),e.max=Ll(e.max,t,r,n,i)}function oh(e,{x:t,y:r}){Za(e.x,t.translate,t.scale,t.originPoint),Za(e.y,r.translate,r.scale,r.originPoint)}var Fl=.999999999999,Vl=1.0000000000001;function av(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&&(Ye(e.x,-a.scroll.offset.x),Ye(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,oh(e,o)),n&&bt(a.latestValues)&&Cn(e,a.latestValues,a.layout?.layoutBox))}t.x<Vl&&t.x>Fl&&(t.x=1),t.y<Vl&&t.y>Fl&&(t.y=1)}function Ye(e,t){e.min+=t,e.max+=t}function Bl(e,t,r,n,i=.5){Za(e,t,r,le(e.min,e.max,i),n)}function Ul(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Cn(e,t,r){const n=r??e;Bl(e.x,Ul(t.x,n.x),t.scaleX,t.scale,t.originX),Bl(e.y,Ul(t.y,n.y),t.scaleY,t.scale,t.originY)}function sh(e,t){return ih(iv(e.getBoundingClientRect(),t))}function ov(e,t,r){const n=sh(e,r),{scroll:i}=t;return i&&(Ye(n.x,i.offset.x),Ye(n.y,i.offset.y)),n}var sv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lv=or.length;function dv(e,t,r){let n="",i=!0;for(let a=0;a<lv;a++){const o=or[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 c=parseFloat(s);l=o.startsWith("scale")?c===1:c===0}if(!l||r){const c=Yf(s,ts[o]);if(!l){i=!1;const u=sv[o]||o;n+=`${u}(${c}) `}r&&(t[o]=c)}}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 c=t[l];if(sr.has(l)){o=!0;continue}else if(yf(l)){i[l]=c;continue}else{const u=Yf(c,ts[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(o||r?n.transform=dv(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}function lh(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 zl(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(L.test(e))e=parseFloat(e);else return e;return`${zl(e,t.target.x)}% ${zl(e,t.target.y)}%`}},cv={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=We.parse(e);if(i.length>5)return n;const a=We.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 c=le(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),a(i)}},Ja={borderRadius:{...cr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cr,borderTopRightRadius:cr,borderBottomLeftRadius:cr,borderBottomRightRadius:cr,boxShadow:cv};function dh(e,{layout:t,layoutId:r}){return sr.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)(xe(n[o])||i&&xe(i[o])||dh(o,e)||r?.getValue(o)?.liveStyle!==void 0)&&(a[o]=n[o]);return a}function uv(e){return window.getComputedStyle(e)}var fv=class extends nh{constructor(){super(...arguments),this.type="html",this.renderInstance=lh}readValueFromInstance(e,t){if(sr.has(t))return this.projection?.isProjecting?La(t):_y(e,t);{const r=uv(e),n=(yf(t)?r.getPropertyValue(t):r[t])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return sh(e,t)}build(e,t,r){ss(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return ls(e,t,r)}},hv={offset:"stroke-dashoffset",array:"stroke-dasharray"},pv={offset:"strokeDashoffset",array:"strokeDasharray"};function mv(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?hv:pv;e[a.offset]=`${-n}`,e[a.array]=`${t} ${r}`}var yv=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ch(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,c,u){if(ss(e,s,c),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=u?.transformBox??"fill-box",delete f.transformBox);for(const m of yv)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&mv(f,i,a,o,!1)}var uh=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"]),fh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gv(e,t,r,n){lh(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(uh.has(i)?i:es(i),t.attrs[i])}function hh(e,t,r){const n=ls(e,t,r);for(const i in e)if(xe(e[i])||xe(t[i])){const a=or.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}var vv=class extends nh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(sr.has(t)){const r=Hf(t);return r&&r.default||0}return t=uh.has(t)?t:es(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return hh(e,t,r)}build(e,t,r){ch(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){gv(e,t,r,n)}mount(e){this.isSVGTag=fh(e.tagName),super.mount(e)}},bv=os.length;function ph(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?ph(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<bv;r++){const n=os[r],i=e.props[n];(wr(i)||i===!1)&&(t[n]=i)}return t}function mh(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 $v=[...as].reverse(),xv=as.length;function wv(e){return t=>Promise.all(t.map(({animation:r,options:n})=>bg(e,r,n)))}function Sv(e){let t=wv(e),r=Wl(),n=!0,i=!1;const a=c=>(u,f)=>{const h=Tt(e,f,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:m,transitionEnd:p,...y}=h;u={...u,...y,...p}}return u};function o(c){t=c(e)}function s(c){const{props:u}=e,f=ph(e.parent)||{},h=[],m=new Set;let p={},y=1/0;for(let v=0;v<xv;v++){const x=$v[v],$=r[x],w=u[x]!==void 0?u[x]:f[x],E=wr(w),C=x===c?$.isActive:null;C===!1&&(y=v);let _=w===f[x]&&w!==u[x]&&E;if(_&&(n||i)&&e.manuallyAnimateOnMount&&(_=!1),$.protectedKeys={...p},!$.isActive&&C===null||!w&&!$.prevProp||Ni(w)||typeof w=="boolean")continue;if(x==="exit"&&$.isActive&&C!==!0){$.prevResolvedValues&&(p={...p,...$.prevResolvedValues});continue}const S=Cv($.prevProp,w);let j=S||x===c&&$.isActive&&!_&&E||v>y&&E,M=!1;const V=Array.isArray(w)?w:[w];let P=V.reduce(a(x),{});C===!1&&(P={});const{prevResolvedValues:U={}}=$,k={...U,...P},W=H=>{j=!0,m.has(H)&&(M=!0,m.delete(H)),$.needsAnimating[H]=!0;const te=e.getValue(H);te&&(te.liveStyle=!1)};for(const H in k){const te=P[H],re=U[H];if(p.hasOwnProperty(H))continue;let ue=!1;Wa(te)&&Wa(re)?ue=!mh(te,re):ue=te!==re,ue?te!=null?W(H):m.add(H):te!==void 0&&m.has(H)?W(H):$.protectedKeys[H]=!0}$.prevProp=w,$.prevResolvedValues=P,$.isActive&&(p={...p,...P}),(n||i)&&e.blockInitialAnimation&&(j=!1);const G=_&&S;j&&(!G||M)&&h.push(...V.map(H=>{const te={type:x};if(typeof H=="string"&&(n||i)&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:re}=e,ue=Tt(re,H);if(re.enteringChildren&&ue){const{delayChildren:Ee}=ue.transition||{};te.delay=Rf(re.enteringChildren,e,Ee)}}return{animation:H,options:te}}))}if(m.size){const v={};if(typeof u.initial!="boolean"){const x=Tt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}m.forEach(x=>{const $=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=$??null}),h.push({animation:v})}let g=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,i=!1,g?t(h):Promise.resolve()}function l(c,u){if(r[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,u)),r[c].isActive=u;const f=s(c);for(const h in r)r[h].protectedKeys={};return f}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Wl(),i=!0}}}function Cv(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mh(t,e):!1}function vt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wl(){return{animate:vt(!0),whileInView:vt(),whileHover:vt(),whileTap:vt(),whileDrag:vt(),whileFocus:vt(),exit:vt()}}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 Gl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var yh=1e-4,Nv=1-yh,Pv=1+yh,gh=.01,Ev=0-gh,Tv=0+gh;function Ce(e){return e.max-e.min}function jv(e,t,r){return Math.abs(e-t)<=r}function Hl(e,t,r,n=.5){e.origin=n,e.originPoint=le(t.min,t.max,e.origin),e.scale=Ce(r)/Ce(t),e.translate=le(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Nv&&e.scale<=Pv||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ev&&e.translate<=Tv||isNaN(e.translate))&&(e.translate=0)}function pr(e,t,r,n){Hl(e.x,t.x,r.x,n?n.originX:void 0),Hl(e.y,t.y,r.y,n?n.originY:void 0)}function Kl(e,t,r,n=0){e.min=(n?le(r.min,r.max,n):r.min)+t.min,e.max=e.min+Ce(t)}function Ov(e,t,r,n){Kl(e.x,t.x,r.x,n?.x),Kl(e.y,t.y,r.y,n?.y)}function ql(e,t,r,n=0){const i=n?le(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+Ce(t)}function Zn(e,t,r,n){ql(e.x,t.x,r.x,n?.x),ql(e.y,t.y,r.y,n?.y)}function Yl(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 _v(e,t=0,r=1,n=.5,i,a=e,o=e){if(Ze.test(t)&&(t=parseFloat(t),t=le(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=le(a.min,a.max,n);e===a&&(s-=t),e.min=Yl(e.min,t,r,s,i),e.max=Yl(e.max,t,r,s,i)}function Xl(e,t,[r,n,i],a,o){_v(e,t[r],t[n],t[i],t.scale,a,o)}var Av=["x","scaleX","originX"],Iv=["y","scaleY","originY"];function Zl(e,t,r,n){Xl(e.x,t,Av,r?r.x:void 0,n?n.x:void 0),Xl(e.y,t,Iv,r?r.y:void 0,n?n.y:void 0)}function Jl(e){return e.translate===0&&e.scale===1}function vh(e){return Jl(e.x)&&Jl(e.y)}function Ql(e,t){return e.min===t.min&&e.max===t.max}function Mv(e,t){return Ql(e.x,t.x)&&Ql(e.y,t.y)}function ed(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bh(e,t){return ed(e.x,t.x)&&ed(e.y,t.y)}function td(e){return Ce(e.x)/Ce(e.y)}function rd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function qe(e){return[e("x"),e("y")]}function kv(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:c,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:p}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),m&&(n+=`skewX(${m}deg) `),p&&(n+=`skewY(${p}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 $h=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Dv=$h.length,nd=e=>typeof e=="string"?parseFloat(e):e,id=e=>typeof e=="number"||L.test(e);function Rv(e,t,r,n,i,a){i?(e.opacity=le(0,r.opacity??1,Lv(n)),e.opacityExit=le(t.opacity??1,0,Fv(n))):a&&(e.opacity=le(t.opacity??1,r.opacity??1,n));for(let o=0;o<Dv;o++){const s=$h[o];let l=ad(t,s),c=ad(r,s);l===void 0&&c===void 0||(l||(l=0),c||(c=0),l===0||c===0||id(l)===id(c)?(e[s]=Math.max(le(nd(l),nd(c),n),0),(Ze.test(c)||Ze.test(l))&&(e[s]+="%")):e[s]=c)}(t.rotate||r.rotate)&&(e.rotate=le(t.rotate||0,r.rotate||0,n))}function ad(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Lv=xh(0,.5,cf),Fv=xh(.5,.95,Re);function xh(e,t,r){return n=>n<e?0:n>t?1:r($r(e,t,n))}function Vv(e,t,r){const n=xe(e)?e:Jt(e);return n.start(Jo("",n,t,r)),n.animation}function Sr(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}var Bv=(e,t)=>e.depth-t.depth,Uv=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(Bv),this.isDirty=!1,this.children.forEach(e)}};function zv(e,t){const r=Se.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(ht(n),e(a-t))};return ae.setup(n,!0),()=>ht(n)}function Nn(e){return xe(e)?e.get():e}var Wv=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},$t={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ra=["","X","Y","Z"],Gv=1e3,Hv=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 wh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=Uf(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ae,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&wh(n)}function Sh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},s=t?.()){this.id=Hv++,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,Xe.value&&($t.nodes=$t.calculatedTargetDeltas=$t.calculatedProjections=0),this.nodes.forEach(Yv),this.nodes.forEach(t2),this.nodes.forEach(r2),this.nodes.forEach(Xv),Xe.addProjectionMetrics&&Xe.addProjectionMetrics($t)},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 Uv)}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)&&!qg(o),this.instance=o;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;ae.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=zv(h,250),Pn.hasAnimatedSinceResize&&(Pn.hasAnimatedSinceResize=!1,this.nodes.forEach(ld)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||s2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!bh(this.targetLayout,m),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const $={...Zo(p,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($),this.setAnimationOrigin(u,x)}else f||ld(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(n2),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&&wh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(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(Jv),this.nodes.forEach(od);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(sd);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qv),this.nodes.forEach(e2),this.nodes.forEach(Kv),this.nodes.forEach(qv)):this.nodes.forEach(sd),this.clearAllSnapshots();const o=Se.now();be.delta=Je(0,1e3/60,o-be.timestamp),be.timestamp=o,be.isProcessing=!0,qi.update.process(be),qi.preRender.process(be),qi.render.process(be),be.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Zv),this.sharedNodes.forEach(i2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ae.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ce(this.snapshot.measuredBox.x)&&!Ce(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&&!vh(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(s||bt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),l2(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(d2))){const{scroll:l}=this.root;l&&(Ye(s.x,l.offset.x),Ye(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 c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Ve(s,o),Ye(s.x,u.offset.x),Ye(s.y,u.offset.y))}return s}applyTransform(o,s=!1,l){const c=l||ge();Ve(c,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Ye(c.x,-f.scroll.offset.x),Ye(c.y,-f.scroll.offset.y)),bt(f.latestValues)&&Cn(c,f.latestValues,f.layout?.layoutBox)}return bt(this.latestValues)&&Cn(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const s=ge();Ve(s,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!bt(c.latestValues))continue;let u;c.instance&&(Xa(c.latestValues)&&c.updateSnapshot(),u=ge(),Ve(u,c.measurePageBox())),Zl(s,c.latestValues,c.snapshot?.layoutBox,u)}return bt(this.latestValues)&&Zl(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!==be.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:c,layoutId:u}=this.options;if(!this.layout||!(c||u))return;this.resolvedRelativeTargetAt=be.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(),Ov(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),oh(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),Xe.value&&$t.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Xa(this.parent.latestValues)||ah(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===be.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Ve(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;av(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:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gl(this.prevProjectionDelta.x,this.projectionDelta.x),Gl(this.prevProjectionDelta.y,this.projectionDelta.y)),pr(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!rd(this.projectionDelta.x,this.prevProjectionDelta.x)||!rd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Xe.value&&$t.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,c=l?l.latestValues:{},u={...this.latestValues},f=Wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=ge(),m=(l?l.source:void 0)!==(this.layout?this.layout.source:void 0),p=this.getStack(),y=!p||p.members.length<=1,g=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(o2));this.animationProgress=0;let v;this.mixTargetDelta=x=>{const $=x/1e3;dd(f.x,o.x,$),dd(f.y,o.y,$),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),a2(this.relativeTarget,this.relativeTargetOrigin,h,$),v&&Mv(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ge()),Ve(v,this.relativeTarget)),m&&(this.animationValues=u,Rv(u,c,this.latestValues,$,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=$},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=ae.update(()=>{Pn.hasAnimatedSinceResize=!0,Pt.layout++,this.motionValue||(this.motionValue=Jt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vv(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(Gv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=o;if(!(!s||!l||!c)){if(this!==o&&this.layout&&c&&Ch(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ge();const f=Ce(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Ce(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Ve(s,l),Cn(s,u),pr(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Wv),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 c=this.getStack();c&&c.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 c={};l.z&&na("z",o,c,this.animationValues);for(let u=0;u<ra.length;u++)na(`rotate${ra[u]}`,o,c,this.animationValues),na(`skew${ra[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=Nn(s?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Nn(s?.pointerEvents)||""),this.hasProjected&&!bt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=kv(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Ja){if(u[p]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:v}=Ja[p],x=f==="none"?u[p]:y(u[p],c);if(g){const $=g.length;for(let w=0;w<$;w++)o[g[w]]=x}else v?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=c===this?Nn(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(od),this.root.sharedNodes.clear()}}}function Kv(e){e.updateLayout()}function qv(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")qe(u=>{const f=a?t.measuredBox[u]:t.layoutBox[u],h=Ce(f);f.min=r[u].min,f.max=f.min+h});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";Qa(a?t.measuredBox[u]:t.layoutBox[u],r[u])}else Ch(i,t.layoutBox,r)&&qe(u=>{const f=a?t.measuredBox[u]:t.layoutBox[u],h=Ce(r[u]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const o=Wt();pr(o,r,t.layoutBox);const s=Wt();a?pr(s,e.applyTransform(n,!0),t.measuredBox):pr(s,r,t.layoutBox);const l=!vh(o);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const m=e.options.layoutAnchor||void 0,p=ge();Zn(p,t.layoutBox,f.layoutBox,m);const y=ge();Zn(y,r,h.layoutBox,m),bh(p,y)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Yv(e){Xe.value&&$t.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 Xv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Zv(e){e.clearSnapshot()}function od(e){e.clearMeasurements()}function Jv(e){e.isLayoutDirty=!0,e.updateLayout()}function sd(e){e.isLayoutDirty=!1}function Qv(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function e2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ld(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t2(e){e.resolveTargetDelta()}function r2(e){e.calcProjection()}function n2(e){e.resetSkewAndRotation()}function i2(e){e.removeLeadSnapshot()}function dd(e,t,r){e.translate=le(t.translate,0,r),e.scale=le(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function cd(e,t,r,n){e.min=le(t.min,r.min,n),e.max=le(t.max,r.max,n)}function a2(e,t,r,n){cd(e.x,t.x,r.x,n),cd(e.y,t.y,r.y,n)}function o2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var s2={duration:.45,ease:[.4,0,.1,1]},ud=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fd=ud("applewebkit/")&&!ud("chrome/")?Math.round:Re;function hd(e){e.min=fd(e.min),e.max=fd(e.max)}function l2(e){hd(e.x),hd(e.y)}function Ch(e,t,r){return e==="position"||e==="preserve-aspect"&&!jv(td(t),td(r),.2)}function d2(e){return e!==e.root&&e.scroll?.wasRoot}var c2=Sh({attachResizeListener:(e,t)=>Sr(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},Nh=Sh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ia.current){const e=new c2({});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"}),ds=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function pd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function u2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=pd(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():pd(e[i],null)}}}}function f2(...e){return b.useCallback(u2(...e),e)}var h2=class extends b.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(bn(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=t.offsetParent,n=bn(r)&&r.offsetWidth||0,i=bn(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 p2({children:e,isPresent:t,anchorX:r,anchorY:n,root:i,pop:a}){const o=(0,b.useId)(),s=(0,b.useRef)(null),l=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=(0,b.useContext)(ds),u=f2(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{const{width:f,height:h,top:m,left:p,right:y,bottom:g}=l.current;if(t||a===!1||!s.current||!f||!h)return;const v=r==="left"?`left: ${p}`:`right: ${y}`,x=n==="bottom"?`bottom: ${g}`:`top: ${m}`;s.current.dataset.motionPopId=o;const $=document.createElement("style");c&&($.nonce=c);const w=i??document.head;return w.appendChild($),$.sheet&&$.sheet.insertRule(`
|
|
15
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),v.warnIfExceeded()),p}}}function en(e){return typeof e=="boolean"}var nm=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Eo;if(r&&(en(r)?o.push(Z0):o.push(J0(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};en(n)||(s=n),o.unshift(vd(s))}if(i){let s={};en(i)||(s=i),o.push(gd(s))}if(a){let s={};en(a)||(s=a),o.unshift(dd(s))}}return o},Oo="RTK_autoBatch",im=()=>e=>({payload:e,meta:{[Oo]:!0}}),Xs=e=>t=>{setTimeout(t,e)},$d=(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:Xs(10):e.type==="callback"?e.queueNotification:Xs(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}}})},am=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Eo(e);return n&&i.push($d(typeof n=="object"?n:void 0)),i};function bd(e){const t=nm(),{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,Te.isPlainObject)(r))l=(0,Te.combineReducers)(r);else throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(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"?ee(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(v=>typeof v!="function"))throw new Error(process.env.NODE_ENV==="production"?ee(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let v=new Set;u.forEach(y=>{if(v.has(y))throw new Error(process.env.NODE_ENV==="production"?ee(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");v.add(y)})}let d=Te.compose;i&&(d=Q0({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=(0,Te.applyMiddleware)(...u),h=am(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?ee(5):"`enhancers` field must be a callback");let m=typeof s=="function"?s(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(m))throw new Error(process.env.NODE_ENV==="production"?ee(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&m.some(v=>typeof v!="function"))throw new Error(process.env.NODE_ENV==="production"?ee(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&u.length&&!m.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const p=d(...m);return(0,Te.createStore)(l,o,p)}function xd(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"?ee(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?ee(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"?ee(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"?ee(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"?ee(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function om(e){return typeof e=="function"}function Sd(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?ee(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]=xd(t),a;if(om(e))a=()=>Ys(e());else{const s=Ys(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(Ae(d)){const h=f(d,l);return h===void 0?d:h}else{if(He(d))return $i(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 Cd=(e,t)=>ld(e)?e.match(t):e(t);function rr(...e){return t=>e.some(r=>Cd(r,t))}function Ln(...e){return t=>e.every(r=>Cd(r,t))}function xi(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 Nd(...e){return e.length===0?t=>xi(t,["pending"]):Vr(e)?rr(...e.map(t=>t.pending)):Nd()(e[0])}function Vn(...e){return e.length===0?t=>xi(t,["rejected"]):Vr(e)?rr(...e.map(t=>t.rejected)):Vn()(e[0])}function wd(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ln(Vn(...e),t):Vr(e)?Ln(Vn(...e),t):wd()(e[0])}function Pd(...e){return e.length===0?t=>xi(t,["fulfilled"]):Vr(e)?rr(...e.map(t=>t.fulfilled)):Pd()(e[0])}function Ed(...e){return e.length===0?t=>xi(t,["pending","fulfilled","rejected"]):Vr(e)?rr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ed()(e[0])}var sm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Br=(e=21)=>{let t="",r=e;for(;r--;)t+=sm[Math.random()*64|0];return t},lm=["name","message","stack","code"],Ui=class{constructor(e,t){this.payload=e,this.meta=t}_type},Zs=class{constructor(e,t){this.payload=e,this.meta=t}_type},Td=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of lm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Js="External signal was aborted",Si=(()=>{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||Td)(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 m=n?.idGenerator?n.idGenerator(l):Br(),p=new AbortController;let v,y;function g(b){y=b,p.abort()}u&&(u.aborted?g(Js):u.addEventListener("abort",()=>g(Js),{once:!0}));const x=(async function(){let b;try{let S=n?.condition?.(l,{getState:f,extra:h});if(cm(S)&&(S=await S),S===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,A)=>{v=()=>{A({name:"AbortError",message:y||"Aborted"})},p.signal.addEventListener("abort",v,{once:!0})});d(a(m,l,n?.getPendingMeta?.({requestId:m,arg:l},{getState:f,extra:h}))),b=await Promise.race([E,Promise.resolve(r(l,{dispatch:d,getState:f,extra:h,requestId:m,signal:p.signal,abort:g,rejectWithValue:(C,A)=>new Ui(C,A),fulfillWithValue:(C,A)=>new Zs(C,A)})).then(C=>{if(C instanceof Ui)throw C;return C instanceof Zs?i(C.payload,m,l,C.meta):i(C,m,l)})])}catch(S){b=S instanceof Ui?o(null,m,l,S.payload,S.meta):o(S,m,l)}finally{v&&p.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&o.match(b)&&b.meta.condition||d(b),b})();return Object.assign(x,{abort:g,requestId:m,arg:l,unwrap(){return x.then(Od)}})}}return Object.assign(s,{pending:a,rejected:o,fulfilled:i,settled:rr(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Od(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _d=Symbol.for("rtk-slice-createasyncthunk"),um={[_d]:Si},Ad=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Ad||{});function dm(e,t){return`${e}/${t}`}function jd({creators:e}={}){const t=e?.asyncThunk?.[_d];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?ee(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(hm()):n.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,S){const E=typeof b=="string"?b:b.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?ee(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?ee(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=S,u},addMatcher(b,S){return l.sliceMatchers.push({matcher:b,reducer:S}),u},exposeAction(b,S){return l.actionCreators[b]=S,u},exposeCaseReducer(b,S){return l.sliceCaseReducersByName[b]=S,u}};s.forEach(b=>{const S=o[b],E={reducerName:b,type:dm(i,b),createNotation:typeof n.reducers=="function"};mm(S)?ym(E,S,u,t):pm(E,S,u)});function d(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?ee(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[b={},S=[],E=void 0]=typeof n.extraReducers=="function"?xd(n.extraReducers):[n.extraReducers],C={...b,...l.sliceCaseReducersByType};return Sd(n.initialState,A=>{for(let N in C)A.addCase(N,C[N]);for(let N of l.sliceMatchers)A.addMatcher(N.matcher,N.reducer);for(let N of S)A.addMatcher(N.matcher,N.reducer);E&&A.addDefaultCase(E)})}const f=b=>b,h=new Map,m=new WeakMap;let p;function v(b,S){return p||(p=d()),p(b,S)}function y(){return p||(p=d()),p.getInitialState()}function g(b,S=!1){function E(A){let N=A[b];if(typeof N>"u"){if(S)N=St(m,E,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ee(15):"selectSlice returned undefined for an uninjected slice reducer")}return N}function C(A=f){return St(St(h,S,()=>new WeakMap),A,()=>{const N={};for(const[O,M]of Object.entries(n.selectors??{}))N[O]=fm(M,A,()=>St(m,A,y),S);return N})}return{reducerPath:b,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const x={name:i,reducer:v,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,...g(a),injectInto(b,{reducerPath:S,...E}={}){const C=S??a;return b.inject({reducerPath:C,reducer:v},E),{...x,...g(C,!0)}}};return x}}function fm(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"?ee(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...o)}return i.unwrapped=e,i}var jt=jd();function hm(){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 pm({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!vm(n))throw new Error(process.env.NODE_ENV==="production"?ee(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 mm(e){return e._reducerDefinitionType==="asyncThunk"}function vm(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ym({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?ee(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||tn,pending:s||tn,rejected:l||tn,settled:u||tn})}function tn(){}function gm(){return{ids:[],entities:{}}}function $m(e){function t(r={},n){const i=Object.assign(gm(),r);return n?e.setAll(i,n):i}return{getInitialState:t}}function bm(){function e(t,r={}){const{createSelector:n=sd}=r,i=f=>f.ids,a=f=>f.entities,o=n(i,a,(f,h)=>f.map(m=>h[m])),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 xm=Ae;function Sm(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 ud(o)}const a=o=>{i(n)?e(n.payload,o):e(n,o)};return xm(r)?(a(r),r):$i(r,a)}}function Lt(e,t){const r=t(e);return process.env.NODE_ENV!=="production"&&r===void 0&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),r}function ut(e){return Array.isArray(e)||(e=Object.values(e)),e}function mn(e){return Ae(e)?gi(e):e}function Id(e,t,r){e=ut(e);const n=mn(r.ids),i=new Set(n),a=[],o=new Set([]),s=[];for(const l of e){const u=Lt(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 Md(e){function t(p,v){const y=Lt(p,e);y in v.entities||(v.ids.push(y),v.entities[y]=p)}function r(p,v){p=ut(p);for(const y of p)t(y,v)}function n(p,v){const y=Lt(p,e);y in v.entities||v.ids.push(y),v.entities[y]=p}function i(p,v){p=ut(p);for(const y of p)n(y,v)}function a(p,v){p=ut(p),v.ids=[],v.entities={},r(p,v)}function o(p,v){return s([p],v)}function s(p,v){let y=!1;p.forEach(g=>{g in v.entities&&(delete v.entities[g],y=!0)}),y&&(v.ids=v.ids.filter(g=>g in v.entities))}function l(p){Object.assign(p,{ids:[],entities:{}})}function u(p,v,y){const g=y.entities[v.id];if(g===void 0)return!1;const x=Object.assign({},g,v.changes),b=Lt(x,e),S=b!==v.id;return S&&(p[v.id]=b,delete y.entities[v.id]),y.entities[b]=x,S}function d(p,v){return f([p],v)}function f(p,v){const y={},g={};p.forEach(x=>{x.id in v.entities&&(g[x.id]={id:x.id,changes:{...g[x.id]?.changes,...x.changes}})}),p=Object.values(g),p.length>0&&p.filter(x=>u(y,x,v)).length>0&&(v.ids=Object.values(v.entities).map(x=>Lt(x,e)))}function h(p,v){return m([p],v)}function m(p,v){const[y,g]=Id(p,e,v);r(y,v),f(g,v)}return{removeAll:Sm(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(m),removeOne:fe(o),removeMany:fe(s)}}function Cm(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 Nm(e,t,r){const n=Cm(e,t,r);return e.splice(n,0,t),e}function wm(e,t){const{removeOne:r,removeMany:n,removeAll:i}=Md(e);function a(y,g){return o([y],g)}function o(y,g,x){y=ut(y);const b=new Set(x??mn(g.ids)),S=new Set,E=y.filter(C=>{const A=Lt(C,e),N=!S.has(A);return N&&S.add(A),!b.has(A)&&N});E.length!==0&&v(g,E)}function s(y,g){return l([y],g)}function l(y,g){let x={};if(y=ut(y),y.length!==0){for(const b of y){const S=e(b);x[S]=b,delete g.entities[S]}y=ut(x),v(g,y)}}function u(y,g){y=ut(y),g.entities={},g.ids=[],o(y,g,[])}function d(y,g){return f([y],g)}function f(y,g){let x=!1,b=!1;for(let S of y){const E=g.entities[S.id];if(!E)continue;x=!0,Object.assign(E,S.changes);const C=e(E);if(S.id!==C){b=!0,delete g.entities[S.id];const A=g.ids.indexOf(S.id);g.ids[A]=C,g.entities[C]=E}}x&&v(g,[],x,b)}function h(y,g){return m([y],g)}function m(y,g){const[x,b,S]=Id(y,e,g);x.length&&o(x,g,S),b.length&&f(b,g)}function p(y,g){if(y.length!==g.length)return!1;for(let x=0;x<y.length;x++)if(y[x]!==g[x])return!1;return!0}const v=(y,g,x,b)=>{const S=mn(y.entities),E=mn(y.ids),C=y.entities;let A=E;b&&(A=new Set(E));let N=[];for(const B of A){const K=S[B];K&&N.push(K)}const O=N.length===0;for(const B of g)C[e(B)]=B,O||Nm(N,B,t);O?N=g.slice().sort(t):x&&N.sort(t);const M=N.map(e);p(E,M)||(y.ids=M)};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(m)}}function Pm(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:o=>o.id,...e},n=r?wm(t,r):Md(t),i=$m(n),a=bm();return{selectId:t,sortComparer:r,...i,...a,...n}}var Em="task",Dd="listener",Rd="completed",_o="cancelled",Tm=`task-${_o}`,Om=`task-${Rd}`,Ta=`${Dd}-${_o}`,_m=`${Dd}-${Rd}`,Ur=class{constructor(e){this.code=e,this.message=`${Em} ${_o} (reason: ${e})`}name="TaskAbortError";message},Ao=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?ee(32):`${t} is not a function`)},Bn=()=>{},kd=(e,t=Bn)=>(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 Ld(e,t){let r=Bn;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=Bn})}var Am=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?.()}},Un=e=>t=>kd(Ld(e,t).then(r=>(wt(e),r))),Vd=e=>{const t=Un(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Gt}=Object,Qs={},Wr="listenerMiddleware",jm=(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=Am(async()=>{wt(e),wt(a.signal);const s=await n({pause:Un(a.signal),delay:Vd(a.signal),signal:a.signal});return wt(a.signal),s},()=>a.abort(Om));return i?.autoJoin&&t.push(o.catch(Bn)),{result:Un(e)(o),cancel(){a.abort(Tm)}}}},Im=(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 Ld(t,Promise.race(o));return wt(t),s}finally{a()}};return(n,i)=>kd(r(n,i))},Bd=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"?ee(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}},Ud=Gt(e=>{const{type:t,predicate:r,effect:n}=Bd(e);return{id:Br(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?ee(22):"Unsubscribe not initialized")}}},{withTypes:()=>Ud}),el=(e,t)=>{const{type:r,effect:n,predicate:i}=Bd(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)})},Mm=(e,t)=>()=>{for(const r of t.keys())Oa(r);e.clear()},tl=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},jo=Gt(We(`${Wr}/add`),{withTypes:()=>jo}),Wd=We(`${Wr}/removeAll`),Io=Gt(We(`${Wr}/remove`),{withTypes:()=>Io}),Dm=(...e)=>{console.error(`${Wr}/error`,...e)},Rm=(e={})=>{const t=new Map,r=new Map,n=m=>{const p=r.get(m)??0;r.set(m,p+1)},i=m=>{const p=r.get(m)??1;p===1?r.delete(m):r.set(m,p-1)},{extra:a,onError:o=Dm}=e;Ao(o,"onError");const s=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),p=>{m.unsubscribe(),p?.cancelActive&&Oa(m)}),l=m=>s(el(t,m)??Ud(m));Gt(l,{withTypes:()=>l});const u=m=>{const p=el(t,m);return p&&(p.unsubscribe(),m.cancelActive&&Oa(p)),!!p};Gt(u,{withTypes:()=>u});const d=async(m,p,v,y)=>{const g=new AbortController,x=Im(l,g.signal),b=[];try{m.pending.add(g),n(m),await Promise.resolve(m.effect(p,Gt({},v,{getOriginalState:y,condition:(S,E)=>x(S,E).then(Boolean),take:x,delay:Vd(g.signal),pause:Un(g.signal),extra:a,signal:g.signal,fork:jm(g.signal,b),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((S,E,C)=>{S!==g&&(S.abort(Ta),C.delete(S))})},cancel:()=>{g.abort(Ta),m.pending.delete(g)},throwIfCancelled:()=>{wt(g.signal)}})))}catch(S){S instanceof Ur||tl(o,S,{raisedBy:"effect"})}finally{await Promise.all(b),g.abort(_m),i(m),m.pending.delete(g)}},f=Mm(t,r);return{middleware:m=>p=>v=>{if(!(0,Te.isAction)(v))return p(v);if(jo.match(v))return l(v.payload);if(Wd.match(v)){f();return}if(Io.match(v))return u(v.payload);let y=m.getState();const g=()=>{if(y===Qs)throw new Error(process.env.NODE_ENV==="production"?ee(23):`${Wr}: getOriginalState can only be called synchronously`);return y};let x;try{if(x=p(v),t.size>0){const b=m.getState(),S=Array.from(t.values());for(const E of S){let C=!1;try{C=E.predicate(v,b,y)}catch(A){C=!1,tl(o,A,{raisedBy:"predicate"})}C&&d(E,v,m,g)}}}finally{y=Qs}return x},startListening:l,stopListening:u,clearListeners:f}},km=e=>({middleware:e,applied:new Map}),Fm=e=>t=>t?.meta?.instanceId===e,Lm=()=>{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,km)})},{withTypes:()=>n}),i=s=>(0,Te.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}},Vm=e=>"reducerPath"in e&&typeof e.reducerPath=="string",Bm=e=>e.flatMap(t=>Vm(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),Mo=Symbol.for("rtk-state-proxy-original"),Um=e=>!!e&&!!e[Mo],Wm=new WeakMap,zm=(e,t,r)=>St(Wm,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"?ee(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}})),Gm=e=>{if(!Um(e))throw new Error(process.env.NODE_ENV==="production"?ee(25):"original must be used on state Proxy");return e[Mo]},Hm={},Km=(e=Hm)=>e;function qm(...e){const t=Object.fromEntries(Bm(e)),r=()=>Object.keys(t).length?(0,Te.combineReducers)(t):Km;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,...m){return u(zm(d?d(h,...m):h,t,a),...m)}},{original:Gm});return Object.assign(i,{inject:o,selector:s})}function ee(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"],Ym={currentStep:"services",completedSteps:["services"],isOrder:!0},zd=jt({name:"breadcrumbs",initialState:Ym,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:Xm,goToStep:_a,completeStep:V5,nextStep:we,prevStep:B5,clearSteps:U5}=zd.actions,Zm=zd.reducer,rl={id:"",outletName:"",timeZone:"",image:"",tenantId:"",address:"",isOpen:!1,outletTimeZoneDate:"",outletTimeZoneYear:"",createdAt:"",isService:!0,currency:"",token:""},Gd=jt({name:"outletDetails",initialState:rl,reducers:{clearBooking:()=>rl,setOutletData:(e,t)=>({...e,...t.payload}),setOutletToken:(e,t)=>{e.token=t.payload}}}),{clearBooking:Jm,setOutletData:Qm,setOutletToken:e1}=Gd.actions,t1=Gd.reducer,nl={standaloneCategories:[],superCategories:[],staff:[],selectedCategory:null,selectedServices:[],selectedProfessional:null},Hd=jt({name:"service",initialState:nl,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:()=>nl}}),{setServicePayload:r1,setCategory:Wn,toggleService:zn,clearServices:W5,incrementService:Kd,decrementService:Gn,toggleProfessional:qd}=Hd.actions,n1=Hd.reducer,st="https://prod.aaravpos.com/api/v1",mt=()=>({"Content-Type":"application/json",Authorization:`Bearer ${Ci.getState()?.outletDetails?.token}`}),il=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()},i1=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()},a1=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()},o1=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()},s1=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()},l1=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}},c1=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}},al=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},ol=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},sl=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()},u1=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 m=await fetch(`${st}/concent/customer-sign`,{method:"POST",headers:mt(),body:JSON.stringify(h)}),p=await m.json();if(!m.ok)throw p;return p},vn=Si("slots/getStaffSlots",async({tenantId:e,staffId:t,date:r})=>await i1(e,t,r)),Yd=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(vn.pending,t=>{t.loading=!0}).addCase(vn.fulfilled,(t,r)=>{t.loading=!1,t.slots=r.payload?.data?.groups||{morning:[],afternoon:[],evening:[]}}).addCase(vn.rejected,t=>{t.loading=!1})}}),{setSelectedSlots:zi,clearSlots:z5,setSelectedDate:Ht,setSelectedTime:Gi}=Yd.actions,d1=Yd.reducer,yn=Si("appointment/create",async(e,{rejectWithValue:t})=>{try{return await a1(e)}catch(r){return t(r?.message||r?.error||r?.data?.message||r?.response?.data?.message||"Failed to create appointment")}}),ll={loading:!1,success:!1,error:null,data:null,appointmentId:null,customerId:null,userDetails:null,tipPct:0,bookingMode:"booking"},Xd=jt({name:"appointment",initialState:ll,reducers:{resetAppointment:()=>ll,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(yn.pending,t=>{t.loading=!0,t.error=null}).addCase(yn.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(yn.rejected,(t,r)=>{t.loading=!1,t.error=r.payload||"Appointment failed"})}}),{resetAppointment:G5,setBookingMode:H5,setUserDetails:cl,setTips:f1,setAppointmentId:Hi,clearUserDetails:h1}=Xd.actions,p1=Xd.reducer,Zd=jt({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:m1,clearOutletList:K5}=Zd.actions,v1=Zd.reducer;function gn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gn=function(r){return typeof r}:gn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gn(e)}function Ki(){}var y1={getItem:Ki,setItem:Ki,removeItem:Ki};function g1(e){if((typeof self>"u"?"undefined":gn(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 $1(e){var t="".concat(e,"Storage");return g1(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),y1)}function b1(e){var t=$1(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 ul=(0,ad.combineReducers)({breadcrumbs:Zm,outletDetails:t1,service:n1,slots:d1,appointment:p1,outletList:v1}),x1=(e,t)=>t.type==="RESET_ALL"?ul({breadcrumbs:void 0,outletDetails:void 0,service:void 0,slots:void 0,appointment:void 0,outletList:e?.outletList},t):ul(e,t),S1=()=>({getItem(){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(){return Promise.resolve()}}),C1=(0,ct.persistReducer)({key:"root",storage:typeof window<"u"?b1("local"):S1()},x1),Ci=bd({reducer:C1,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)(Ci),q5=Ci.getState;function N1({children:e}){return(0,c.jsx)(G.Provider,{store:Ci,children:(0,c.jsx)(Ku,{loading:null,persistor:Ro,children:e})})}var w1=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 Fo(e){const t=(0,$.useRef)(null);return t.current===null&&(t.current=e()),t.current}var P1=typeof window<"u",Jd=P1?$.useLayoutEffect:$.useEffect,Ni=(0,$.createContext)(null);function Lo(e,t){e.indexOf(t)===-1&&e.push(t)}function Hn(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={},Qd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ef(e){return typeof e=="object"&&e!==null}var tf=e=>/^0[^.\s]+$/u.test(e);function rf(e){let t;return()=>(t===void 0&&(t=e()),t)}var ke=e=>e,E1=(e,t)=>r=>t(e(r)),zr=(...e)=>e.reduce(E1),br=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Vo=class{constructor(){this.subscriptions=[]}add(e){return Lo(this.subscriptions,e),()=>Hn(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}},_e=e=>e*1e3,Re=e=>e/1e3;function nf(e,t){return t?e*(1e3/t):0}var dl=new Set;function Bo(e,t,r){e||dl.has(t)||(console.warn(Aa(t,r)),dl.add(t))}var af=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,T1=1e-7,O1=12;function _1(e,t,r,n,i){let a,o,s=0;do o=t+(r-t)/2,a=af(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>T1&&++s<O1);return o}function Gr(e,t,r,n){if(e===t&&r===n)return ke;const i=a=>_1(a,0,1,e,r);return a=>a===0||a===1?a:af(i(a),t,n)}var of=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sf=e=>t=>1-e(1-t),lf=Gr(.33,1.53,.69,.99),Uo=sf(lf),cf=of(Uo),uf=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)),df=sf(Wo),ff=of(Wo),A1=Gr(.42,0,1,1),j1=Gr(0,0,.58,1),hf=Gr(.42,0,.58,1),I1=e=>Array.isArray(e)&&typeof e[0]!="number",pf=e=>Array.isArray(e)&&typeof e[0]=="number",fl={linear:ke,easeIn:A1,easeInOut:hf,easeOut:j1,circIn:Wo,circInOut:ff,circOut:df,backIn:Uo,backInOut:cf,backOut:lf,anticipate:uf},M1=e=>typeof e=="string",hl=e=>{if(pf(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(M1(e))return at(fl[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),fl[e];return e},rn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ze={value:null,addProjectionMetrics:null};function D1(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,m=!1)=>{const p=m&&i?r:n;return h&&o.add(f),p.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 R1=40;function mf(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=rn.reduce((b,S)=>(b[S]=D1(a,t?S:void 0),b),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:p}=o,v=()=>{const b=ft.useManualTiming,S=b?i.timestamp:performance.now();r=!1,b||(i.delta=n?1e3/60:Math.max(Math.min(S-i.timestamp,R1),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),m.process(i),p.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(v))},y=()=>{r=!0,n=!0,i.isProcessing||e(v)};return{schedule:rn.reduce((b,S)=>{const E=o[S];return b[S]=(C,A=!1,N=!1)=>(r||y(),E.schedule(C,A,N)),b},{}),cancel:b=>{for(let S=0;S<rn.length;S++)o[rn[S]].cancel(b)},state:i,steps:o}}var{schedule:ae,cancel:ht,state:be,steps:qi}=mf(typeof requestAnimationFrame<"u"?requestAnimationFrame:ke,!0),$n;function k1(){$n=void 0}var Ce={now:()=>($n===void 0&&Ce.set(be.isProcessing||ft.useManualTiming?be.timestamp:performance.now()),$n),set:e=>{$n=e,queueMicrotask(k1)}},Pt={layout:0,mainThread:0,waapi:0},vf=e=>t=>typeof t=="string"&&t.startsWith(e),yf=vf("--"),F1=vf("var(--"),zo=e=>F1(e)?L1.test(e.split("/*")[0].trim()):!1,L1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pl(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)},nn={...ir,default:1},hr=e=>Math.round(e*1e5)/1e5,Go=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V1(e){return e==null}var B1=/^(?:#[\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"&&B1.test(r)&&r.startsWith(e)||t&&!V1(r)&&Object.prototype.hasOwnProperty.call(r,t)),gf=(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}},U1=e=>Qe(0,255,e),Yi={...ir,transform:e=>Math.round(U1(e))},Ct={test:Ho("rgb","red"),parse:gf("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Yi.transform(e)+", "+Yi.transform(t)+", "+Yi.transform(r)+", "+hr(xr.transform(n))+")"};function W1(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:W1,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("%"),L=Hr("px"),z1=Hr("vh"),G1=Hr("vw"),ml={...Je,parse:e=>Je.parse(e)/100,transform:e=>Je.transform(e*100)},Vt={test:Ho("hsl","hue"),parse:gf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Je.transform(hr(t))+", "+Je.transform(hr(r))+", "+hr(xr.transform(n))+")"},pe={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=pe.parse(e);return t.alpha=0,pe.transform(t)}},H1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function K1(e){return isNaN(e)&&typeof e=="string"&&(e.match(Go)?.length||0)+(e.match(H1)?.length||0)>0}var $f="number",bf="color",q1="var",Y1="var(",vl="${}",X1=/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(X1,o=>(pe.test(o)?(n.color.push(a),i.push(bf),r.push(pe.parse(o))):o.startsWith(Y1)?(n.var.push(a),i.push(q1),r.push(o)):(n.number.push(a),i.push($f),r.push(parseFloat(o))),++a,vl)).split(vl),indexes:n,types:i}}function Z1(e){return Xt(e).values}function xf({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===$f?i+=hr(n[a]):o===bf?i+=pe.transform(n[a]):i+=n[a]}return i}}function J1(e){return xf(Xt(e))}var Q1=e=>typeof e=="number"?0:pe.test(e)?pe.getAnimatableNone(e):e,ev=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Q1(e);function tv(e){const t=Xt(e);return xf(t)(t.values.map((r,n)=>ev(r,t.split[n])))}var ze={test:K1,parse:Z1,createTransformer:J1,getAnimatableNone:tv};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 rv({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 Kn(e,t){return r=>r>0?t:e}var le=(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)},nv=[ja,Ct,Vt],iv=e=>nv.find(t=>t.test(e));function yl(e){const t=iv(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=rv(r)),r}var gl=(e,t)=>{const r=yl(e),n=yl(t);if(!r||!n)return Kn(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=le(r.alpha,n.alpha,a),Ct.transform(i))},Ia=new Set(["none","hidden"]);function av(e,t){return Ia.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function ov(e,t){return r=>le(e,t,r)}function Ko(e){return typeof e=="number"?ov:typeof e=="string"?zo(e)?Kn:pe.test(e)?gl:cv:Array.isArray(e)?Sf:typeof e=="object"?pe.test(e)?gl:sv:Kn}function Sf(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 sv(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 lv(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 cv=(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?av(e,t):zr(Sf(lv(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"),Kn(e,t))};function Cf(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?le(e,t,r):Ko(e)(e,t)}var uv=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>ae.update(t,r),stop:()=>ht(t),now:()=>be.isProcessing?be.timestamp:Ce.now()}},Nf=(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)})`},wf=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 dv(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(qo(n),wf);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Re(i)}}var ue={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 fv=12;function hv(e,t,r){let n=r;for(let i=1;i<fv;i++)n=n-e(n)/t(n);return n}var Ji=.001;function pv({duration:e=ue.duration,bounce:t=ue.bounce,velocity:r=ue.velocity,mass:n=ue.mass}){let i,a;nr(e<=_e(ue.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Qe(ue.minDamping,ue.maxDamping,o),e=Qe(ue.minDuration,ue.maxDuration,Re(e)),o<1?(i=u=>{const d=u*o,f=d*e,h=d-r,m=Ma(u,o),p=Math.exp(-f);return Ji-h/m*p},a=u=>{const d=u*o*e,f=d*r+r,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),p=Ma(Math.pow(u,2),o);return(-i(u)+Ji>0?-1:1)*((f-h)*m)/p}):(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=hv(i,a,s);if(e=_e(e),isNaN(l))return{stiffness:ue.stiffness,damping:ue.damping,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var mv=["duration","bounce"],vv=["stiffness","damping","mass"];function $l(e,t){return t.some(r=>e[r]!==void 0)}function yv(e){let t={velocity:ue.velocity,stiffness:ue.stiffness,damping:ue.damping,mass:ue.mass,isResolvedFromDuration:!1,...e};if(!$l(e,vv)&&$l(e,mv))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:ue.mass,stiffness:i,damping:a}}else{const r=pv({...e,velocity:0});t={...t,...r,mass:ue.mass},t.isResolvedFromDuration=!0}return t}function qn(e=ue.visualDuration,t=ue.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:m}=yv({...r,velocity:-Re(r.velocity||0)}),p=h||0,v=u/(2*Math.sqrt(l*d)),y=o-a,g=Re(Math.sqrt(l/d)),x=Math.abs(y)<5;n||(n=x?ue.restSpeed.granular:ue.restSpeed.default),i||(i=x?ue.restDelta.granular:ue.restDelta.default);let b,S,E,C,A,N;if(v<1)E=Ma(g,v),C=(p+v*g*y)/E,b=M=>o-Math.exp(-v*g*M)*(C*Math.sin(E*M)+y*Math.cos(E*M)),A=v*g*C+y*E,N=v*g*y-C*E,S=M=>Math.exp(-v*g*M)*(A*Math.sin(E*M)+N*Math.cos(E*M));else if(v===1){b=B=>o-Math.exp(-g*B)*(y+(p+g*y)*B);const M=p+g*y;S=B=>Math.exp(-g*B)*(g*M*B-p)}else{const M=g*Math.sqrt(v*v-1);b=w=>{const R=Math.exp(-v*g*w),W=Math.min(M*w,300);return o-R*((p+v*g*y)*Math.sinh(W)+M*y*Math.cosh(W))/M};const B=(p+v*g*y)/M,K=v*g*B-y*M,te=v*g*y-B*M;S=w=>{const R=Math.exp(-v*g*w),W=Math.min(M*w,300);return R*(K*Math.sinh(W)+te*Math.cosh(W))}}const O={calculatedDuration:m&&f||null,velocity:M=>_e(S(M)),next:M=>{if(!m&&v<1){const K=Math.exp(-v*g*M),te=Math.sin(E*M),w=Math.cos(E*M),R=o-K*(C*te+y*w),W=_e(K*(A*te+N*w));return s.done=Math.abs(W)<=n&&Math.abs(o-R)<=i,s.value=s.done?o:R,s}const B=b(M);if(m)s.done=M>=f;else{const K=_e(S(M));s.done=Math.abs(K)<=n&&Math.abs(o-B)<=i}return s.value=s.done?o:B,s},toString:()=>{const M=Math.min(qo(O),wf),B=Nf(K=>O.next(M*K).value,M,30);return M+"ms "+B},toTransition:()=>{}};return O}qn.applyToOptions=e=>{const t=dv(e,100,qn);return e.ease=t.ease,e.duration=_e(t.duration),e.type="keyframes",e};var gv=5;function Pf(e,t,r){const n=Math.max(t-gv,0);return nf(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},m=N=>s!==void 0&&N<s||l!==void 0&&N>l,p=N=>s===void 0?l:l===void 0||Math.abs(s-N)<Math.abs(l-N)?s:l;let v=r*t;const y=f+v,g=o===void 0?y:o(y);g!==y&&(v=g-f);const x=N=>-v*Math.exp(-N/n),b=N=>g+x(N),S=N=>{const O=x(N),M=b(N);h.done=Math.abs(O)<=u,h.value=h.done?g:M};let E,C;const A=N=>{m(h.value)&&(E=N,C=qn({keyframes:[h.value,p(h.value)],velocity:Pf(b,N,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return A(0),{calculatedDuration:null,next:N=>{let O=!1;return!C&&E===void 0&&(O=!0,S(N),A(N)),E!==void 0&&N>=E?C.next(N-E):(!O&&S(N),h)}}}function $v(e,t,r){const n=[],i=r||ft.mix||Cf,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 bv(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=$v(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 xv(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=br(0,t,n);e.push(le(r,1,i))}}function Sv(e){const t=[0];return xv(t,e.length-1),t}function Cv(e,t){return e.map(r=>r*t)}function Nv(e,t){return e.map(()=>t||hf).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=I1(n)?n.map(hl):hl(n),a={done:!1,value:t[0]},o=bv(Cv(r&&r.length===t.length?r:Sv(t),e),t,{ease:Array.isArray(i)?i:Nv(t,i)});return{calculatedDuration:e,next:s=>(a.value=o(s),a.done=s>=e,a)}}var wv=e=>e!==null;function wi(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(wv),o=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}var Pv={decay:Da,inertia:Da,tween:Bt,keyframes:Bt,spring:qn};function Ef(e){typeof e.type=="string"&&(e.type=Pv[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)}},Ev=e=>e/100,Yn=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!==Ce.now()&&this.tick(Ce.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;Ef(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(Ev,Cf(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:m,onUpdate:p,finalKeyframe:v}=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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let x=this.currentTime,b=r;if(d){const A=Math.min(this.currentTime,n)/o;let N=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&N--,N=Math.min(N,d+1),N%2&&(f==="reverse"?(O=1-O,h&&(O-=h/o)):f==="mirror"&&(b=a)),x=Qe(0,1,O)*o}let S;g?(this.delayState.value=u[0],S=this.delayState):S=b.next(x),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&&m!==Da&&(S.value=wi(u,this.options,v,this.speed)),p&&p(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=_e(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 Pf(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(Ce.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=uv,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(Ce.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 Tv(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]))),Ov={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),bl=Ra,xl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Sl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_v={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:xl,scaleY:Sl,scale:e=>(xl(e)+Sl(e))/2,rotateX:e=>ka(Nt(Math.atan2(e[6],e[5]))),rotateY:e=>ka(Nt(Math.atan2(-e[2],e[0]))),rotateZ:bl,rotate:bl,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 Fa(e){return e.includes("scale")?1:0}function La(e,t){if(!e||e==="none")return Fa(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=_v,i=r;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ov,i=s}if(!i)return Fa(t);const a=n[t],o=i[1].split(",").map(jv);return typeof a=="function"?a(o):o[a]}var Av=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return La(r,t)};function jv(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),Cl=e=>e===ir||e===L,Iv=new Set(["x","y","z"]),Mv=ar.filter(e=>!Iv.has(e));function Dv(e){const t=[];return Mv.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})=>La(t,"x"),y:(e,{transform:t})=>La(t,"y")};dt.translateX=dt.x;dt.translateY=dt.y;var Et=new Set,Va=!1,Ba=!1,Ua=!1;function Tf(){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=Dv(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 Of(){Et.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ba=!0)})}function Rv(){Ua=!0,Of(),Tf(),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,ae.read(Of),ae.resolveKeyframes(Tf))):(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])}Tv(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()}},kv=e=>e.startsWith("--");function _f(e,t,r){kv(t)?e.style.setProperty(t,r):e.style[t]=r}var Fv={};function Af(e,t){const r=rf(e);return()=>Fv[t]??r()}var Lv=Af(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),jf=Af(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fr=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,Nl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fr([0,.65,.55,1]),circOut:fr([.55,0,1,.45]),backIn:fr([.31,.01,.66,-.59]),backOut:fr([.33,1.53,.69,.99])};function If(e,t){if(e)return typeof e=="function"?jf()?Nf(e,t):"ease-out":pf(e)?fr(e):Array.isArray(e)?e.map(r=>If(r,t)||Nl.easeOut):Nl[e]}function Vv(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=If(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 m=e.animate(d,h);return Ze.value&&m.finished.finally(()=>{Pt.waapi--}),m}function Mf(e){return typeof e=="function"&&"applyToOptions"in e}function Bv({type:e,...t}){return Mf(e)&&jf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Df=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=Bv(e);this.animation=Vv(t,r,n,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=wi(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(u),_f(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=_e(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&&Lv()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),ke):n(this)}},Rf={anticipate:uf,backInOut:cf,circInOut:ff};function Uv(e){return e in Rf}function Wv(e){typeof e.ease=="string"&&Uv(e.ease)&&(e.ease=Rf[e.ease])}var Qi=10,zv=class extends Df{constructor(e){Wv(e),Ef(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 Yn({...a,autoplay:!1}),s=Math.max(Qi,Ce.now()-this.startTime),l=Qe(0,Qi,s-Qi),u=o.sample(s).value,{name:d}=this.options;i&&d&&_f(i,d,u),t.setWithVelocity(o.sample(Math.max(0,s-l)).value,u,l),o.stop()}},wl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ze.test(e)||e==="0")&&!e.startsWith("url("));function Gv(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 Hv(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=wl(i,t),s=wl(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:Gv(e)||(r==="spring"||Mf(r))&&n}function Wa(e){e.duration=0,e.type="keyframes"}var kf=new Set(["opacity","clipPath","filter","transform"]),Kv=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function qv(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Kv.test(e[t]))return!0;return!1}var Yv=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Xv=rf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zv(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 Xv()&&r&&(kf.has(r)||Yv.has(r)&&qv(s))&&(r!=="transform"||!u)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}var Jv=40,Qv=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=Ce.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,(m,p,v)=>this.onKeyframesResolved(m,p,f,!v),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=Ce.now();let d=!0;Hv(e,i,a,o)||(d=!1,(ft.instantAnimations||!s)&&u?.(wi(e,r,t)),e[0]=e[e.length-1],Wa(r),r.repeat=0);const f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>Jv?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},h=d&&!l&&Zv(f),m=f.motionValue?.owner?.current;let p;if(h)try{p=new zv({...f,element:m})}catch{p=new Yn(f)}else p=new Yn(f);p.finished.then(()=>{this.notifyFinished()}).catch(ke),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),Rv()),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 ey=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ty(e){const t=ey.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}var ry=4;function Lf(e,t,r=1){at(r<=ry,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,i]=ty(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return Qd(o)?parseFloat(o):o}return zo(i)?Lf(i,t,r+1):i}var ny={type:"spring",stiffness:500,damping:25,restSpeed:10},iy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ay={type:"keyframes",duration:.8},oy={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sy=(e,{keyframes:t})=>t.length>2?ay:or.has(e)?e.startsWith("scale")?iy(t[1]):ny:oy;function Vf(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?Vf(r,e):r}var ly=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cy(e){for(const t in e)if(!ly.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-_e(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};cy(s)||Object.assign(d,sy(e,d)),d.duration&&(d.duration=_e(d.duration)),d.repeatDelay&&(d.repeatDelay=_e(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=wi(d.keyframes,s);if(h!==void 0){ae.update(()=>{d.onUpdate(h),d.onComplete()});return}}return s.isSync?new Yn(d):new Qv(d)};function Pl(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]=Pl(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]=Pl(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 Bf=new Set(["width","height","top","left","right","bottom",...ar]),El=30,uy=e=>!isNaN(parseFloat(e)),Tl={current:void 0},dy=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const n=Ce.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=Ce.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uy(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(),ae.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 Tl.current&&Tl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>El)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,El);return nf(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 dy(e,t)}var za=e=>Array.isArray(e);function fy(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Zt(r))}function hy(e){return za(e)?e[e.length-1]||0:e}function py(e,t){let{transitionEnd:r={},transition:n={},...i}=Tt(e,t)||{};i={...i,...r};for(const a in i)fy(e,a,hy(i[a]))}var xe=e=>!!(e&&e.getVelocity);function my(e){return!!(xe(e)&&e.add)}function Ga(e,t){const r=e.getValue("willChange");if(my(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 vy="framerAppearId",Uf="data-"+es(vy);function Wf(e){return e.props[Uf]}function yy({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function zf(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Vf(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 m=e.getValue(h,e.latestValues[h]??null),p=s[h];if(p===void 0||f&&yy(f,h))continue;const v={delay:r,...Zo(a||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(p)&&p===y&&!v.velocity){ae.update(()=>m.set(p));continue}let g=!1;if(window.MotionHandoffAnimation){const S=Wf(e);if(S){const E=window.MotionHandoffAnimation(S,h,ae);E!==null&&(v.startTime=E,g=!0)}}Ga(e,h);const x=u??e.shouldReduceMotion;m.start(Jo(h,m,p,x&&Bf.has(h)?{type:!1}:v,e,g));const b=m.animation;b&&d.push(b)}if(o){const h=()=>ae.update(()=>{o&&py(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(zf(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return gy(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 gy(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 $y(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(zf(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var by={test:e=>e==="auto",parse:e=>e},Gf=e=>t=>t.test(e),Hf=[ir,L,Je,lt,G1,z1,by],Ol=e=>Hf.find(Gf(e));function xy(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tf(e):!0}var Sy=new Set(["brightness","contrast","saturate","opacity"]);function Cy(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=Sy.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}var Ny=/\b([a-z-]*)\(.*?\)/gu,Ka={...ze,getAnimatableNone:e=>{const t=e.match(Ny);return t?t.map(Cy).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))}},_l={...ir,transform:Math.round},wy={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:nn,scaleX:nn,scaleY:nn,scaleZ:nn,skew:lt,skewX:lt,skewY:lt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:xr,originX:ml,originY:ml,originZ:L},ts={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,...wy,zIndex:_l,fillOpacity:xr,strokeOpacity:xr,numOctaves:_l},Py={...ts,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:Ka,WebkitFilter:Ka,mask:qa,WebkitMask:qa},Kf=e=>Py[e],Ey=new Set([Ka,qa]);function qf(e,t){let r=Kf(e);return Ey.has(r)||(r=ze),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Ty=new Set(["auto","none","0"]);function Oy(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!Ty.has(a)&&Xt(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=qf(r,i)}var _y=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=Lf(l,t.current);u!==void 0&&(e[s]=u),s===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Bf.has(r)||e.length!==2)return;const[n,i]=e,a=Ol(n),o=Ol(i);if(pl(n)!==pl(i)&&dt[r]){this.needsMeasurement=!0;return}if(a!==o)if(Cl(a)&&Cl(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||xy(e[n]))&&r.push(n);r.length&&Oy(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 Yf(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 Xf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function bn(e){return ef(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:rs,cancel:Y5}=mf(queueMicrotask,!1),Ue={x:!1,y:!1};function Zf(){return Ue.x||Ue.y}function Ay(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 Jf(e,t){const r=Yf(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function jy(e){return!(e.pointerType==="touch"||Zf())}function Iy(e,t,r={}){const[n,i,a]=Jf(e,r);return n.forEach(o=>{let s=!1,l=!1,u;const d=()=>{o.removeEventListener("pointerleave",p)},f=y=>{u&&(u(y),u=void 0),d()},h=y=>{s=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,f(y))},m=()=>{s=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=y=>{if(y.pointerType!=="touch"){if(s){l=!0;return}f(y)}},v=y=>{if(!jy(y))return;l=!1;const g=t(o,y);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",v,i),o.addEventListener("pointerdown",m,i)}),a}var Qf=(e,t)=>t?e===t?!0:Qf(e,t.parentElement):!1,ns=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,My=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dy(e){return My.has(e.tagName)||e.isContentEditable===!0}var Ry=new Set(["INPUT","SELECT","TEXTAREA"]);function ky(e){return Ry.has(e.tagName)||e.isContentEditable===!0}var xn=new WeakSet;function Al(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=Al(()=>{if(xn.has(r))return;ea(r,"down");const i=Al(()=>{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 jl(e){return ns(e)&&!Zf()}var Il=new WeakSet;function Ly(e,t,r={}){const[n,i,a]=Jf(e,r),o=s=>{const l=s.currentTarget;if(!jl(s)||Il.has(s))return;xn.add(l),r.stopPropagation&&Il.add(s);const u=t(l,s),d=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),xn.has(l)&&xn.delete(l),jl(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{d(m,l===window||l===document||r.useGlobalTarget||Qf(l,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),bn(s)&&(s.addEventListener("focus",l=>Fy(l,i)),!Dy(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function is(e){return ef(e)&&"ownerSVGElement"in e}var Sn=new WeakMap,Cn,eh=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:is(n)&&"getBBox"in n?n.getBBox()[t]:n[r],Vy=eh("inline","width","offsetWidth"),By=eh("block","height","offsetHeight");function Uy({target:e,borderBoxSize:t}){Sn.get(e)?.forEach(r=>{r(e,{get width(){return Vy(e,t)},get height(){return By(e,t)}})})}function Wy(e){e.forEach(Uy)}function zy(){typeof ResizeObserver>"u"||(Cn=new ResizeObserver(Wy))}function Gy(e,t){Cn||zy();const r=Yf(e);return r.forEach(n=>{let i=Sn.get(n);i||(i=new Set,Sn.set(n,i)),i.add(t),Cn?.observe(n)}),()=>{r.forEach(n=>{const i=Sn.get(n);i?.delete(t),i?.size||Cn?.unobserve(n)})}}var Nn=new Set,Ut;function Hy(){Ut=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nn.forEach(t=>t(e))},window.addEventListener("resize",Ut)}function Ky(e){return Nn.add(e),Ut||Hy(),()=>{Nn.delete(e),!Nn.size&&typeof Ut=="function"&&(window.removeEventListener("resize",Ut),Ut=void 0)}}function Ml(e,t){return typeof e=="function"?Ky(e):Gy(e,t)}function qy(e){return is(e)&&e.tagName==="svg"}var Yy=[...Hf,pe,ze],Xy=e=>Yy.find(Gf(e)),Dl=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:Dl(),y:Dl()}),Rl=()=>({min:0,max:0}),ge=()=>({x:Rl(),y:Rl()}),Zy=new WeakMap;function Pi(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 Ei(e){return Pi(e.animate)||os.some(t=>Sr(e[t]))}function th(e){return!!(Ei(e)||e.variants)}function Jy(e,t,r){for(const n in t){const i=t[n],a=r[n];if(xe(i))e.addValue(n,i);else if(xe(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},rh={current:!1},Qy=typeof window<"u";function eg(){if(rh.current=!0,!!Qy)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 kl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Xn={};function nh(e){Xn=e}function tg(){return Xn}var rg=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=Ce.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ae.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=Ei(t),this.isVariantNode=th(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 m=f[h];l[h]!==void 0&&xe(m)&&m.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,Zy.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:(rh.current||eg(),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&&kf.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:s,ease:l,duration:u}=t.accelerate,d=new Df({element:this.current,name:e,keyframes:o,times:s,ease:l,duration:_e(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&&ae.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 Xn){const t=Xn[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<kl.length;r++){const n=kl[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=Jy(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"&&(Qd(r)||tf(r))?r=parseFloat(r):!Xy(r)&&ze.test(t)&&(r=qf(e,t)),this.setBaseTarget(e,xe(r)?r.get():r)),xe(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&&!xe(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)}},ih=class extends rg{constructor(){super(...arguments),this.KeyframeResolver=_y}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;xe(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 ah({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function ng({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ig(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)||oh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oh(e){return Fl(e.x)||Fl(e.y)}function Fl(e){return e&&e!=="0%"}function Zn(e,t,r){return r+t*(e-r)}function Ll(e,t,r,n,i){return i!==void 0&&(e=Zn(e,i,n)),Zn(e,r,n)+t}function Za(e,t=0,r=1,n,i){e.min=Ll(e.min,t,r,n,i),e.max=Ll(e.max,t,r,n,i)}function sh(e,{x:t,y:r}){Za(e.x,t.translate,t.scale,t.originPoint),Za(e.y,r.translate,r.scale,r.originPoint)}var Vl=.999999999999,Bl=1.0000000000001;function ag(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,sh(e,o)),n&&$t(a.latestValues)&&wn(e,a.latestValues,a.layout?.layoutBox))}t.x<Bl&&t.x>Vl&&(t.x=1),t.y<Bl&&t.y>Vl&&(t.y=1)}function Xe(e,t){e.min+=t,e.max+=t}function Ul(e,t,r,n,i=.5){Za(e,t,r,le(e.min,e.max,i),n)}function Wl(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function wn(e,t,r){const n=r??e;Ul(e.x,Wl(t.x,n.x),t.scaleX,t.scale,t.originX),Ul(e.y,Wl(t.y,n.y),t.scaleY,t.scale,t.originY)}function lh(e,t){return ah(ig(e.getBoundingClientRect(),t))}function og(e,t,r){const n=lh(e,r),{scroll:i}=t;return i&&(Xe(n.x,i.offset.x),Xe(n.y,i.offset.y)),n}var sg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lg=ar.length;function cg(e,t,r){let n="",i=!0;for(let a=0;a<lg;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=Xf(s,ts[o]);if(!l){i=!1;const d=sg[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(yf(l)){i[l]=u;continue}else{const d=Xf(u,ts[l]);l.startsWith("origin")?(s=!0,a[l]=d):n[l]=d}}if(t.transform||(o||r?n.transform=cg(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 ch(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 zl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ur={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;return`${zl(e,t.target.x)}% ${zl(e,t.target.y)}%`}},ug={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=le(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:{...ur,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ur,borderTopRightRadius:ur,borderBottomLeftRadius:ur,borderBottomRightRadius:ur,boxShadow:ug};function uh(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)(xe(n[o])||i&&xe(i[o])||uh(o,e)||r?.getValue(o)?.liveStyle!==void 0)&&(a[o]=n[o]);return a}function dg(e){return window.getComputedStyle(e)}var fg=class extends ih{constructor(){super(...arguments),this.type="html",this.renderInstance=ch}readValueFromInstance(e,t){if(or.has(t))return this.projection?.isProjecting?Fa(t):Av(e,t);{const r=dg(e),n=(yf(t)?r.getPropertyValue(t):r[t])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return lh(e,t)}build(e,t,r){ss(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return ls(e,t,r)}},hg={offset:"stroke-dashoffset",array:"stroke-dasharray"},pg={offset:"strokeDashoffset",array:"strokeDasharray"};function mg(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?hg:pg;e[a.offset]=`${-n}`,e[a.array]=`${t} ${r}`}var vg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dh(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 m of vg)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&mg(f,i,a,o,!1)}var fh=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"]),hh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yg(e,t,r,n){ch(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(fh.has(i)?i:es(i),t.attrs[i])}function ph(e,t,r){const n=ls(e,t,r);for(const i in e)if(xe(e[i])||xe(t[i])){const a=ar.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}var gg=class extends ih{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=Kf(t);return r&&r.default||0}return t=fh.has(t)?t:es(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return ph(e,t,r)}build(e,t,r){dh(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,n){yg(e,t,r,n)}mount(e){this.isSVGTag=hh(e.tagName),super.mount(e)}},$g=os.length;function mh(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?mh(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<$g;r++){const n=os[r],i=e.props[n];(Sr(i)||i===!1)&&(t[n]=i)}return t}function vh(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 bg=[...as].reverse(),xg=as.length;function Sg(e){return t=>Promise.all(t.map(({animation:r,options:n})=>$y(e,r,n)))}function Cg(e){let t=Sg(e),r=Gl(),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:m,transitionEnd:p,...v}=h;d={...d,...v,...p}}return d};function o(u){t=u(e)}function s(u){const{props:d}=e,f=mh(e.parent)||{},h=[],m=new Set;let p={},v=1/0;for(let g=0;g<xg;g++){const x=bg[g],b=r[x],S=d[x]!==void 0?d[x]:f[x],E=Sr(S),C=x===u?b.isActive:null;C===!1&&(v=g);let A=S===f[x]&&S!==d[x]&&E;if(A&&(n||i)&&e.manuallyAnimateOnMount&&(A=!1),b.protectedKeys={...p},!b.isActive&&C===null||!S&&!b.prevProp||Pi(S)||typeof S=="boolean")continue;if(x==="exit"&&b.isActive&&C!==!0){b.prevResolvedValues&&(p={...p,...b.prevResolvedValues});continue}const N=Ng(b.prevProp,S);let O=N||x===u&&b.isActive&&!A&&E||g>v&&E,M=!1;const B=Array.isArray(S)?S:[S];let K=B.reduce(a(x),{});C===!1&&(K={});const{prevResolvedValues:te={}}=b,w={...te,...K},R=k=>{O=!0,m.has(k)&&(M=!0,m.delete(k)),b.needsAnimating[k]=!0;const J=e.getValue(k);J&&(J.liveStyle=!1)};for(const k in w){const J=K[k],re=te[k];if(p.hasOwnProperty(k))continue;let de=!1;za(J)&&za(re)?de=!vh(J,re):de=J!==re,de?J!=null?R(k):m.add(k):J!==void 0&&m.has(k)?R(k):b.protectedKeys[k]=!0}b.prevProp=S,b.prevResolvedValues=K,b.isActive&&(p={...p,...K}),(n||i)&&e.blockInitialAnimation&&(O=!1);const W=A&&N;O&&(!W||M)&&h.push(...B.map(k=>{const J={type:x};if(typeof k=="string"&&(n||i)&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:re}=e,de=Tt(re,k);if(re.enteringChildren&&de){const{delayChildren:Ee}=de.transition||{};J.delay=Ff(re.enteringChildren,e,Ee)}}return{animation:k,options:J}}))}if(m.size){const g={};if(typeof d.initial!="boolean"){const x=Tt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(g.transition=x.transition)}m.forEach(x=>{const b=e.getBaseTarget(x),S=e.getValue(x);S&&(S.liveStyle=!0),g[x]=b??null}),h.push({animation:g})}let y=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),n=!1,i=!1,y?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=Gl(),i=!0}}}function Ng(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vh(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gl(){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 Hl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var yh=1e-4,wg=1-yh,Pg=1+yh,gh=.01,Eg=0-gh,Tg=0+gh;function Ne(e){return e.max-e.min}function Og(e,t,r){return Math.abs(e-t)<=r}function Kl(e,t,r,n=.5){e.origin=n,e.originPoint=le(t.min,t.max,e.origin),e.scale=Ne(r)/Ne(t),e.translate=le(r.min,r.max,e.origin)-e.originPoint,(e.scale>=wg&&e.scale<=Pg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eg&&e.translate<=Tg||isNaN(e.translate))&&(e.translate=0)}function pr(e,t,r,n){Kl(e.x,t.x,r.x,n?n.originX:void 0),Kl(e.y,t.y,r.y,n?n.originY:void 0)}function ql(e,t,r,n=0){e.min=(n?le(r.min,r.max,n):r.min)+t.min,e.max=e.min+Ne(t)}function _g(e,t,r,n){ql(e.x,t.x,r.x,n?.x),ql(e.y,t.y,r.y,n?.y)}function Yl(e,t,r,n=0){const i=n?le(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+Ne(t)}function Jn(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,i){return e-=t,e=Zn(e,1/r,n),i!==void 0&&(e=Zn(e,1/i,n)),e}function Ag(e,t=0,r=1,n=.5,i,a=e,o=e){if(Je.test(t)&&(t=parseFloat(t),t=le(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=le(a.min,a.max,n);e===a&&(s-=t),e.min=Xl(e.min,t,r,s,i),e.max=Xl(e.max,t,r,s,i)}function Zl(e,t,[r,n,i],a,o){Ag(e,t[r],t[n],t[i],t.scale,a,o)}var jg=["x","scaleX","originX"],Ig=["y","scaleY","originY"];function Jl(e,t,r,n){Zl(e.x,t,jg,r?r.x:void 0,n?n.x:void 0),Zl(e.y,t,Ig,r?r.y:void 0,n?n.y:void 0)}function Ql(e){return e.translate===0&&e.scale===1}function $h(e){return Ql(e.x)&&Ql(e.y)}function ec(e,t){return e.min===t.min&&e.max===t.max}function Mg(e,t){return ec(e.x,t.x)&&ec(e.y,t.y)}function tc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bh(e,t){return tc(e.x,t.x)&&tc(e.y,t.y)}function rc(e){return Ne(e.x)/Ne(e.y)}function nc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ye(e){return[e("x"),e("y")]}function Dg(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:m,skewY:p}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),m&&(n+=`skewX(${m}deg) `),p&&(n+=`skewY(${p}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 xh=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Rg=xh.length,ic=e=>typeof e=="string"?parseFloat(e):e,ac=e=>typeof e=="number"||L.test(e);function kg(e,t,r,n,i,a){i?(e.opacity=le(0,r.opacity??1,Fg(n)),e.opacityExit=le(t.opacity??1,0,Lg(n))):a&&(e.opacity=le(t.opacity??1,r.opacity??1,n));for(let o=0;o<Rg;o++){const s=xh[o];let l=oc(t,s),u=oc(r,s);l===void 0&&u===void 0||(l||(l=0),u||(u=0),l===0||u===0||ac(l)===ac(u)?(e[s]=Math.max(le(ic(l),ic(u),n),0),(Je.test(u)||Je.test(l))&&(e[s]+="%")):e[s]=u)}(t.rotate||r.rotate)&&(e.rotate=le(t.rotate||0,r.rotate||0,n))}function oc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Fg=Sh(0,.5,df),Lg=Sh(.5,.95,ke);function Sh(e,t,r){return n=>n<e?0:n>t?1:r(br(e,t,n))}function Vg(e,t,r){const n=xe(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 Bg=(e,t)=>e.depth-t.depth,Ug=class{constructor(){this.children=[],this.isDirty=!1}add(e){Lo(this.children,e),this.isDirty=!0}remove(e){Hn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bg),this.isDirty=!1,this.children.forEach(e)}};function Wg(e,t){const r=Ce.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(ht(n),e(a-t))};return ae.setup(n,!0),()=>ht(n)}function Pn(e){return xe(e)?e.get():e}var zg=class{constructor(){this.members=[]}add(e){Lo(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&&(Hn(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Hn(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)}},En={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bt={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ra=["","X","Y","Z"],Gg=1e3,Hg=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 Ch(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=Wf(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ae,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Ch(n)}function Nh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},s=t?.()){this.id=Hg++,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(Yg),this.nodes.forEach(t2),this.nodes.forEach(r2),this.nodes.forEach(Xg),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 Ug)}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)&&!qy(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;ae.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=Wg(h,250),En.hasAnimatedSinceResize&&(En.hasAnimatedSinceResize=!1,this.nodes.forEach(cc)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||s2,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!bh(this.targetLayout,m),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Zo(p,"layout"),onPlay:v,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(d,x)}else f||cc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(n2),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&&Ch(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(Jg),this.nodes.forEach(sc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(lc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qg),this.nodes.forEach(e2),this.nodes.forEach(Kg),this.nodes.forEach(qg)):this.nodes.forEach(lc),this.clearAllSnapshots();const o=Ce.now();be.delta=Qe(0,1e3/60,o-be.timestamp),be.timestamp=o,be.isProcessing=!0,qi.update.process(be),qi.preRender.process(be),qi.render.process(be),be.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Zg),this.sharedNodes.forEach(i2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ae.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ne(this.snapshot.measuredBox.x)&&!Ne(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&&!$h(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)),l2(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(c2))){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)&&wn(u,f.latestValues,f.layout?.layoutBox)}return $t(this.latestValues)&&wn(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())),Jl(s,u.latestValues,u.snapshot?.layoutBox,d)}return $t(this.latestValues)&&Jl(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!==be.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=be.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(),_g(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),sh(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)||oh(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(),Jn(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===be.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;ag(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:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hl(this.prevProjectionDelta.x,this.projectionDelta.x),Hl(this.prevProjectionDelta.y,this.projectionDelta.y)),pr(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!nc(this.projectionDelta.x,this.prevProjectionDelta.x)||!nc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),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(),m=(l?l.source:void 0)!==(this.layout?this.layout.source:void 0),p=this.getStack(),v=!p||p.members.length<=1,y=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(o2));this.animationProgress=0;let g;this.mixTargetDelta=x=>{const b=x/1e3;uc(f.x,o.x,b),uc(f.y,o.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),a2(this.relativeTarget,this.relativeTargetOrigin,h,b),g&&Mg(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ge()),Ve(g,this.relativeTarget)),m&&(this.animationValues=d,kg(d,u,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},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=ae.update(()=>{En.hasAnimatedSinceResize=!0,Pt.layout++,this.motionValue||(this.motionValue=Zt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vg(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(Gg),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&&wh(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ge();const f=Ne(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Ne(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Ve(s,l),wn(s,d),pr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zg),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=Pn(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=Pn(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=Dg(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.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 p in Ja){if(d[p]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:g}=Ja[p],x=f==="none"?d[p]:v(d[p],u);if(y){const b=y.length;for(let S=0;S<b;S++)o[y[S]]=x}else g?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=u===this?Pn(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(sc),this.root.sharedNodes.clear()}}}function Kg(e){e.updateLayout()}function qg(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=Ne(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 wh(i,t.layoutBox,r)&&Ye(d=>{const f=a?t.measuredBox[d]:t.layoutBox[d],h=Ne(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();pr(o,r,t.layoutBox);const s=Wt();a?pr(s,e.applyTransform(n,!0),t.measuredBox):pr(s,r,t.layoutBox);const l=!$h(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 m=e.options.layoutAnchor||void 0,p=ge();Jn(p,t.layoutBox,f.layoutBox,m);const v=ge();Jn(v,r,h.layoutBox,m),bh(p,v)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,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 Yg(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 Xg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Zg(e){e.clearSnapshot()}function sc(e){e.clearMeasurements()}function Jg(e){e.isLayoutDirty=!0,e.updateLayout()}function lc(e){e.isLayoutDirty=!1}function Qg(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function e2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t2(e){e.resolveTargetDelta()}function r2(e){e.calcProjection()}function n2(e){e.resetSkewAndRotation()}function i2(e){e.removeLeadSnapshot()}function uc(e,t,r){e.translate=le(t.translate,0,r),e.scale=le(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function dc(e,t,r,n){e.min=le(t.min,r.min,n),e.max=le(t.max,r.max,n)}function a2(e,t,r,n){dc(e.x,t.x,r.x,n),dc(e.y,t.y,r.y,n)}function o2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var s2={duration:.45,ease:[.4,0,.1,1]},fc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hc=fc("applewebkit/")&&!fc("chrome/")?Math.round:ke;function pc(e){e.min=hc(e.min),e.max=hc(e.max)}function l2(e){pc(e.x),pc(e.y)}function wh(e,t,r){return e==="position"||e==="preserve-aspect"&&!Og(rc(t),rc(r),.2)}function c2(e){return e!==e.root&&e.scroll?.wasRoot}var u2=Nh({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},Ph=Nh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ia.current){const e=new u2({});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 mc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=mc(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():mc(e[i],null)}}}}function f2(...e){return $.useCallback(d2(...e),e)}var h2=class extends $.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(bn(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=t.offsetParent,n=bn(r)&&r.offsetWidth||0,i=bn(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 p2({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=f2(s,e.props?.ref??e?.ref);return(0,$.useInsertionEffect)(()=>{const{width:f,height:h,top:m,left:p,right:v,bottom:y}=l.current;if(t||a===!1||!s.current||!f||!h)return;const g=r==="left"?`left: ${p}`:`right: ${v}`,x=n==="bottom"?`bottom: ${y}`:`top: ${m}`;s.current.dataset.motionPopId=o;const b=document.createElement("style");u&&(b.nonce=u);const S=i??document.head;return S.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
16
16
|
[data-motion-pop-id="${o}"] {
|
|
17
17
|
position: absolute !important;
|
|
18
18
|
width: ${f}px !important;
|
|
19
19
|
height: ${h}px !important;
|
|
20
|
-
${
|
|
20
|
+
${g}px !important;
|
|
21
21
|
${x}px !important;
|
|
22
22
|
}
|
|
23
|
-
`),()=>{s.current?.removeAttribute("data-motion-pop-id"),w.contains($)&&w.removeChild($)}},[t]),(0,d.jsx)(h2,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var m2=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:l,root:c})=>{const u=Lo(y2),f=(0,b.useId)();let h=!0,m=(0,b.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:i,onExitComplete:p=>{u.set(p,!0);for(const y of u.values())if(!y)return;n&&n()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,n]);return a&&h&&(m={...m}),(0,b.useMemo)(()=>{u.forEach((p,y)=>u.set(y,!1))},[r]),b.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=(0,d.jsx)(p2,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),(0,d.jsx)(Si.Provider,{value:m,children:e})};function y2(){return new Map}function Ph(e=!0){const t=(0,b.useContext)(Si);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);const o=(0,b.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}var nn=e=>e.key||"";function md(e){const t=[];return b.Children.forEach(e,r=>{(0,b.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:c})=>{const[u,f]=Ph(o),h=(0,b.useMemo)(()=>md(e),[e]),m=o&&!u?[]:h.map(nn),p=(0,b.useRef)(!0),y=(0,b.useRef)(h),g=Lo(()=>new Map),v=(0,b.useRef)(new Set),[x,$]=(0,b.useState)(h),[w,E]=(0,b.useState)(h);Zu(()=>{p.current=!1,y.current=h;for(let S=0;S<w.length;S++){const j=nn(w[S]);m.includes(j)?(g.delete(j),v.current.delete(j)):g.get(j)!==!0&&g.set(j,!1)}},[w,m.length,m.join("-")]);const C=[];if(h!==x){let S=[...h];for(let j=0;j<w.length;j++){const M=w[j],V=nn(M);m.includes(V)||(S.splice(j,0,M),C.push(M))}return a==="wait"&&C.length&&(S=C),E(md(S)),$(h),null}process.env.NODE_ENV!=="production"&&a==="wait"&&w.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,b.useContext)(Ro);return(0,d.jsx)(d.Fragment,{children:w.map(S=>{const j=nn(S),M=o&&!u?!1:h===w||m.includes(j),V=()=>{if(v.current.has(j))return;if(g.has(j))v.current.add(j),g.set(j,!0);else return;let P=!0;g.forEach(U=>{U||(P=!1)}),P&&(_?.(),E(y.current),o&&f?.(),n&&n())};return(0,d.jsx)(m2,{isPresent:M,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:M?void 0:V,anchorX:s,anchorY:l,children:S},j)})})},Eh=(0,b.createContext)({strict:!1}),yd={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"]},gd=!1;function g2(){if(gd)return;const e={};for(const t in yd)e[t]={isEnabled:r=>yd[t].some(n=>!!r[n])};rh(e),gd=!0}function Th(){return g2(),tv()}function v2(e){const t=Th();for(const r in e)t[r]={...t[r],...e[r]};rh(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 $2=Gc({default:()=>jh}),jh,x2=cp((()=>{throw jh={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')})),Oh=e=>!Jn(e);function w2(e){typeof e=="function"&&(Oh=t=>t.startsWith("on")?!Jn(t):e(t))}try{w2((x2(),fp($2)).default)}catch{}function S2(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||xe(e[i])||(Oh(i)||r===!0&&Jn(i)||!t&&!Jn(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var Ei=(0,b.createContext)({});function C2(e,t){if(Pi(e)){const{initial:r,animate:n}=e;return{initial:r===!1||wr(r)?r:void 0,animate:wr(n)?n:void 0}}return e.inherit!==!1?t:{}}function N2(e){const{initial:t,animate:r}=C2(e,(0,b.useContext)(Ei));return(0,b.useMemo)(()=>({initial:t,animate:r}),[vd(t),vd(r)])}function vd(e){return Array.isArray(e)?e.join(" "):e}var cs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _h(e,t,r){for(const n in t)!xe(t[n])&&!dh(n,r)&&(e[n]=t[n])}function P2({transformTemplate:e},t){return(0,b.useMemo)(()=>{const r=cs();return ss(r,t,e),Object.assign({},r.vars,r.style)},[t])}function E2(e,t){const r=e.style||{},n={};return _h(n,r,e),Object.assign(n,P2(e,t)),n}function T2(e,t){const r={},n=E2(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 Ah=()=>({...cs(),attrs:{}});function j2(e,t,r,n){const i=(0,b.useMemo)(()=>{const a=Ah();return ch(a,t,fh(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};_h(a,e.style,e),i.style={...a,...i.style}}return i}var O2=["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 us(e){return typeof e!="string"||e.includes("-")?!1:!!(O2.indexOf(e)>-1||/[A-Z]/u.test(e))}function _2(e,t,r,{latestValues:n},i,a=!1,o){const s=(o??us(e)?j2:T2)(t,n,i,e),l=S2(t,typeof e=="string",a),c=e!==b.Fragment?{...l,...s,ref:r}:{},{children:u}=t,f=(0,b.useMemo)(()=>xe(u)?u.get():u,[u]);return(0,b.createElement)(e,{...c,children:f})}function A2({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:I2(r,n,i,e),renderState:t()}}function I2(e,t,r,n){const i={},a=n(e,{});for(const h in a)i[h]=Nn(a[h]);let{initial:o,animate:s}=e;const l=Pi(e),c=eh(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?s:o;if(f&&typeof f!="boolean"&&!Ni(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const p=Qo(e,h[m]);if(p){const{transitionEnd:y,transition:g,...v}=p;for(const x in v){let $=v[x];if(Array.isArray($)){const w=u?$.length-1:0;$=$[w]}$!==null&&(i[x]=$)}for(const x in y)i[x]=y[x]}}}return i}var Ih=e=>(t,r)=>{const n=(0,b.useContext)(Ei),i=(0,b.useContext)(Si),a=()=>A2(e,t,n,i);return r?a():Lo(a)},M2=Ih({scrapeMotionValuesFromProps:ls,createRenderState:cs}),k2=Ih({scrapeMotionValuesFromProps:hh,createRenderState:Ah}),D2=Symbol.for("motionComponentSymbol");function R2(e,t,r){const n=(0,b.useRef)(r);(0,b.useInsertionEffect)(()=>{n.current=r});const i=(0,b.useRef)(null);return(0,b.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 Mh=(0,b.createContext)({});function Ft(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function L2(e,t,r,n,i,a){const{visualElement:o}=(0,b.useContext)(Ei),s=(0,b.useContext)(Eh),l=(0,b.useContext)(Si),c=(0,b.useContext)(ds),u=c.reducedMotion,f=c.skipAnimations,h=(0,b.useRef)(null),m=(0,b.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:u,skipAnimations:f,isSVG:a}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,y=(0,b.useContext)(Mh);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&F2(h.current,r,i,y);const g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{p&&g.current&&p.update(r,l)});const v=r[Bf],x=(0,b.useRef)(!!v&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Zu(()=>{m.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),(0,b.useEffect)(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),p.enteringChildren=void 0)}),p}function F2(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,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&&Ft(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}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&&v2(n);const a=r?r==="svg":us(e),o=a?k2:M2;function s(c,u){let f;const h={...(0,b.useContext)(ds),...c,layoutId:V2(c)},{isStatic:m}=h,p=N2(c),y=o(c,m);if(!m&&typeof window<"u"){B2(h,n);const g=U2(h);f=g.MeasureLayout,p.visualElement=L2(e,y,h,i,g.ProjectionNode,a)}return(0,d.jsxs)(Ei.Provider,{value:p,children:[f&&p.visualElement?(0,d.jsx)(f,{visualElement:p.visualElement,...h}):null,_2(e,c,R2(y,p.visualElement,u),y,m,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=(0,b.forwardRef)(s);return l[D2]=e,l}function V2({layoutId:e}){const t=(0,b.useContext)(Ro).id;return t&&e!==void 0?t+"-"+e:e}function B2(e,t){const r=(0,b.useContext)(Eh).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?ir(!1,n,"lazy-strict-mode"):it(!1,n,"lazy-strict-mode")}}function U2(e){const{drag:t,layout:r}=Th();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 W2=(e,t)=>t.isSVG??us(e)?new vv(t):new fv(t,{allowProjection:e!==b.Fragment}),G2=class extends yt{constructor(e){super(e),e.animationState||(e.animationState=Sv(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ni(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?.()}},H2=0,K2=class extends yt{constructor(){super(...arguments),this.id=H2++,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,...c}=o;for(const u in c)this.node.getValue(u)?.jump(c[u])}}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(){}},q2={animation:{Feature:G2},exit:{Feature:K2}};function Kr(e){return{point:{x:e.pageX,y:e.pageY}}}var Y2=e=>t=>ns(t)&&e(t,Kr(t));function mr(e,t,r,n){return Sr(e,t,Y2(r),n)}var Dh=({current:e})=>e?e.ownerDocument.defaultView:null,bd=(e,t)=>Math.abs(e-t);function X2(e,t){const r=bd(e.x,t.x),n=bd(e.y,t.y);return Math.sqrt(r**2+n**2)}var $d=new Set(["auto","scroll"]),Rh=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,m=X2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:p}=f,{timestamp:y}=be;this.history.push({...p,timestamp:y});const{onStart:g,onMove:v}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=an(h,this.transformPagePoint),ae.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=oa(f.type==="pointercancel"?this.lastMoveEventInfo:an(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,g),p&&p(f,g)},!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:c}=be;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,oa(s,this.history)),this.removeListeners=Wr(mr(this.contextWindow,"pointermove",this.handlePointerMove),mr(this.contextWindow,"pointerup",this.handlePointerUp),mr(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);($d.has(r.overflowX)||$d.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),ae.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 xd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oa({point:e},t){return{point:e,delta:xd(e,Lh(t)),offset:xd(e,Z2(t)),velocity:J2(t,.1)}}function Z2(e){return e[0]}function Lh(e){return e[e.length-1]}function J2(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Lh(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Oe(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>Oe(t)*2&&(n=e[1]);const a=De(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 Q2(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?le(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?le(r,e,n.max):Math.min(e,r)),e}function wd(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 eb(e,{top:t,left:r,bottom:n,right:i}){return{x:wd(e.x,r,i),y:wd(e.y,t,n)}}function Sd(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 tb(e,t){return{x:Sd(e.x,t.x),y:Sd(e.y,t.y)}}function rb(e,t){let r=.5;const n=Ce(e),i=Ce(t);return i>n?r=$r(t.min,t.max-n,e.min):n>i&&(r=$r(e.min,e.max-i,t.min)),Je(0,1,r)}function nb(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 ib(e=eo){return e===!1?e=0:e===!0&&(e=eo),{x:Cd(e,"left","right"),y:Cd(e,"top","bottom")}}function Cd(e,t,r){return{min:Nd(e,t),max:Nd(e,r)}}function Nd(e,t){return typeof e=="number"?e:e[t]||0}var ab=new WeakMap,ob=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=u=>{t&&this.snapToCursor(Kr(u).point),this.stopAnimation()},a=(u,f)=>{const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_g(h),!this.openDragLock))return;this.latestPointerEvent=u,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),qe(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Ze.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const $=x.layout.layoutBox[g];$&&(v=Ce($)*(parseFloat(v)/100))}}this.originPoint[g]=v}),p&&ae.update(()=>p(u,f),!1,!0),Ga(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=lb(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&ae.update(()=>y(u,f),!1,!0)},s=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f,this.stop(u,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:u}=this.getProps();(u||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Rh(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Dh(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&&ae.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=Q2(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&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=eb(r.layoutBox,e):this.constraints=!1,this.elastic=ib(t),n!==this.constraints&&!Ft(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&qe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=nb(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ft(e))return!1;const r=e.current;it(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=ov(r,n.root,this.visualElement.getTransformPagePoint());let a=tb(n.layout.layoutBox,i);if(t){const o=t(nv(a));this.hasMutatedConstraints=!!o,o&&(a=ih(o))}return a}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=qe(c=>{if(!on(c,t,this.currentDirection))return;let u=s&&s[c]||{};(a===!0||a===c)&&(u={min:0,max:0});const f=n?200:1e6,h=n?40:1e7,m={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(c,m)});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(){qe(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){qe(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]-le(a,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Ft(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};qe(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const s=o.get();n[a]=rb({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(),qe(a=>{if(!on(a,e,null))return;const o=this.getAxisMotionValue(a),{min:s,max:l}=this.constraints[a];o.set(le(s,l,n[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ab.set(this.visualElement,this);const e=this.visualElement.current,t=mr(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),f=l.target,h=f!==e&&Rg(f);c&&u&&!h&&this.start(l)});let r;const n=()=>{const{dragConstraints:l}=this.getProps();Ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=sb(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ae.read(n);const o=Sr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(qe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].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 Pd(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sb(e,t,r){const n=Il(e,Pd(r)),i=Il(t,Pd(r));return()=>{n(),i()}}function on(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function lb(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var db=class extends yt{constructor(e){super(e),this.removeGroupControls=Re,this.removeListeners=Re,this.controls=new ob(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Re}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&&ae.update(()=>e(t,r),!1,!0)},cb=class extends yt{constructor(){super(...arguments),this.removePointerDownListener=Re}onPointerDown(e){this.session=new Rh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dh(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&&ae.postRender(()=>n(i,a))}}}mount(){this.removePointerDownListener=mr(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,ub=class extends b.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()||ae.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 Fh(e){const[t,r]=Ph(),n=(0,b.useContext)(Ro);return(0,d.jsx)(ub,{...e,layoutGroup:n,switchLayoutGroup:(0,b.useContext)(Mh),isPresent:t,safeToRemove:r})}var fb={pan:{Feature:cb},drag:{Feature:db,ProjectionNode:Nh,MeasureLayout:Fh}};function Ed(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i=n["onHover"+r];i&&ae.postRender(()=>i(t,Kr(t)))}var hb=class extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=Ig(e,(t,r)=>(Ed(this.node,r,"Start"),n=>Ed(this.node,n,"End"))))}unmount(){}},pb=class extends yt{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=Wr(Sr(this.node.current,"focus",()=>this.onFocus()),Sr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Td(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&&ae.postRender(()=>i(t,Kr(t)))}var mb=class extends yt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=Fg(e,(n,i)=>(Td(this.node,i,"Start"),(a,{success:o})=>Td(this.node,a,o?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:r?.tap===!1})}unmount(){}},to=new WeakMap,da=new WeakMap,yb=e=>{const t=to.get(e.target);t&&t(e)},gb=e=>{e.forEach(yb)};function vb({root:e,...t}){const r=e||document;da.has(r)||da.set(r,{});const n=da.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(gb,{root:e,...t})),n[i]}function bb(e,t,r){const n=vb(t);return to.set(e,r),n.observe(e),()=>{to.delete(e),n.unobserve(e)}}var $b={some:0,all:1},xb=class extends yt{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:$b[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:c,onViewportLeave:u}=this.node.getProps(),f=l?c:u;f&&f(s)};this.stopObserver=bb(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(wb(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function wb({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var Sb={inView:{Feature:xb},tap:{Feature:mb},focus:{Feature:pb},hover:{Feature:hb}},Cb={layout:{ProjectionNode:Nh,MeasureLayout:Fh}},Nb={...q2,...Sb,...fb,...Cb},at=z2(Nb,W2),Vh=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Pb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),jd=e=>{const t=Eb(e);return t.charAt(0).toUpperCase()+t.slice(1)},ca={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"},Tb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},jb=(0,b.createContext)({}),Ob=()=>(0,b.useContext)(jb),_b=(0,b.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:m=""}=Ob()??{},p=n??f?Number(r??u)*24/Number(t??c):r??u;return(0,b.createElement)("svg",{ref:l,...ca,width:t??c??ca.width,height:t??c??ca.height,stroke:e??h,strokeWidth:p,className:Vh("lucide",m,i),...!a&&!Tb(s)&&{"aria-hidden":"true"},...s},[...o.map(([y,g])=>(0,b.createElement)(y,g)),...Array.isArray(a)?a:[a]])}),ie=(e,t)=>{const r=(0,b.forwardRef)(({className:n,...i},a)=>(0,b.createElement)(_b,{ref:a,iconNode:t,className:Vh(`lucide-${Pb(jd(e))}`,`lucide-${e}`,n),...i}));return r.displayName=jd(e),r},Ab=[["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"}]],Ib=ie("calendar-1",Ab),Mb=[["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"}]],kb=ie("calendar-days",Mb),Db=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fs=ie("check",Db),Rb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bh=ie("chevron-down",Rb),Lb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Qn=ie("chevron-left",Lb),Fb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mt=ie("chevron-right",Fb),Vb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ro=ie("circle-check",Vb),Bb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Ti=ie("clock-3",Bb),Ub=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],zb=ie("credit-card",Ub),Wb=[["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"}]],Uh=ie("dollar-sign",Wb),Gb=[["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"}]],Hb=ie("euro",Gb),Kb=[["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"}]],qb=ie("indian-rupee",Kb),Yb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zh=ie("info",Yb),Xb=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wh=ie("minus",Xb),Zb=[["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"}]],Jb=ie("moon",Zb),Qb=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Od=ie("move-left",Qb),e3=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],t3=ie("move-right",e3),r3=[["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"}]],Gh=ie("package-2",r3),n3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hs=ie("plus",n3),i3=[["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"}]],a3=ie("pound-sterling",i3),o3=[["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"}]],s3=ie("rotate-cw",o3),l3=[["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"}]],Hh=ie("scissors",l3),d3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ps=ie("search",d3),c3=[["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"}]],u3=ie("store",c3),f3=[["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"}]],h3=ie("sun",f3),p3=[["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"}]],m3=ie("sunrise",p3),y3=[["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"}]],Kh=ie("user",y3),g3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_t=ie("x",g3),v3={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}}},b3=({status:e})=>(0,d.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),$3=({item:e,onSelect:t,selected:r})=>(0,d.jsxs)("div",{className:`aaravpos-outlet-card
|
|
23
|
+
`),()=>{s.current?.removeAttribute("data-motion-pop-id"),S.contains(b)&&S.removeChild(b)}},[t]),(0,c.jsx)(h2,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var m2=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:l,root:u})=>{const d=Fo(v2),f=(0,$.useId)();let h=!0,m=(0,$.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:i,onExitComplete:p=>{d.set(p,!0);for(const v of d.values())if(!v)return;n&&n()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[r,d,n]);return a&&h&&(m={...m}),(0,$.useMemo)(()=>{d.forEach((p,v)=>d.set(v,!1))},[r]),$.useEffect(()=>{!r&&!d.size&&n&&n()},[r]),e=(0,c.jsx)(p2,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:u,children:e}),(0,c.jsx)(Ni.Provider,{value:m,children:e})};function v2(){return new Map}function Eh(e=!0){const t=(0,$.useContext)(Ni);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 an=e=>e.key||"";function vc(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]=Eh(o),h=(0,$.useMemo)(()=>vc(e),[e]),m=o&&!d?[]:h.map(an),p=(0,$.useRef)(!0),v=(0,$.useRef)(h),y=Fo(()=>new Map),g=(0,$.useRef)(new Set),[x,b]=(0,$.useState)(h),[S,E]=(0,$.useState)(h);Jd(()=>{p.current=!1,v.current=h;for(let N=0;N<S.length;N++){const O=an(S[N]);m.includes(O)?(y.delete(O),g.current.delete(O)):y.get(O)!==!0&&y.set(O,!1)}},[S,m.length,m.join("-")]);const C=[];if(h!==x){let N=[...h];for(let O=0;O<S.length;O++){const M=S[O],B=an(M);m.includes(B)||(N.splice(O,0,M),C.push(M))}return a==="wait"&&C.length&&(N=C),E(vc(N)),b(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:A}=(0,$.useContext)(ko);return(0,c.jsx)(c.Fragment,{children:S.map(N=>{const O=an(N),M=o&&!d?!1:h===S||m.includes(O),B=()=>{if(g.current.has(O))return;if(y.has(O))g.current.add(O),y.set(O,!0);else return;let K=!0;y.forEach(te=>{te||(K=!1)}),K&&(A?.(),E(v.current),o&&f?.(),n&&n())};return(0,c.jsx)(m2,{isPresent:M,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:M?void 0:B,anchorX:s,anchorY:l,children:N},O)})})},Th=(0,$.createContext)({strict:!1}),yc={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"]},gc=!1;function y2(){if(gc)return;const e={};for(const t in yc)e[t]={isEnabled:r=>yc[t].some(n=>!!r[n])};nh(e),gc=!0}function Oh(){return y2(),tg()}function g2(e){const t=Oh();for(const r in e)t[r]={...t[r],...e[r]};nh(t)}var $2=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 Qn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$2.has(e)}var b2=Hu({default:()=>_h}),_h,x2=u0((()=>{throw _h={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')})),Ah=e=>!Qn(e);function S2(e){typeof e=="function"&&(Ah=t=>t.startsWith("on")?!Qn(t):e(t))}try{S2((x2(),f0(b2)).default)}catch{}function C2(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||xe(e[i])||(Ah(i)||r===!0&&Qn(i)||!t&&!Qn(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var Ti=(0,$.createContext)({});function N2(e,t){if(Ei(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 w2(e){const{initial:t,animate:r}=N2(e,(0,$.useContext)(Ti));return(0,$.useMemo)(()=>({initial:t,animate:r}),[$c(t),$c(r)])}function $c(e){return Array.isArray(e)?e.join(" "):e}var us=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jh(e,t,r){for(const n in t)!xe(t[n])&&!uh(n,r)&&(e[n]=t[n])}function P2({transformTemplate:e},t){return(0,$.useMemo)(()=>{const r=us();return ss(r,t,e),Object.assign({},r.vars,r.style)},[t])}function E2(e,t){const r=e.style||{},n={};return jh(n,r,e),Object.assign(n,P2(e,t)),n}function T2(e,t){const r={},n=E2(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 Ih=()=>({...us(),attrs:{}});function O2(e,t,r,n){const i=(0,$.useMemo)(()=>{const a=Ih();return dh(a,t,hh(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};jh(a,e.style,e),i.style={...a,...i.style}}return i}var _2=["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:!!(_2.indexOf(e)>-1||/[A-Z]/u.test(e))}function A2(e,t,r,{latestValues:n},i,a=!1,o){const s=(o??ds(e)?O2:T2)(t,n,i,e),l=C2(t,typeof e=="string",a),u=e!==$.Fragment?{...l,...s,ref:r}:{},{children:d}=t,f=(0,$.useMemo)(()=>xe(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function j2({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:I2(r,n,i,e),renderState:t()}}function I2(e,t,r,n){const i={},a=n(e,{});for(const h in a)i[h]=Pn(a[h]);let{initial:o,animate:s}=e;const l=Ei(e),u=th(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"&&!Pi(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const p=Qo(e,h[m]);if(p){const{transitionEnd:v,transition:y,...g}=p;for(const x in g){let b=g[x];if(Array.isArray(b)){const S=d?b.length-1:0;b=b[S]}b!==null&&(i[x]=b)}for(const x in v)i[x]=v[x]}}}return i}var Mh=e=>(t,r)=>{const n=(0,$.useContext)(Ti),i=(0,$.useContext)(Ni),a=()=>j2(e,t,n,i);return r?a():Fo(a)},M2=Mh({scrapeMotionValuesFromProps:ls,createRenderState:us}),D2=Mh({scrapeMotionValuesFromProps:ph,createRenderState:Ih}),R2=Symbol.for("motionComponentSymbol");function k2(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 Dh=(0,$.createContext)({});function Ft(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)(Ti),s=(0,$.useContext)(Th),l=(0,$.useContext)(Ni),u=(0,$.useContext)(cs),d=u.reducedMotion,f=u.skipAnimations,h=(0,$.useRef)(null),m=(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}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,v=(0,$.useContext)(Dh);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&L2(h.current,r,i,v);const y=(0,$.useRef)(!1);(0,$.useInsertionEffect)(()=>{p&&y.current&&p.update(r,l)});const g=r[Uf],x=(0,$.useRef)(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Jd(()=>{m.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),(0,$.useEffect)(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),x.current=!1),p.enteringChildren=void 0)}),p}function L2(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:Rh(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ft(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:d})}function Rh(e){if(e)return e.options.allowProjection!==!1?e.projection:Rh(e.parent)}function aa(e,{forwardMotionProps:t=!1,type:r}={},n,i){n&&g2(n);const a=r?r==="svg":ds(e),o=a?D2:M2;function s(u,d){let f;const h={...(0,$.useContext)(cs),...u,layoutId:V2(u)},{isStatic:m}=h,p=w2(u),v=o(u,m);if(!m&&typeof window<"u"){B2(h,n);const y=U2(h);f=y.MeasureLayout,p.visualElement=F2(e,v,h,i,y.ProjectionNode,a)}return(0,c.jsxs)(Ti.Provider,{value:p,children:[f&&p.visualElement?(0,c.jsx)(f,{visualElement:p.visualElement,...h}):null,A2(e,u,k2(v,p.visualElement,d),v,m,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=(0,$.forwardRef)(s);return l[R2]=e,l}function V2({layoutId:e}){const t=(0,$.useContext)(ko).id;return t&&e!==void 0?t+"-"+e:e}function B2(e,t){const r=(0,$.useContext)(Th).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 U2(e){const{drag:t,layout:r}=Oh();if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function W2(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 z2=(e,t)=>t.isSVG??ds(e)?new gg(t):new fg(t,{allowProjection:e!==$.Fragment}),G2=class extends vt{constructor(e){super(e),e.animationState||(e.animationState=Cg(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Pi(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?.()}},H2=0,K2=class extends vt{constructor(){super(...arguments),this.id=H2++,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(){}},q2={animation:{Feature:G2},exit:{Feature:K2}};function Kr(e){return{point:{x:e.pageX,y:e.pageY}}}var Y2=e=>t=>ns(t)&&e(t,Kr(t));function mr(e,t,r,n){return Cr(e,t,Y2(r),n)}var kh=({current:e})=>e?e.ownerDocument.defaultView:null,bc=(e,t)=>Math.abs(e-t);function X2(e,t){const r=bc(e.x,t.x),n=bc(e.y,t.y);return Math.sqrt(r**2+n**2)}var xc=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=on(this.lastRawMoveEventInfo,this.transformPagePoint));const f=oa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=X2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:p}=f,{timestamp:v}=be;this.history.push({...p,timestamp:v});const{onStart:y,onMove:g}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=on(h,this.transformPagePoint),ae.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=oa(f.type==="pointercancel"?this.lastMoveEventInfo:on(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,y),p&&p(f,y)},!ns(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=n||window;const s=on(Kr(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=be;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=t;d&&d(e,oa(s,this.history)),this.removeListeners=zr(mr(this.contextWindow,"pointermove",this.handlePointerMove),mr(this.contextWindow,"pointerup",this.handlePointerUp),mr(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);(xc.has(r.overflowX)||xc.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),ae.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 on(e,t){return t?{point:t(e.point)}:e}function Sc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oa({point:e},t){return{point:e,delta:Sc(e,Lh(t)),offset:Sc(e,Z2(t)),velocity:J2(t,.1)}}function Z2(e){return e[0]}function Lh(e){return e[e.length-1]}function J2(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=Lh(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>_e(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>_e(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 Q2(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?le(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?le(r,e,n.max):Math.min(e,r)),e}function Cc(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 e3(e,{top:t,left:r,bottom:n,right:i}){return{x:Cc(e.x,r,i),y:Cc(e.y,t,n)}}function Nc(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 t3(e,t){return{x:Nc(e.x,t.x),y:Nc(e.y,t.y)}}function r3(e,t){let r=.5;const n=Ne(e),i=Ne(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 n3(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 i3(e=eo){return e===!1?e=0:e===!0&&(e=eo),{x:wc(e,"left","right"),y:wc(e,"top","bottom")}}function wc(e,t,r){return{min:Pc(e,t),max:Pc(e,r)}}function Pc(e,t){return typeof e=="number"?e:e[t]||0}var a3=new WeakMap,o3=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:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ay(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(y=>{let g=this.getAxisMotionValue(y).get()||0;if(Je.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[y];b&&(g=Ne(b)*(parseFloat(g)/100))}}this.originPoint[y]=g}),p&&ae.update(()=>p(d,f),!1,!0),Ga(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=l3(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),v&&ae.update(()=>v(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:kh(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&&ae.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||!sn(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=Q2(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&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=e3(r.layoutBox,e):this.constraints=!1,this.elastic=i3(t),n!==this.constraints&&!Ft(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ye(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=n3(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ft(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=og(r,n.root,this.visualElement.getTransformPagePoint());let a=t3(n.layout.layoutBox,i);if(t){const o=t(ng(a));this.hasMutatedConstraints=!!o,o&&(a=ah(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(!sn(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,m={type:"inertia",velocity:r?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});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(!sn(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]-le(a,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Ft(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]=r3({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(!sn(a,e,null))return;const o=this.getAxisMotionValue(a),{min:s,max:l}=this.constraints[a];o.set(le(s,l,n[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;a3.set(this.visualElement,this);const e=this.visualElement.current,t=mr(e,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=l.target,h=f!==e&&ky(f);u&&d&&!h&&this.start(l)});let r;const n=()=>{const{dragConstraints:l}=this.getProps();Ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=s3(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ae.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 Ec(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function s3(e,t,r){const n=Ml(e,Ec(r)),i=Ml(t,Ec(r));return()=>{n(),i()}}function sn(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function l3(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var c3=class extends vt{constructor(e){super(e),this.removeGroupControls=ke,this.removeListeners=ke,this.controls=new o3(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&&ae.update(()=>e(t,r),!1,!0)},u3=class extends vt{constructor(){super(...arguments),this.removePointerDownListener=ke}onPointerDown(e){this.session=new Fh(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kh(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&&ae.postRender(()=>n(i,a))}}}mount(){this.removePointerDownListener=mr(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,d3=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()})),En.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()||ae.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 Vh(e){const[t,r]=Eh(),n=(0,$.useContext)(ko);return(0,c.jsx)(d3,{...e,layoutGroup:n,switchLayoutGroup:(0,$.useContext)(Dh),isPresent:t,safeToRemove:r})}var f3={pan:{Feature:u3},drag:{Feature:c3,ProjectionNode:Ph,MeasureLayout:Vh}};function Tc(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i=n["onHover"+r];i&&ae.postRender(()=>i(t,Kr(t)))}var h3=class extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=Iy(e,(t,r)=>(Tc(this.node,r,"Start"),n=>Tc(this.node,n,"End"))))}unmount(){}},p3=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 Oc(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&&ae.postRender(()=>i(t,Kr(t)))}var m3=class extends vt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=Ly(e,(n,i)=>(Oc(this.node,i,"Start"),(a,{success:o})=>Oc(this.node,a,o?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:r?.tap===!1})}unmount(){}},to=new WeakMap,ca=new WeakMap,v3=e=>{const t=to.get(e.target);t&&t(e)},y3=e=>{e.forEach(v3)};function g3({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(y3,{root:e,...t})),n[i]}function $3(e,t,r){const n=g3(t);return to.set(e,r),n.observe(e),()=>{to.delete(e),n.unobserve(e)}}var b3={some:0,all:1},x3=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:b3[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=$3(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(S3(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function S3({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var C3={inView:{Feature:x3},tap:{Feature:m3},focus:{Feature:p3},hover:{Feature:h3}},N3={layout:{ProjectionNode:Ph,MeasureLayout:Vh}},w3={...q2,...C3,...f3,...N3},Ke=W2(w3,z2),Bh=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),P3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),_c=e=>{const t=E3(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"},T3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},O3=(0,$.createContext)({}),_3=()=>(0,$.useContext)(O3),A3=(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:m=""}=_3()??{},p=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:p,className:Bh("lucide",m,i),...!a&&!T3(s)&&{"aria-hidden":"true"},...s},[...o.map(([v,y])=>(0,$.createElement)(v,y)),...Array.isArray(a)?a:[a]])}),ie=(e,t)=>{const r=(0,$.forwardRef)(({className:n,...i},a)=>(0,$.createElement)(A3,{ref:a,iconNode:t,className:Bh(`lucide-${P3(_c(e))}`,`lucide-${e}`,n),...i}));return r.displayName=_c(e),r},j3=[["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"}]],I3=ie("calendar-1",j3),M3=[["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"}]],D3=ie("calendar-days",M3),R3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fs=ie("check",R3),k3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Uh=ie("chevron-down",k3),F3=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ei=ie("chevron-left",F3),L3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],It=ie("chevron-right",L3),V3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ro=ie("circle-check",V3),B3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],qr=ie("clock-3",B3),U3=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],W3=ie("credit-card",U3),z3=[["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"}]],Wh=ie("dollar-sign",z3),G3=[["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"}]],H3=ie("euro",G3),K3=[["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"}]],q3=ie("indian-rupee",K3),Y3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zh=ie("info",Y3),X3=[["path",{d:"M5 12h14",key:"1ays0h"}]],Gh=ie("minus",X3),Z3=[["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"}]],J3=ie("moon",Z3),Q3=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Ac=ie("move-left",Q3),e$=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],t$=ie("move-right",e$),r$=[["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=ie("package-2",r$),n$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ps=ie("plus",n$),i$=[["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"}]],a$=ie("pound-sterling",i$),o$=[["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"}]],s$=ie("rotate-cw",o$),l$=[["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"}]],Hh=ie("scissors",l$),c$=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ms=ie("search",c$),u$=[["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"}]],d$=ie("store",u$),f$=[["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"}]],h$=ie("sun",f$),p$=[["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"}]],m$=ie("sunrise",p$),v$=[["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"}]],Kh=ie("user",v$),y$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sr=ie("x",y$),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}}},$$=({status:e})=>(0,c.jsx)("span",{className:`aaravpos-status-badge ${e?"aaravpos-status-open":"aaravpos-status-closed"}`,children:e?"Open":"Closed"}),b$=({item:e,onSelect:t,selected:r})=>(0,c.jsxs)("div",{className:`aaravpos-outlet-card
|
|
24
24
|
${r?"selected":""}
|
|
25
25
|
${e.isOpen?"":"closed"}
|
|
26
|
-
`,onClick:()=>t(String(e?.id)),children:[(0,
|
|
26
|
+
`,onClick:()=>t(String(e?.id)),children:[(0,c.jsx)("div",{className:"aaravpos-outlet-card-top",children:(0,c.jsx)($$,{status:e.isOpen})}),(0,c.jsx)("div",{className:"aaravpos-outlet-card-content",children:(0,c.jsxs)("div",{className:"aaravpos-outlet-card-inner",children:[(0,c.jsx)("h2",{className:"aaravpos-outlet-card-title",children:e.outletName}),(0,c.jsx)("p",{className:"aaravpos-outlet-card-address",children:e.address})]})})]});function x$({outlets:e,onSelectOutlet:t}){const[r,n]=(0,$.useState)(null),[i,a]=(0,$.useState)(""),o=l=>{n(l);const u=e.find(d=>d.id==l);u&&setTimeout(()=>{t(u)},100)},s=(0,$.useMemo)(()=>{if(!i.trim())return e;const l=i.toLowerCase();return e.filter(u=>u.outletName?.toLowerCase().includes(l)||u.address?.toLowerCase().includes(l))},[e,i]);return(0,c.jsxs)("div",{className:"arravpos-container",children:[(0,c.jsxs)("div",{className:"aaravpos-header",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h1",{className:"aaravpos-title",children:"Choose Your Outlet"}),(0,c.jsx)("div",{className:"aaravpos-outlet-divider"})]}),(0,c.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,c.jsx)("span",{className:"aaravpos-search-icon",children:(0,c.jsx)(ms,{size:18})}),(0,c.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,onChange:l=>a(l.target.value),className:"aaravpos-search-input"}),(0,c.jsx)("div",{className:"aaravpos-search-actions",children:i&&(0,c.jsx)("button",{onClick:()=>a(""),className:"aaravpos-search-clear",children:(0,c.jsx)(sr,{size:16})})})]})]}),(0,c.jsx)("div",{className:"aaravpos-outlet-list-wrapper",children:s.length>0?(0,c.jsx)("div",{className:"aaravpos-outlet-grid",children:(0,c.jsx)(pt,{mode:"popLayout",children:s.map((l,u)=>(0,c.jsx)(Ke.div,{variants:g$,initial:"hidden",animate:"visible",exit:"exit",custom:u,layout:"position",style:{willChange:"transform, opacity"},children:(0,c.jsx)(b$,{item:l,onSelect:o,selected:r===l.id})},l.id))})}):(0,c.jsx)("div",{className:"aaravpos-empty-state",children:(0,c.jsxs)("div",{className:"aaravpos-empty-content",children:[(0,c.jsx)("h3",{className:"aaravpos-empty-title",children:"No outlets found"}),(0,c.jsx)("p",{className:"aaravpos-empty-text",children:"Try searching with a different keyword"})]})})})]})}var S$={USD:Wh,INR:q3,EUR:H3,GBP:a$},me=({size:e=20})=>{const t=(0,G.useSelector)(r=>r.outletDetails?.currency);return(0,c.jsx)(t?S$[t]:Wh,{size:e})},lr=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},C$=e=>Number(e.price||e.min_price||0),jc=(e,{perUnit:t=!1}={})=>{const r=C$(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||0)*n:a.taxType==="PERCENTAGE"?i+r*n*(a.taxRate||0)/100:i:i,0)};function Yr(){const[e,t]=(0,$.useState)({width:0,height:0});return(0,$.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var N$=[{label:"Services",page:"services",icon:(0,c.jsx)(Hh,{size:16})},{label:"Professional",page:"professionals",icon:(0,c.jsx)(Kh,{size:16})},{label:"Time Slot",page:"time",icon:(0,c.jsx)(qr,{size:16})},{label:"Details",page:"details",icon:(0,c.jsx)(zh,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,c.jsx)(ro,{size:16})}],w$=[{label:"Professional",page:"professionals",icon:(0,c.jsx)(Kh,{size:16})},{label:"Service",page:"services",icon:(0,c.jsx)(Hh,{size:16})},{label:"Time",page:"time",icon:(0,c.jsx)(qr,{size:16})},{label:"Details",page:"details",icon:(0,c.jsx)(zh,{size:16})},{label:(0,c.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,c.jsx)(ro,{size:13})]}),page:"confirm",icon:(0,c.jsx)(ro,{size:16})}];function Mt(){const e=(0,G.useDispatch)(),{width:t}=Yr(),{isService:r}=(0,G.useSelector)(f=>f.outletDetails),n=(0,G.useSelector)(f=>f.outletList.outlets),{currentStep:i,completedSteps:a}=(0,G.useSelector)(f=>f.breadcrumbs),o=r?N$:w$,s=o.findIndex(f=>f.page===i),l=()=>{e({type:"RESET_ALL"}),Ro.purge()},u=()=>{if(s===0&&n.length>1){l(),e(Jm());return}if(s<=0)return;const f=o[s-1];e(_a(f.page))},d=o[s];return(0,c.jsx)(c.Fragment,{children:t<991?(0,c.jsxs)("div",{className:"aaravpos-mobile-stepper",children:[(0,c.jsx)("button",{onClick:u,disabled:!1,className:"aaravpos-mobile-back-btn",children:(0,c.jsx)(ei,{size:20})}),(0,c.jsx)("span",{className:"aaravpos-mobile-step-label",children:d?.label})]}):(0,c.jsxs)("div",{className:"aaravpos-desktop-stepper",children:[(0,c.jsx)("button",{onClick:u,className:"aaravpos-desktop-back-btn",children:(0,c.jsx)(ei,{size:20})}),(0,c.jsx)("nav",{className:"aaravpos-step-nav",children:o.map((f,h)=>{const m=i===f.page,p=a?.includes(f.page)||h<=s;return(0,c.jsxs)("button",{onClick:()=>{p&&e(_a(f.page))},className:`aaravpos-step-btn
|
|
27
27
|
${p?"clickable":"disabled"}
|
|
28
28
|
${m?"active":"inactive"}
|
|
29
|
-
`,children:[(0,d.jsx)("span",{className:`aaravpos-step-icon ${m?"active":"inactive"}`,children:f.icon}),(0,d.jsx)("span",{children:f.label})]},f.page)})})]})})}function Dt({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:i,isSidebarOpen:a=!1}){return(0,d.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,d.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-[minmax(0,1fr)_350px] lg:grid-cols-[minmax(0,1fr)_360px] overflow-hidden relative",children:[(0,d.jsxs)("main",{className:"p-4",children:[e,(0,d.jsx)("div",{className:"md:hidden fixed bottom-5 left-0 right-0 flex items-center justify-center z-50 px-4",children:n?(0,d.jsx)("button",{onClick:i,className:"p-3! px-8.5! text-sm relative rounded-full btn-bg text-white hover:text-white border-none font-dm font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed",children:(0,d.jsx)("span",{children:"View Order"})}):r})]}),(0,d.jsx)("aside",{className:"hidden md:flex flex-col bg-surface border-l border-black/10 p-4 pb-3.5 h-[calc(100dvh)]",children:t})]}),a&&(0,d.jsx)("div",{className:"fixed z-999 bottom-0 left-0 right-0 h-screen bg-white rounded-t-2xl flex flex-col animate-fade-in",children:(0,d.jsx)("div",{className:"flex-1 md:px-6 p-4 fixed top-0 left-0 right-0 bottom-0",children:t})})]})}var qh=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:i})=>{const{outletName:a}=(0,K.useSelector)(l=>l.outletDetails),{isService:o}=(0,K.useSelector)(l=>l.outletDetails),s=t.length>0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[a||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[e?.id&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Professional"}),(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-4 py-2 px-3 border border-black/20 rounded",children:[e.imageUrl?(0,d.jsx)("img",{src:e.imageUrl,alt:e.name,className:"w-10 h-10 rounded-lg object-cover border border-black/10"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-lg bg-btn-bg/50 text-white flex items-center justify-center",style:{background:e.color||"#111"},children:lr(e.name)}),(0,d.jsxs)("div",{className:"overflow-hidden",children:[(0,d.jsx)("p",{className:"text-sm font-bold uppercase line-clamp-1",children:e.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 uppercase line-clamp-1",children:e.staff_type})]})]})]}),s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase",children:"Selected Services"}),(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-410px)] h-[calc(100dvh-260px)] overflow-y-auto scrollbar-none",children:t.map((l,c)=>(0,d.jsxs)("li",{className:`flex flex-col items-start text-sm py-2 ${c!==t.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:l.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:l.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),l.price||l.min_price]})]})]},l.id))})]})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex items-center",children:[(0,d.jsx)($e,{size:18}),r]})]}),(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Duration"}),(0,d.jsxs)("span",{className:"font-mono font-semibold",children:[n," mins"]})]})]}),(0,d.jsx)("button",{disabled:o?!t.length:!e,onClick:()=>i("time"),className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[o?"Choose Time":"Choose Services",(0,d.jsx)(Mt,{size:16})]})})]})]})]})},P3={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 E3(){const{width:e}=qr(),t=(0,K.useDispatch)(),{staff:r,selectedProfessional:n}=(0,K.useSelector)(o=>o.service),i=e<768,a=!r||r.length===0;return(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:n,goToStep:()=>t(Ne())}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-4",children:"Available based on selected services"}),(0,d.jsx)(pt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-btn-bg/90 font-semibold",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(pt,{mode:"popLayout",children:r?.map((o,s)=>(0,d.jsxs)(at.div,{variants:P3,initial:"hidden",animate:"visible",exit:"exit",custom:s,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{t(Ku(o)),t(Kt(null)),i&&t(Ne())},className:`pro-card border border-border rounded-sm p-4 cursor-pointer transition flex items-center gap-4 ${n?.id===o.id?"border-red bg-[#fff8f8]":"bg-white hover:border-red"}`,children:[o.imageUrl?(0,d.jsx)("img",{src:o.imageUrl,alt:o.name,className:"w-12 h-12 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{background:o.color||"#111"},children:lr(o.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:o.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:o.staff_type})]})]},o.id))})})})]})]})}var T3=e=>Number(e.price||e.min_price||0),no=(e,{perUnit:t=!1}={})=>{const r=T3(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)},j3={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 O3(){const e=(0,K.useDispatch)(),{width:t}=qr(),{staff:r,selectedServices:n,selectedProfessional:i}=(0,K.useSelector)(p=>p.service),[a,o]=(0,b.useState)(!1),s=n.map(p=>p.id),l=(0,b.useMemo)(()=>{if(!i?.id)return[];const p=r.find(y=>y.id===i.id);return p?n.map(y=>{const g=p?.assignments?.find(x=>x.id===y?.id),v={...y,price:g?.price||y.price||y.min_price||0,duration:g?.duration||y.estimated_time||y.min_time||0};return{...v,tax:no(v)}}):[]},[i,r,n]),c=l.reduce((p,y)=>p+Number(y.price||0)*y.qty,0),u=l.reduce((p,y)=>p+(y?.duration||0)*y.qty,0),f=(0,b.useMemo)(()=>s.length?r.filter(p=>{const y=p.assignments??[];return s?.every(g=>y.some(v=>String(v.id)==String(g)&&!!v?.assigned))}):[],[r,s]),h=t<768,m=s.length>0;return(0,b.useEffect)(()=>{if(m&&f.length===0){const p=setTimeout(()=>o(!0),300);return()=>clearTimeout(p)}else o(!1)},[m,f]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(qh,{pro:i,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!n.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Professional"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-6",children:"Available based on selected services"}),(0,d.jsx)(pt,{mode:"wait",children:a&&(0,d.jsx)(at.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.25},className:"text-sm text-btn-bg/90 font-semibold",children:"No staff available for selected services"},"no-staff")}),(0,d.jsx)("div",{className:"h-[calc(100dvh-210px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none pb-20 lg:pb-4",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(195px,1fr))] gap-3",children:(0,d.jsx)(pt,{mode:"popLayout",children:f.map((p,y)=>(0,d.jsxs)(at.div,{variants:j3,initial:"hidden",animate:"visible",exit:"exit",custom:y,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{e(Ku(p)),e(Kt(null)),h&&e(Ne())},className:`pro-card border-2 border-black/15 rounded p-3 cursor-pointer transition flex items-center gap-4 ${i?.id===p.id?"border-btn-bg-hover/80 bg-btn-bg-hover/5":"bg-white hover:border-btn-bg/80"}`,children:[p.imageUrl?(0,d.jsx)("img",{src:p.imageUrl,alt:p.name,className:"w-12 h-12 rounded-lg object-cover border border-black/10"}):(0,d.jsx)("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center text-white font-bold text-lg",style:{background:p.color||"#111"},children:lr(p.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-md uppercase",children:p.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 uppercase",children:p.staff_type})]})]},p.id))})})})]})]})}function Yh({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,K.useSelector)(a=>a?.outletDetails),{isService:i}=(0,K.useSelector)(a=>a.outletDetails);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"p-3 border-b border-gray-300",children:[(0,d.jsx)("p",{className:"font-black uppercase tracking-tight text-2xl mb-0",children:"Your Order"}),(0,d.jsxs)("p",{className:"text-xs font-semibold text-black/40 uppercase line-clamp-1",children:[n||"-"," Outlet"]})]}),(0,d.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,d.jsxs)("div",{className:"p-3",children:[(0,d.jsx)("p",{className:"text-sm font-semibold my-1.5 text-black/40 uppercase line-clamp-1",children:"SELECTED SERVICES"}),e?.length>0&&(0,d.jsx)("ul",{className:"md:h-[calc(100dvh-270px)] h-[calc(100dvh-230px)] overflow-y-scroll scrollbar-none",children:e?.map((a,o)=>(0,d.jsxs)("li",{className:`flex justify-start flex-col items-start text-sm py-2 ${o!==e?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsx)("p",{className:"flex justify-between flex-row items-center gap-1 line-clamp-1 text-sm font-medium uppercase",children:a.name}),(0,d.jsxs)("div",{className:"grid grid-cols-3 items-center gap-2 w-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-start gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Gh,{size:13}),(0,d.jsx)("span",{children:a.qty})]}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)(Ti,{size:13}),(0,d.jsxs)("span",{children:[a.min_time||a.estimated_time," min"]})]}),(0,d.jsxs)("p",{className:"flex items-center justify-end gap-1 text-xs text-black/60 font-medium",children:[(0,d.jsx)($e,{size:12}),a.price||a.min_price]})]})]},a.id))})]}),(0,d.jsxs)("div",{className:"p-3 border-t border-gray-300",children:[(0,d.jsxs)("div",{className:"flex justify-between items-end mb-1",children:[(0,d.jsx)("span",{className:"font-medium text-sm text-black/60 uppercase",children:"Subtotal"}),(0,d.jsxs)("span",{className:"font-mono font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:18}),t]})]}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-2 w-full relative py-3 font-dm text-xs font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:[i?"Choose Professional":"Choose Time",(0,d.jsx)(Mt,{size:16})]})})})]})]})]})}function Xh(){return(0,d.jsx)("div",{className:"h-33.5 rounded-sm relative overflow-hidden bg-[#e0e0e0]",children:(0,d.jsx)("div",{className:"absolute top-0 -left-full h-full w-full",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}var _3={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 A3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,selectedProfessional:o,loading:s}=(0,K.useSelector)(P=>P.service),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,m]=(0,b.useState)(null),[p,y]=(0,b.useState)(""),g=new Set(o?o?.assignments?.map(P=>P.id):[]),v=new Set(o?o?.assignments?.map(P=>P.categoryId):[]),x=n?.filter(P=>v.has(P.id))?.map(P=>({...P,services:P.services.filter(U=>g.has(U.id))})),$=r?.map(P=>({...P,categories:P.categories?.filter(U=>v.has(U.id))?.map(U=>({...U,services:U.services.filter(k=>g.has(k.id))}))?.filter(U=>U.services.length>0)}))?.filter(P=>P.categories.length>0),w=x?.flatMap(P=>P.services),E=i?i.services:w,C=(0,b.useMemo)(()=>u?h?h.services||[]:u.categories?.flatMap(P=>P.services||[]):[],[u,h]),_=l==="standalone"?E:C,S=(0,b.useMemo)(()=>{const P=x?.flatMap(k=>k.services||[]),U=$?.flatMap(k=>k.categories?.flatMap(W=>W.services||[]));return[...P,...U]},[x,$]),j=(0,b.useMemo)(()=>{const P=p.trim().toLowerCase();return P?S.filter(U=>U.name?.toLowerCase().includes(P)||U.description?.toLowerCase().includes(P)):_},[p,S,_]),M=P=>P.taxRows?.some(U=>U.isActive)||!1,V=a.reduce((P,U)=>P+Number(U.price||0)*U.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&$?.length>0&&!u){const P=$[0];f(P),m(P?.categories?.[0]||null)}},[l,$,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:V,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-bg border-btn-bg hover:text-btn-bg-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Time ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Choose a Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",o?.name,"'s available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),m(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ps,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:p,onChange:P=>y(P.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),p&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:$.map(P=>(0,d.jsxs)("button",{onClick:()=>{f(P),m(P?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===P.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:P.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[P?.categories?.length||0," Sub Categories"]})]},P.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>m(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((P,U)=>P+U.services.length,0),")"]}),u?.categories?.map(P=>(0,d.jsx)("button",{onClick:()=>m(P),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:P.name},P.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:P=>{t.current&&(t.current.scrollLeft+=P.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",x.reduce((P,U)=>P+U.services.length,0),")"]}),x.map(P=>(0,d.jsxs)("button",{onClick:()=>e(Un(P)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===P.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[P.name," (",P.services.length,")"]},P.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:s?Array.from({length:10}).map((P,U)=>(0,d.jsx)(Xh,{},U)):(0,d.jsx)(pt,{mode:"popLayout",children:j?.map((P,U)=>{const k=a.some(W=>W.id===P.id);return(0,d.jsxs)(at.div,{variants:_3,initial:"hidden",animate:"visible",exit:"exit",custom:U,layout:!0,onClick:()=>{const W=a.find(G=>G.id===P.id);W&&W.qty===1?e(Wn(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",k?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[M(P)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(P)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:P.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:P.description}),P.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:P.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:P.estimated_time?`${P.estimated_time} min`:`${P.min_time}-${P.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),P.price?P.price:`${P.min_price}-${P.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),e(Wn(String(P.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(W=>W.id===P.id)?.qty||0}),(0,d.jsx)("button",{onClick:W=>{W.stopPropagation(),a.find(G=>G.id===P.id)?e(Hu(String(P.id))):e(zn({...P,price:P.price?Number(P.price):void 0}))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},P.id)})})})})]})]})}var I3={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 M3(){const e=(0,K.useDispatch)(),t=(0,b.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,loading:o}=(0,K.useSelector)(S=>S.service),{outletName:s}=(0,K.useSelector)(S=>S?.outletDetails),[l,c]=(0,b.useState)("supercategory"),[u,f]=(0,b.useState)(null),[h,m]=(0,b.useState)(null),[p,y]=(0,b.useState)(""),g=n?.flatMap(S=>S.services),v=i?i.services:g,x=(0,b.useMemo)(()=>u?h?h.services||[]:u?.categories?.flatMap(S=>S.services||[]):[],[u,h]),$=l==="standalone"?v:x,w=(0,b.useMemo)(()=>{const S=n?.flatMap(M=>M.services||[]),j=r?.flatMap(M=>M?.categories?.flatMap(V=>V.services||[]));return[...S,...j]},[n,r]),E=(0,b.useMemo)(()=>{const S=p.trim().toLowerCase();return S?w.filter(j=>j.name?.toLowerCase().includes(S)||j.description?.toLowerCase().includes(S)):$},[p,w,$]),C=S=>S.taxRows?.some(j=>j.isActive)||!1,_=a.reduce((S,j)=>S+Number(j.price||0)*j.qty,0);return(0,b.useEffect)(()=>{if(l==="supercategory"&&r?.length>0&&!u){const S=r[0];f(S),m(S?.categories?.[0]||null)}},[l,r,u]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(Yh,{selectedServices:a,totalPrice:_,goToStep:()=>e(Ne())}),renderButton:(0,d.jsx)("button",{onClick:()=>e(Ne()),disabled:!a.length,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover p-3 px-8 text-xs relative rounded border-none font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-btn-bg-hover/70 disabled:cursor-not-allowed ",children:(0,d.jsxs)("span",{className:"flex flex-row justify-center items-center gap-2",children:["Choose Professional ",(0,d.jsx)(Mt,{size:16})]})}),children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"text-2xl lg:text-4xl font-black uppercase tracking-tight text-gray-900 pt-3",children:"Book A Service"}),(0,d.jsxs)("p",{className:"text-sm text-black/60 mb-6",children:["Select from ",s," Outlet's available services"]}),(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-4 lg:gap-8 mb-5 border-b border-black/40",children:[(0,d.jsxs)("div",{className:"flex items-end gap-8 ",children:[(0,d.jsx)("button",{onClick:()=>{c("supercategory"),m(null),f(null)},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="supercategory"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Super Category"}),(0,d.jsx)("button",{onClick:()=>{c("standalone")},className:`text-xs uppercase tracking-[2px] font-semibold cursor-pointer pb-4 transition-all ${l==="standalone"?"text-btn-bg border-b-2 border-btn-bg":"text-black/40 hover:text-black border-b-2 border-transparent"}`,children:"Standalone"})]}),(0,d.jsx)("div",{className:"pb-2",children:(0,d.jsxs)("div",{className:"relative w-full",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ps,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:p,onChange:S=>y(S.target.value),className:"w-full border border-black/30 rounded-md pl-9 pr-10 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-black/20"}),p&&(0,d.jsx)("button",{onClick:()=>y(""),className:"absolute cursor-pointer right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black transition",children:(0,d.jsx)(_t,{size:16})})]})})]}),l==="supercategory"&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-3 border border-black/20 p-1",children:r.map(S=>(0,d.jsxs)("button",{onClick:()=>{f(S),m(S?.categories?.[0]||null)},className:`border text-left py-2 px-4 transition-all cursor-pointer min-w-fit ${u?.id===S.id?"border-btn-bg-hover/50 bg-btn-bg-hover/10":"border-black/30 bg-white hover:border-btn-bg/50"}`,children:[(0,d.jsx)("h3",{className:"font-medium text-sm mb-1 font-serif",children:S.name}),(0,d.jsxs)("p",{className:"text-[10px] uppercase tracking-[1px] font-semibold text-black/60",children:[S?.categories?.length||0," Sub Categories"]})]},S.id))}),u&&(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full mb-5",children:[(0,d.jsxs)("button",{onClick:()=>m(null),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",u?.categories?.reduce((S,j)=>S+j.services.length,0),")"]}),u?.categories?.map(S=>(0,d.jsx)("button",{onClick:()=>m(S),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${h?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:S.name},S.id))]})]}),l==="standalone"&&(0,d.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 items-start mb-4",children:(0,d.jsxs)("div",{ref:t,onWheel:S=>{t.current&&(t.current.scrollLeft+=S.deltaY)},className:"flex flex-nowrap gap-2 overflow-x-auto scrollbar-none w-full",children:[(0,d.jsxs)("button",{onClick:()=>e(Un(null)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?"bg-white border-border hover:border-black":"bg-black text-white border-black"}`,children:["All Services (",n.reduce((S,j)=>S+j.services.length,0),")"]}),n.map(S=>(0,d.jsxs)("button",{onClick:()=>e(Un(S)),className:`px-4 py-2 text-xs border whitespace-nowrap transition-all cursor-pointer ${i?.id===S.id?"bg-black text-white border-black":"bg-white border-border hover:border-black"}`,children:[S.name," (",S.services.length,")"]},S.id))]})}),(0,d.jsx)("div",{className:`overflow-y-auto pb-20 lg:pb-4 scrollbar-none ${l==="standalone"?"h-[calc(100dvh-315px)] md:h-[calc(100dvh-300px)]":"h-[calc(100dvh-415px)] lg:h-[calc(100dvh-390px)]"}`,children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-3",children:o?Array.from({length:10}).map((S,j)=>(0,d.jsx)(Xh,{},j)):(0,d.jsx)(pt,{mode:"popLayout",children:E?.map((S,j)=>{const M=a.some(V=>V.id===S.id);return(0,d.jsxs)(at.div,{variants:I3,initial:"hidden",animate:"visible",exit:"exit",custom:j,layout:!0,onClick:()=>{const V=a.find(P=>P.id===S.id);V&&V.qty===1?e(Wn(String(S.id))):e(zn(S))},className:["relative border rounded-md p-3 cursor-pointer transition-all ",M?"border-btn-bg/80 bg-btn-bg-hover/5":"border-black/30 hover:border-btn-bg-hover/80 bg-white"].join(" "),children:[C(S)&&(0,d.jsx)("span",{className:"absolute top-0 left-0 text-[9px] px-2 py-0.5 bg-green-700 text-white rounded-br-md rounded-tl-md",children:"TAX"}),ko(S)&&(0,d.jsx)("span",{className:"absolute top-0 right-0 text-[9px] px-2 py-0.5 bg-black/80 text-white rounded-bl-md rounded-tr-md",children:"CONSENT"}),(0,d.jsx)("p",{className:"font-bold text-sm mb-1 mt-3 line-clamp-1 uppercase",children:S.name}),(0,d.jsxs)("div",{className:"relative group",children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-black/40 line-clamp-1 uppercase",children:S.description}),S.description?.length>30&&(0,d.jsx)("div",{className:"absolute hidden group-hover:block bg-neutral-100 text-xs p-2 rounded top-3 mt-1 z-10 w-52",children:S.description})]}),(0,d.jsxs)("p",{className:"text-sm font-semibold text-black/60 mb-2 flex justify-between mt-2",children:[(0,d.jsx)("span",{children:S.estimated_time?`${S.estimated_time} min`:`${S.min_time}-${S.max_time} min`}),(0,d.jsxs)("span",{className:"font-mono flex items-center gap-1",children:[(0,d.jsx)($e,{size:14}),S.price?S.price:`${S.min_price}-${S.max_price}`]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-start mt-4 border border-gray-300 max-w-fit",children:[(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),e(Wn(String(S.id)))},className:"w-10 h-8 flex items-center justify-center hover:bg-stone-100 transition-all",children:(0,d.jsx)(Wh,{size:14})}),(0,d.jsx)("span",{className:"text-sm font-semibold min-w-5 w-10 h-8 border-x border-gray-300 text-center flex items-center justify-center",children:a.find(V=>V.id===S.id)?.qty||0}),(0,d.jsx)("button",{onClick:V=>{V.stopPropagation(),a.find(P=>P.id===S.id)?e(Hu(String(S.id))):e(zn(S))},className:"w-10 h-8 bg-btn-bg/80 text-white flex items-center justify-center hover:bg-btn-bg-hover/90 transition-all",children:(0,d.jsx)(hs,{size:14})})]})]},S.id)})})})})]})]})}var k3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ms({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:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:h}){const{selectedSlotIndexes:m,slots:p,selectedDate:y}=(0,K.useSelector)(D=>D.slots),{staff:g,selectedServices:v,selectedProfessional:x}=(0,K.useSelector)(D=>D.service),{timeZone:$}=(0,K.useSelector)(D=>D.outletDetails),w=ke.DateTime.now().setZone($??"UTC"),[E,C]=(0,b.useState)(""),[_,S]=(0,b.useState)(!1),j=(0,b.useRef)(null),M=(0,b.useRef)(null),[V,P]=(0,b.useState)(0),U=[0,5,10,15,20],k=(0,b.useMemo)(()=>[...p?.morning||[],...p?.afternoon||[],...p?.evening||[]],[p]),W=15,G=(0,b.useMemo)(()=>{if(!x?.id)return[];const D=g?.find(A=>A.id===x.id);return D?v.map(A=>{const ne=D.assignments?.find(Ke=>Ke.id===A.id),ye={...A,price:ne?.price||A.price||A.min_price||0,duration:ne?.duration||A.estimated_time||A.min_time||0};return{...ye,tax:no(ye),unitTax:no(ye,{perUnit:!0})}}):[]},[x,g,v]),H=G.reduce((D,A)=>D+Number(A.price)*(A.qty||1),0),te=G.reduce((D,A)=>D+Number(A.duration)*(A.qty||1),0),re=Math.ceil(te/W),ue=D=>{if(!k.length)return"";const A=k[D]?.start_time,ne=k[D+re-1];return!A||!ne?"":`${A} - ${ne.end_time||ne.start_time}`},Ee=y||{day:w.day,month:w.month,year:w.year},N=m?.[0],T=N!==void 0?ue(N):null,F=Ee.month??0,B=T?`${k3[F]} ${Ee.day} at ${T}`:null,z=G.reduce((D,A)=>D+A.tax,0),X=Number(i)||0,q=n?H*X/100:0,Y=H+z+q;(0,b.useEffect)(()=>{n&&i==null&&a?.(0)},[n,i,a]);const J=(0,b.useMemo)(()=>u?"Processing...":c?"Checking consents...":o&&s<l?`Sign Consents (${s}/${l})`:(0,d.jsxs)(d.Fragment,{children:[e||"Book Appointment",(0,d.jsx)(t3,{})]}),[u,c,o,s,l,e]),Z=f||u||c||!T;return(0,b.useEffect)(()=>{const D=()=>{const ne=j.current?.offsetHeight||0,ye=M.current?.offsetHeight||0,Ke=(ne+(_?70:n?68:56)||0)+ye;P(window.innerHeight-Ke)};D();const A=new ResizeObserver(()=>{D()});return M.current&&A.observe(M.current),j.current&&A.observe(j.current),window.addEventListener("resize",D),()=>{A.disconnect(),window.removeEventListener("resize",D)}},[G,n,s,l,_]),(0,d.jsxs)("div",{className:"h-full flex flex-col justify-between",children:[(0,d.jsxs)("div",{className:"first",ref:j,children:[(0,d.jsxs)("p",{className:"font-bebas text-xl mb-3 flex flex-row justify-between items-center",children:["Your Order",h&&(0,d.jsx)("button",{onClick:h,className:"md:hidden block w-auto p-2 text-3xl border-none cursor-pointer rounded",children:(0,d.jsx)(_t,{})})]}),x?.id&&(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 border border-border rounded bg-white",children:[x.imageUrl?(0,d.jsx)("img",{src:x.imageUrl,alt:x.name,className:"w-10 h-10 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-full text-white flex items-center justify-center",style:{background:x.color||"#111"},children:lr(x.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-semibold",children:x.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:x.staff_type})]})]}),(0,d.jsxs)("div",{className:"text-sm mb-3 border-b border-border pb-2 font-bold flex justify-between",children:[(0,d.jsx)("span",{children:"Date & Time:"}),B?(0,d.jsx)("span",{className:"text-red",children:B}):(0,d.jsx)("span",{className:"text-muted",children:"No time selected"})]})]}),(0,d.jsx)("ul",{className:"overflow-y-scroll mb-1 scrollbar-none",style:{height:`${V}px`},children:G?.length>0&&G.map((D,A)=>(0,d.jsxs)("li",{className:`flex justify-between text-sm py-1.5 ${A!==G?.length-1?"border-b border-dotted border-gray-400":""}`,children:[(0,d.jsxs)("span",{className:"flex justify-between flex-row items-center gap-1",children:[D.name," ",(0,d.jsx)(_t,{size:12})," ",D.qty," (",D.duration," min)"]}),(0,d.jsxs)("span",{className:"flex flex-col items-end",children:[(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:12}),D.price]}),D.tax>0&&(0,d.jsxs)("span",{className:"flex items-center text-[11px] text-gray-700",children:["+ Tax:"," ",(0,d.jsx)($e,{size:11}),D.unitTax.toFixed(2)]})]})]},D.id))}),(0,d.jsxs)("div",{className:"third",ref:M,children:[n&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[1.5px] mt-4 mb-2",children:"Add Tip"}),(0,d.jsx)("div",{className:"flex gap-1 mb-2",children:[...U,"custom"].map((D,A)=>{const ne=D==="custom",ye=ne?_:X===D,Ke=A===0,Yr=A===[...U,"custom"].length-1;return(0,d.jsx)("button",{onClick:()=>{ne?(S(!0),a?.(Number(E)||0)):(S(!1),C(""),a?.(Number(D)))},className:`
|
|
30
|
-
px-2 py-1.5 border rounded-sm cursor-pointer text-xs text-center
|
|
31
|
-
${Ke||Yr?"flex-none w-16":"flex-1"}
|
|
32
|
-
|
|
33
|
-
`,children:ne?"Custom":D===0?"No tip":`${D}%`},D)})}),(0,d.jsx)(pt,{initial:!1,children:_&&(0,d.jsx)(at.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:(0,d.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:E,onChange:D=>{const A=D.target.value;(A===""||Number(A)>=0&&Number(A)<=100)&&(C(A),a?.(Number(A)||0))},className:"w-full px-3 py-2 border rounded-sm text-sm mb-3"})})})]}),o&&s<l&&(0,d.jsxs)("div",{className:"mb-3 p-2 bg-yellow-50 border border-yellow-200 rounded-sm",children:[(0,d.jsxs)("p",{className:"text-xs text-yellow-800 font-medium",children:["Consent Required:"," ",s,"/",l," completed"]}),(0,d.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5 mt-1",children:(0,d.jsx)("div",{className:"bg-yellow-600 h-1.5 rounded-full transition-all duration-300",style:{width:`${s/l*100}%`}})})]}),(0,d.jsxs)("div",{className:"mt-auto",children:[(0,d.jsx)(ua,{label:"Service",value:(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:14}),H.toFixed(2)]})}),n&&(0,d.jsx)(ua,{label:`Tip (${X}%)`,value:(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:14}),q.toFixed(2)]})}),(!r||T)&&(0,d.jsx)(ua,{label:"Taxes",value:(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)($e,{size:14}),z.toFixed(2)]})}),(0,d.jsxs)("div",{className:"flex justify-between text-lg pt-3 border-t mt-2",children:[(0,d.jsx)("span",{className:"font-semibold",children:"Total"}),(0,d.jsxs)("span",{className:"font-mono font-semibold text-red text-lg flex items-center",children:[(0,d.jsx)($e,{size:18}),Y.toFixed(2)]})]}),(0,d.jsx)("button",{onClick:t,disabled:Z,className:"bg-btn-bg text-btn-text border-btn-bg px-2 w-full relative py-3 font-dm text-sm font-bold tracking-[1.5px] uppercase cursor-pointer mt-3.5 rounded-sm transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed max-md:py-3.5 max-md:text-xs",children:(0,d.jsx)("span",{className:"flex flex-row justify-center items-center gap-2",children:J})})]})]})]})}function ua({label:e,value:t}){return(0,d.jsxs)("div",{className:"flex justify-between text-sm font-semibold text-gray-700 mb-1.5",children:[(0,d.jsx)("span",{children:e}),(0,d.jsx)("span",{className:"font-mono flex flex-row items-center",children:t})]})}var D3=e=>{try{if(!e)throw new Error("Missing timezone");const t=ke.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),[]}},R3=["S","M","T","W","T","F","S"];function L3(e,t){return e===2&&t<12}function F3({isOpen:e,onClose:t}){const r=(0,K.useDispatch)(),{selectedDate:n}=(0,K.useSelector)(h=>h.slots),{timeZone:i,outletTimeZoneYear:a}=(0,K.useSelector)(h=>h.outletDetails),[o]=(0,b.useState)(D3(i||"")),[s,l]=(0,b.useState)(0),c=o[s];if(!e)return null;const u=ke.DateTime.now().setZone(i??"UTC"),f=(h,m)=>{r(Kt({month:h,day:m,year:a})),t()};return(0,d.jsx)("div",{className:"fixed inset-0 z-200 bg-[rgba(14,14,14,0.55)] backdrop-blur-sm flex items-center justify-center min-h-[calc(100dvh-56px)]",onClick:h=>h.target===h.currentTarget&&t(),children:(0,d.jsxs)("div",{className:"bg-canvas rounded-lg max-w-[95vw] max-h-[90vh] flex flex-col shadow-2xl animate-pop-in max-md:h-[fit] max-md:rounded-t-2xl max-md:rounded-b-none",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border max-md:px-4 sticky top-0 bg-canvas z-10",children:[(0,d.jsx)("h2",{className:"font-bebas text-[26px] tracking-[1px] max-md:text-xl",children:"Pick a Date"}),(0,d.jsx)("button",{onClick:t,className:"w-8 h-8 rounded-full cursor-pointer bg-surface flex items-center justify-center text-muted hover:bg-red hover:text-white transition",children:(0,d.jsx)(_t,{})})]}),(0,d.jsx)("div",{className:"overflow-y-auto px-7 py-5 max-md:px-4",children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)("button",{disabled:s===0,onClick:()=>l(h=>Math.max(h-1,0)),className:`text-lg disabled:opacity-30 hover:red transition hover:text-red ${s===0?"cursor-not-allowed":"cursor-pointer"}`,children:(0,d.jsx)(Qn,{})}),(0,d.jsx)("div",{className:"text-sm font-semibold",children:c?.label}),(0,d.jsx)("button",{disabled:s===o.length-1,onClick:()=>l(h=>Math.min(h+1,o.length-1)),className:`text-lg disabled:opacity-30 hover:red transition hover:text-red ${s===o.length-1?"cursor-not-allowed":"cursor-pointer"}`,children:(0,d.jsx)(Mt,{})})]}),(0,d.jsxs)("div",{className:"grid grid-cols-7 gap-1.5 max-md:gap-2",children:[R3.map((h,m)=>(0,d.jsx)("div",{className:"text-[10px] font-semibold uppercase text-muted text-center py-1",children:h},m)),Array.from({length:c?.startDow||0}).map((h,m)=>(0,d.jsx)("div",{},`e${m}`)),Array.from({length:c?.days||0},(h,m)=>m+1).map(h=>{const m=n?.month===c?.monthIdx&&n?.day===h,p=c?.monthIdx===u.month&&h===u.day,y=L3(c?.monthIdx||0,h);return(0,d.jsx)("div",{onClick:()=>{y||f(c.monthIdx,h)},className:["aspect-square flex items-center justify-center rounded-full","text-xs font-mono transition-all duration-150","min-h-8.5 max-md:min-h-10",!m&&!y?"hover:bg-red/10 hover:text-red cursor-pointer":"",p&&!m?"outline-[1.5px] outline-border outline-offset-1":"",m?"cal-avail cal-selected bg-red! text-white!":"",y?"opacity-40 cursor-not-allowed":""].join(" "),children:h},h)})]})]})})]})})}var Ad=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],V3=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function B3(){const e=(0,K.useDispatch)(),{height:t}=qr(),[r,n]=(0,b.useState)(11),{staff:i,selectedServices:a,selectedProfessional:o}=(0,K.useSelector)(N=>N.service),{tenantId:s,timeZone:l}=(0,K.useSelector)(N=>N?.outletDetails),{selectedSlotIndexes:c,selectedDate:u,selectedTime:f,slots:h,loading:m}=(0,K.useSelector)(N=>N.slots),[p,y]=(0,b.useState)(!1),[g,v]=(0,b.useState)(0),x=15,$=(0,b.useMemo)(()=>[h.morning,h.afternoon,h.evening].flat(),[h]),w=(0,b.useMemo)(()=>ke.DateTime.now().setZone(l),[l]),E=N=>{try{if(!N.isValid)throw new Error("Invalid timezone or start date");return Array.from({length:180},(F,B)=>{const z=N.plus({days:B});return z.isValid?{day:z.day,month:z.month,year:z.year,fullDate:z.toISODate()}:null}).filter(Boolean)}catch(T){return console.error("generateDates error:",T),[]}},C=(0,b.useMemo)(()=>E(w),[w]),_=(0,b.useMemo)(()=>{if(!o?.id)return[];const N=i?.find(T=>T.id===o.id);return N?a.map(T=>{const F=N.assignments?.find(B=>B.id===T.id);return{...T,price:F?.price||T.price||T.min_price||0,duration:F?.duration||T.estimated_time||T.min_time||0,qty:F?.qty||1}}):[]},[o,i,a]),S=_.reduce((N,T)=>N+Number(T.duration)*(T.qty||1),0),j=Math.ceil(S/x),M=u?ke.DateTime.fromObject(u).toFormat("yyyy-MM-dd"):null;(0,b.useEffect)(()=>{!o?.id||!M||e(mn({tenantId:s,staffId:o.id,date:M}))},[o?.id,M,e,s]);const V=N=>{v(T=>Math.max(0,Math.min(C.length-11,T+N*4)))};(0,b.useEffect)(()=>{u||e(Kt({day:w.day,month:w.month,year:w.year}))},[]),(0,b.useEffect)(()=>{if(!u||!C.length)return;const N=C.findIndex(T=>T.day===u.day&&T.month===u.month&&T.year===u.year);N!==-1&&v(Math.max(0,Math.min(C.length-r,N-Math.floor(r/2))))},[u,C,r]);const P=N=>{e(Kt({day:N.day,month:N.month,year:N.year})),e(Gi(null))},U=N=>{if(!$.length)return;const T=$.slice(N,N+j);if(T.length<j){de.toast.warning("You don't have sufficient time for selected service");return}if(T.some(B=>B.isBooked||B.status!=="AVAILABLE")){de.toast.warning("Selected time range is not fully available");return}e(Gi($[N].start_time));const F=Array.from({length:j},(B,z)=>N+z);e(Wi({indexes:F,ids:F.map(B=>$[B]?.id)}))};(0,b.useEffect)(()=>{if(!f||!$.length)return;const N=$.findIndex(F=>F.start_time===f);if(N===-1)return;const T=Array.from({length:j},(F,B)=>N+B);T.length===c.length&&T.every((F,B)=>F===c[B])||e(Wi({indexes:T,ids:T.map(F=>$[F]?.id)}))},[f,$,j,c]),(0,b.useEffect)(()=>{if(!$.length||j===0)return;let N=!1;for(let T=0;T<=$.length-j;T++)if($.slice(T,T+j).every(F=>!F.isBooked&&F.status==="AVAILABLE")){U(T),N=!0;break}N||(e(Gi(null)),e(Wi({indexes:[],ids:[]})))},[$,j]),(0,b.useEffect)(()=>{const N=()=>{const T=window.innerWidth;T<1024?n(5):T<1280?n(7):n(11)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const k=h?.morning||[],W=h?.afternoon||[],G=h?.evening||[],H=N=>N.some(T=>!T.isBooked&&T.status==="AVAILABLE"),te=()=>H(k)?"morning":H(W)?"afternoon":H(G)?"evening":null,[re,ue]=(0,b.useState)(te()),Ee=()=>{const N=ke.DateTime.now().setZone(l).plus({days:1});e(Kt({day:N.day,month:N.month,year:N.year}))};return(0,b.useEffect)(()=>{const N=$[c[0]];N&&(k.some(T=>T.id===N.id)?ue("morning"):W.some(T=>T.id===N.id)?ue("afternoon"):G.some(T=>T.id===N.id)&&ue("evening"))},[c,$,k,W,G]),(0,b.useEffect)(()=>{const N=F=>F?.some(B=>!B.isBooked&&B.status==="AVAILABLE"),T=!N(k)&&!N(W)&&!N(G);!m&&T&&Ee()},[k,W,G]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(ms,{buttonText:"Fill Details",onButtonClick:()=>{if(!f||!c.length){de.toast.warning("Please select a time slot");return}e(Ne())},showTaxesOnlyIfTime:!0}),renderButton:(0,d.jsx)("button",{onClick:()=>{if(!f||!c.length){de.toast.warning("Please select a time slot");return}e(Ne())},disabled:!f||!c.length,className:"btn-bg p-3! px-8.5! text-sm relative rounded-full btn-bg text-white hover:text-white border-none font-dm font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed",children:(0,d.jsx)("span",{children:"Fill Details"})}),children:[(0,d.jsx)(kt,{}),(0,d.jsx)("div",{className:"mt-5 flex items-center justify-between mb-3",children:(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl tracking-[1px] leading-none",children:"Choose a Time"})}),(0,d.jsxs)("div",{className:"mt-2 mb-6 flex flex-row flex-wrap",children:[(0,d.jsxs)("div",{className:"flex items-stretch gap-1.5 overflow-x-auto scrollbar-none",children:[(0,d.jsx)(Id,{onClick:()=>V(-1),children:(0,d.jsx)(Qn,{size:20})}),C.slice(g,g+r).map(N=>{const T=ke.DateTime.fromISO(N.fullDate||""),F=T.weekday%7,B=ke.DateTime.now().setZone(l).startOf("day"),z=T.hasSame(B,"day"),X=u?.day===N.day&&u?.month===N.month&&u?.year===N.year;return(0,d.jsxs)("div",{onClick:()=>P(N),className:["shrink-0 flex flex-col items-center px-3 py-2 rounded-sm cursor-pointer","transition-all duration-150 min-w-12.5 select-none",X?"bg-btn-bg text-btn-text border-btn-bg":"hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover"].join(" "),children:[(0,d.jsx)("span",{className:"text-[10px] uppercase mb-1",children:V3[F]}),(0,d.jsx)("span",{className:"font-mono text-lg",children:N.day}),z&&!X&&(0,d.jsx)("span",{className:"text-[8px] text-red mt-1 font-bold",children:"TODAY"})]},`${N.day}-${N.month}-${N.year}`)}),(0,d.jsx)(Id,{onClick:()=>V(1),children:(0,d.jsx)(Mt,{size:20})})]}),(0,d.jsxs)("button",{onClick:()=>y(!0),className:"ml-4 p-2 text-sm gap-1.5 font-semibold max-md:text-xs flex flex-col items-center justify-center rounded-sm cursor-pointer transition-all duration-150 min-w-12.5 select-none bg-red text-white!",children:[(0,d.jsx)(Ib,{size:16}),u?.month!=null?`${Ad[u.month-1]} ${u.year}`:`${Ad[w.month-1]} ${w.year}`]})]}),(0,d.jsx)("div",{className:"h-px bg-border mb-5"}),(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-5 p-3 bg-surface rounded-sm border border-border flex-wrap",children:[o?.imageUrl?(0,d.jsx)("img",{src:o.imageUrl,alt:o.name,className:"w-10 h-10 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-full bg-black text-white flex items-center justify-center",style:{background:o?.color||"#111"},children:lr(o?.name)}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:o?.name}),(0,d.jsxs)("p",{className:"text-xs text-muted truncate",children:[_.map(N=>N.name).join(", ")," ·"," ",S," mins"]})]})]}),(0,d.jsxs)("div",{className:"overflow-y-auto scrollbar-none pb-20 lg:pb-4",style:{height:`${t-370}px`},children:[m?(0,d.jsx)("div",{className:"flex items-center justify-center w-full h-full",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-3 border-red border-t-transparent"})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(fa,{label:"Morning",icon:(0,d.jsx)(m3,{size:18,className:"text-orange-400"}),slots:k,allSlots:$,selectedSlotIndexes:c,handleSlotSelect:U,isOpen:re==="morning",onToggle:()=>ue(re==="morning"?null:"morning")}),(0,d.jsx)(fa,{label:"Afternoon",icon:(0,d.jsx)(h3,{size:18,className:"text-orange-400"}),slots:W,allSlots:$,selectedSlotIndexes:c,handleSlotSelect:U,isOpen:re==="afternoon",onToggle:()=>ue(re==="afternoon"?null:"afternoon")}),(0,d.jsx)(fa,{label:"Evening",icon:(0,d.jsx)(Jb,{size:18,className:"text-orange-400"}),slots:G,allSlots:$,selectedSlotIndexes:c,handleSlotSelect:U,isOpen:re==="evening",onToggle:()=>ue(re==="evening"?null:"evening")})]}),(0,d.jsx)(F3,{isOpen:p,onClose:()=>y(!1)})]})]})}function Id({onClick:e,children:t}){return(0,d.jsx)("button",{onClick:e,className:"shrink-0 w-8.5 bg-surface border p-2 border-border rounded-sm cursor-pointer text-sm text-muted flex items-center justify-center self-stretch transition-all duration-150 hover:border-red hover:text-red hover:bg-[rgba(215,38,61,0.12)]",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,d.jsxs)("div",{className:"mb-4 border border-border rounded-sm overflow-hidden",children:[(0,d.jsxs)("div",{onClick:s,className:"flex items-center justify-between px-4 py-3 cursor-pointer bg-surface hover:bg-[rgba(215,38,61,0.08)] transition",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs font-bold uppercase tracking-[1.2px] text-black/80",children:[(0,d.jsx)("span",{children:e})," ",t]}),(0,d.jsx)("span",{className:`transition-transform duration-200 ${o?"rotate-180":""}`,children:(0,d.jsx)(Bh,{})})]}),o&&(0,d.jsx)("div",{className:"p-3 border-t border-border bg-white",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(110px,1fr))] gap-2",children:r.map(l=>{const c=n.findIndex(h=>h.id===l.id),u=i.includes(c),f=l.isBooked||l.status!=="AVAILABLE";return(0,d.jsxs)("div",{onClick:()=>{f||a(c)},className:["pro-card flex flex-col items-center justify-center","p-3 border border-border rounded-sm gap-1 transition-all",f?"bg-gray-100 text-gray-400 cursor-not-allowed":u?"bg-[#fff8f8] text-red border-red":"bg-white hover:text-red hover:border-red cursor-pointer"].join(" "),children:[(0,d.jsx)("span",{className:"font-mono text-sm",children:l.start_time}),(0,d.jsx)("span",{className:"text-[10px]",children:f?"Booked":"Available"})]},l.id)})})})]})}var U3=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),z3=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},W3=e=>e.replace(/\D/g,"").slice(0,3);function G3({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,K.useSelector)(u=>u?.outletDetails),{control:i,handleSubmit:a,reset:o,formState:{errors:s,isSubmitting:l}}=(0,rt.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,d.jsx)("div",{className:"fixed inset-0 bg-black/40 flex items-center justify-center z-1020",children:(0,d.jsx)("form",{onSubmit:a(c),className:"p-6",children:(0,d.jsxs)("div",{className:"bg-white rounded-xl w-full max-w-sm sm:max-w-lg md:max-w-xl lg:max-w-2xl p-6 shadow-xl",children:[(0,d.jsxs)("div",{className:"flex justify-between mb-5",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Make a payment"}),(0,d.jsxs)("span",{className:"flex flex-row font-semibold items-center",children:[(0,d.jsx)($e,{size:14}),r?.toFixed(2)]})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{htmlFor:"name",className:"text-xs font-semibold text-gray-600 flex mb-1",children:["Card Holder Name ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(rt.Controller,{name:"name",control:i,rules:{required:"Name required",pattern:{value:/^[A-Za-z ]+$/,message:"Only letters allowed"}},render:({field:u})=>(0,d.jsx)("input",{...u,id:"name",autoComplete:"cc-name",placeholder:"Card Holder Name",onChange:f=>{const h=f.target.value.replace(/[^A-Za-z ]/g,"");u.onChange(h)},className:"w-full py-2.5 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"})}),s.name&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:s.name.message})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{htmlFor:"number",className:"text-xs font-semibold text-gray-600 flex mb-1",children:["Card Number ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(rt.Controller,{name:"number",control:i,rules:{required:"Card number required",validate:u=>u.replace(/\s/g,"").length===16||"Must be 16 digits"},render:({field:u})=>(0,d.jsx)("input",{...u,id:"number",placeholder:"4242 4242 4242 4242",onChange:f=>{u.onChange(U3(f.target.value))},className:"w-full py-2.5 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"})}),s.number&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:s.number.message})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{htmlFor:"expiry",className:"text-xs font-semibold text-gray-600 flex mb-1",children:["Expiry Date ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(rt.Controller,{name:"expiry",control:i,rules:{required:"Expiry required",validate:u=>{if(!/^\d{2}\/\d{2}$/.test(u))return"Invalid format";const[f,h]=u.split("/").map(Number);if(f<1||f>12)return"Invalid month";const m=ke.DateTime.now().setZone(n),p=m.year%100,y=m.month;return h<p||h===p&&f<y?"Card expired":!0}},render:({field:u})=>(0,d.jsx)("input",{...u,id:"expiry",placeholder:"MM/YY",onChange:f=>{u.onChange(z3(f.target.value))},className:"w-full py-2.5 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"})}),s.expiry&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:s.expiry.message})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{htmlFor:"cvv",className:"text-xs font-semibold text-gray-600 flex mb-1",children:["CVV ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(rt.Controller,{name:"cvv",control:i,rules:{required:"CVV required",minLength:{value:3,message:"3 digits required"}},render:({field:u})=>(0,d.jsx)("input",{...u,id:"cvv",placeholder:"CVV",onChange:f=>{u.onChange(W3(f.target.value))},className:"w-full py-2.5 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"})}),s.cvv&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:s.cvv.message})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-2 gap-4 mt-5",children:[(0,d.jsx)("button",{type:"button",onClick:()=>{o(),e()},className:"p-2 px-4 cursor-pointer rounded-md bg-linear-to-r from-red-500 to-red-600 text-white",children:"Cancel"}),(0,d.jsx)("button",{type:"submit",disabled:l,className:"btn-green p-2 px-4 rounded-md cursor-pointer bg-green-600 text-white disabled:opacity-50",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 H3(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 K3(e,t){if(e==null)return{};var r,n,i=H3(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 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 q3(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y3(e){var t=q3(e,"string");return Qt(t)=="symbol"?t:t+""}function Md(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,Y3(n.key),n)}}function X3(e,t,r){return t&&Md(e.prototype,t),r&&Md(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z3(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 J3(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 Zh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zh=function(){return!!e})()}function Q3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e$(e,t){if(t&&(Qt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q3(e)}function t$(e){var t=Zh();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 e$(this,r)}}var r$=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,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function w(C){if(typeof C=="object"&&C!==null){var _=C.$$typeof;switch(_){case r:switch(C=C.type,C){case c:case u:case i:case o:case a:case h:return C;default:switch(C=C&&C.$$typeof,C){case l:case f:case y:case p:case s:return C;default:return _}}case n:return _}}}function E(C){return w(C)===u}e.AsyncMode=c,e.ConcurrentMode=u,e.ContextConsumer=l,e.ContextProvider=s,e.Element=r,e.ForwardRef=f,e.Fragment=i,e.Lazy=y,e.Memo=p,e.Portal=n,e.Profiler=o,e.StrictMode=a,e.Suspense=h,e.isAsyncMode=function(C){return E(C)||w(C)===c},e.isConcurrentMode=E,e.isContextConsumer=function(C){return w(C)===l},e.isContextProvider=function(C){return w(C)===s},e.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},e.isForwardRef=function(C){return w(C)===f},e.isFragment=function(C){return w(C)===i},e.isLazy=function(C){return w(C)===y},e.isMemo=function(C){return w(C)===p},e.isPortal=function(C){return w(C)===n},e.isProfiler=function(C){return w(C)===o},e.isStrictMode=function(C){return w(C)===a},e.isSuspense=function(C){return w(C)===h},e.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===i||C===u||C===o||C===a||C===h||C===m||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===p||C.$$typeof===s||C.$$typeof===l||C.$$typeof===f||C.$$typeof===v||C.$$typeof===x||C.$$typeof===$||C.$$typeof===g)},e.typeOf=w})),n$=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,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function w(A){return typeof A=="string"||typeof A=="function"||A===i||A===u||A===o||A===a||A===h||A===m||typeof A=="object"&&A!==null&&(A.$$typeof===y||A.$$typeof===p||A.$$typeof===s||A.$$typeof===l||A.$$typeof===f||A.$$typeof===v||A.$$typeof===x||A.$$typeof===$||A.$$typeof===g)}function E(A){if(typeof A=="object"&&A!==null){var ne=A.$$typeof;switch(ne){case r:var ye=A.type;switch(ye){case c:case u:case i:case o:case a:case h:return ye;default:var Ke=ye&&ye.$$typeof;switch(Ke){case l:case f:case y:case p:case s:return Ke;default:return ne}}case n:return ne}}}var C=c,_=u,S=l,j=s,M=r,V=f,P=i,U=y,k=p,W=n,G=o,H=a,te=h,re=!1;function ue(A){return re||(re=!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.")),Ee(A)||E(A)===c}function Ee(A){return E(A)===u}function N(A){return E(A)===l}function T(A){return E(A)===s}function F(A){return typeof A=="object"&&A!==null&&A.$$typeof===r}function B(A){return E(A)===f}function z(A){return E(A)===i}function X(A){return E(A)===y}function q(A){return E(A)===p}function Y(A){return E(A)===n}function J(A){return E(A)===o}function Z(A){return E(A)===a}function D(A){return E(A)===h}e.AsyncMode=C,e.ConcurrentMode=_,e.ContextConsumer=S,e.ContextProvider=j,e.Element=M,e.ForwardRef=V,e.Fragment=P,e.Lazy=U,e.Memo=k,e.Portal=W,e.Profiler=G,e.StrictMode=H,e.Suspense=te,e.isAsyncMode=ue,e.isConcurrentMode=Ee,e.isContextConsumer=N,e.isContextProvider=T,e.isElement=F,e.isForwardRef=B,e.isFragment=z,e.isLazy=X,e.isMemo=q,e.isPortal=Y,e.isProfiler=J,e.isStrictMode=Z,e.isSuspense=D,e.isValidElementType=w,e.typeOf=E})()})),Jh=Le(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=r$():t.exports=n$()})),i$=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={},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=o()?Object.assign:function(s,l){for(var c,u=a(s),f,h=1;h<arguments.length;h++){c=Object(arguments[h]);for(var m in c)n.call(c,m)&&(u[m]=c[m]);if(r){f=r(c);for(var p=0;p<f.length;p++)i.call(c,f[p])&&(u[f[p]]=c[f[p]])}}return u}})),ys=Le(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),Qh=Le(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),a$=Le(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=ys(),i={},a=Qh();r=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function o(s,l,c,u,f){if(process.env.NODE_ENV!=="production"){for(var h in s)if(a(s,h)){var m;try{if(typeof s[h]!="function"){var p=Error((u||"React class")+": "+c+" 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 p.name="Invariant Violation",p}m=s[h](l,h,u,c,null,n)}catch(g){m=g}if(m&&!(m instanceof Error)&&r((u||"React class")+": type specification of "+c+" `"+h+"` 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 i)){i[m.message]=!0;var y=f?f():"";r("Failed "+c+" type: "+m.message+(y??""))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},t.exports=o})),o$=Le(((e,t)=>{var r=Jh(),n=i$(),i=ys(),a=Qh(),o=a$(),s=function(){};process.env.NODE_ENV!=="production"&&(s=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,h="@@iterator";function m(N){var T=N&&(f&&N[f]||N[h]);if(typeof T=="function")return T}var p="<<anonymous>>",y={array:$("array"),bigint:$("bigint"),bool:$("boolean"),func:$("function"),number:$("number"),object:$("object"),string:$("string"),symbol:$("symbol"),any:w(),arrayOf:E,element:C(),elementType:_(),instanceOf:S,node:P(),objectOf:M,oneOf:j,oneOfType:V,shape:k,exact:W};function g(N,T){return N===T?N!==0||1/N===1/T:N!==N&&T!==T}function v(N,T){this.message=N,this.data=T&&typeof T=="object"?T:{},this.stack=""}v.prototype=Error.prototype;function x(N){if(process.env.NODE_ENV!=="production")var T={},F=0;function B(X,q,Y,J,Z,D,A){if(J=J||p,D=D||Y,A!==i){if(u){var ne=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 ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=J+":"+Y;!T[ye]&&F<3&&(s("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+J+"`. 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."),T[ye]=!0,F++)}}return q[Y]==null?X?q[Y]===null?new v("The "+Z+" `"+D+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new v("The "+Z+" `"+D+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:N(q,Y,J,Z,D)}var z=B.bind(null,!1);return z.isRequired=B.bind(null,!0),z}function $(N){function T(F,B,z,X,q,Y){var J=F[B];if(te(J)!==N){var Z=re(J);return new v("Invalid "+X+" `"+q+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return x(T)}function w(){return x(l)}function E(N){function T(F,B,z,X,q){if(typeof N!="function")return new v("Property `"+q+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var Y=F[B];if(!Array.isArray(Y)){var J=te(Y);return new v("Invalid "+X+" `"+q+"` of type "+("`"+J+"` supplied to `"+z+"`, expected an array."))}for(var Z=0;Z<Y.length;Z++){var D=N(Y,Z,z,X,q+"["+Z+"]",i);if(D instanceof Error)return D}return null}return x(T)}function C(){function N(T,F,B,z,X){var q=T[F];if(!c(q)){var Y=te(q);return new v("Invalid "+z+" `"+X+"` of type "+("`"+Y+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return x(N)}function _(){function N(T,F,B,z,X){var q=T[F];if(!r.isValidElementType(q)){var Y=te(q);return new v("Invalid "+z+" `"+X+"` of type "+("`"+Y+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return x(N)}function S(N){function T(F,B,z,X,q){if(!(F[B]instanceof N)){var Y=N.name||p,J=Ee(F[B]);return new v("Invalid "+X+" `"+q+"` of type "+("`"+J+"` supplied to `"+z+"`, expected ")+("instance of `"+Y+"`."))}return null}return x(T)}function j(N){if(!Array.isArray(N))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 T(F,B,z,X,q){for(var Y=F[B],J=0;J<N.length;J++)if(g(Y,N[J]))return null;var Z=JSON.stringify(N,function(A,ne){return re(ne)==="symbol"?String(ne):ne});return new v("Invalid "+X+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+z+"`, expected one of "+Z+"."))}return x(T)}function M(N){function T(F,B,z,X,q){if(typeof N!="function")return new v("Property `"+q+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var Y=F[B],J=te(Y);if(J!=="object")return new v("Invalid "+X+" `"+q+"` of type "+("`"+J+"` supplied to `"+z+"`, expected an object."));for(var Z in Y)if(a(Y,Z)){var D=N(Y,Z,z,X,q+"."+Z,i);if(D instanceof Error)return D}return null}return x(T)}function V(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var T=0;T<N.length;T++){var F=N[T];if(typeof F!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(F)+" at index "+T+"."),l}function B(z,X,q,Y,J){for(var Z=[],D=0;D<N.length;D++){var A=N[D],ne=A(z,X,q,Y,J,i);if(ne==null)return null;ne.data&&a(ne.data,"expectedType")&&Z.push(ne.data.expectedType)}var ye=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new v("Invalid "+Y+" `"+J+"` supplied to "+("`"+q+"`"+ye+"."))}return x(B)}function P(){function N(T,F,B,z,X){return G(T[F])?null:new v("Invalid "+z+" `"+X+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return x(N)}function U(N,T,F,B,z){return new v((N||"React class")+": "+T+" type `"+F+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function k(N){function T(F,B,z,X,q){var Y=F[B],J=te(Y);if(J!=="object")return new v("Invalid "+X+" `"+q+"` of type `"+J+"` "+("supplied to `"+z+"`, expected `object`."));for(var Z in N){var D=N[Z];if(typeof D!="function")return U(z,X,q,Z,re(D));var A=D(Y,Z,z,X,q+"."+Z,i);if(A)return A}return null}return x(T)}function W(N){function T(F,B,z,X,q){var Y=F[B],J=te(Y);if(J!=="object")return new v("Invalid "+X+" `"+q+"` of type `"+J+"` "+("supplied to `"+z+"`, expected `object`."));for(var Z in n({},F[B],N)){var D=N[Z];if(a(N,Z)&&typeof D!="function")return U(z,X,q,Z,re(D));if(!D)return new v("Invalid "+X+" `"+q+"` key `"+Z+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(F[B],null," ")+`
|
|
34
|
-
Valid keys: `+JSON.stringify(Object.keys(N),null," "));var A=D(Y,Z,z,X,q+"."+Z,i);if(A)return A}return null}return x(T)}function G(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(G);if(N===null||c(N))return!0;var T=m(N);if(T){var F=T.call(N),B;if(T!==N.entries){for(;!(B=F.next()).done;)if(!G(B.value))return!1}else for(;!(B=F.next()).done;){var z=B.value;if(z&&!G(z[1]))return!1}}else return!1;return!0;default:return!1}}function H(N,T){return N==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function te(N){var T=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":H(T,N)?"symbol":T}function re(N){if(typeof N>"u"||N===null)return""+N;var T=te(N);if(T==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return T}function ue(N){var T=re(N);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function Ee(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y}})),s$=Le(((e,t)=>{var r=ys();function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function a(l,c,u,f,h,m){if(m!==r){var p=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 p.name="Invariant Violation",p}}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}})),l$=Le(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=Jh(),n=!0;t.exports=o$()(r.isElement,n)}else t.exports=s$()()})),O=Lr(l$(),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 gs(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}gs.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,c=s-n;t+=Math.sqrt(l*l+c*c)}r=o,n=s}return t};gs.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 d$(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 c=Date.now();!s&&r.leading===!1&&(s=c);var u=t-(c-s);return n=this,i=arguments,u<=0||u>t?(o&&(clearTimeout(o),o=null),s=c,a=e.apply(n,i),o||(n=i=null)):!o&&r.trailing!==!1&&(o=setTimeout(l,u)),a}}function oe(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=d$(oe.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=oe.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()}oe.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};oe.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};oe.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))}};oe.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};oe.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)};oe.prototype.isEmpty=function(){return this._isEmpty};oe.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};oe.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,c=s.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})}};oe.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)};oe.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};oe.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)};oe.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};oe.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new At(e-n.left,t-n.top,r||new Date().getTime())};oe.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 gs(t[1],n,i,t[2]),o=this._calculateCurveWidths(a);return t.shift(),{curve:a,widths:o}}return{}};oe.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},c=Math.sqrt(n*n+i*i),u=Math.sqrt(a*a+o*o),f=s.x-l.x,h=s.y-l.y,m=u/(c+u),p={x:l.x+f*m,y:l.y+h*m},y=t.x-p.x,g=t.y-p.y;return{c1:new At(s.x+y,s.y+g),c2:new At(l.x+y,l.y+g)}};oe.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};oe.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};oe.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};oe.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,c=l*s,u=1-s,f=u*u,h=f*u,m=h*e.startPoint.x;m+=3*f*s*e.control1.x,m+=3*u*l*e.control2.x,m+=c*e.endPoint.x;var p=h*e.startPoint.y;p+=3*f*s*e.control1.y,p+=3*u*l*e.control2.y,p+=c*e.endPoint.y;var y=t+c*i;this._drawPoint(m,p,y)}n.closePath(),n.fill()};oe.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()};oe.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 c=this._addPoint(s),u=c.curve,f=c.widths;u&&f&&t(u,f,l)}}else{this._reset();var h=i[0];r(h)}}};oe.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(g,v,x){var $=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var w="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));$.setAttribute("d",w),$.setAttribute("stroke-width",(v.end*2.25).toFixed(3)),$.setAttribute("stroke",x),$.setAttribute("fill","none"),$.setAttribute("stroke-linecap","round"),l.appendChild($)}},function(g){var v=document.createElement("circle"),x=typeof e.dotSize=="function"?e.dotSize():e.dotSize;v.setAttribute("r",x),v.setAttribute("cx",g.x),v.setAttribute("cy",g.y),v.setAttribute("fill",g.color),l.appendChild(v)});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="'+i+" "+a+" "+o+" "+s+'"')+(' width="'+o+'"')+(' height="'+s+'"')+">",f=l.innerHTML;if(f===void 0){var h=document.createElement("dummy"),m=l.childNodes;h.innerHTML="";for(var p=0;p<m.length;p+=1)h.appendChild(m[p].cloneNode(!0));f=h.innerHTML}var y=u+f+"</svg>";return c+btoa(y)};oe.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};oe.prototype.toData=function(){return this._data};var c$=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(c){var u=c.getContext("2d"),f=c.width,h=c.height,m=u.getImageData(0,0,f,h).data,p=s(!0,f,h,m),y=s(!1,f,h,m),g=l(!0,f,h,m),v=l(!1,f,h,m)-g+1,x=y-p+1,$=u.getImageData(g,p,v,x);return c.width=v,c.height=x,u.clearRect(0,0,v,x),u.putImageData($,0,0),c}function a(c,u,f,h){return{red:h[4*(f*u+c)],green:h[4*(f*u+c)+1],blue:h[4*(f*u+c)+2],alpha:h[4*(f*u+c)+3]}}function o(c,u,f,h){return a(c,u,f,h).alpha}function s(c,u,f,h){for(var m=c?1:-1,p=c?0:f-1;c?p<f:p>-1;p+=m)for(var y=0;y<u;y++)if(o(y,p,u,h))return p;return null}function l(c,u,f,h){for(var m=c?1:-1,p=c?0:u-1;c?p<u:p>-1;p+=m)for(var y=0;y<f;y++)if(o(p,y,u,h))return p;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=i}])})})),u$=Lr(c$(),1),f$=["canvasProps","clearOnResize"],ji=(function(e){J3(r,e);var t=t$(r);function r(){var n;Z3(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,K3(s,f$)},n.componentDidMount=function(){var s=n.getCanvas();n._sigPad=new oe(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,u$.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,c=(s=n.props.canvasProps)!==null&&s!==void 0?s:{},u=c.width,f=c.height;if(!(typeof u<"u"&&typeof f<"u")){var h=n.getCanvas(),m=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof u>"u"&&(h.width=h.offsetWidth*m),typeof f>"u"&&(h.height=h.offsetHeight*m),h.getContext("2d").scale(m,m),n.clear()}},n.render=function(){var s=n.props.canvasProps;return b.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 X3(r)})(b.Component);ji.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};ji.defaultProps={clearOnResize:!0};ji.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var h$=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:i})=>{const a=(0,b.useRef)(null),{register:o,handleSubmit:s,control:l,reset:c,watch:u,setValue:f,formState:{errors:h,isSubmitting:m}}=(0,rt.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),p=u("accepted"),y=u("typedName"),g=u("signatureDataUrl"),v=()=>{c(),r==="DRAW_SIGNATURE"&&a.current?.clear()},x=()=>{v(),e()},$=()=>{a.current?.clear(),f("signatureDataUrl","")},w=C=>{let _="";if(r==="DRAW_SIGNATURE"){const S=a.current;if(S&&!S.isEmpty())_=S.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}),v(),e()},E=!m&&(r==="CHECKBOX_ONLY"?p:r==="TYPED_NAME"?y?.trim().length>2:r==="DRAW_SIGNATURE"?!!g:!1);return(0,d.jsxs)("div",{className:"fixed inset-0 z-1024 bg-black/40 flex items-center justify-center",children:[(0,d.jsx)("div",{className:"fixed inset-0 bg-black/60"}),(0,d.jsxs)("div",{className:"relative bg-white rounded-xl p-4 w-[90%] lg:w-[60%] max-h-[95vh] overflow-y-auto z-10",children:[(0,d.jsxs)("div",{className:"flex justify-between mb-2.5",children:[(0,d.jsx)("h3",{className:"lg:text-xl text-base font-semibold text-gray-900",children:n||"Consent Form"}),(0,d.jsx)("button",{onClick:x,className:"text-gray-400 hover:text-gray-600 transition-colors cursor-pointer",children:(0,d.jsx)(_t,{})})]}),(0,d.jsx)("div",{className:"max-h-[42vh]",children:(0,d.jsx)("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:(0,d.jsx)("div",{dangerouslySetInnerHTML:{__html:i},className:"text-gray-700 whitespace-pre-wrap overflow-y-auto max-h-[30vh]"})})}),(0,d.jsxs)("form",{onSubmit:s(w),children:[r==="CHECKBOX_ONLY"&&(0,d.jsxs)("label",{className:"flex gap-2 items-center mt-3 border-gray-200",htmlFor:"accepted",children:[(0,d.jsx)("input",{type:"checkbox",...o("accepted",{required:"You must accept terms"}),id:"accepted",className:"w-4.5 h-4.5 text-red-500 bg-gray-100 border-gray-300 rounded"}),(0,d.jsx)("span",{className:"text-sm text-gray-700 font-medium",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,d.jsxs)("div",{className:"mt-4",children:[(0,d.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",htmlFor:"typedName",children:["Full Name"," ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.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:`w-full px-3 py-2 border rounded-md focus:outline-none ${h.typedName?"border-red-500 focus:ring-red-500":"border-gray-300"}`}),(0,d.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"By typing your name, you agree to the consent above"}),h.typedName&&(0,d.jsx)("p",{className:"text-red-500 text-sm",children:h.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,d.jsx)(rt.Controller,{control:l,name:"signatureDataUrl",rules:{validate:()=>a.current&&!a.current.isEmpty()?!0:"Signature required"},render:({field:C})=>(0,d.jsxs)("div",{className:"mt-4",children:[(0,d.jsx)(ji,{ref:a,canvasProps:{className:"w-full h-34 bg-white border border-gray-300 rounded-md overflow-hidden"},onEnd:()=>{const _=a.current;if(!_)return;const S=_.getCanvas().toDataURL("image/png");C.onChange(S)}}),h.signatureDataUrl&&(0,d.jsx)("p",{className:"text-red-500 text-sm my-1",children:h.signatureDataUrl.message}),(0,d.jsxs)("div",{className:"flex justify-between mt-2",children:[(0,d.jsxs)("button",{type:"button",onClick:$,className:"px-2 py-1 text-sm text-gray-600 hover:text-gray-800 border border-gray-300 rounded-md flex flex-row items-center gap-1 cursor-pointer",children:[(0,d.jsx)(s3,{size:14}),"Clear"]}),(0,d.jsxs)("label",{className:"flex gap-2 text-sm items-center cursor-pointer",htmlFor:"emailme",children:[(0,d.jsx)("input",{type:"checkbox",...o("emailMe"),id:"emailme",className:"w-4 h-4 text-red-500 bg-gray-100 border-gray-300 rounded"}),(0,d.jsx)("span",{className:"text-sm text-gray-700",children:"Email me"})]})]})]})}),(0,d.jsxs)("div",{className:"flex justify-end gap-3 mt-5",children:[(0,d.jsx)("button",{type:"button",onClick:x,className:"px-4 py-2 text-gray-700 cursor-pointer hover:text-gray-900 border border-gray-300 rounded-md transition-colors",children:"Cancel"}),(0,d.jsxs)("button",{type:"submit",disabled:!E,className:`px-4 py-2 rounded-md flex items-center gap-2 transition ${E?"bg-red-500 text-white hover:bg-red-600 cursor-pointer":"bg-gray-300 text-gray-600 cursor-not-allowed"}`,children:[(0,d.jsx)(fs,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},p$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sn="consentDraftByService",m$=15,y$=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function g$(){const e=(0,K.useDispatch)(),{tenantId:t,id:r}=(0,K.useSelector)(I=>I.outletDetails),{timeZone:n,image:i,outletName:a,address:o}=(0,K.useSelector)(I=>I.outletDetails),{staff:s,selectedServices:l,selectedProfessional:c}=(0,K.useSelector)(I=>I.service),{selectedSlotIds:u,selectedDate:f,selectedTime:h}=(0,K.useSelector)(I=>I.slots),{userDetails:m,bookingMode:p,tipPct:y}=(0,K.useSelector)(I=>I.appointment),g=Array.isArray(l)?l:[l],{selectedSlotIndexes:v,slots:x}=(0,K.useSelector)(I=>I.slots),[$,w]=(0,b.useState)(!1),[E,C]=(0,b.useState)(!1),[_,S]=(0,b.useState)(null),[j,M]=(0,b.useState)("person"),[V,P]=(0,b.useState)(!1),[U,k]=(0,b.useState)(""),[W,G]=(0,b.useState)(""),[H,te]=(0,b.useState)(null),[re,ue]=(0,b.useState)(null),[Ee,N]=(0,b.useState)({}),[T,F]=(0,b.useState)({}),[B,z]=(0,b.useState)(!1),[X,q]=(0,b.useState)(!1),Y=(0,b.useRef)(!1),J=(0,b.useRef)(""),Z=ke.DateTime.now().setZone(n??"UTC"),D=g.map(I=>{const R=s?.find(se=>se.id===c?.id)?.assignments?.find(se=>se.id===I.id),Q={...I,price:R?.price??I.price??I.min_price??0,duration:R?.duration??I.estimated_time??I.min_time??0};return{...Q,duration:R?.duration??I.estimated_time??I.min_time??0,tax:_d(Q),unitTax:_d(Q,{perUnit:!0})}}),A=[...x?.morning??[],...x?.afternoon??[],...x?.evening??[]],ne=D.reduce((I,R)=>I+Number(R.duration??0),0),ye=Math.ceil(ne/m$),Ke=I=>{if(!A.length)return"";const R=A[I]?.start_time,Q=A[I+ye-1];return!R||!Q?"":`${R} - ${Q.end_time??Q.start_time}`},Yr={day:Number(f?.day??Z.day),month:Number(f?.month??Z.month),year:Number(f?.year??Z.year)},Cs=v?.[0],Ns=Cs!==void 0?Ke(Cs):null,z0=Ns?`${p$[Yr.month]} ${Yr.day} at ${Ns}`:null,Di=D.reduce((I,R)=>I+Number(R.price)*(R.qty??1),0),Ps=D.reduce((I,R)=>I+R.tax,0),W0=Math.round(Ps*100),Es=Di*y/100,G0=Math.round(Es*100),Ts=Di+Es+Ps,Me=(0,b.useMemo)(()=>g.filter(I=>!(!ko(I)||(I?.consent_rule?.enforcementMode??I?.enforcementMode)==="FIXED")),[g]),H0=(0,b.useMemo)(()=>Me.map(I=>String(I.id)).filter(Boolean),[Me]),K0=I=>{const R=I?.consent_template??I?.consentTemplate??null;return{heading:String(R?.heading??"").trim(),consent:String(R?.consent??"").trim()}},Ri=I=>{N(R=>({...R,[String(I)]:!0}))};(0,b.useEffect)(()=>{m&&Me?.length>0&&q0()},[m,Me?.length]);const q0=async()=>{const I=m?.id;if(I){z(!0);try{const R={};for(const Q of Me){const se=String(Q.id),ve=String(Q.consent_form_id??"");if(!se||!ve)continue;const he=il(Q);if(!(he==="EVERY_X_DAYS"||he==="ONCE_PER_CUSTOMER")){R[se]={data:{checked:!0,needsSignature:!0}};continue}const Fe=!!(await ol(I,ve,se))?.data?.needsSignature;R[se]={data:{checked:!0,needsSignature:Fe}},Fe||Ri(se)}F(R)}catch(R){console.error(R)}finally{z(!1)}}},Li=(0,b.useMemo)(()=>Me.filter(I=>{const R=String(I.id);if(Ee[R])return!1;const Q=T[R];return!(Q?.data?.checked&&Q?.data?.needsSignature===!1)}),[Me,Ee,T]),js=H0.length,Os=js-Li.length,_s=Li.length===0,As=async()=>{if(!Y.current){Y.current=!0;try{if(!m?.firstName){de.toast.warn("Please enter First Name before signing consent.");return}if(!m?.email&&!m?.phone){de.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const I=Li[0];if(!I){await Fi();return}const R=String(I.id);if(J.current===R&&V)return;J.current=R;const Q=String(I.consent_form_id??"");if(!Q){de.toast.error("Consent form missing.");return}const se=al(I);if(!se){de.toast.error("Consent enforcement method not found.");return}const ve=m?.id;if(il(I)!=="EVERY_VISIT"&&ve){const Qe=!!(await ol(ve,Q,R))?.data?.needsSignature;if(F(Xr=>({...Xr,[R]:{data:{checked:!0,needsSignature:Qe}}})),!Qe){Ri(R),de.toast.success("Consent already signed for this service."),setTimeout(()=>As(),250);return}}else F(Fe=>({...Fe,[R]:{data:{checked:!0,needsSignature:!0}}}));const{heading:he,consent:Ae}=K0(I);if(!he||!Ae){de.toast.error("Consent template missing.");return}k(he),G(Ae),te(se),ue(R),P(!0)}catch(I){console.error(I),de.toast.error(I?.message??"Consent check failed")}finally{Y.current=!1}}},Y0=(I,R)=>{try{const Q=localStorage.getItem(sn),se=Q?JSON.parse(Q):{};se[String(I)]=R,localStorage.setItem(sn,JSON.stringify(se))}catch(Q){console.error("Failed to save consent draft",Q)}},X0=()=>{try{return JSON.parse(localStorage.getItem(sn)??"{}")}catch{return{}}},Z0=I=>{const R=String(re);if(!R)return;const Q=Me.find(Ae=>String(Ae.id)===R);if(!Q)return;const se=String(Q.consent_form_id??""),ve=al(Q);if(!se||!ve){de.toast.error("Consent form/method missing.");return}let he="CHECKBOX_ONLY";ve==="TYPED_NAME"?he="TYPED_NAME":ve==="DRAW_SIGNATURE"&&(he="SIGNATURE_IMAGE"),Y0(R,{serviceId:R,concentFormId:se,signatureType:he,typedName:I?.typedName,isChecked:I?.accepted,signatureDataUrl:I?.signatureDataUrl,emailMe:I?.emailMe}),Ri(R),P(!1),J.current="",de.toast.success("Consent captured.")},J0=()=>{P(!1),ue(null)},Q0=async(I,R,Q)=>{const se=X0(),ve=Object.entries(se).map(([he,Ae])=>({serviceId:he,concentFormId:Ae.concentFormId,captured:Ae})).filter(he=>he.serviceId&&he.concentFormId);for(const he of ve){const{serviceId:Ae,concentFormId:Fe,captured:Qe}=he,Xr=Qe.signatureType||(Qe.typedName?"TYPED_NAME":Qe.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Ms={tenantId:t,outletId:r,appointmentId:I,customerId:R,serviceId:Ae,formId:Fe,staffId:Q,signatureType:Xr,typedName:Qe.typedName,imageUrl:Qe.signatureDataUrl};Xr==="CHECKBOX_ONLY"&&(Ms.isChecked=Qe.isChecked??!0),await c1(Ms)}localStorage.removeItem(sn)};let Is="";f&&(Is=`${f?.year}-${String(f?.month+1).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const ep={tenantId:t,outletId:r,staffId:c?.id,date:Is,startTime:h,serviceIds:g.map(I=>I.id),slotIds:u,isWalkIn:!1,requiresConsent:Me.length>0,customer:{first_name:m?.firstName,last_name:m?.lastName,email:m?.email,phone:m?.phone}},Fi=async()=>{if(Me.length&&!_s){de.toast.warn("Please complete all consent forms first");return}try{w(!0);const I=await e(yn(ep)).unwrap(),R=I?.data??I,Q=R.id||"",se=R.customerId||R.customer?.id||"",ve=R.staffId||c?.id||"";p==="booking"&&Os>0&&await Q0(Q,se,ve),j==="card"?(S({appointmentId:Q,customerId:se}),C(!0)):(e(Hi(String(Q))),e(Ne()))}catch(I){const R=I?.payload?.message||I?.data?.message||I?.message||"Staff not working on this day";de.toast.error(R)}finally{w(!1)}},tp=async()=>{if(!h&&p==="booking")return void de.toast.error("Select time");if(!m?.firstName)return void de.toast.error("Enter first name");if(!m?.email&&!m?.phone)return void de.toast.error("Email or phone required");Me.length>0?_s?await Fi():await As():await Fi()},rp=I=>{const R=I.replace(/\s/g,"");return/^4/.test(R)?"VISA":/^5[1-5]/.test(R)?"MASTERCARD":/^3[47]/.test(R)?"AMEX":/^6/.test(R)?"DISCOVER":"UNKNOWN"},np=async I=>{try{w(!0);const R=_?.appointmentId,Q=String(_?.customerId);if(!R||!r)return de.toast.error("Something went wrong."),!1;const se=rp(I.number),ve=await l1({appointmentId:R,customerId:Q,outletId:r,referenceNo:R,currency:"USD",amountCents:Math.round(Ts*100),tipAmountCents:j==="card"?G0:0,taxAmountCents:j==="card"?W0:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:I.name,cardNumber:I.number.replace(/\s/g,""),cardType:se,cardExpiry:y$(I.expiry),cvData:I.cvv},billingContact:{name:{firstName:m?.firstName??"",lastName:m?.lastName??""},email:m?.email??""}}}),he=ve?.data?.data??ve?.data??ve??{},Ae=he?.orderId;if(String(he?.mappedStatus).toLowerCase()==="succeeded"||String(he?.reasonMessage).toLowerCase()==="success"){if(de.toast.success("Payment successful!"),Ae)try{await d1(Ae)}catch(Fe){de.toast.warning(Fe instanceof Error?Fe.message:String(Fe??"Payment done, but finalize failed"))}}else de.toast.warning("Payment pending");return C(!1),e(Hi(String(_?.appointmentId))),e(Ne()),!0}catch(R){return de.toast.warning(R instanceof Error?R.message:"Payment failed, but appointment is booked"),C(!1),e(Hi(String(_?.appointmentId))),e(Ne()),!0}finally{w(!1)}},ip=()=>C(!1),ap=()=>!h||!m?.firstName||!m?.email&&!m?.phone;return(0,d.jsxs)(Dt,{isSidebarOpen:X,handleSidebarOpen:()=>q(I=>!I),sidebar:(0,d.jsx)(ms,{buttonText:"Book Appointment",onButtonClick:tp,showTip:j==="card",tipPct:y,onTipChange:I=>e(f1(I??0)),consentRequired:Me?.length>0,consentCompleted:Os,totalConsents:js,checkingConsent:B,loading:$,isBookingDisabled:ap(),handleSidebarOpen:()=>q(I=>!I)}),isConfirm:!0,children:[(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl",children:"Confirm Booking"}),(0,d.jsx)("p",{className:"text-sm text-black/60 mb-6 max-md:text-xs",children:"Review your appointment details before booking"}),(0,d.jsxs)("div",{className:"max-md:max-w-full",children:[(0,d.jsxs)("div",{className:"flex gap-3 items-center p-3 bg-surface rounded-sm mb-2",children:[i&&(0,d.jsx)("div",{className:"w-10 h-10 rounded-sm flex items-center justify-center text-white text-xs",children:(0,d.jsx)("img",{src:i??"/logo.svg",alt:"Logo",className:"w-full h-full object-cover"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:a??"-"}),(0,d.jsxs)("p",{className:"text-xs text-black/70",children:[o??"-",(0,d.jsx)("br",{})]})]})]}),(0,d.jsx)("div",{className:"h-[calc(100dvh-285px)] max-md:h-[calc(100dvh-200px)] overflow-y-auto scrollbar-none",children:(0,d.jsxs)("div",{className:"xl:flex gap-7 justify-between",children:[(0,d.jsxs)("div",{className:"w-full",children:[(0,d.jsx)(kd,{children:"Appointment"}),(0,d.jsxs)(v$,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)(b$,{pro:c}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:c?.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500 line-clamp-1",children:g.map(I=>I.name).join(", ")})]}),(0,d.jsxs)("span",{className:"font-mono font-semibold",children:["$",Di]})]}),(0,d.jsxs)("div",{className:"flex flex-row items-center gap-2 mt-3 pt-3 border-t",children:[(0,d.jsx)(kb,{}),(0,d.jsx)("span",{className:"font-semibold text-sm",children:z0??"No time selected"})]})]})]}),(0,d.jsxs)("div",{className:"w-full",children:[(0,d.jsx)(kd,{children:"Payment Method"}),(0,d.jsx)(Dd,{icon:(0,d.jsx)(u3,{}),label:"Pay in person",selected:j==="person",onClick:()=>M("person")}),(0,d.jsx)(Dd,{icon:(0,d.jsx)(zb,{}),label:"Pay with card",selected:j==="card",onClick:()=>M("card")})]})]})})]})]})]}),E&&(0,d.jsx)(G3,{onClose:ip,onPay:np,amount:Ts}),V&&re&&(0,d.jsx)(h$,{enforcement:H,heading:U,consent:W,onClose:J0,onConfirm:Z0},re??"consent")]})}function v$({children:e}){return(0,d.jsx)("div",{className:"bg-white border rounded-sm p-4 mb-2 text-sm",children:e})}function b$({pro:e}){return(0,d.jsx)(d.Fragment,{children:e.imageUrl?(0,d.jsx)("img",{src:e.imageUrl,alt:e.name,className:"w-10 h-10 rounded-full object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-full bg-black text-white flex items-center justify-center",style:{background:e.color??"#111"},children:lr(e.name)})})}function kd({children:e}){return(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[1.5px] text-black/70 mt-5 mb-2",children:e})}function Dd({icon:e,label:t,selected:r,onClick:n}){return(0,d.jsxs)("div",{onClick:n,className:`flex flex-row items-center gap-3 p-3 border rounded-sm cursor-pointer mb-2 ${r?"border-red bg-red/5":"border-border"}`,children:[(0,d.jsx)("div",{children:e}),t,(0,d.jsx)("span",{className:"ml-auto",children:r&&(0,d.jsx)(fs,{})})]})}var e0={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}"]]]}},$$=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 x$(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 w$(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 S$(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=C$(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
35
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E$(e,t){if(e){if(typeof e=="string")return Ld(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 Ld(e,t)}}function Ld(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 T$(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=P$(e.split("")),l;!(l=s()).done;){var c=l.value;if(c!==t){o+=c;continue}if(o+=i[a],a++,a===i.length&&i.length<n)break}return r&&(o=N$(o,e)),{text:o,template:e}}}function j$(e,t,r){typeof r=="string"&&(r=T$(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 O$(e){return e.hasAttribute("readonly")}function _$(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}var Fd={Backspace:8,Delete:46};function A$(e){switch(e.keyCode){case Fd.Backspace:return"Backspace";case Fd.Delete:return"Delete"}}function I$(e){return e.selectionStart}function t0(e,t){t!==void 0&&(M$()?setTimeout(function(){return e.setSelectionRange(t,t)},0):e.setSelectionRange(t,t))}function M$(){if(typeof navigator<"u")return k$.test(navigator.userAgent)}var k$=/Android/i;function D$(e,t,r,n,i){so(t,r,n,void 0,i)}function R$(e,t,r,n,i){if(!O$(t)){var a=A$(e);switch(a){case"Delete":case"Backspace":e.preventDefault();var o=_$(t);return o?(L$(t,o),so(t,r,n,void 0,i)):so(t,r,n,a,i);default:}}}function L$(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,t0(e,t.start)}function so(e,t,r,n,i){var a=w$(e.value,I$(e),t),o=a.value,s=a.caret;if(n){var l=x$(o,s,n);o=l.value,s=l.caret}var c=j$(o,s,r),u=c.text;s=c.caret,e.value=u,t0(e,s),i&&i(o)}var F$=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Vd(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?Vd(Object(r),!0).forEach(function(n){V$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B$(e,t){if(e==null)return{};var r=U$(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 U$(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 z$(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,c=e.onKeyDown,u=B$(e,F$),f=(0,b.useRef)(),h=(0,b.useCallback)(function(g){f.current=g,t&&(typeof t=="function"?t(g):t.current=g)},[t]),m=(0,b.useCallback)(function(g){return D$(g,f.current,r,n,l)},[f,r,n,l]),p=(0,b.useCallback)(function(g){if(c&&c(g),!g.defaultPrevented)return R$(g,f.current,r,n,l)},[f,r,n,l,c]),y=Rt(Rt({},u),{},{ref:h,onChange:m,onKeyDown:p});return s?Rt(Rt({},y),{},{value:n(Bd(i)?"":i).text}):Rt(Rt({},y),{},{defaultValue:n(Bd(a)?"":a).text})}function Bd(e){return e==null}var W$=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Ud(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 G$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(r),!0).forEach(function(n){H$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ud(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K$(e,t){if(e==null)return{};var r=q$(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 q$(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,c=e.controlled,u=e.onKeyDown,f=e.type,h=f===void 0?"text":f,m=K$(e,W$),p=z$(G$({ref:t,parse:i,format:a,value:o,defaultValue:s,onChange:l,controlled:c,onKeyDown:u,type:h},m));return b.default.createElement(n,p)}ti=b.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 Y$=ti;function zd(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 X$={}.constructor;function jt(e){return e!=null&&e.constructor===X$}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 Oi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wd(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,Z$(n.key),n)}}function _i(e,t,r){return t&&Wd(e.prototype,t),r&&Wd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z$(e){var t=J$(e,"string");return er(t)=="symbol"?t:t+""}function J$(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)}var Q$="1.2.0",ex="1.7.35",Gd=" ext. ",tx=/^\d+$/,me=(function(){function e(t){Oi(this,e),r0(t),this.metadata=t,i0.call(this,t)}return _i(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&&tx.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Hd(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Hd(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}}])})(),Hd=(function(){function e(t,r){Oi(this,e),this.globalMetadataObject=r,this.metadata=t,i0.call(this,r.metadata)}return _i(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 rx(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()&&Kd(this.types(),r))return new ix(Kd(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?Gd:this.metadata[13]||Gd}}])})(),rx=(function(){function e(t,r){Oi(this,e),this._format=t,this.metadata=r}return _i(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()&&!nx.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])})(),nx=/^\(?\$1\)?$/,ix=(function(){function e(t,r){Oi(this,e),this.type=t,this.metadata=r}return _i(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 Kd(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 r0(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!jt(e)||!jt(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(jt(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+ax(e)+": "+e,"."))}var ax=function(t){return er(t)};function gt(e,t){if(t=new me(t),t.hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function n0(e,t){return t.countries.hasOwnProperty(e)}function i0(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?zd(t,Q$)===-1?this.v2=!0:zd(t,ex)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function ox(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=sx(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 Cx(e,t){if(e){if(typeof e=="string")return Xd(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)?Xd(e,t):void 0}}function Xd(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 l0(e,t){var r=t.countries,n=t.metadata;n=new me(n);for(var i=Sx(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(vs({phone:e,country:o},void 0,n.metadata))return o}}var Nx=!1;function bs(e,t){var r=t.nationalNumber,n=t.metadata;if(Nx&&n.isNonGeographicCallingCode(e))return"001";var i=n.getCountryCodesForCallingCode(e);if(i)return i.length===1?i[0]:l0(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(!Px(e,a,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=bs(r.numberingPlan.callingCode(),{nationalNumber:a,metadata:r})),!Ex(a,t,r)))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:i}}function Px(e,t,r){return!(ot(e,r.nationalNumberPattern())&&!ot(t,r.nationalNumberPattern()))}function Ex(e,t,r){switch(Ai(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function d0(e,t,r,n,i){var a=t||r?gt(t||r,i):n;if(e.indexOf(a)===0){i=new me(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())||Ai(l,t,i)==="TOO_LONG")return{countryCallingCode:a,number:o}}return{number:e}}function $s(e,t,r,n,i){if(!e)return{};var a;if(e[0]!=="+"){var o=s0(e,t||r,n,i);if(o&&o!==e)a=!0,e="+"+o;else{if(t||r||n){var s=d0(e,t,r,n,i),l=s.countryCallingCode,c=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:e}}}if(e[1]==="0")return{};i=new me(i);for(var u=2;u-1<=3&&u<=e.length;){var f=e.slice(1,u);if(i.hasCallingCode(f))return i.selectNumberingPlan(f),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:f,number:e.slice(u)};u++}return{}}function c0(e){return e.replace(new RegExp("[".concat(Ge,"]+"),"g")," ").trim()}var u0=/(\$\d)/;function f0(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(u0,t.nationalPrefixFormattingRule()):t.format());return n?c0(a):a}var Tx=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function jx(e,t,r){var n=new me(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(Tx.test(n.IDDPrefix()))return n.IDDPrefix()}var Ox=";ext=",Lt=function(t){return"([".concat(Pe,"]{1,").concat(t,"})")};function h0(e){var t="20",r="15",n="9",i="6",a="[ \\t,]*",o="[:\\..]?[ \\t,-]*",s="#?",l="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[ \\t]*",h="(?:,{2}|;)",m=Ox+Lt(t),p=a+l+o+Lt(t)+s,y=a+c+o+Lt(n)+s,g=u+Lt(i)+"#",v=f+h+o+Lt(r)+s,x=f+"(?:,)+"+o+Lt(n)+s;return m+"|"+p+"|"+y+"|"+g+"|"+v+"|"+x}var _x="["+Pe+"]{2}",Ax="["+Ii+"]{0,1}(?:["+Ge+"]*["+Pe+"]){3,}["+Ge+Pe+"]*",Ix=new RegExp("^["+Ii+"]{0,1}(?:["+Ge+"]*["+Pe+"]){1,2}$","i"),Mx=Ax+"(?:"+h0()+")?",kx=new RegExp("^"+_x+"$|^"+Mx+"$","i");function Dx(e){return e.length>=2&&kx.test(e)}function Rx(e){return Ix.test(e)}function Lx(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 Zd={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function Fx(e,t,r,n){if(r?r=Ux({},Zd,r):r=Zd,n=new me(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 Lx({number:"+".concat(i).concat(a),ext:e.ext});case"IDD":if(!r.fromCountry)return;var s=Bx(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=Vx(n.formats(),e);return a?f0(e,a,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function Vx(e,t){return zx(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 Bx(e,t,r,n,i){if(gt(n,i.metadata)===r){var a=ri(e,t,"NATIONAL",i);return r==="1"?r+" "+a:a}var o=jx(n,void 0,i.metadata);if(o)return"".concat(o," ").concat(r," ").concat(ri(e,null,"INTERNATIONAL",i))}function Ux(){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 zx(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}function Cr(e){"@babel/helpers - typeof";return Cr=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},Cr(e)}function Jd(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 Qd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){Wx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wx(e,t,r){return(t=p0(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ec(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,p0(n.key),n)}}function Hx(e,t,r){return t&&ec(e.prototype,t),r&&ec(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p0(e){var t=Kx(e,"string");return Cr(t)=="symbol"?t:t+""}function Kx(e,t){if(Cr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qx=!1,m0=(function(){function e(t,r,n){if(Gx(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(jt(r)&&jt(r.countries)){n=r;var i=t;if(!Zx.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=$s(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");r0(n);var s=Xx(t,n),l=s.country,c=s.countryCallingCode;this.country=l,this.countryCallingCode=c,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}return Hx(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:px(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return dx(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return hx(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new me(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return vs(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return Fx(this,r,n?Qd(Qd({},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)}}])})(),Yx=function(t){return/^[A-Z]{2}$/.test(t)};function Xx(e,t){var r,n,i=new me(t);return Yx(e)?(r=e,i.selectNumberingPlan(r),n=i.countryCallingCode()):(n=e,qx&&i.isNonGeographicCallingCode(n)&&(r="001")),{country:r,countryCallingCode:n}}var Zx=/^\+\d+$/;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 tc(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,Qx(n.key),n)}}function Jx(e,t,r){return t&&tc(e.prototype,t),r&&tc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qx(e){var t=e4(e,"string");return tr(t)=="symbol"?t:t+""}function e4(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)}function t4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r4(e,t,r){return t=Pr(t),n4(e,xs()?Reflect.construct(t,r||[],Pr(e).constructor):t.apply(e,r))}function n4(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 i4(e)}function i4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a4(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&&Nr(e,t)}function uo(e){var t=typeof Map=="function"?new Map:void 0;return uo=function(n){if(n===null||!s4(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 o4(n,arguments,Pr(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Nr(i,n)},uo(e)}function o4(e,t,r){if(xs())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&Nr(i,r.prototype),i}function xs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xs=function(){return!!e})()}function s4(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Nr(e,t){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Nr(e,t)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(e)}var tt=(function(e){function t(r){var n;return t4(this,t),n=r4(this,t,[r]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return a4(t,e),Jx(t)})(uo(Error)),rc=new RegExp("(?:"+h0()+")$","i");function l4(e){var t=e.search(rc);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(rc),i=1;i<n.length;){if(n[i])return{number:r,ext:n[i]};i++}}function d4(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=c4(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
|
|
41
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
45
|
-
|
|
46
|
-
`.concat(JSON.stringify(h,null,2)))}}return l?{partialMatch:!0}:void 0;case"[]":for(var m=$c(t.args),p;!(p=m()).done;){var y=p.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 Mr(e){"@babel/helpers - typeof";return Mr=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},Mr(e)}function Sc(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=E9(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 n8(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 i8(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,c=!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(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function a8(e){if(Array.isArray(e))return e}function o8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oc(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,l8(n.key),n)}}function s8(e,t,r){return t&&Oc(e.prototype,t),r&&Oc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l8(e){var t=d8(e,"string");return Dr(t)=="symbol"?t:t+""}function d8(e,t){if(Dr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _c=!1,dr=(function(){function e(t,r){o8(this,e),this.metadata=new me(r);var n=t8(this.getCountryAndCallingCode(t),2),i=n[0],a=n[1];this.defaultCountry=i,this.defaultCallingCode=a,this.reset()}return s8(e,[{key:"getCountryAndCallingCode",value:function(r){var n,i;return r&&(jt(r)?(n=r.defaultCountry,i=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),i&&_c&&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 i9({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 R9({state:this.state,metadata:this.metadata}),this.parser=new Z9({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(!(_c&&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(bs(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 me(this.metadata.metadata);s.selectNumberingPlan(o);var l=s.numberingPlan.callingCode(),c=this.metadata.getCountryCodesForCallingCode(l);if(c.length>1){var u=l0(n,{countries:c,metadata:this.metadata.metadata});u&&(o=u)}}var f=new m0(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 Ac(e){return new me(e).getCountries()}function c8(e,t,r){return r||(r=t,t=void 0),new dr(t,r).input(e)}var ai=Lr($$(),1);function x0(e){var t=e.inputFormat,r=e.country,n=e.metadata;return t==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(gt(r,n)):""}function go(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}function u8(e,t,r){if(!(r&&r.ignoreRest))return g0(e,t,function(i){r&&i==="end"&&(r.ignoreRest=!0)})}function w0(e){var t=e.onKeyDown,r=e.inputFormat;return(0,b.useCallback)(function(n){if(n.keyCode===h8&&r==="INTERNATIONAL"&&n.target instanceof HTMLInputElement&&f8(n.target)===p8.length){n.preventDefault();return}t&&t(n)},[t,r])}function f8(e){return e.selectionStart}var h8=8,p8="+",m8=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function vo(){return vo=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},vo.apply(this,arguments)}function y8(e,t){if(e==null)return{};var r=g8(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 g8(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 v8(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 c=y8(r,m8),u=(0,b.useCallback)(function(h){var m=new dr(a,l),p=x0({inputFormat:o,country:a,metadata:l}),y=m.input(p+h),g=m.getTemplate();return p&&(y=go(y,p),g&&(g=go(g,p))),{text:y,template:g}},[a,l]),f=w0({onKeyDown:i,inputFormat:o});return b.default.createElement(Y$,vo({},c,{ref:n,parse:u8,format:u,onKeyDown:f}))}return t=b.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 b8=v8(),$8=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function bo(){return bo=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},bo.apply(this,arguments)}function x8(e,t){if(e==null)return{};var r=w8(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 w8(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 S8(e){function t(r,n){var i=r.value,a=r.onChange,o=r.onKeyDown,s=r.country,l=r.inputFormat,c=r.metadata,u=c===void 0?e:c,f=r.inputComponent,h=f===void 0?"input":f;r.international,r.withCountryCallingCode;var m=x8(r,$8),p=x0({inputFormat:l,country:s,metadata:u}),y=(0,b.useCallback)(function(v){var x=fo(v.target.value);x===i&&Ic(p,x,s,u).indexOf(v.target.value)===0&&(x=x.slice(0,-1)),a(x)},[p,i,a,s,u]),g=w0({onKeyDown:o,inputFormat:l});return b.default.createElement(h,bo({},m,{ref:n,value:Ic(p,i,s,u),onChange:y,onKeyDown:g}))}return t=b.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 C8=S8();function Ic(e,t,r,n){return go(c8(e+t,r,n),e)}function N8(e){return Mc(e[0])+Mc(e[1])}function Mc(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var P8=["value","onChange","options","disabled","readOnly"],E8=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function T8(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=j8(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.
|
|
50
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j8(e,t){if(e){if(typeof e=="string")return kc(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 kc(e,t)}}function kc(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 oi(){return oi=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},oi.apply(this,arguments)}function S0(e,t){if(e==null)return{};var r=O8(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 O8(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 C0(e){var t=e.value,r=e.onChange,n=e.options,i=e.disabled,a=e.readOnly,o=S0(e,P8),s=(0,b.useCallback)(function(l){var c=l.target.value;r(c==="ZZ"?void 0:c)},[r]);return(0,b.useMemo)(function(){return P0(n,t)},[n,t]),b.default.createElement("select",oi({},o,{disabled:i||a,readOnly:a,value:t||"ZZ",onChange:s}),n.map(function(l){var c=l.value,u=l.label,f=l.divider;return b.default.createElement("option",{key:f?"|":c||"ZZ",value:f?"|":c||"ZZ",disabled:!!f,style:f?_8:void 0},u)}))}C0.propTypes={value:O.default.string,onChange:O.default.func.isRequired,options:O.default.arrayOf(O.default.shape({value:O.default.string,label:O.default.string,divider:O.default.bool})).isRequired,disabled:O.default.bool,readOnly:O.default.bool};var _8={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function N0(e){var t=e.value,r=e.options,n=e.className,i=e.iconComponent;e.getIconAspectRatio;var a=e.arrowComponent,o=a===void 0?A8:a,s=e.unicodeFlags,l=S0(e,E8),c=(0,b.useMemo)(function(){return P0(r,t)},[r,t]);return b.default.createElement("div",{className:"PhoneInputCountry"},b.default.createElement(C0,oi({},l,{value:t,options:r,className:(0,ai.default)("PhoneInputCountrySelect",n)})),c&&(s&&t?b.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},N8(t)):b.default.createElement(i,{"aria-hidden":!0,country:t,label:c.label,aspectRatio:s?1:void 0})),b.default.createElement(o,null))}N0.propTypes={iconComponent:O.default.elementType,arrowComponent:O.default.elementType,unicodeFlags:O.default.bool};function A8(){return b.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function P0(e,t){for(var r=T8(e),n;!(n=r()).done;){var i=n.value;if(!i.divider&&I8(i.value,t))return i}}function I8(e,t){return e==null?t==null:e===t}var M8=["country","countryName","flags","flagUrl"];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 k8(e,t){if(e==null)return{};var r=D8(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 D8(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 ws(e){var t=e.country,r=e.countryName,n=e.flags,i=e.flagUrl,a=k8(e,M8);return n&&n[t]?n[t]({title:r}):b.default.createElement("img",$o({},a,{alt:r,role:r?void 0:"presentation",src:i.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}ws.propTypes={country:O.default.string.isRequired,countryName:O.default.string.isRequired,flags:O.default.objectOf(O.default.elementType),flagUrl:O.default.string.isRequired};var R8=["aspectRatio"],L8=["title"],F8=["title"];function si(){return si=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},si.apply(this,arguments)}function Ss(e,t){if(e==null)return{};var r=V8(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 V8(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 Mi(e){var t=e.aspectRatio,r=Ss(e,R8);return t===1?b.default.createElement(T0,r):b.default.createElement(E0,r)}Mi.propTypes={title:O.default.string.isRequired,aspectRatio:O.default.number};function E0(e){var t=e.title,r=Ss(e,L8);return b.default.createElement("svg",si({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),b.default.createElement("title",null,t),b.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},b.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"}),b.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"}),b.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),b.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),b.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"}),b.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"})),b.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"}))}E0.propTypes={title:O.default.string.isRequired};function T0(e){var t=e.title,r=Ss(e,F8);return b.default.createElement("svg",si({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),b.default.createElement("title",null,t),b.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},b.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),b.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"}),b.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"}),b.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"}),b.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),b.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),b.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"}))}T0.propTypes={title:O.default.string.isRequired};function B8(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 j0(e){B8(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function U8(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=z8(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.
|
|
51
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8(e,t){if(e){if(typeof e=="string")return Dc(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 Dc(e,t)}}function Dc(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 W8(e,t){if(!t)return e;for(var r=[],n=[],i=r,a=function(){var c=s.value;if(c==="|")i.push({divider:!0});else if(c==="..."||c==="…")i=n;else{var u;c==="🌐"?u=void 0:u=c;var f=e.indexOf(e.filter(function(m){return m.value===u})[0]),h=e[f];e.splice(f,1),i.push(h)}},o=U8(t),s;!(s=o()).done;)a();return r.concat(e).concat(n)}function G8(e,t){if(e&&(e=e.filter(function(r){switch(r){case"🌐":case"|":case"...":case"…":return!0;default:return ki(r,t)}}),e.length>0))return e}function ki(e,t){return n0(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function O0(e,t){return e&&(e=e.filter(function(r){return ki(r,t)}),e.length===0&&(e=void 0)),e}var H8=["country","label","aspectRatio"];function xo(){return xo=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},xo.apply(this,arguments)}function K8(e,t){if(e==null)return{};var r=q8(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 q8(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 _0(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,i=e.internationalIcon;function a(o){var s=o.country,l=o.label,c=o.aspectRatio,u=K8(o,H8),f=i===Mi?c:void 0;return b.default.createElement("div",xo({},u,{className:(0,ai.default)("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":f===1,"PhoneInputCountryIcon--border":s})}),s?b.default.createElement(n,{country:s,countryName:l,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):b.default.createElement(i,{title:l,aspectRatio:f,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:O.default.string,label:O.default.string.isRequired,aspectRatio:O.default.number},a}var Z5=_0({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:ws,internationalIcon:Mi});function Y8(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=X8(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.
|
|
52
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X8(e,t){if(e){if(typeof e=="string")return Rc(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 Rc(e,t)}}function Rc(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 Z8(e,t){for(var r=Y8(e),n;!(n=r()).done;){var i=n.value;i&&J8(i,t)}}function J8(e,t){typeof e=="function"?e(t):e.current=t}var A0=O.default.shape({country_calling_codes:O.default.object.isRequired,countries:O.default.object.isRequired}),I0=O.default.objectOf(O.default.string);function nt(e,t){return"+"+gt(e,t)}function Q8(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||qt(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 M0(e,t){return Y4(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?nt(n,i):"";if(n){if(e[0]==="+"){if(a)return e.indexOf("+"+gt(n,i))===0?l5(e,n,i):"";if(r){var o=nt(n,i);return e.indexOf(o)===0?e:o}else{var s=nt(n,i);return e.indexOf(s)===0?e:s}}}else if(e[0]!=="+")return Gt(e,r,i)||"";return e}function Gt(e,t,r){if(e){if(e[0]==="+"){if(e==="+")return;var n=new dr(t,r);return n.input(e),n.getNumberValue()}if(t){var i=D0(e,t,r);return"+".concat(gt(t,r)).concat(i||"")}}}function n5(e,t,r){var n=D0(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 me(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function k0(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(qt(e,r,s)){if(a&&qt(e,a,s))return a;if(i&&qt(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,c=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,h=t.metadata;if(c&&f===!1&&n){var m=nt(n,h);if(e.indexOf(m)!==0){var p;return e&&e[0]!=="+"?(e=m+e,p=Gt(e,n,h)):e=m,{phoneDigits:e,value:p,country:n}}}c===!1&&n&&e&&e[0]==="+"&&(e=Lc(e,n,h)),e&&n&&u&&(e=n5(e,n,h)),e&&e[0]!=="+"&&(!n||c)&&(e="+"+e),!e&&r&&r[0]==="+"&&(c?n=void 0:n=i),e==="+"&&r&&r[0]==="+"&&r.length>1&&(n=void 0);var y;return e&&(e[0]==="+"&&(e==="+"||n&&nt(n,h).indexOf(e)===0)?y=void 0:y=Gt(e,n,h)),y&&(n=k0(y,{country:n,countries:l,defaultCountry:i,latestCountrySelectedByUser:a,required:!1,metadata:h}),c===!1&&n&&e&&e[0]==="+"&&(e=Lc(e,n,h),y=Gt(e,n,h))),!n&&o&&(n=i||s()),{phoneDigits:e,country:n,value:y}}function Lc(e,t,r){if(e.indexOf(nt(t,r))===0){var n=new dr(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 dr(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="+"+gt(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 D0(e,t,r){var n=new dr(t,r);n.input(e);var i=n.getNumber();return i&&i.nationalNumber}function qt(e,t,r){for(var n=nt(t,r),i=0;i<e.length&&i<n.length;){if(e[i]!==n[i])return!1;i++}return!0}function R0(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?nt(n,o):t}function Rr(e){"@babel/helpers - typeof";return Rr=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},Rr(e)}function Fc(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?Fc(Object(r),!0).forEach(function(n){d5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d5(e,t,r){return t=c5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c5(e){var t=u5(e,"string");return Rr(t)=="symbol"?t:t+""}function u5(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)}function f5(e,t,r){var n=e.metadata,i=e.countries,a=e.defaultCountry,o=e.value,s=e.reset,l=e.international,c=e.displayInitialValueAsLocalNumber,u=e.initialValueFormat,f=t.defaultCountry,h=t.value,m=t.reset;r.country;var p=r.value,y=r.hasUserSelectedACountry,g=r.latestCountrySelectedByUser,v=function(j){return R0(ln(ln({},j),{},{international:l,useNationalFormat:c||u==="national",metadata:n}))};if(s!==m)return{phoneDigits:v({value:void 0,defaultCountry:a}),value:void 0,country:a,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(a!==f){var x=!a||ki(a,n),$=!p||l&&p===v({value:void 0,defaultCountry:f});if(!y&&x&&!o&&$)return{country:a,phoneDigits:v({value:void 0,defaultCountry:a}),value:void 0}}if(!Vc(o,h)&&!Vc(o,p)){var w,E;if(o){o&&j0(o),w=M0(o,n);var C=O0(i,n);w&&w.country?(!C||C.indexOf(w.country)>=0)&&(E=w.country):(E=k0(o,{country:void 0,countries:C,metadata:n}),E||a&&o.indexOf(nt(a,n))===0&&(E=a))}var _;return o?g&&((E?g===E:qt(o,g,n))?E||(E=g):_={latestCountrySelectedByUser:void 0}):_={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},ln(ln({},_),{},{phoneDigits:v({phoneNumber:w,value:o,defaultCountry:a}),value:o,country:o?E:a})}}function Vc(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 rr(e){"@babel/helpers - typeof";return rr=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},rr(e)}function Bc(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 L0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bc(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yt.apply(this,arguments)}function 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 y5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uc(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,V0(n.key),n)}}function g5(e,t,r){return t&&Uc(e.prototype,t),r&&Uc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v5(e,t,r){return t=li(t),b5(e,F0()?Reflect.construct(t,r||[],li(e).constructor):t.apply(e,r))}function b5(e,t){if(t&&(rr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $5(e)}function $5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F0=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&&wo(e,t)}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},wo(e,t)}function Be(e,t,r){return t=V0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V0(e){var t=w5(e,"string");return rr(t)=="symbol"?t:t+""}function w5(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 S5=(function(e){function t(r){var n;y5(this,t),n=v5(this,t,[r]),Be(n,"setInputRef",function(g){Z8([n.props.inputRef,n.inputRef],g)}),Be(n,"isCountrySupportedWithError",function(g){var v=n.props.metadata;return ki(g,v)}),Be(n,"onCountryChange",function(g){var v=n.props,x=v.international,$=v.metadata,w=v.onChange,E=v.focusInputOnCountrySelection,C=n.state,_=C.phoneDigits,S=C.country,j=r5(_,{prevCountry:S,newCountry:g,metadata:$,useNationalFormat:!x}),M=Gt(j,g,$);E&&n.inputRef.current.focus(),n.setState({country:g,latestCountrySelectedByUser:g,hasUserSelectedACountry:!0,phoneDigits:j,value:M},function(){w(M)})}),Be(n,"onChange",function(g){var v=n.props,x=v.defaultCountry,$=v.onChange,w=v.addInternationalOption,E=v.international,C=v.limitMaxLength,_=v.countryCallingCodeEditable,S=v.metadata,j=n.state,M=j.countries,V=j.phoneDigits,P=j.country,U=j.latestCountrySelectedByUser,k=a5(g,{prevPhoneDigits:V,country:P,countryRequired:!w,defaultCountry:x,latestCountrySelectedByUser:U,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:M})},countries:M,international:E,limitMaxLength:C,countryCallingCodeEditable:_,metadata:S}),W=k.phoneDigits,G=k.country,H=k.value,te={phoneDigits:W,value:H,country:G};U&&H&&!qt(H,U,S)&&(te.latestCountrySelectedByUser=void 0),_===!1&&!H&&W===n.state.phoneDigits&&(te.forceRerender={}),n.setState(te,function(){return $(H)})}),Be(n,"_onFocus",function(){return n.setState({isFocused:!0})}),Be(n,"_onBlur",function(){return n.setState({isFocused:!1})}),Be(n,"onFocus",function(g){n._onFocus();var v=n.props.onFocus;v&&v(g)}),Be(n,"onBlur",function(g){var v=n.props.onBlur;n._onBlur(),v&&v(g)}),Be(n,"onCountryFocus",function(g){n._onFocus();var v=n.props.countrySelectProps;if(v){var x=v.onFocus;x&&x(g)}}),Be(n,"onCountryBlur",function(g){n._onBlur();var v=n.props.countrySelectProps;if(v){var x=v.onBlur;x&&x(g)}}),n.inputRef=b.default.createRef();var i=n.props,a=i.value;i.labels;var o=i.international,s=i.addInternationalOption,l=i.displayInitialValueAsLocalNumber,c=i.initialValueFormat,u=i.metadata,f=n.props,h=f.defaultCountry,m=f.countries;h&&(n.isCountrySupportedWithError(h)||(h=void 0)),a&&j0(a),m=O0(m,u);var p=M0(a,u);n.CountryIcon=_0(n.props);var y=Q8({value:a,phoneNumber:p,defaultCountry:h,required:!s,countries:m||Ac(u),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:m})},metadata:u});return n.state={props:n.props,country:y,countries:m,phoneDigits:R0({value:a,phoneNumber:p,defaultCountry:h,international:o,useNationalFormat:l||c==="national",metadata:u}),value:a},n}return x5(t,e),g5(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,c=a.addInternationalOption,u=a.labels,f=a.locales,h=a.metadata;return this.useMemoCountrySelectOptions(function(){return W8(e5({countries:i||Ac(h),countryNames:u,addInternationalOption:o&&s===!1?!1:c,compareStringsLocales:f}),G8(l,h))},[i,l,c,u,h])}},{key:"useMemoCountrySelectOptions",value:function(n,i){return(!this.countrySelectOptionsMemoDependencies||!N5(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,c=n.className;n.inputRef;var u=n.inputComponent,f=n.numberInputProps,h=n.smartCaret,m=n.countrySelectComponent,p=n.countrySelectProps,y=n.containerComponent,g=n.containerComponentProps;n.defaultCountry,n.countries,n.countryOptionsOrder;var v=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 x=n.metadata,$=n.international;n.locales;var w=p5(n,h5),E=this.state,C=E.country,_=E.countries,S=E.phoneDigits,j=E.isFocused,M=h?b8:C8,V=this.getCountrySelectOptions({countries:_});return b.default.createElement(y,Yt({style:l,className:(0,ai.default)(c,"PhoneInput",{"PhoneInput--focus":j,"PhoneInput--disabled":a,"PhoneInput--readOnly":o})},g),b.default.createElement(m,Yt({name:i?"".concat(i,"Country"):void 0,"aria-label":v.country},p,{value:C,options:V,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:a||p&&p.disabled,readOnly:o||p&&p.readOnly,iconComponent:this.CountryIcon})),b.default.createElement(M,Yt({ref:this.setInputRef,type:"tel",autoComplete:s},f,w,{inputFormat:$===!0?"INTERNATIONAL":$===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:$?!0:void 0,withCountryCallingCode:$?!0:void 0,name:i,metadata:x,country:C,value:S||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:a,readOnly:o,inputComponent:u,className:(0,ai.default)("PhoneInputInput",f&&f.className,w.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return L0({props:n},f5(n,i.props,i))}}])})(b.default.PureComponent),B0=b.default.forwardRef(function(e,t){return b.default.createElement(S5,Yt({},C5(e),{inputRef:t}))});B0.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:I0,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:A0,onCountryChange:O.default.func,focusInputOnCountrySelection:O.default.bool};var zc={autoComplete:"tel",countrySelectComponent:N0,flagComponent:ws,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 C5(e){e=L0({},e);for(var t in zc)e[t]===void 0&&(e[t]=zc[t]);return e}function N5(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 So(){return So=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},So.apply(this,arguments)}function T5(e,t){if(e==null)return{};var r=j5(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 j5(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 U0(e){var t=b.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 b.default.createElement(B0,So({},l,{ref:n,metadata:a,labels:s}))});return t.propTypes={metadata:A0,labels:I0},t}var J5=U0();function O5(e,t){var r=Array.prototype.slice.call(t);return r.push(e0),e.apply(this,r)}var _5=U0(e0);function ga(){return O5(Q4,arguments)}var A5=["IN","US","CA","PH","NZ","AU","CN"];function I5(){const e=(0,K.useDispatch)(),{tenantId:t}=(0,K.useSelector)(k=>k?.outletDetails),{height:r}=qr(),{userDetails:n}=(0,K.useSelector)(k=>k.appointment),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(null),[l,c]=(0,b.useState)(!1),u=(0,b.useRef)(""),f=(0,b.useRef)(null),{register:h,handleSubmit:m,control:p,watch:y,reset:g,trigger:v,setValue:x,formState:{errors:$,isSubmitted:w,isSubmitting:E}}=(0,rt.useForm)({defaultValues:{firstName:"",lastName:"",phone:"",email:""},mode:"onSubmit"}),C=y("phone"),_=y("email");(0,b.useEffect)(()=>{g({...n,phone:n?.phone||""},{keepErrors:!0,keepDirty:!1})},[n,g]),(0,b.useEffect)(()=>{w&&v(["phone","email"])},[C,_,w,v]);const S=k=>k?.replace(/\s+/g,"")||"",j=k=>/^\S+@\S+\.\S+$/.test(k),M=k=>{e(ll({...k,phone:k?.phone??""})),e(Ne())},V=(0,b.useCallback)(async({value:k,type:W})=>{if(!k)return;let G="";if(W==="phone"){if(!ga(k))return;G=S(k)}if(W==="email"){if(!j(k))return;G=k.trim()}if(G&&!(u.current===G&&l)){u.current=G,a(!0),s(W);try{const H=(await s1({search:G,tenantId:t}))?.data?.[0];H?(x("firstName",H.first_name||"",{shouldValidate:!0}),x("lastName",H.last_name||""),H.phone&&ga(H.phone)&&x("phone",H.phone),H.email&&x("email",H.email),e(ll({email:H.email,firstName:H.first_name,lastName:H.last_name,phone:H.phone})),c(!0)):c(!1)}catch(H){console.error(H)}finally{a(!1),s(null)}}},[e,x,l]),P=()=>{g({firstName:"",lastName:"",email:"",phone:""}),c(!1),u.current="",e(h1())};(0,b.useEffect)(()=>(f.current=(0,hp.debounce)(V,800),()=>{f.current?.cancel?.()}),[V]);const U=(k,W,G)=>{if(W&&W(k),!k){f.current?.cancel?.(),u.current="",c(!1),s(null);return}s(G),f.current?.({value:k,type:G})};return(0,d.jsx)(Dt,{sidebar:(0,d.jsx)(ms,{buttonText:"Confirm Details",onButtonClick:m(M)}),renderButton:(0,d.jsx)("button",{onClick:m(M),disabled:E,className:"p-3! px-8.5! text-sm relative rounded-full btn-bg text-white hover:text-white border-none font-dm font-bold tracking-[1.5px] uppercase cursor-pointer transition-all duration-200 disabled:bg-[#ccc] disabled:cursor-not-allowed",children:(0,d.jsx)("span",{className:"flex flex-row justify-center items-center gap-2",children:E?"Submitting...":"Confirm Details"})}),children:(0,d.jsxs)("form",{children:[(0,d.jsx)(kt,{}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl",children:"Your Details"}),(0,d.jsx)("div",{className:"overflow-y-auto scrollbar-none pb-20 lg:pb-4",style:{height:`${r-200}px`},children:(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 lg:gap-6 mt-5",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("label",{className:"text-xs font-semibold text-gray-600 flex mb-1",htmlFor:"phone",children:["Phone ",!_&&(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(rt.Controller,{control:p,name:"phone",rules:{validate:k=>{const W=!!S(k),G=!!_?.trim();return!W&&!G?"Enter phone or email":W&&!ga(k)?"Enter valid phone number":!0}},render:({field:k})=>(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(_5,{...k,id:"phone",international:!0,countries:A5,defaultCountry:"US",value:k.value||"",onChange:W=>U(W??"",k.onChange,"phone"),countryCallingCodeEditable:!1,className:"w-full py-2 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"}),i&&o==="phone"&&(0,d.jsx)("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:(0,d.jsx)("div",{className:"h-4 w-4 border-2 border-gray-300 border-t-black rounded-full animate-spin"})})]})}),$.phone&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:$.phone.message}),l&&(0,d.jsxs)("div",{className:"mt-1 text-xs flex items-center gap-1 text-gray-600",children:["Using existing customer",(0,d.jsx)("span",{onClick:P,className:"text-red cursor-pointer",children:"Clear"})]})]}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("label",{className:"text-xs font-semibold text-gray-600 flex mb-1",htmlFor:"email",children:["Email ",!C&&(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{id:"email",...h("email",{validate:k=>{const W=!!k?.trim(),G=!!S(C);return!W&&!G?"Enter phone or email":W&&!/^\S+@\S+\.\S+$/.test(k)?"Invalid email":!0},onChange:k=>{U(k.target.value,null,"email")}}),autoComplete:"email",placeholder:"Email address",className:"w-full py-2 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"}),i&&o==="email"&&(0,d.jsx)("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:(0,d.jsx)("div",{className:"h-4 w-4 border-2 border-gray-300 border-t-black rounded-full animate-spin"})})]}),$.email&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:$.email.message})]}),(0,d.jsxs)("div",{className:"flex flex-col ",children:[(0,d.jsxs)("label",{htmlFor:"first_name",className:"text-xs font-semibold text-gray-600 flex mb-1",children:["First Name ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)("input",{id:"first_name",...h("firstName",{required:"First name required",pattern:{value:/^[A-Za-z\s]+$/,message:"Only letters are allowed"}}),autoComplete:"given-name",placeholder:"First Name",className:"w-full py-2 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"}),$.firstName&&(0,d.jsx)("p",{className:"text-red-500 text-sm mt-1",children:$.firstName.message})]}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("label",{htmlFor:"last_name",className:"text-xs font-semibold text-gray-600 flex mb-1",children:"Last Name"}),(0,d.jsx)("input",{id:"last_name",autoComplete:"family-name",...h("lastName"),placeholder:"Last Name",className:"w-full py-2 px-3 border border-border rounded-sm text-sm outline-none focus:border-red"})]})]})})]})]})})}var M5={hidden:{opacity:0},visible:{opacity:1,transition:{duration:.5,delay:.3}}};function k5(){const e=(0,K.useDispatch)(),t=(0,K.useSelector)(C=>C.appointment.appointmentId),{tenantId:r}=(0,K.useSelector)(C=>C.outletDetails),[n,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(!0),[s,l]=(0,b.useState)(null),[c,u]=(0,b.useState)(!1);(0,b.useEffect)(()=>{if(!t){l("No appointment ID provided"),o(!1);return}(async()=>{try{const _=await o1(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"}),Do.purge()};if(a)return(0,d.jsx)("div",{className:"flex items-center justify-center min-h-[calc(100dvh-56px)]",children:(0,d.jsx)("p",{children:"Loading appointment details..."})});if(s||!n)return(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[calc(100dvh-56px)]",children:[(0,d.jsx)("p",{className:"text-red-600 mb-4",children:s||"Appointment not found"}),(0,d.jsxs)("button",{onClick:f,className:"px-7 py-3 bg-btn-bg text-btn-text border-btn-bg hover:text-btn-bg-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover text-base cursor-pointer uppercase tracking-wide rounded-sm flex flex-row items-center gap-2",children:[(0,d.jsx)(Od,{}),"Book Another Appointment"]})]});const{staff:h,outlet:m,services:p}=n,y=p?.reduce((C,_)=>C+Number(_.price||0),0),g=(n.tipsCents||0)/100,v=(n.taxCents||0)/100,x=(n.totalCents||0)/100,$=x>0?x.toFixed(2):(y+g+v).toFixed(2),w=c?p:p.slice(0,5),E=p.length-5;return(0,d.jsx)("div",{className:"h-[calc(100dvh-5px)] max-md:h-[calc(100dvh-5px)] overflow-y-auto scrollbar-none",children:(0,d.jsxs)(at.div,{initial:"hidden",animate:"visible",variants:M5,className:"flex flex-col h-full items-center justify-center bg-canvas text-center lg:p-12 p-4",children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-bg text-white rounded-full shrink-0 flex items-center justify-center text-4xl mb-6 success-pulse",children:(0,d.jsx)(fs,{})}),(0,d.jsx)("h1",{className:"font-bebas text-xl md:text-2xl lg:text-4xl mb-2",children:"You're Booked!"}),(0,d.jsxs)("p",{className:"text-sm text-muted mb-6 leading-normal",children:["Your appointment has been confirmed.",(0,d.jsx)("br",{}),"A confirmation has been sent to your email."]}),(0,d.jsxs)("div",{className:"w-full max-w-142.5",children:[(0,d.jsxs)("div",{className:"bg-white rounded-md text-left mb-6 p-4 shadow-sm",children:[(0,d.jsxs)("div",{className:"flex justify-between py-2 pt-0 border-b border-gray-100",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Outlet Name"}),(0,d.jsx)("span",{className:"text-sm font-medium text-gray-800",children:m?.outletName||"-"})]}),(0,d.jsxs)("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Professional"}),(0,d.jsx)("span",{className:"text-sm font-medium text-gray-800",children:h?`${h?.firstName} ${h?.lastName}`:"-"})]}),(0,d.jsxs)("div",{className:"flex justify-between items-center py-2 border-gray-100",children:[(0,d.jsxs)("span",{className:"text-gray-500 text-sm font-bold",children:["Services (",p.length,")"]}),p.length>5&&(0,d.jsx)("button",{onClick:()=>u(C=>!C),className:"text-blue-600 text-xs font-medium cursor-pointer",children:c?"Hide":(0,d.jsxs)("span",{className:"flex flex-row items-center gap-1",children:["Show",(0,d.jsx)(Bh,{size:16})]})})]}),(0,d.jsxs)("div",{className:"py-2 border-b border-gray-100 text-gray-600 text-sm whitespace-pre-wrap overflow-y-auto max-h-[23vh] font-bold",children:[w?.map(C=>(0,d.jsxs)("div",{className:"flex justify-between text-sm py-1.5",children:[(0,d.jsx)("span",{className:"text-gray-700",children:C.serviceName}),(0,d.jsxs)("span",{className:"text-gray-900 flex flex-row items-center",children:[(0,d.jsx)($e,{size:14}),Number(C.price).toFixed(2)]})]},C.id)),!c&&E>0&&(0,d.jsxs)("div",{className:"text-center text-xs text-gray-500 mt-2 flex flex-row items-center justify-center gap-1",children:[(0,d.jsx)(hs,{size:14}),E," more services"]})]}),(0,d.jsxs)("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Date & Time"}),(0,d.jsxs)("span",{className:"text-sm font-medium text-gray-800",children:[n.appointmentDate," at"," ",n.startTime]})]}),(0,d.jsxs)("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Tip"}),(0,d.jsxs)("span",{className:"text-gray-800 font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:14}),g.toFixed(2)]})]}),(0,d.jsxs)("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Tax"}),(0,d.jsxs)("span",{className:"text-gray-800 font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:14}),v.toFixed(2)]})]}),(0,d.jsxs)("div",{className:"flex justify-between py-4 pb-0",children:[(0,d.jsx)("span",{className:"text-gray-600 text-sm font-bold",children:"Total Amount"}),(0,d.jsxs)("span",{className:"text-red font-semibold flex flex-row items-center",children:[(0,d.jsx)($e,{size:14}),$]})]})]}),(0,d.jsxs)("button",{onClick:f,className:"bg-btn-bg text-btn-text border-btn-bg hover:text-btn-text-hover hover:border-btn-bg-hover hover:bg-btn-bg-hover px-7 py-2.5 cursor-pointer md:text-base text-sm w-full flex flex-row items-center justify-center gap-2 uppercase tracking-wide rounded-sm transition",children:[(0,d.jsx)(Od,{}),"Book Another Appointment"]})]})]})})}function D5(){const{currentStep:e}=(0,K.useSelector)(n=>n.breadcrumbs),{isService:t}=(0,K.useSelector)(n=>n.outletDetails),r={services:t?M3:A3,professionals:t?O3:E3,time:B3,details:I5,confirm:g$,success:k5}[e];return(0,d.jsx)("div",{className:"h-screen flex flex-col bg-canvas text-copy overflow-hidden",children:(0,d.jsx)("div",{className:"flex-1 relative",children:(0,d.jsx)("div",{className:"h-full animate-fade-in",children:(0,d.jsx)(r,{})},e)})})}function R5(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D5,{}),(0,d.jsx)(de.ToastContainer,{position:"top-right",autoClose:3e3})]})}var L5=({bookingCode:e})=>{const t=(0,K.useDispatch)(),r=(0,K.useSelector)(c=>c.outletList.outlets),[n,i]=(0,b.useState)(null),{id:a}=(0,K.useSelector)(c=>c.outletDetails),o=(0,b.useCallback)(async()=>{try{i(null);const c=await nl(e);if(c?.success){const u=c?.data?.data?.outlets||[];t(m1(u)),N1(c?.data?.result),u.length===1&&l(u[0])}else i(c?.message||"Failed to fetch data")}catch(c){console.error(c),i(c?.message||"Something went wrong")}},[e]),s=async(c,u)=>{try{const f=await nl(e,c,u);f?.success||i(f?.message||"Failed to fetch outlet data"),t(e1(f?.data?.token)),t(Xm(f?.data?.data?.outlets[0]?.isService)),t(r1({standaloneCategories:f?.data?.data?.standaloneCategories,superCategories:f?.data?.data?.superCategories,staff:f?.data?.data?.staff}))}catch(f){console.error(f),i(f?.message||"Something went wrong")}},l=async c=>{c&&(await s(String(c?.tenantId),String(c?.id)),t(Qm({...c,tenantId:c.tenantId??"",currency:c.currency??"",outletTimeZoneDate:ke.DateTime.now().setZone(c?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:ke.DateTime.fromISO(c?.createdAt,{zone:"utc"}).setZone(c?.timeZone).year})),t(Oa(c?.isService?"services":"professionals")))};return(0,b.useEffect)(()=>{o()},[o]),n?(0,d.jsx)("div",{className:"arravpos-error-box",children:n}):(0,d.jsx)(d.Fragment,{children:r.length>1&&!a?(0,d.jsx)(x3,{outlets:r,onSelectOutlet:c=>{c?.id&&l(c)}}):(0,d.jsx)(R5,{})})},F5=e=>(0,d.jsx)(C1,{children:(0,d.jsx)(L5,{...e})});exports.BookingPlugin=F5;
|
|
29
|
+
`,children:[(0,c.jsx)("span",{className:`aaravpos-step-icon ${m?"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}){return(0,c.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,c.jsxs)("div",{className:"aaravpos-layout-wrapper",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",children:t})]}),a&&(0,c.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,c.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var qh=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:i})=>{const{outletName:a}=(0,G.useSelector)(l=>l.outletDetails),{isService:o}=(0,G.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:[e?.id&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Professional"}),(0,c.jsxs)("div",{className:"aaravpos-pro-card aaravpos-mb-10",children:[e.imageUrl?(0,c.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:e.color||"#111"},children:lr(e.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:e.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:e.staff_type})]})]})]}),(0,c.jsxs)("div",{className:"aaravpos-margin-top-20",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)(me,{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)(me,{size:18}),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})]})})]})]})]})},P$={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 E$(){const{width:e}=Yr(),t=(0,G.useDispatch)(),{staff:r,selectedProfessional:n}=(0,G.useSelector)(o=>o.service),i=e<768,a=!r||r.length===0;return(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(qh,{pro:n,goToStep:()=>t(we())}),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((o,s)=>(0,c.jsxs)(Ke.div,{variants:P$,initial:"hidden",animate:"visible",exit:"exit",custom:s,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{t(qd(o)),t(Ht(null)),i&&t(we())},className:`aaravpos-pro-card ${n?.id===o.id?"active":""}`,children:[o.imageUrl?(0,c.jsx)("img",{src:o.imageUrl,alt:o.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:o.color||"#111"},children:lr(o.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:o.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:o.staff_type})]})]},o.id))})})})]})]})}var T$=e=>Number(e.price||e.min_price||0),no=(e,{perUnit:t=!1}={})=>{const r=T$(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)},O$={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 _$(){const e=(0,G.useDispatch)(),{width:t}=Yr(),{staff:r,selectedServices:n,selectedProfessional:i}=(0,G.useSelector)(p=>p.service),[a,o]=(0,$.useState)(!1),s=n.map(p=>p.id),l=(0,$.useMemo)(()=>{if(!i?.id)return[];const p=r.find(v=>v.id===i.id);return p?n.map(v=>{const y=p?.assignments?.find(x=>x.id===v?.id),g={...v,price:y?.price||v.price||v.min_price||0,duration:y?.duration||v.estimated_time||v.min_time||0};return{...g,tax:no(g)}}):[]},[i,r,n]),u=l.reduce((p,v)=>p+Number(v.price||0)*v.qty,0),d=l.reduce((p,v)=>p+(v?.duration||0)*v.qty,0),f=(0,$.useMemo)(()=>s.length?r.filter(p=>{const v=p.assignments??[];return s?.every(y=>v.some(g=>String(g.id)==String(y)&&!!g?.assigned))}):[],[r,s]),h=t<768,m=s.length>0;return(0,$.useEffect)(()=>{if(m&&f.length===0){const p=setTimeout(()=>o(!0),300);return()=>clearTimeout(p)}else o(!1)},[m,f]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(qh,{pro:i,selectedStaffServices:l,totalPrice:u,totalDuration:d,goToStep:()=>e(we())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(we()),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((p,v)=>(0,c.jsxs)(Ke.div,{variants:O$,initial:"hidden",animate:"visible",exit:"exit",custom:v,layout:"position",style:{willChange:"transform, opacity"},onClick:()=>{e(qd(p)),e(Ht(null)),h&&e(we())},className:`aaravpos-pro-card ${i?.id===p.id?"active":""}`,children:[p.imageUrl?(0,c.jsx)("img",{src:p.imageUrl,alt:p.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:p.color||"#111"},children:lr(p.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:p.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:p.staff_type})]})]},p.id))})})})]})]})}function Yh({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,G.useSelector)(a=>a?.outletDetails),{isService:i}=(0,G.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)(me,{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)(me,{size:18}),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 Xh(){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 A$={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 j$(){const e=(0,G.useDispatch)(),t=(0,$.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,selectedProfessional:o,loading:s}=(0,G.useSelector)(w=>w.service),[l,u]=(0,$.useState)("supercategory"),[d,f]=(0,$.useState)(null),[h,m]=(0,$.useState)(null),[p,v]=(0,$.useState)(""),y=new Set(o?o?.assignments?.map(w=>w.id):[]),g=new Set(o?o?.assignments?.map(w=>w.categoryId):[]),x=n.map(w=>({...w,services:w.services?.filter(R=>y.has(R.id))||[]})).filter(w=>g.has(w.id)&&w.services.length>0),b=r.map(w=>({...w,categories:w.categories?.map(R=>({...R,services:R.services?.filter(W=>y.has(W.id))||[]})).filter(R=>g.has(R.id)&&R.services.length>0)||[]})).filter(w=>w.categories.length>0),S=x.length>0,E=b.length>0;(0,$.useEffect)(()=>{!E&&S&&u("standalone"),!S&&E&&u("supercategory")},[S,E]);const C=x?.flatMap(w=>w.services),A=i?i.services:C,N=(0,$.useMemo)(()=>d?h?h.services||[]:d.categories?.flatMap(w=>w.services||[]):[],[d,h]),O=l==="standalone"?A:N,M=(0,$.useMemo)(()=>{const w=x?.flatMap(W=>W.services||[]),R=b?.flatMap(W=>W.categories?.flatMap(k=>k.services||[]));return[...w,...R]},[x,b]),B=(0,$.useMemo)(()=>{const w=p.trim().toLowerCase();return w?M.filter(R=>R.name?.toLowerCase().includes(w)||R.description?.toLowerCase().includes(w)):O},[p,M,O]),K=w=>w.taxRows?.some(R=>R.isActive)||!1,te=a.reduce((w,R)=>w+Number(R.price||0)*R.qty,0);return(0,$.useEffect)(()=>{if(l==="supercategory"&&b?.length>0&&!d){const w=b[0];f(w),m(null)}},[l,b,d]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Yh,{selectedServices:a,totalPrice:te,goToStep:()=>e(we())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(we()),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:[(0,c.jsx)("button",{onClick:()=>{E&&(u("supercategory"),m(null),f(null))},className:`aaravpos-tab-btn ${l==="supercategory"?"active":"inactive"}`,children:"Super Category"}),(0,c.jsx)("button",{onClick:()=>{S&&u("standalone")},className:`aaravpos-tab-btn ${l==="standalone"?"active":"inactive"} ${S?"aaravpos-tab-enabled":"aaravpos-tab-disabled"}`,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:18})}),(0,c.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:p,onChange:w=>v(w.target.value),className:"aaravpos-search-input"}),(0,c.jsx)("div",{className:"aaravpos-search-actions",children:p&&(0,c.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,c.jsx)(sr,{size:16})})})]})]}),l==="supercategory"&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{ref:t,onWheel:w=>{t.current&&(t.current.scrollLeft+=w.deltaY)},className:"aaravpos-supercategory-wrapper",children:b.map(w=>(0,c.jsxs)("button",{onClick:()=>{f(w),m(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&&(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:()=>m(null),className:`aaravpos-supercategory-btn ${h?"":"active"}`,children:["All Services (",d?.categories?.reduce((w,R)=>w+R.services.length,0),")"]}),d?.categories?.map(w=>(0,c.jsxs)("button",{onClick:()=>m(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(Wn(null)),className:`aaravpos-supercategory-btn ${i?"":"active"}`,children:["All Services (",x.reduce((w,R)=>w+R.services.length,0),")"]}),x.map(w=>(0,c.jsxs)("button",{onClick:()=>e(Wn(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,R)=>(0,c.jsx)(Xh,{},R)):(0,c.jsx)(pt,{mode:"popLayout",children:B?.length?B?.map((w,R)=>{const W=a.some(k=>k.id===w.id);return(0,c.jsxs)(Ke.div,{variants:A$,initial:"hidden",animate:"visible",exit:"exit",custom:R,layout:!0,onClick:()=>{const k=a.find(J=>J.id===w.id);k&&k.qty===1?e(Gn(String(w.id))):e(zn({...w,price:w.price?Number(w.price):void 0}))},className:`aaravpos-service-card ${W?"active":""}`,children:[K(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)(me,{size:14}),w.price]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(me,{size:14}),w.min_price," - ",(0,c.jsx)(me,{size:14}),w.max_price]})})]}),(0,c.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,c.jsx)("button",{onClick:k=>{k.stopPropagation(),e(Gn(String(w.id)))},className:"aaravpos-service-action-btn",children:(0,c.jsx)(Gh,{size:14})}),(0,c.jsx)("span",{className:"aaravpos-service-qty",children:a.find(k=>k.id===w.id)?.qty||0}),(0,c.jsx)("button",{onClick:k=>{k.stopPropagation(),a.find(J=>J.id===w.id)?e(Kd(String(w.id))):e(zn({...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:p?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}var I$={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 M$(){const e=(0,G.useDispatch)(),t=(0,$.useRef)(null),{superCategories:r,standaloneCategories:n,selectedCategory:i,selectedServices:a,loading:o}=(0,G.useSelector)(N=>N.service),{outletName:s}=(0,G.useSelector)(N=>N?.outletDetails),[l,u]=(0,$.useState)("supercategory"),[d,f]=(0,$.useState)(null),[h,m]=(0,$.useState)(null),[p,v]=(0,$.useState)(""),y=n?.flatMap(N=>N.services),g=i?i.services:y,x=(0,$.useMemo)(()=>d?h?h.services||[]:d?.categories?.flatMap(N=>N.services||[]):[],[d,h]),b=l==="standalone"?g:x,S=(0,$.useMemo)(()=>{const N=n?.flatMap(M=>M.services||[]),O=r?.flatMap(M=>M?.categories?.flatMap(B=>B.services||[]));return[...N,...O]},[n,r]),E=(0,$.useMemo)(()=>{const N=p.trim().toLowerCase();return N?S.filter(O=>O.name?.toLowerCase().includes(N)||O.description?.toLowerCase().includes(N)):b},[p,S,b]),C=N=>N.taxRows?.some(O=>O.isActive)||!1,A=a.reduce((N,O)=>N+Number(O.price||0)*O.qty,0);return(0,$.useEffect)(()=>{if(l==="supercategory"&&r?.length>0&&!d){const N=r[0];f(N),m(null)}},[l,r,d]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)(Yh,{selectedServices:a,totalPrice:A,goToStep:()=>e(we())}),renderButton:(0,c.jsx)("button",{onClick:()=>e(we()),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:[(0,c.jsx)("button",{onClick:()=>{u("supercategory"),m(null),f(null)},className:`aaravpos-tab-btn ${l==="supercategory"?"active":"inactive"}`,children:"Super Category"}),(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:18})}),(0,c.jsx)("input",{type:"text",placeholder:"Search services...",value:p,onChange:N=>v(N.target.value),className:"aaravpos-search-input"}),(0,c.jsx)("div",{className:"aaravpos-search-actions",children:p&&(0,c.jsx)("button",{onClick:()=>v(""),className:"aaravpos-search-clear",children:(0,c.jsx)(sr,{size:16})})})]})]}),l==="supercategory"&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{ref:t,onWheel:N=>{t.current&&(t.current.scrollLeft+=N.deltaY)},className:"aaravpos-supercategory-wrapper",children:r.map(N=>(0,c.jsxs)("button",{onClick:()=>{f(N),m(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&&(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:()=>m(null),className:`aaravpos-supercategory-btn ${h?"":"active"}`,children:["All Services (",d?.categories?.reduce((N,O)=>N+O.services.length,0),")"]}),d?.categories?.map(N=>(0,c.jsxs)("button",{onClick:()=>m(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(Wn(null)),className:`aaravpos-supercategory-btn ${i?"":"active"}`,children:["All Services (",n.reduce((N,O)=>N+O.services.length,0),")"]}),n.map(N=>(0,c.jsxs)("button",{onClick:()=>e(Wn(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,O)=>(0,c.jsx)(Xh,{},O)):(0,c.jsx)(pt,{mode:"popLayout",children:E?.length?E?.map((N,O)=>{const M=a.some(B=>B.id===N.id);return(0,c.jsxs)(Ke.div,{variants:I$,initial:"hidden",animate:"visible",exit:"exit",custom:O,layout:!0,onClick:()=>{const B=a.find(K=>K.id===N.id);B&&B.qty===1?e(Gn(String(N.id))):e(zn(N))},className:`aaravpos-service-card ${M?"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)(me,{size:14}),N.price]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(me,{size:14}),N.min_price," - ",(0,c.jsx)(me,{size:14}),N.max_price]})})]}),(0,c.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,c.jsx)("button",{onClick:B=>{B.stopPropagation(),e(Gn(String(N.id)))},className:"aaravpos-service-action-btn",children:(0,c.jsx)(Gh,{size:14})}),(0,c.jsx)("span",{className:"aaravpos-service-qty",children:a.find(B=>B.id===N.id)?.qty||0}),(0,c.jsx)("button",{onClick:B=>{B.stopPropagation(),a.find(K=>K.id===N.id)?e(Kd(String(N.id))):e(zn(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:p?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var D$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vs({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:m,slots:p,selectedDate:v}=(0,G.useSelector)(D=>D.slots),{staff:y,selectedServices:g,selectedProfessional:x}=(0,G.useSelector)(D=>D.service),{timeZone:b}=(0,G.useSelector)(D=>D.outletDetails),S=De.DateTime.now().setZone(b??"UTC"),[E,C]=(0,$.useState)(""),[A,N]=(0,$.useState)(!1),O=(0,$.useRef)(null),M=(0,$.useRef)(null),[B,K]=(0,$.useState)(0),te=[0,5,10,15,20],w=(0,$.useMemo)(()=>[...p?.morning||[],...p?.afternoon||[],...p?.evening||[]],[p]),R=15,W=(0,$.useMemo)(()=>{if(!x?.id)return[];const D=y?.find(j=>j.id===x.id);return D?g.map(j=>{const ne=D.assignments?.find(qe=>qe.id===j.id),ye={...j,price:ne?.price||j.price||j.min_price||0,duration:ne?.duration||j.estimated_time||j.min_time||0};return{...ye,tax:no(ye),unitTax:no(ye,{perUnit:!0})}}):[]},[x,y,g]),k=W.reduce((D,j)=>D+Number(j.price)*(j.qty||1),0),J=W.reduce((D,j)=>D+Number(j.duration)*(j.qty||1),0),re=Math.ceil(J/R),de=D=>{if(!w.length)return"";const j=w[D]?.start_time,ne=w[D+re-1];return!j||!ne?"":`${j} - ${ne.end_time||ne.start_time}`},Ee=v||{day:S.day,month:S.month,year:S.year},P=m?.[0],T=P!==void 0?de(P):null,V=Ee.month??0,U=T?`${D$[V]} ${Ee.day} at ${T}`:null,z=W.reduce((D,j)=>D+j.tax,0),Y=Number(i)||0,H=n?k*Y/100:0,q=k+z+H;(0,$.useEffect)(()=>{n&&i==null&&a?.(0)},[n,i,a]);const Z=(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)(t$,{})]}),[d,u,o,s,l,e]),X=f||d||u||!T;return(0,$.useEffect)(()=>{const D=()=>{const ne=O.current?.offsetHeight||0,ye=M.current?.offsetHeight||0,qe=(ne+(A?70:n?68:56)||0)+ye;K(window.innerHeight-qe)};D();const j=new ResizeObserver(()=>{D()});return M.current&&j.observe(M.current),O.current&&j.observe(O.current),window.addEventListener("resize",D),()=>{j.disconnect(),window.removeEventListener("resize",D)}},[W,n,s,l,A]),(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,{})})]}),x?.id&&(0,c.jsxs)("div",{className:"aaravpos-pro-card aaravpos-mb-10",children:[x.imageUrl?(0,c.jsx)("img",{src:x.imageUrl,alt:x.name,className:"aaravpos-pro-image"}):(0,c.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:x.color||"#111"},children:lr(x.name)}),(0,c.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,c.jsx)("p",{className:"aaravpos-pro-name",children:x.name}),(0,c.jsx)("p",{className:"aaravpos-pro-type",children:x.staff_type})]})]}),(0,c.jsxs)("div",{className:"aaravpos-date-time",children:[(0,c.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),U?(0,c.jsx)("span",{className:"aaravpos-date-time-value",children:U}):(0,c.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,c.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${B}px`},children:W?.length>0&&W.map(D=>(0,c.jsxs)("li",{className:"aaravpos-order-item",children:[(0,c.jsx)("p",{className:"aaravpos-order-service-name",children:D.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:D.qty})]}),(0,c.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,c.jsx)(qr,{size:13}),(0,c.jsxs)("span",{children:[D.min_time||D.estimated_time," min"]})]}),(0,c.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,c.jsx)(me,{size:12}),D.price||D.min_price]})]})]},D.id))}),(0,c.jsxs)("div",{className:"third",ref:M,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:[...te,"custom"].map((D,j)=>{const ne=D==="custom",ye=ne?A:Y===D,qe=j===0,Xr=j===[...te,"custom"].length-1;return(0,c.jsx)("button",{onClick:()=>{ne?(N(!0),a?.(Number(E)||0)):(N(!1),C(""),a?.(Number(D)))},className:`aaravpos-tip-btn
|
|
30
|
+
${qe||Xr?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${ye?"aaravpos-tip-btn-active":""}`,children:ne?"Custom":D===0?"No tip":`${D}%`},D)})}),(0,c.jsx)(pt,{initial:!1,children:A&&(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:D=>{const j=D.target.value;(j===""||Number(j)>=0&&Number(j)<=100)&&(C(j),a?.(Number(j)||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)(me,{size:14}),k.toFixed(2)]})}),n&&(0,c.jsx)(da,{label:`Tip (${Y}%)`,value:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(me,{size:14}),H.toFixed(2)]})}),(!r||T)&&(0,c.jsx)(da,{label:"Taxes",value:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(me,{size:14}),z.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)(me,{size:18}),q.toFixed(2)]})]}),(0,c.jsx)("button",{onClick:t,disabled:X,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,c.jsx)("span",{className:"aaravpos-common-btn-content",children:Z})})]})]})]})}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 R$=e=>{try{if(!e)throw new Error("Missing timezone");const t=De.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),[]}},k$=["S","M","T","W","T","F","S"];function F$(e,t){return e===2&&t<12}function L$({isOpen:e,onClose:t}){const r=(0,G.useDispatch)(),{selectedDate:n}=(0,G.useSelector)(h=>h.slots),{timeZone:i,outletTimeZoneYear:a}=(0,G.useSelector)(h=>h.outletDetails),[o]=(0,$.useState)(R$(i||"")),[s,l]=(0,$.useState)(0),u=o[s];if(!e)return null;const d=De.DateTime.now().setZone(i??"UTC"),f=(h,m)=>{r(Ht({month:h,day:m,year:a})),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)(ei,{})}),(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:[k$.map((h,m)=>(0,c.jsx)("div",{className:"aaravpos-calendar-weekday",children:h},m)),Array.from({length:u?.startDow||0}).map((h,m)=>(0,c.jsx)("div",{},`e${m}`)),Array.from({length:u?.days||0},(h,m)=>m+1).map(h=>{const m=n?.month===u?.monthIdx&&n?.day===h,p=u?.monthIdx===d.month&&h===d.day,v=F$(u?.monthIdx||0,h);return(0,c.jsx)("div",{onClick:()=>{v||f(u.monthIdx,h)},className:["aaravpos-calendar-day",!m&&!v&&"aaravpos-calendar-day-active",p&&!m&&"aaravpos-calendar-day-today",m&&"aaravpos-calendar-day-selected",v&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:h},h)})]})]})]})})}var Ic=["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,G.useDispatch)(),{height:t}=Yr(),[r,n]=(0,$.useState)(11),{staff:i,selectedServices:a,selectedProfessional:o}=(0,G.useSelector)(P=>P.service),{tenantId:s,timeZone:l}=(0,G.useSelector)(P=>P?.outletDetails),{selectedSlotIndexes:u,selectedDate:d,selectedTime:f,slots:h,loading:m}=(0,G.useSelector)(P=>P.slots),[p,v]=(0,$.useState)(!1),[y,g]=(0,$.useState)(0),x=15,b=(0,$.useMemo)(()=>[h.morning,h.afternoon,h.evening].flat(),[h]),S=(0,$.useMemo)(()=>De.DateTime.now().setZone(l),[l]),E=P=>{try{if(!P.isValid)throw new Error("Invalid timezone or start date");return Array.from({length:180},(V,U)=>{const z=P.plus({days:U});return z.isValid?{day:z.day,month:z.month,year:z.year,fullDate:z.toISODate()}:null}).filter(Boolean)}catch(T){return console.error("generateDates error:",T),[]}},C=(0,$.useMemo)(()=>E(S),[S]),A=(0,$.useMemo)(()=>{if(!o?.id)return[];const P=i?.find(T=>T.id===o.id);return P?a.map(T=>{const V=P.assignments?.find(U=>U.id===T.id);return{...T,price:V?.price||T.price||T.min_price||0,duration:V?.duration||T.estimated_time||T.min_time||0,qty:V?.qty||1}}):[]},[o,i,a]),N=A.reduce((P,T)=>P+Number(T.duration)*(T.qty||1),0),O=Math.ceil(N/x),M=d?De.DateTime.fromObject(d).toFormat("yyyy-MM-dd"):null;(0,$.useEffect)(()=>{!o?.id||!M||e(vn({tenantId:s,staffId:o.id,date:M}))},[o?.id,M,e,s]);const B=P=>{g(T=>Math.max(0,Math.min(C.length-11,T+P*4)))};(0,$.useEffect)(()=>{d||e(Ht({day:S.day,month:S.month,year:S.year}))},[]),(0,$.useEffect)(()=>{if(!d||!C.length)return;const P=C.findIndex(T=>T.day===d.day&&T.month===d.month&&T.year===d.year);P!==-1&&g(Math.max(0,Math.min(C.length-r,P-Math.floor(r/2))))},[d,C,r]);const K=P=>{e(Ht({day:P.day,month:P.month,year:P.year})),e(Gi(null))},te=P=>{if(!b.length)return;const T=b.slice(P,P+O);if(T.length<O){ce.toast.warning("You don't have sufficient time for selected service");return}if(T.some(U=>U.isBooked||U.status!=="AVAILABLE")){ce.toast.warning("Selected time range is not fully available");return}e(Gi(b[P].start_time));const V=Array.from({length:O},(U,z)=>P+z);e(zi({indexes:V,ids:V.map(U=>b[U]?.id)}))};(0,$.useEffect)(()=>{if(!f||!b.length)return;const P=b.findIndex(V=>V.start_time===f);if(P===-1)return;const T=Array.from({length:O},(V,U)=>P+U);T.length===u.length&&T.every((V,U)=>V===u[U])||e(zi({indexes:T,ids:T.map(V=>b[V]?.id)}))},[f,b,O,u]),(0,$.useEffect)(()=>{if(!b.length||O===0)return;let P=!1;for(let T=0;T<=b.length-O;T++)if(b.slice(T,T+O).every(V=>!V.isBooked&&V.status==="AVAILABLE")){te(T),P=!0;break}P||(e(Gi(null)),e(zi({indexes:[],ids:[]})))},[b,O]),(0,$.useEffect)(()=>{const P=()=>{const T=window.innerWidth;T<1024?n(5):T<1280?n(7):n(11)};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]);const w=h?.morning||[],R=h?.afternoon||[],W=h?.evening||[],k=P=>P.some(T=>!T.isBooked&&T.status==="AVAILABLE"),J=()=>k(w)?"morning":k(R)?"afternoon":k(W)?"evening":null,[re,de]=(0,$.useState)(J()),Ee=()=>{const P=De.DateTime.now().setZone(l).plus({days:1});e(Ht({day:P.day,month:P.month,year:P.year}))};return(0,$.useEffect)(()=>{const P=b[u[0]];P&&(w.some(T=>T.id===P.id)?de("morning"):R.some(T=>T.id===P.id)?de("afternoon"):W.some(T=>T.id===P.id)&&de("evening"))},[u,b,w,R,W]),(0,$.useEffect)(()=>{const P=V=>V?.some(U=>!U.isBooked&&U.status==="AVAILABLE"),T=!P(w)&&!P(R)&&!P(W);!m&&T&&Ee()},[w,R,W]),(0,c.jsxs)(Dt,{sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(vs,{buttonText:"Fill Details",onButtonClick:()=>{if(!f||!u.length){ce.toast.warning("Please select a time slot");return}e(we())},showTaxesOnlyIfTime:!0})}),renderButton:(0,c.jsx)("button",{onClick:()=>{if(!f||!u.length){ce.toast.warning("Please select a time slot");return}e(we())},disabled:!f||!u.length,className:"aaravpos-btn",children:(0,c.jsx)("span",{className:"aaravpos-btn-content",children:"Fill Details"})}),children:[(0,c.jsx)(Mt,{}),(0,c.jsx)("h1",{className:"aaravpos-page-title aaravpos-margin-bottom-20",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)(Mc,{onClick:()=>B(-1),children:(0,c.jsx)(ei,{size:20})}),C.slice(y,y+r).map(P=>{const T=De.DateTime.fromISO(P.fullDate||""),V=T.weekday%7,U=De.DateTime.now().setZone(l).startOf("day"),z=T.hasSame(U,"day"),Y=d?.day===P.day&&d?.month===P.month&&d?.year===P.year;return(0,c.jsxs)("div",{onClick:()=>K(P),className:`arravpos-date-card ${Y?"arravpos-date-card-active":"arravpos-date-card-default"}`,children:[(0,c.jsx)("span",{className:"arravpos-date-week",children:V$[V]}),(0,c.jsx)("span",{className:"arravpos-date-day",children:P.day}),z&&!Y&&(0,c.jsx)("span",{className:"arravpos-date-today",children:"TODAY"})]},`${P.day}-${P.month}-${P.year}`)}),(0,c.jsx)(Mc,{onClick:()=>B(1),children:(0,c.jsx)(It,{size:20})})]}),(0,c.jsxs)("button",{onClick:()=>v(!0),className:"arravpos-calendar-btn",children:[(0,c.jsx)(I3,{size:16}),d?.month!=null?`${Ic[d.month-1]} ${d.year}`:`${Ic[S.month-1]} ${S.year}`]})]}),(0,c.jsxs)("div",{className:"arravpos-selected-professional",children:[o?.imageUrl?(0,c.jsx)("img",{src:o.imageUrl,alt:o.name,className:"arravpos-selected-professional-image"}):(0,c.jsx)("div",{className:"arravpos-selected-professional-avatar",style:{background:o?.color||"#111"},children:lr(o?.name)}),(0,c.jsxs)("div",{className:"arravpos-selected-professional-content",children:[(0,c.jsx)("p",{className:"arravpos-selected-professional-name",children:o?.name}),(0,c.jsxs)("p",{className:"arravpos-selected-professional-services",children:[A.map(P=>P.name).join(", ")," ·"," ",N," mins"]})]})]}),(0,c.jsxs)("div",{className:"arravpos-scroll-area",style:{height:`${t-370}px`},children:[m?(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)(m$,{size:18,className:"arravpos-slot-icon"}),slots:w,allSlots:b,selectedSlotIndexes:u,handleSlotSelect:te,isOpen:re==="morning",onToggle:()=>de(re==="morning"?null:"morning")}),(0,c.jsx)(fa,{label:"Afternoon",icon:(0,c.jsx)(h$,{size:18,className:"arravpos-slot-icon"}),slots:R,allSlots:b,selectedSlotIndexes:u,handleSlotSelect:te,isOpen:re==="afternoon",onToggle:()=>de(re==="afternoon"?null:"afternoon")}),(0,c.jsx)(fa,{label:"Evening",icon:(0,c.jsx)(J3,{size:18,className:"arravpos-slot-icon"}),slots:W,allSlots:b,selectedSlotIndexes:u,handleSlotSelect:te,isOpen:re==="evening",onToggle:()=>de(re==="evening"?null:"evening")})]}),(0,c.jsx)(L$,{isOpen:p,onClose:()=>v(!1)})]})]})}function Mc({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)(Uh,{})})]}),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,G.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)(me,{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 m=De.DateTime.now().setZone(n),p=m.year%100,v=m.month;return h<p||h===p&&f<v?"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 Dc(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&&Dc(e.prototype,t),r&&Dc(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 ti(e){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ti(e)}function Zh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zh=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=Zh();return function(){var r,n=ti(e);if(t){var i=ti(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eb(this,r)}}var rb=Fe((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,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function S(C){if(typeof C=="object"&&C!==null){var A=C.$$typeof;switch(A){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 v:case p:case s:return C;default:return A}}case n:return A}}}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=v,e.Memo=p,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)===v},e.isMemo=function(C){return S(C)===p},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===m||typeof C=="object"&&C!==null&&(C.$$typeof===v||C.$$typeof===p||C.$$typeof===s||C.$$typeof===l||C.$$typeof===f||C.$$typeof===g||C.$$typeof===x||C.$$typeof===b||C.$$typeof===y)},e.typeOf=S})),nb=Fe((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,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function S(j){return typeof j=="string"||typeof j=="function"||j===i||j===d||j===o||j===a||j===h||j===m||typeof j=="object"&&j!==null&&(j.$$typeof===v||j.$$typeof===p||j.$$typeof===s||j.$$typeof===l||j.$$typeof===f||j.$$typeof===g||j.$$typeof===x||j.$$typeof===b||j.$$typeof===y)}function E(j){if(typeof j=="object"&&j!==null){var ne=j.$$typeof;switch(ne){case r:var ye=j.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 v:case p:case s:return qe;default:return ne}}case n:return ne}}}var C=u,A=d,N=l,O=s,M=r,B=f,K=i,te=v,w=p,R=n,W=o,k=a,J=h,re=!1;function de(j){return re||(re=!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.")),Ee(j)||E(j)===u}function Ee(j){return E(j)===d}function P(j){return E(j)===l}function T(j){return E(j)===s}function V(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function U(j){return E(j)===f}function z(j){return E(j)===i}function Y(j){return E(j)===v}function H(j){return E(j)===p}function q(j){return E(j)===n}function Z(j){return E(j)===o}function X(j){return E(j)===a}function D(j){return E(j)===h}e.AsyncMode=C,e.ConcurrentMode=A,e.ContextConsumer=N,e.ContextProvider=O,e.Element=M,e.ForwardRef=B,e.Fragment=K,e.Lazy=te,e.Memo=w,e.Portal=R,e.Profiler=W,e.StrictMode=k,e.Suspense=J,e.isAsyncMode=de,e.isConcurrentMode=Ee,e.isContextConsumer=P,e.isContextProvider=T,e.isElement=V,e.isForwardRef=U,e.isFragment=z,e.isLazy=Y,e.isMemo=H,e.isPortal=q,e.isProfiler=Z,e.isStrictMode=X,e.isSuspense=D,e.isValidElementType=S,e.typeOf=E})()})),Jh=Fe(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=rb():t.exports=nb()})),ib=Fe(((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 m in u)n.call(u,m)&&(d[m]=u[m]);if(r){f=r(u);for(var p=0;p<f.length;p++)i.call(u,f[p])&&(d[f[p]]=u[f[p]])}}return d}})),ys=Fe(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),Qh=Fe(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),ab=Fe(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=ys(),i={},a=Qh();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 m;try{if(typeof s[h]!="function"){var p=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 p.name="Invariant Violation",p}m=s[h](l,h,d,u,null,n)}catch(y){m=y}if(m&&!(m 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 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 i)){i[m.message]=!0;var v=f?f():"";r("Failed "+u+" type: "+m.message+(v??""))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},t.exports=o})),ob=Fe(((e,t)=>{var r=Jh(),n=ib(),i=ys(),a=Qh(),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 m(P){var T=P&&(f&&P[f]||P[h]);if(typeof T=="function")return T}var p="<<anonymous>>",v={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:S(),arrayOf:E,element:C(),elementType:A(),instanceOf:N,node:K(),objectOf:M,oneOf:O,oneOfType:B,shape:w,exact:R};function y(P,T){return P===T?P!==0||1/P===1/T:P!==P&&T!==T}function g(P,T){this.message=P,this.data=T&&typeof T=="object"?T:{},this.stack=""}g.prototype=Error.prototype;function x(P){if(process.env.NODE_ENV!=="production")var T={},V=0;function U(Y,H,q,Z,X,D,j){if(Z=Z||p,D=D||q,j!==i){if(d){var ne=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 ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=Z+":"+q;!T[ye]&&V<3&&(s("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+Z+"`. 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."),T[ye]=!0,V++)}}return H[q]==null?Y?H[q]===null?new g("The "+X+" `"+D+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new g("The "+X+" `"+D+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:P(H,q,Z,X,D)}var z=U.bind(null,!1);return z.isRequired=U.bind(null,!0),z}function b(P){function T(V,U,z,Y,H,q){var Z=V[U];if(J(Z)!==P){var X=re(Z);return new g("Invalid "+Y+" `"+H+"` of type "+("`"+X+"` supplied to `"+z+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return x(T)}function S(){return x(l)}function E(P){function T(V,U,z,Y,H){if(typeof P!="function")return new g("Property `"+H+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var q=V[U];if(!Array.isArray(q)){var Z=J(q);return new g("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected an array."))}for(var X=0;X<q.length;X++){var D=P(q,X,z,Y,H+"["+X+"]",i);if(D instanceof Error)return D}return null}return x(T)}function C(){function P(T,V,U,z,Y){var H=T[V];if(!u(H)){var q=J(H);return new g("Invalid "+z+" `"+Y+"` of type "+("`"+q+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return x(P)}function A(){function P(T,V,U,z,Y){var H=T[V];if(!r.isValidElementType(H)){var q=J(H);return new g("Invalid "+z+" `"+Y+"` of type "+("`"+q+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return x(P)}function N(P){function T(V,U,z,Y,H){if(!(V[U]instanceof P)){var q=P.name||p,Z=Ee(V[U]);return new g("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected ")+("instance of `"+q+"`."))}return null}return x(T)}function O(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 T(V,U,z,Y,H){for(var q=V[U],Z=0;Z<P.length;Z++)if(y(q,P[Z]))return null;var X=JSON.stringify(P,function(j,ne){return re(ne)==="symbol"?String(ne):ne});return new g("Invalid "+Y+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+z+"`, expected one of "+X+"."))}return x(T)}function M(P){function T(V,U,z,Y,H){if(typeof P!="function")return new g("Property `"+H+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var q=V[U],Z=J(q);if(Z!=="object")return new g("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected an object."));for(var X in q)if(a(q,X)){var D=P(q,X,z,Y,H+"."+X,i);if(D instanceof Error)return D}return null}return x(T)}function B(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 T=0;T<P.length;T++){var V=P[T];if(typeof V!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+de(V)+" at index "+T+"."),l}function U(z,Y,H,q,Z){for(var X=[],D=0;D<P.length;D++){var j=P[D],ne=j(z,Y,H,q,Z,i);if(ne==null)return null;ne.data&&a(ne.data,"expectedType")&&X.push(ne.data.expectedType)}var ye=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new g("Invalid "+q+" `"+Z+"` supplied to "+("`"+H+"`"+ye+"."))}return x(U)}function K(){function P(T,V,U,z,Y){return W(T[V])?null:new g("Invalid "+z+" `"+Y+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return x(P)}function te(P,T,V,U,z){return new g((P||"React class")+": "+T+" type `"+V+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function w(P){function T(V,U,z,Y,H){var q=V[U],Z=J(q);if(Z!=="object")return new g("Invalid "+Y+" `"+H+"` of type `"+Z+"` "+("supplied to `"+z+"`, expected `object`."));for(var X in P){var D=P[X];if(typeof D!="function")return te(z,Y,H,X,re(D));var j=D(q,X,z,Y,H+"."+X,i);if(j)return j}return null}return x(T)}function R(P){function T(V,U,z,Y,H){var q=V[U],Z=J(q);if(Z!=="object")return new g("Invalid "+Y+" `"+H+"` of type `"+Z+"` "+("supplied to `"+z+"`, expected `object`."));for(var X in n({},V[U],P)){var D=P[X];if(a(P,X)&&typeof D!="function")return te(z,Y,H,X,re(D));if(!D)return new g("Invalid "+Y+" `"+H+"` key `"+X+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(V[U],null," ")+`
|
|
31
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var j=D(q,X,z,Y,H+"."+X,i);if(j)return j}return null}return x(T)}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 T=m(P);if(T){var V=T.call(P),U;if(T!==P.entries){for(;!(U=V.next()).done;)if(!W(U.value))return!1}else for(;!(U=V.next()).done;){var z=U.value;if(z&&!W(z[1]))return!1}}else return!1;return!0;default:return!1}}function k(P,T){return P==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function J(P){var T=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":k(T,P)?"symbol":T}function re(P){if(typeof P>"u"||P===null)return""+P;var T=J(P);if(T==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return T}function de(P){var T=re(P);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function Ee(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v}})),sb=Fe(((e,t)=>{var r=ys();function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function a(l,u,d,f,h,m){if(m!==r){var p=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 p.name="Invariant Violation",p}}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=Fe(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=Jh(),n=!0;t.exports=ob()(r.isElement,n)}else t.exports=sb()()})),_=Fr(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 gs(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}gs.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};gs.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 oe(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(oe.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=oe.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()}oe.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};oe.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};oe.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))}};oe.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};oe.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)};oe.prototype.isEmpty=function(){return this._isEmpty};oe.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};oe.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})}};oe.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)};oe.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};oe.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)};oe.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};oe.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new At(e-n.left,t-n.top,r||new Date().getTime())};oe.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 gs(t[1],n,i,t[2]),o=this._calculateCurveWidths(a);return t.shift(),{curve:a,widths:o}}return{}};oe.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,m=d/(u+d),p={x:l.x+f*m,y:l.y+h*m},v=t.x-p.x,y=t.y-p.y;return{c1:new At(s.x+v,s.y+y),c2:new At(l.x+v,l.y+y)}};oe.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};oe.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};oe.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};oe.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,m=h*e.startPoint.x;m+=3*f*s*e.control1.x,m+=3*d*l*e.control2.x,m+=u*e.endPoint.x;var p=h*e.startPoint.y;p+=3*f*s*e.control1.y,p+=3*d*l*e.control2.y,p+=u*e.endPoint.y;var v=t+u*i;this._drawPoint(m,p,v)}n.closePath(),n.fill()};oe.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()};oe.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)}}};oe.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(y,g,x){var b=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){var S="M "+y.startPoint.x.toFixed(3)+","+y.startPoint.y.toFixed(3)+" "+("C "+y.control1.x.toFixed(3)+","+y.control1.y.toFixed(3)+" ")+(y.control2.x.toFixed(3)+","+y.control2.y.toFixed(3)+" ")+(y.endPoint.x.toFixed(3)+","+y.endPoint.y.toFixed(3));b.setAttribute("d",S),b.setAttribute("stroke-width",(g.end*2.25).toFixed(3)),b.setAttribute("stroke",x),b.setAttribute("fill","none"),b.setAttribute("stroke-linecap","round"),l.appendChild(b)}},function(y){var g=document.createElement("circle"),x=typeof e.dotSize=="function"?e.dotSize():e.dotSize;g.setAttribute("r",x),g.setAttribute("cx",y.x),g.setAttribute("cy",y.y),g.setAttribute("fill",y.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"),m=l.childNodes;h.innerHTML="";for(var p=0;p<m.length;p+=1)h.appendChild(m[p].cloneNode(!0));f=h.innerHTML}var v=d+f+"</svg>";return u+btoa(v)};oe.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};oe.prototype.toData=function(){return this._data};var ub=Fe(((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,m=d.getImageData(0,0,f,h).data,p=s(!0,f,h,m),v=s(!1,f,h,m),y=l(!0,f,h,m),g=l(!1,f,h,m)-y+1,x=v-p+1,b=d.getImageData(y,p,g,x);return u.width=g,u.height=x,d.clearRect(0,0,g,x),d.putImageData(b,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 m=u?1:-1,p=u?0:f-1;u?p<f:p>-1;p+=m)for(var v=0;v<d;v++)if(o(v,p,d,h))return p;return null}function l(u,d,f,h){for(var m=u?1:-1,p=u?0:d-1;u?p<d:p>-1;p+=m)for(var v=0;v<f;v++)if(o(p,v,d,h))return p;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=i}])})})),db=Fr(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 oe(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(),m=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof d>"u"&&(h.width=h.offsetWidth*m),typeof f>"u"&&(h.height=h.offsetHeight*m),h.getContext("2d").scale(m,m),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:_.default.number,minWidth:_.default.number,maxWidth:_.default.number,minDistance:_.default.number,dotSize:_.default.oneOfType([_.default.number,_.default.func]),penColor:_.default.string,throttle:_.default.number,onEnd:_.default.func,onBegin:_.default.func,canvasProps:_.default.object,clearOnResize:_.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:m}}=(0,nt.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),p=d("accepted"),v=d("typedName"),y=d("signatureDataUrl"),g=()=>{u(),r==="DRAW_SIGNATURE"&&a.current?.clear()},x=()=>{g(),e()},b=()=>{a.current?.clear(),f("signatureDataUrl","")},S=C=>{let A="";if(r==="DRAW_SIGNATURE"){const N=a.current;if(N&&!N.isEmpty())A=N.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?C.accepted:!1,typedName:r==="TYPED_NAME"?C.typedName.trim():"",signatureDataUrl:A,emailMe:C.emailMe}),g(),e()},E=!m&&(r==="CHECKBOX_ONLY"?p:r==="TYPED_NAME"?v?.trim().length>2:r==="DRAW_SIGNATURE"?!!y:!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:x,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=a.current;if(!A)return;const N=A.getCanvas().toDataURL("image/png");C.onChange(N)}}),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:b,className:"arravpos-consent-clear-btn",children:[(0,c.jsx)(s$,{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:x,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"],ln="consentDraftByService",mb=15,vb=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function yb(){const e=(0,G.useDispatch)(),{tenantId:t,id:r}=(0,G.useSelector)(I=>I.outletDetails),{timeZone:n,image:i,outletName:a,address:o}=(0,G.useSelector)(I=>I.outletDetails),{staff:s,selectedServices:l,selectedProfessional:u}=(0,G.useSelector)(I=>I.service),{selectedSlotIds:d,selectedDate:f,selectedTime:h}=(0,G.useSelector)(I=>I.slots),{userDetails:m,bookingMode:p,tipPct:v}=(0,G.useSelector)(I=>I.appointment),y=Array.isArray(l)?l:[l],{selectedSlotIndexes:g,slots:x}=(0,G.useSelector)(I=>I.slots),[b,S]=(0,$.useState)(!1),[E,C]=(0,$.useState)(!1),[A,N]=(0,$.useState)(null),[O,M]=(0,$.useState)("person"),[B,K]=(0,$.useState)(!1),[te,w]=(0,$.useState)(""),[R,W]=(0,$.useState)(""),[k,J]=(0,$.useState)(null),[re,de]=(0,$.useState)(null),[Ee,P]=(0,$.useState)({}),[T,V]=(0,$.useState)({}),[U,z]=(0,$.useState)(!1),[Y,H]=(0,$.useState)(!1),q=(0,$.useRef)(!1),Z=(0,$.useRef)(""),X=De.DateTime.now().setZone(n??"UTC"),D=y.map(I=>{const F=s?.find(se=>se.id===u?.id)?.assignments?.find(se=>se.id===I.id),Q={...I,price:F?.price??I.price??I.min_price??0,duration:F?.duration??I.estimated_time??I.min_time??0};return{...Q,duration:F?.duration??I.estimated_time??I.min_time??0,tax:jc(Q),unitTax:jc(Q,{perUnit:!0})}}),j=[...x?.morning??[],...x?.afternoon??[],...x?.evening??[]],ne=D.reduce((I,F)=>I+Number(F.duration??0),0),ye=Math.ceil(ne/mb),qe=I=>{if(!j.length)return"";const F=j[I]?.start_time,Q=j[I+ye-1];return!F||!Q?"":`${F} - ${Q.end_time??Q.start_time}`},Xr={day:Number(f?.day??X.day),month:Number(f?.month??X.month),year:Number(f?.year??X.year)},ws=g?.[0],Ps=ws!==void 0?qe(ws):null,Wp=Ps?`${pb[Xr.month]} ${Xr.day} at ${Ps}`:null,Ri=D.reduce((I,F)=>I+Number(F.price)*(F.qty??1),0),Es=D.reduce((I,F)=>I+F.tax,0),zp=Math.round(Es*100),Ts=Ri*v/100,Gp=Math.round(Ts*100),Os=Ri+Ts+Es,Me=(0,$.useMemo)(()=>y.filter(I=>!(!Do(I)||(I?.consent_rule?.enforcementMode??I?.enforcementMode)==="FIXED")),[y]),Hp=(0,$.useMemo)(()=>Me.map(I=>String(I.id)).filter(Boolean),[Me]),Kp=I=>{const F=I?.consent_template??I?.consentTemplate??null;return{heading:String(F?.heading??"").trim(),consent:String(F?.consent??"").trim()}},ki=I=>{P(F=>({...F,[String(I)]:!0}))};(0,$.useEffect)(()=>{m&&Me?.length>0&&qp()},[m,Me?.length]);const qp=async()=>{const I=m?.id;if(I){z(!0);try{const F={};for(const Q of Me){const se=String(Q.id),$e=String(Q.consent_form_id??"");if(!se||!$e)continue;const he=al(Q);if(!(he==="EVERY_X_DAYS"||he==="ONCE_PER_CUSTOMER")){F[se]={data:{checked:!0,needsSignature:!0}};continue}const Le=!!(await sl(I,$e,se))?.data?.needsSignature;F[se]={data:{checked:!0,needsSignature:Le}},Le||ki(se)}V(F)}catch(F){console.error(F)}finally{z(!1)}}},Fi=(0,$.useMemo)(()=>Me.filter(I=>{const F=String(I.id);if(Ee[F])return!1;const Q=T[F];return!(Q?.data?.checked&&Q?.data?.needsSignature===!1)}),[Me,Ee,T]),_s=Hp.length,As=_s-Fi.length,js=Fi.length===0,Is=async()=>{if(!q.current){q.current=!0;try{if(!m?.firstName){ce.toast.warn("Please enter First Name before signing consent.");return}if(!m?.email&&!m?.phone){ce.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const I=Fi[0];if(!I){await Li();return}const F=String(I.id);if(Z.current===F&&B)return;Z.current=F;const Q=String(I.consent_form_id??"");if(!Q){ce.toast.error("Consent form missing.");return}const se=ol(I);if(!se){ce.toast.error("Consent enforcement method not found.");return}const $e=m?.id;if(al(I)!=="EVERY_VISIT"&&$e){const et=!!(await sl($e,Q,F))?.data?.needsSignature;if(V(Zr=>({...Zr,[F]:{data:{checked:!0,needsSignature:et}}})),!et){ki(F),ce.toast.success("Consent already signed for this service."),setTimeout(()=>Is(),250);return}}else V(Le=>({...Le,[F]:{data:{checked:!0,needsSignature:!0}}}));const{heading:he,consent:je}=Kp(I);if(!he||!je){ce.toast.error("Consent template missing.");return}w(he),W(je),J(se),de(F),K(!0)}catch(I){console.error(I),ce.toast.error(I?.message??"Consent check failed")}finally{q.current=!1}}},Yp=(I,F)=>{try{const Q=localStorage.getItem(ln),se=Q?JSON.parse(Q):{};se[String(I)]=F,localStorage.setItem(ln,JSON.stringify(se))}catch(Q){console.error("Failed to save consent draft",Q)}},Xp=()=>{try{return JSON.parse(localStorage.getItem(ln)??"{}")}catch{return{}}},Zp=I=>{const F=String(re);if(!F)return;const Q=Me.find(je=>String(je.id)===F);if(!Q)return;const se=String(Q.consent_form_id??""),$e=ol(Q);if(!se||!$e){ce.toast.error("Consent form/method missing.");return}let he="CHECKBOX_ONLY";$e==="TYPED_NAME"?he="TYPED_NAME":$e==="DRAW_SIGNATURE"&&(he="SIGNATURE_IMAGE"),Yp(F,{serviceId:F,concentFormId:se,signatureType:he,typedName:I?.typedName,isChecked:I?.accepted,signatureDataUrl:I?.signatureDataUrl,emailMe:I?.emailMe}),ki(F),K(!1),Z.current="",ce.toast.success("Consent captured.")},Jp=()=>{K(!1),de(null)},Qp=async(I,F,Q)=>{const se=Xp(),$e=Object.entries(se).map(([he,je])=>({serviceId:he,concentFormId:je.concentFormId,captured:je})).filter(he=>he.serviceId&&he.concentFormId);for(const he of $e){const{serviceId:je,concentFormId:Le,captured:et}=he,Zr=et.signatureType||(et.typedName?"TYPED_NAME":et.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Ds={tenantId:t,outletId:r,appointmentId:I,customerId:F,serviceId:je,formId:Le,staffId:Q,signatureType:Zr,typedName:et.typedName,imageUrl:et.signatureDataUrl};Zr==="CHECKBOX_ONLY"&&(Ds.isChecked=et.isChecked??!0),await u1(Ds)}localStorage.removeItem(ln)};let Ms="";f&&(Ms=`${f?.year}-${String(f?.month+1).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const e0={tenantId:t,outletId:r,staffId:u?.id,date:Ms,startTime:h,serviceIds:y.map(I=>I.id),slotIds:d,isWalkIn:!1,requiresConsent:Me.length>0,customer:{first_name:m?.firstName,last_name:m?.lastName,email:m?.email,phone:m?.phone}},Li=async()=>{if(Me.length&&!js){ce.toast.warn("Please complete all consent forms first");return}try{S(!0);const I=await e(yn(e0)).unwrap(),F=I?.data??I,Q=F.id||"",se=F.customerId||F.customer?.id||"",$e=F.staffId||u?.id||"";p==="booking"&&As>0&&await Qp(Q,se,$e),O==="card"?(N({appointmentId:Q,customerId:se}),C(!0)):(e(Hi(String(Q))),e(we()))}catch(I){const F=I?.payload?.message||I?.data?.message||I?.message||"Staff not working on this day";ce.toast.error(F)}finally{S(!1)}},t0=async()=>{if(!h&&p==="booking")return void ce.toast.error("Select time");if(!m?.firstName)return void ce.toast.error("Enter first name");if(!m?.email&&!m?.phone)return void ce.toast.error("Email or phone required");Me.length>0?js?await Li():await Is():await Li()},r0=I=>{const F=I.replace(/\s/g,"");return/^4/.test(F)?"VISA":/^5[1-5]/.test(F)?"MASTERCARD":/^3[47]/.test(F)?"AMEX":/^6/.test(F)?"DISCOVER":"UNKNOWN"},n0=async I=>{try{S(!0);const F=A?.appointmentId,Q=String(A?.customerId);if(!F||!r)return ce.toast.error("Something went wrong."),!1;const se=r0(I.number),$e=await l1({appointmentId:F,customerId:Q,outletId:r,referenceNo:F,currency:"USD",amountCents:Math.round(Os*100),tipAmountCents:O==="card"?Gp:0,taxAmountCents:O==="card"?zp:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:I.name,cardNumber:I.number.replace(/\s/g,""),cardType:se,cardExpiry:vb(I.expiry),cvData:I.cvv},billingContact:{name:{firstName:m?.firstName??"",lastName:m?.lastName??""},email:m?.email??""}}}),he=$e?.data?.data??$e?.data??$e??{},je=he?.orderId;if(String(he?.mappedStatus).toLowerCase()==="succeeded"||String(he?.reasonMessage).toLowerCase()==="success"){if(ce.toast.success("Payment successful!"),je)try{await c1(je)}catch(Le){ce.toast.warning(Le instanceof Error?Le.message:String(Le??"Payment done, but finalize failed"))}}else ce.toast.warning("Payment pending");return C(!1),e(Hi(String(A?.appointmentId))),e(we()),!0}catch(F){return ce.toast.warning(F instanceof Error?F.message:"Payment failed, but appointment is booked"),C(!1),e(Hi(String(A?.appointmentId))),e(we()),!0}finally{S(!1)}},i0=()=>C(!1),a0=()=>!h||!m?.firstName||!m?.email&&!m?.phone;return(0,c.jsxs)(Dt,{isSidebarOpen:Y,handleSidebarOpen:()=>H(I=>!I),sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(vs,{buttonText:"Book Appointment",onButtonClick:t0,showTip:O==="card",tipPct:v,onTipChange:I=>e(f1(I??0)),consentRequired:Me?.length>0,consentCompleted:As,totalConsents:_s,checkingConsent:U,loading:b,isBookingDisabled:a0(),handleSidebarOpen:()=>H(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)(Rc,{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:y.map(I=>I.name).join(", ")})]}),(0,c.jsxs)("span",{className:"arravpos-appointment-price",children:["$",Ri]})]}),(0,c.jsxs)("div",{className:"arravpos-appointment-date",children:[(0,c.jsx)(D3,{}),(0,c.jsx)("span",{className:"arravpos-appointment-date-text",children:Wp??"No time selected"})]})]})]}),(0,c.jsxs)("div",{className:"arravpos-booking-column",children:[(0,c.jsx)(Rc,{children:"Payment Method"}),(0,c.jsx)(kc,{icon:(0,c.jsx)(d$,{}),label:"Pay in person",selected:O==="person",onClick:()=>M("person")}),(0,c.jsx)(kc,{icon:(0,c.jsx)(W3,{}),label:"Pay with card",selected:O==="card",onClick:()=>M("card")})]})]})})]})]})]}),E&&(0,c.jsx)(G$,{onClose:i0,onPay:n0,amount:Os}),B&&re&&(0,c.jsx)(hb,{enforcement:k,heading:te,consent:R,onClose:Jp,onConfirm:Zp},re??"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:lr(e.name)})})}function Rc({children:e}){return(0,c.jsx)("p",{className:"arravpos-section-label",children:e})}function kc({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 ep={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=Fe(((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 Nb(e,t){if(e){if(typeof e=="string")return Fc(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 Fc(e,t)}}function Fc(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 oo(e,t){for(var r=0,n=Cb(t.split("")),i;!(i=n()).done;)i.value===e&&r++;return r}function wb(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]:" ",i=e.length,a=oo("(",e)-oo(")",e);a>0&&i<t.length;)e+=t[i].replace(r,n),t[i]===")"&&a--,i++;return e}function Pb(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=Eb(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 Eb(e,t){if(e){if(typeof e=="string")return Lc(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 Lc(e,t)}}function Lc(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 Vc={Backspace:8,Delete:46};function jb(e){switch(e.keyCode){case Vc.Backspace:return"Backspace";case Vc.Delete:return"Delete"}}function Ib(e){return e.selectionStart}function tp(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?(Fb(t,o),so(t,r,n,void 0,i)):so(t,r,n,a,i);default:}}}function Fb(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,tp(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,tp(e,s),i&&i(o)}var Lb=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Bc(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?Bc(Object(r),!0).forEach(function(n){Vb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bc(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,Lb),f=(0,$.useRef)(),h=(0,$.useCallback)(function(y){f.current=y,t&&(typeof t=="function"?t(y):t.current=y)},[t]),m=(0,$.useCallback)(function(y){return Rb(y,f.current,r,n,l)},[f,r,n,l]),p=(0,$.useCallback)(function(y){if(u&&u(y),!y.defaultPrevented)return kb(y,f.current,r,n,l)},[f,r,n,l,u]),v=Rt(Rt({},d),{},{ref:h,onChange:m,onKeyDown:p});return s?Rt(Rt({},v),{},{value:n(Uc(i)?"":i).text}):Rt(Rt({},v),{},{defaultValue:n(Uc(a)?"":a).text})}function Uc(e){return e==null}var zb=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Wc(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?Wc(Object(r),!0).forEach(function(n){Hb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(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 ri(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,m=Kb(e,zb),p=Wb(Gb({ref:t,parse:i,format:a,value:o,defaultValue:s,onChange:l,controlled:u,onKeyDown:d,type:h},m));return $.default.createElement(n,p)}ri=$.default.forwardRef(ri);ri.propTypes={parse:_.default.func.isRequired,format:_.default.func.isRequired,inputComponent:_.default.elementType,type:_.default.string,value:_.default.string,defaultValue:_.default.string,onChange:_.default.func,controlled:_.default.bool,onKeyDown:_.default.func,onCut:_.default.func,onPaste:_.default.func};var Yb=ri;function zc(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 Gc(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&&Gc(e.prototype,t),r&&Gc(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",Hc=" ext. ",t4=/^\d+$/,ve=(function(){function e(t){_i(this,e),rp(t),this.metadata=t,ip.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 Kc(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Kc(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}}])})(),Kc=(function(){function e(t,r){_i(this,e),this.globalMetadataObject=r,this.metadata=t,ip.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()&&qc(this.types(),r))return new i4(qc(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?Hc:this.metadata[13]||Hc}}])})(),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 qc(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 rp(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 np(e,t){return t.countries.hasOwnProperty(e)}function ip(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?zc(t,Qb)===-1?this.v2=!0:zc(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 s4(e,t){if(e){if(typeof e=="string")return Yc(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)?Yc(e,t):void 0}}function Yc(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 l4(e,t){for(var r=e.slice(),n=o4(t),i;!(i=n()).done;){var a=i.value;e.indexOf(a)<0&&r.push(a)}return r.sort(function(o,s){return o-s})}function ji(e,t,r){return ap(e,t,void 0,r)}function ap(e,t,r,n){t&&(n=new ve(n.metadata),n.selectNumberingPlan(t));var i=n.type(r),a=i&&i.possibleLengths()||n.possibleLengths();if(!a)return"IS_POSSIBLE";if(r==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return ap(e,t,"MOBILE",n);var o=n.type("MOBILE");o&&(a=l4(a,o.possibleLengths()))}else if(r&&!i)return"INVALID_LENGTH";var s=e.length,l=a[0];return l===s?"IS_POSSIBLE":l>s?"TOO_SHORT":a[a.length-1]<s?"TOO_LONG":a.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function c4(e,t,r){if(t===void 0&&(t={}),r=new ve(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 op(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 op(e,t,r){return ji(e,t,r)==="IS_POSSIBLE"}function ot(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function u4(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=d4(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
35
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d4(e,t){if(e){if(typeof e=="string")return Xc(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)?Xc(e,t):void 0}}function Xc(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 f4=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function $s(e,t,r){if(t=t||{},!(!e.country&&!e.countryCallingCode)){r=new ve(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(ot(n,r.nationalNumberPattern())){if(ha(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||ha(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=u4(f4),a;!(a=i()).done;){var o=a.value;if(ha(n,o,r))return o}}}}function ha(e,t,r){var n=r.type(t);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0?!1:ot(e,n.pattern())}function h4(e,t,r){return t=t||{},r=new ve(r),r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?$s(e,t,r.metadata)!==void 0:ot(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}function p4(e,t,r){var n=new ve(r).getCountryCodesForCallingCode(e);return n?n.filter(function(i){return m4(t,i,r)}):[]}function m4(e,t,r){var n=new ve(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}var Pe="0-90-9٠-٩۰-۹",v4="-‐-―−ー-",y4="//",g4="..",$4=" ",b4="()()[]\\[\\]",x4="~⁓∼~",Ge="".concat(v4).concat(y4).concat(g4).concat($4).concat(b4).concat(x4),Ii="++",S4=new RegExp("(["+Pe+"])");function sp(e,t,r,n){if(t){var i=new ve(n);i.selectNumberingPlan(t,r);var a=new RegExp(i.IDDPrefix());if(e.search(a)===0){e=e.slice(e.match(a)[0].length);var o=e.match(S4);if(!(o&&o[1]!=null&&o[1].length>0&&o[1]==="0"))return e}}}function lo(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var i,a,o=n.length-1,s=o>0&&n[o];if(t.nationalPrefixTransformRule()&&s)i=e.replace(r,t.nationalPrefixTransformRule()),o>1&&(a=n[1]);else{var l=n[0];i=e.slice(l.length),s&&(a=n[1])}var u;if(s){var d=e.indexOf(n[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(u=t.numberingPlan.nationalPrefix())}else u=n[0];return{nationalNumber:i,nationalPrefix:u,carrierCode:a}}}return{nationalNumber:e}}function C4(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=N4(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 N4(e,t){if(e){if(typeof e=="string")return Zc(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)?Zc(e,t):void 0}}function Zc(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 lp(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($s({phone:e,country:o},void 0,n.metadata))return o}}var w4=!1;function bs(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]:lp(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=bs(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 cp(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 xs(e,t,r,n,i){if(!e)return{};var a;if(e[0]!=="+"){var o=sp(e,t||r,n,i);if(o&&o!==e)a=!0,e="+"+o;else{if(t||r||n){var s=cp(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 up(e){return e.replace(new RegExp("[".concat(Ge,"]+"),"g")," ").trim()}var dp=/(\$\d)/;function fp(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(dp,t.nationalPrefixFormattingRule()):t.format());return n?up(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(Pe,"]{1,").concat(t,"})")};function hp(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}|;)",m=_4+kt(t),p=a+l+o+kt(t)+s,v=a+u+o+kt(n)+s,y=d+kt(i)+"#",g=f+h+o+kt(r)+s,x=f+"(?:,)+"+o+kt(n)+s;return m+"|"+p+"|"+v+"|"+y+"|"+g+"|"+x}var A4="["+Pe+"]{2}",j4="["+Ii+"]{0,1}(?:["+Ge+"]*["+Pe+"]){3,}["+Ge+Pe+"]*",I4=new RegExp("^["+Ii+"]{0,1}(?:["+Ge+"]*["+Pe+"]){1,2}$","i"),M4=j4+"(?:"+hp()+")?",D4=new RegExp("^"+A4+"$|^"+M4+"$","i");function R4(e){return e.length>=2&&D4.test(e)}function k4(e){return I4.test(e)}function F4(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 Jc={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function L4(e,t,r,n){if(r?r=U4({},Jc,r):r=Jc,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=ni(a,e.carrierCode,"NATIONAL",n,r),pa(o,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return a?(o=ni(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 F4({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 ni(e,t,r,n,i){var a=V4(n.formats(),e);return a?fp(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=ni(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(ni(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 Qc(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 eu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qc(Object(r),!0).forEach(function(n){z4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z4(e,t,r){return(t=pp(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 tu(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,pp(n.key),n)}}function H4(e,t,r){return t&&tu(e.prototype,t),r&&tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pp(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,mp=(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=xs(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");rp(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 $s(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(r,n){return L4(this,r,n?eu(eu({},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 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,Q4(n.key),n)}}function J4(e,t,r){return t&&ru(e.prototype,t),r&&ru(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,Ss()?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(Ss())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 Ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ss=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)),nu=new RegExp("(?:"+hp()+")$","i");function l9(e){var t=e.search(nu);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(nu),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 u9(e,t){if(e){if(typeof e=="string")return iu(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)?iu(e,t):void 0}}function iu(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 d9={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 vp(e){return d9[e]}function ii(e){for(var t="",r=c9(e.split("")),n;!(n=r()).done;){var i=n.value,a=vp(i);a&&(t+=a)}return t}function f9(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=h9(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h9(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 fo(e){for(var t="",r=f9(e.split("")),n;!(n=r()).done;){var i=n.value;t+=yp(i,t)||""}return t}function yp(e,t,r){if(e==="+"){if(t){typeof r=="function"&&r("end");return}return"+"}return vp(e)}var ou="(["+Pe+"]|[\\-\\.\\(\\)]?)",p9="^\\+"+ou+"*["+Pe+"]"+ou+"*$",m9=new RegExp(p9,"g"),ho=Pe,v9="["+ho+"]+((\\-)*["+ho+"])*",y9="[a-zA-Z]+((\\-)*["+ho+"])*",g9="^("+v9+"\\.)*"+y9+"\\.?$",$9=new RegExp(g9,"g"),su="tel:",po=";phone-context=",b9=";isub=";function x9(e){var t=e.indexOf(po);if(t<0)return null;var r=t+po.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}function S9(e){return e===null?!0:e.length===0?!1:m9.test(e)||$9.test(e)}function C9(e,t){var r=t.extractFormattedPhoneNumber,n=x9(e);if(!S9(n))throw new rt("NOT_A_NUMBER");var i;if(n===null)i=r(e)||"";else{i="",n.charAt(0)==="+"&&(i+=n);var a=e.indexOf(su),o;a>=0?o=a+su.length:o=0;var s=e.indexOf(po);i+=e.substring(o,s)}var l=i.indexOf(b9);if(l>0&&(i=i.substring(0,l)),i!=="")return i}var N9=250,w9=new RegExp("["+Ii+Pe+"]"),P9=new RegExp("[^"+Pe+"#]+$"),E9=!1;function T9(e,t,r){if(t=t||{},r=new ve(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new rt("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=_9(e,t.v2,t.extract),i=n.number,a=n.ext,o=n.error;if(!i){if(t.v2)throw o==="TOO_SHORT"?new rt("TOO_SHORT"):new rt("NOT_A_NUMBER");return{}}var s=j9(i,t.defaultCountry,t.defaultCallingCode,r),l=s.country,u=s.nationalNumber,d=s.countryCallingCode,f=s.countryCallingCodeSource,h=s.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new rt("INVALID_COUNTRY");return{}}if(!u||u.length<2){if(t.v2)throw new rt("TOO_SHORT");return{}}if(u.length>17){if(t.v2)throw new rt("TOO_LONG");return{}}if(t.v2){var m=new mp(d,u,r.metadata);return l&&(m.country=l),h&&(m.carrierCode=h),a&&(m.ext=a),m.__countryCallingCodeSource=f,m}var p=(t.extended?r.hasSelectedNumberingPlan():l)?ot(u,r.nationalNumberPattern()):!1;return t.extended?{country:l,countryCallingCode:d,carrierCode:h,valid:p,possible:p?!0:!!(t.extended===!0&&r.possibleLengths()&&op(u,l,r)),phone:u,ext:a}:p?A9(l,u,a):{}}function O9(e,t,r){if(e){if(e.length>N9){if(r)throw new rt("TOO_LONG");return}if(t===!1)return e;var n=e.search(w9);if(!(n<0))return e.slice(n).replace(P9,"")}}function _9(e,t,r){var n=C9(e,{extractFormattedPhoneNumber:function(o){return O9(o,r,t)}});if(!n)return{};if(!R4(n))return k4(n)?{error:"TOO_SHORT"}:{};var i=l9(n);return i.ext?i:{number:n}}function A9(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function j9(e,t,r,n){var i=xs(fo(e),void 0,t,r,n.metadata),a=i.countryCallingCodeSource,o=i.countryCallingCode,s=i.number,l;if(o)n.selectNumberingPlan(o);else if(s&&(t||r))n.selectNumberingPlan(t,r),t?l=t:E9&&n.isNonGeographicCallingCode(r)&&(l="001"),o=r||yt(t,n.metadata);else return{};if(!s)return{countryCallingCodeSource:a,countryCallingCode:o};var u=co(fo(s),l,n),d=u.nationalNumber,f=u.carrierCode,h=bs(o,{nationalNumber:d,metadata:n});return h&&(l=h,h==="001"||n.selectNumberingPlan(l)),{country:l,countryCallingCode:o,countryCallingCodeSource:a,nationalNumber:d,carrierCode:f}}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 lu(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 cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lu(Object(r),!0).forEach(function(n){I9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I9(e,t,r){return(t=M9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M9(e){var t=D9(e,"string");return Er(t)=="symbol"?t:t+""}function D9(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 R9(e,t,r){return T9(e,cu(cu({},t),{},{v2:!0}),r)}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 uu(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 k9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uu(Object(r),!0).forEach(function(n){F9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F9(e,t,r){return(t=L9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L9(e){var t=V9(e,"string");return Tr(t)=="symbol"?t:t+""}function V9(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)}function B9(e,t){return G9(e)||z9(e,t)||W9(e,t)||U9()}function U9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
39
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W9(e,t){if(e){if(typeof e=="string")return du(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)?du(e,t):void 0}}function du(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 z9(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 G9(e){if(Array.isArray(e))return e}function gp(e){var t=B9(Array.prototype.slice.call(e),4),r=t[0],n=t[1],i=t[2],a=t[3],o,s,l;if(typeof r=="string")o=r;else throw new TypeError("A text for parsing must be a string.");if(!n||typeof n=="string")a?(s=i,l=a):(s=void 0,l=i),n&&(s=k9({defaultCountry:n},s));else if(Ot(n))i?(s=n,l=i):l=n;else throw new Error("Invalid second argument: ".concat(n));return{text:o,options:s,metadata:l}}function Or(e){"@babel/helpers - typeof";return Or=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},Or(e)}function fu(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 hu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fu(Object(r),!0).forEach(function(n){H9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H9(e,t,r){return(t=K9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K9(e){var t=q9(e,"string");return Or(t)=="symbol"?t:t+""}function q9(e,t){if(Or(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Or(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $p(e,t,r){t&&t.defaultCountry&&!np(t.defaultCountry,r)&&(t=hu(hu({},t),{},{defaultCountry:void 0}));try{return R9(e,t,r)}catch(n){if(!(n instanceof rt))throw n}}function Y9(){var e=gp(arguments),t=e.text,r=e.options,n=e.metadata;return $p(t,r,n)}function _r(e){"@babel/helpers - typeof";return _r=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},_r(e)}function pu(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 mu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pu(Object(r),!0).forEach(function(n){X9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X9(e,t,r){return(t=Z9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z9(e){var t=J9(e,"string");return _r(t)=="symbol"?t:t+""}function J9(e,t){if(_r(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_r(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q9(){var e=gp(arguments),t=e.text,r=e.options,n=e.metadata;r=mu(mu({},r),{},{extract:!1});var i=$p(t,r,n);return i&&i.isValid()||!1}function Ar(e){"@babel/helpers - typeof";return Ar=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},Ar(e)}function e8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vu(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,r8(n.key),n)}}function t8(e,t,r){return t&&vu(e.prototype,t),r&&vu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r8(e){var t=n8(e,"string");return Ar(t)=="symbol"?t:t+""}function n8(e,t){if(Ar(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ar(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i8=(function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;e8(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return t8(e,[{key:"reset",value:function(r){var n=r.country,i=r.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(n,i)}},{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,i=Object.keys(r);n<i.length;n++){var a=i[n];this[a]=r[a]}}},{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 a8(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=o8(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 o8(e,t){if(e){if(typeof e=="string")return yu(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)?yu(e,t):void 0}}function yu(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 ma=new RegExp("x");function Tn(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function gu(e,t){return e[t]===")"&&t++,s8(e.slice(0,t))}function s8(e){for(var t=[],r=0;r<e.length;)e[r]==="("?t.push(r):e[r]===")"&&t.pop(),r++;var n=0,i="";t.push(e.length);for(var a=0,o=t;a<o.length;a++){var s=o[a];i+=e.slice(n,s),n=s+1}return i}function l8(e,t,r){for(var n=a8(r.split("")),i;!(i=n()).done;){var a=i.value;if(e.slice(t+1).search(ma)<0)return;t=e.search(ma),e=e.replace(ma,a)}return[e,t]}function c8(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return d8(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:a})}function u8(e,t,r){return ji(e,t,r)==="IS_POSSIBLE"}function d8(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var o=$u(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:n});if(o)return o}return $u(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:n})}function $u(e,t,r){var n=r.metadata,i=r.useNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix,o=fp(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:n});if(i||(e.nationalPrefix?o=e.nationalPrefix+a(t)+o:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(o=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+o)),f8(o,e))return o}function f8(e,t){return ii(e)===t.getNationalDigits()}function jr(e){"@babel/helpers - typeof";return jr=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},jr(e)}function h8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bu(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,m8(n.key),n)}}function p8(e,t,r){return t&&bu(e.prototype,t),r&&bu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m8(e){var t=v8(e,"string");return jr(t)=="symbol"?t:t+""}function v8(e,t){if(jr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y8=(function(){function e(){h8(this,e)}return p8(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],i=n.branches,a=n.instructions;if(i)return{op:"|",args:i.concat([va(a)])};if(a.length===0)throw new Error("Pattern is required");return a.length===1?a[0]:a}},{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(b8);if(!n){if($8.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var i=n[1],a=r.slice(0,n.index),o=r.slice(n.index+i.length);switch(i){case"(?:":a&&this.parsePattern(a),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(a&&this.parsePattern(a),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var s=this.getContext().branches;s.push(va(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:s});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(a&&this.parsePattern(a),!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(va(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":a&&this.parsePattern(a),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:g8(a)});break;default:throw new Error("Unknown operator: ".concat(i))}o&&this.parsePattern(o)}}])})();function g8(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,i=e[r+1].charCodeAt(0)-1,a=n;a<=i;)t.push(String.fromCharCode(a)),a++}else t.push(e[r]);r++}return t}var $8=/[\(\)\[\]\?\:\|]/,b8=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function va(e){return e.length===1?e[0]:e}function xu(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=x8(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 x8(e,t){if(e){if(typeof e=="string")return Su(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)?Su(e,t):void 0}}function Su(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 Ir(e){"@babel/helpers - typeof";return Ir=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},Ir(e)}function S8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cu(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,N8(n.key),n)}}function C8(e,t,r){return t&&Cu(e.prototype,t),r&&Cu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N8(e){var t=w8(e,"string");return Ir(t)=="symbol"?t:t+""}function w8(e,t){if(Ir(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P8=(function(){function e(t){S8(this,e),this.matchTree=new y8().parse(t)}return C8(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 i=mo(r.split(""),this.matchTree,!0);if(i&&i.match&&delete i.matchedChars,!(i&&i.overflow&&!n))return i}}])})();function mo(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 i=e.slice(),a=0;a<t.length;){var o=t[a],s=mo(i,o,r&&a===t.length-1);if(s){if(s.overflow)return s;if(s.match){if(i=i.slice(s.matchedChars.length),i.length===0)return a===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(s.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
|
|
42
|
+
`.concat(JSON.stringify(s,null,2)))}}else return;a++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var l,u=xu(t.args),d;!(d=u()).done;){var f=d.value,h=mo(e,f,r);if(h){if(h.overflow)return h;if(h.match)return{match:!0,matchedChars:h.matchedChars};if(h.partialMatch)l=!0;else throw new Error(`Unsupported match result:
|
|
43
|
+
`.concat(JSON.stringify(h,null,2)))}}return l?{partialMatch:!0}:void 0;case"[]":for(var m=xu(t.args),p;!(p=m()).done;){var v=p.value;if(e[0]===v)return e.length===1?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[v]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function Mr(e){"@babel/helpers - typeof";return Mr=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},Mr(e)}function Nu(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=E8(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.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E8(e,t){if(e){if(typeof e=="string")return wu(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)?wu(e,t):void 0}}function wu(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 T8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pu(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,_8(n.key),n)}}function O8(e,t,r){return t&&Pu(e.prototype,t),r&&Pu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _8(e){var t=A8(e,"string");return Mr(t)=="symbol"?t:t+""}function A8(e,t){if(Mr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vo="9",j8=Tn(vo,15),I8=/[- ]/,ai=!0,M8=ai&&function(){return/\[([^\[\]])*\]/g},D8=ai&&function(){return/\d(?=[^,}][^,}])/g},R8=new RegExp("["+Ge+"]*\\$1["+Ge+"]*(\\$\\d["+Ge+"]*)*$"),Eu=3,k8=(function(){function e(t){t.state;var r=t.metadata;T8(this,e),this.metadata=r,this.resetFormat()}return O8(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 i=this;if(u8(n.nationalSignificantNumber,n.country,this.metadata))for(var a=Nu(this.matchingFormats),o;!(o=a()).done;){var s=o.value,l=c8(n,s,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(d){return i.shouldTryNationalPrefixFormattingRule(d,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(d){return i.getSeparatorAfterNationalPrefix(d)}});if(l)return this.resetFormat(),this.chosenFormat=s,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 i=this.chosenFormat,a=this.chooseFormat(n);if(a)return a===i?this.formatNextNationalNumberDigits(r):this.formatNextNationalNumberDigits(n.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(r){var n=this,i=r.nationalSignificantNumber,a=r.nationalPrefix,o=r.international,s=i,l=s.length-Eu;l<0&&(l=0),this.matchingFormats=this.matchingFormats.filter(function(u){return n.formatSuits(u,o,a)&&n.formatMatches(u,s,l)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(r,n,i){return!(i&&!r.usesNationalPrefix()&&!r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!n&&!i&&r.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(r,n,i){var a=r.leadingDigitsPatterns().length;if(a===0)return!0;i=Math.min(i,a-1);var o=r.leadingDigitsPatterns()[i];if(n.length<Eu)try{return new P8(o).match(n,{allowOverflow:!0})!==void 0}catch(s){return console.error(s),!0}return new RegExp("^(".concat(o,")")).test(n)}},{key:"getFormatFormat",value:function(r,n){return n?r.internationalFormat():r.format()}},{key:"chooseFormat",value:function(r){for(var n=this,i=function(){var u=s.value;return n.chosenFormat===u?0:R8.test(n.getFormatFormat(u,r.international))?n.createTemplateForFormat(u,r)?(n.chosenFormat=u,0):(n.matchingFormats=n.matchingFormats.filter(function(d){return d!==u}),1):1},a,o=Nu(this.matchingFormats.slice()),s;!(s=o()).done&&(a=i(),a!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(ai&&r.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(r,n);if(i)return this.setNationalNumberTemplate(i,n),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(r){return this.isNANP||r&&r.nationalPrefixFormattingRule()&&I8.test(r.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(r,n){var i=r.IDDPrefix,a=r.missingPlus;return i?n&&n.spacing===!1?i:i+" ":a?"":"+"}},{key:"getTemplate",value:function(r){if(this.template){for(var n=-1,i=0,a=r.international?this.getInternationalPrefixBeforeCountryCallingCode(r,{spacing:!1}):"";i<a.length+r.getDigitsWithoutInternationalPrefix().length;)n=this.template.indexOf("x",n+1),i++;return gu(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")+Tn("x",n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var i=n.nationalSignificantNumber,a=n.international,o=n.nationalPrefix,s=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,l=r.pattern();ai&&(l=l.replace(M8(),"\\d").replace(D8(),"\\d"));var u=j8.match(l)[0];if(!(i.length>u.length)){var d=new RegExp("^"+l+"$"),f=i.replace(/\d/g,vo);d.test(f)&&(u=f);var h=this.getFormatFormat(r,a),m;if(this.shouldTryNationalPrefixFormattingRule(r,{international:a,nationalPrefix:o})){var p=h.replace(dp,r.nationalPrefixFormattingRule());if(ii(r.nationalPrefixFormattingRule())===(o||"")+ii("$1")&&(h=p,m=!0,o))for(var v=o.length;v>0;)h=h.replace(/\d/,"x"),v--}var y=u.replace(new RegExp(l),h).replace(new RegExp(vo,"g"),"x");return m||(s?y=Tn("x",s.length)+" "+y:o&&(y=Tn("x",o.length)+this.getSeparatorAfterNationalPrefix(r)+y)),a&&(y=up(y)),y}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=l8(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],gu(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(r,n){var i=n.international,a=n.nationalPrefix;if(r.nationalPrefixFormattingRule()){var o=r.usesNationalPrefix();if(o&&a||!o&&!i)return!0}}}])})();function Dr(e){"@babel/helpers - typeof";return Dr=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},Dr(e)}function bp(e,t){return B8(e)||V8(e,t)||L8(e,t)||F8()}function F8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L8(e,t){if(e){if(typeof e=="string")return Tu(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)?Tu(e,t):void 0}}function Tu(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 V8(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 B8(e){if(Array.isArray(e))return e}function U8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ou(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,z8(n.key),n)}}function W8(e,t,r){return t&&Ou(e.prototype,t),r&&Ou(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function z8(e){var t=G8(e,"string");return Dr(t)=="symbol"?t:t+""}function G8(e,t){if(Dr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H8="["+Ge+Pe+"]+",K8=new RegExp("^"+H8+"$","i"),q8="(?:["+Ii+"]["+Ge+Pe+"]*|["+Ge+Pe+"]+)",Y8=new RegExp("[^"+Ge+Pe+"]+.*$"),X8=/[^\d\[\]]/,Z8=(function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,i=t.metadata,a=t.onNationalSignificantNumberChange;U8(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=i,this.onNationalSignificantNumberChange=a}return W8(e,[{key:"input",value:function(r,n){var i=bp(e6(r),2),a=i[0],o=i[1],s=ii(a),l;return o&&(n.digits||(n.startInternationalNumber(void 0,void 0),s||(l=!0))),s&&this.inputDigits(s,n),{digits:s,justLeadingPlus:l}}},{key:"inputDigits",value:function(r,n){var i=n.digits,a=i.length<3&&i.length+r.length>=3;if(n.appendDigits(r),a&&this.extractIddPrefix(n),this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n))return}else n.appendNationalSignificantNumberDigits(r);n.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(n.getNationalDigits(),function(o){return n.update(o)})}},{key:"isWaitingForCountryCallingCode",value:function(r){var n=r.international,i=r.callingCode;return n&&!i}},{key:"extractCountryCallingCode",value:function(r){var n=xs("+"+r.getDigitsWithoutInternationalPrefix(),r.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=n.countryCallingCode,a=n.number;if(i)return r.setCallingCode(i),r.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(r){if(r){this.hasSelectedNumberingPlan=!0;var n=r._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&X8.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(this.hasSelectedNumberingPlan){var i=lo(r,this.metadata),a=i.nationalPrefix,o=i.nationalNumber,s=i.carrierCode;if(o!==r)return this.onExtractedNationalNumber(a,s,o,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=lo(r,this.metadata),o=a.nationalPrefix,s=a.nationalNumber,l=a.carrierCode;if(s!==n)return this.onExtractedNationalNumber(o,l,s,r,i),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,i,a,o){var s=!1,l,u=a.lastIndexOf(i);if(u<0||u!==a.length-i.length)s=!0;else{var d=a.slice(0,u);d&&d!==r&&(l=d)}o({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:i,nationalSignificantNumberIsModified:s,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,i=r.IDDPrefix,a=r.digits;if(r.nationalSignificantNumber,!(n||i)){var o=sp(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(o!==void 0&&o!==a)return r.update({IDDPrefix:a.slice(0,a.length-o.length)}),this.startInternationalNumber(r,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(r){if(!r.international){var n=cp(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 i=n.country,a=n.callingCode;r.startInternationalNumber(i,a),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 J8(e){var t=e.search(q8);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(Y8,""),r&&(e="+"+e),e}}function Q8(e){var t=J8(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function e6(e){var t=bp(Q8(e),2),r=t[0],n=t[1];return K8.test(r)||(r=""),[r,n]}function Rr(e){"@babel/helpers - typeof";return Rr=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},Rr(e)}function t6(e,t){return a6(e)||i6(e,t)||n6(e,t)||r6()}function r6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
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 _u(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)?_u(e,t):void 0}}function _u(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 Au(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&&Au(e.prototype,t),r&&Au(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 ju=!1,cr=(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&&ju&&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(!(ju&&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(bs(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=lp(n,{countries:u,metadata:this.metadata.metadata});d&&(o=d)}}var f=new mp(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 Iu(e){return new ve(e).getCountries()}function u6(e,t,r){return r||(r=t,t=void 0),new cr(t,r).input(e)}var oi=Fr(bb(),1);function xp(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 yp(e,t,function(i){r&&i==="end"&&(r.ignoreRest=!0)})}function Sp(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 m=new cr(a,l),p=xp({inputFormat:o,country:a,metadata:l}),v=m.input(p+h),y=m.getTemplate();return p&&(v=yo(v,p),y&&(y=yo(y,p))),{text:v,template:y}},[a,l]),f=Sp({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:_.default.string.isRequired,onChange:_.default.func.isRequired,onKeyDown:_.default.func,country:_.default.string,inputFormat:_.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:_.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 m=x6(r,b6),p=xp({inputFormat:l,country:s,metadata:d}),v=(0,$.useCallback)(function(g){var x=fo(g.target.value);x===i&&Mu(p,x,s,d).indexOf(g.target.value)===0&&(x=x.slice(0,-1)),a(x)},[p,i,a,s,d]),y=Sp({onKeyDown:o,inputFormat:l});return $.default.createElement(h,$o({},m,{ref:n,value:Mu(p,i,s,d),onChange:v,onKeyDown:y}))}return t=$.default.forwardRef(t),t.propTypes={value:_.default.string.isRequired,onChange:_.default.func.isRequired,onKeyDown:_.default.func,country:_.default.string,inputFormat:_.default.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:_.default.object,inputComponent:_.default.elementType},t}var N6=C6();function Mu(e,t,r,n){return yo(u6(e+t,r,n),e)}function w6(e){return Du(e[0])+Du(e[1])}function Du(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 O6(e,t){if(e){if(typeof e=="string")return Ru(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 Ru(e,t)}}function Ru(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 si(){return si=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},si.apply(this,arguments)}function Cp(e,t){if(e==null)return{};var r=_6(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 _6(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 Np(e){var t=e.value,r=e.onChange,n=e.options,i=e.disabled,a=e.readOnly,o=Cp(e,P6),s=(0,$.useCallback)(function(l){var u=l.target.value;r(u==="ZZ"?void 0:u)},[r]);return(0,$.useMemo)(function(){return Pp(n,t)},[n,t]),$.default.createElement("select",si({},o,{disabled:i||a,readOnly:a,value:t||"ZZ",onChange:s}),n.map(function(l){var u=l.value,d=l.label,f=l.divider;return $.default.createElement("option",{key:f?"|":u||"ZZ",value:f?"|":u||"ZZ",disabled:!!f,style:f?A6:void 0},d)}))}Np.propTypes={value:_.default.string,onChange:_.default.func.isRequired,options:_.default.arrayOf(_.default.shape({value:_.default.string,label:_.default.string,divider:_.default.bool})).isRequired,disabled:_.default.bool,readOnly:_.default.bool};var A6={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function wp(e){var t=e.value,r=e.options,n=e.className,i=e.iconComponent;e.getIconAspectRatio;var a=e.arrowComponent,o=a===void 0?j6:a,s=e.unicodeFlags,l=Cp(e,E6),u=(0,$.useMemo)(function(){return Pp(r,t)},[r,t]);return $.default.createElement("div",{className:"PhoneInputCountry"},$.default.createElement(Np,si({},l,{value:t,options:r,className:(0,oi.default)("PhoneInputCountrySelect",n)})),u&&(s&&t?$.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},w6(t)):$.default.createElement(i,{"aria-hidden":!0,country:t,label:u.label,aspectRatio:s?1:void 0})),$.default.createElement(o,null))}wp.propTypes={iconComponent:_.default.elementType,arrowComponent:_.default.elementType,unicodeFlags:_.default.bool};function j6(){return $.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function Pp(e,t){for(var r=T6(e),n;!(n=r()).done;){var i=n.value;if(!i.divider&&I6(i.value,t))return i}}function I6(e,t){return e==null?t==null:e===t}var M6=["country","countryName","flags","flagUrl"];function bo(){return bo=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},bo.apply(this,arguments)}function D6(e,t){if(e==null)return{};var r=R6(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 R6(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 Cs(e){var t=e.country,r=e.countryName,n=e.flags,i=e.flagUrl,a=D6(e,M6);return n&&n[t]?n[t]({title:r}):$.default.createElement("img",bo({},a,{alt:r,role:r?void 0:"presentation",src:i.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}Cs.propTypes={country:_.default.string.isRequired,countryName:_.default.string.isRequired,flags:_.default.objectOf(_.default.elementType),flagUrl:_.default.string.isRequired};var k6=["aspectRatio"],F6=["title"],L6=["title"];function li(){return li=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},li.apply(this,arguments)}function Ns(e,t){if(e==null)return{};var r=V6(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 V6(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 Mi(e){var t=e.aspectRatio,r=Ns(e,k6);return t===1?$.default.createElement(Tp,r):$.default.createElement(Ep,r)}Mi.propTypes={title:_.default.string.isRequired,aspectRatio:_.default.number};function Ep(e){var t=e.title,r=Ns(e,F6);return $.default.createElement("svg",li({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),$.default.createElement("title",null,t),$.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},$.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"}),$.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"}),$.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),$.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),$.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"}),$.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"})),$.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"}))}Ep.propTypes={title:_.default.string.isRequired};function Tp(e){var t=e.title,r=Ns(e,L6);return $.default.createElement("svg",li({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),$.default.createElement("title",null,t),$.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},$.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),$.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"}),$.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"}),$.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"}),$.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),$.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),$.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"}))}Tp.propTypes={title:_.default.string.isRequired};function B6(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 Op(e){B6(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function U6(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=W6(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.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W6(e,t){if(e){if(typeof e=="string")return ku(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 ku(e,t)}}function ku(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){if(!t)return e;for(var r=[],n=[],i=r,a=function(){var u=s.value;if(u==="|")i.push({divider:!0});else if(u==="..."||u==="…")i=n;else{var d;u==="🌐"?d=void 0:d=u;var f=e.indexOf(e.filter(function(m){return m.value===d})[0]),h=e[f];e.splice(f,1),i.push(h)}},o=U6(t),s;!(s=o()).done;)a();return r.concat(e).concat(n)}function G6(e,t){if(e&&(e=e.filter(function(r){switch(r){case"🌐":case"|":case"...":case"…":return!0;default:return Di(r,t)}}),e.length>0))return e}function Di(e,t){return np(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function _p(e,t){return e&&(e=e.filter(function(r){return Di(r,t)}),e.length===0&&(e=void 0)),e}var H6=["country","label","aspectRatio"];function xo(){return xo=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},xo.apply(this,arguments)}function K6(e,t){if(e==null)return{};var r=q6(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 q6(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 Ap(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,i=e.internationalIcon;function a(o){var s=o.country,l=o.label,u=o.aspectRatio,d=K6(o,H6),f=i===Mi?u:void 0;return $.default.createElement("div",xo({},d,{className:(0,oi.default)("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":f===1,"PhoneInputCountryIcon--border":s})}),s?$.default.createElement(n,{country:s,countryName:l,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):$.default.createElement(i,{title:l,aspectRatio:f,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:_.default.string,label:_.default.string.isRequired,aspectRatio:_.default.number},a}var Z5=Ap({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:Cs,internationalIcon:Mi});function Y6(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=X6(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.
|
|
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 jp=_.default.shape({country_calling_codes:_.default.object.isRequired,countries:_.default.object.isRequired}),Ip=_.default.objectOf(_.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 Mp(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 cr(t,r);return n.input(e),n.getNumberValue()}if(t){var i=Rp(e,t,r);return"+".concat(yt(t,r)).concat(i||"")}}}function n5(e,t,r){var n=Rp(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 Dp(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 m=it(n,h);if(e.indexOf(m)!==0){var p;return e&&e[0]!=="+"?(e=m+e,p=zt(e,n,h)):e=m,{phoneDigits:e,value:p,country:n}}}u===!1&&n&&e&&e[0]==="+"&&(e=Lu(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 v;return e&&(e[0]==="+"&&(e==="+"||n&&it(n,h).indexOf(e)===0)?v=void 0:v=zt(e,n,h)),v&&(n=Dp(v,{country:n,countries:l,defaultCountry:i,latestCountrySelectedByUser:a,required:!1,metadata:h}),u===!1&&n&&e&&e[0]==="+"&&(e=Lu(e,n,h),v=zt(e,n,h))),!n&&o&&(n=i||s()),{phoneDigits:e,country:n,value:v}}function Lu(e,t,r){if(e.indexOf(it(t,r))===0){var n=new cr(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 cr(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 Rp(e,t,r){var n=new cr(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 kp(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 Vu(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 cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vu(Object(r),!0).forEach(function(n){c5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vu(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,m=t.reset;r.country;var p=r.value,v=r.hasUserSelectedACountry,y=r.latestCountrySelectedByUser,g=function(O){return kp(cn(cn({},O),{},{international:l,useNationalFormat:u||d==="national",metadata:n}))};if(s!==m)return{phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0,country:a,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(a!==f){var x=!a||Di(a,n),b=!p||l&&p===g({value:void 0,defaultCountry:f});if(!v&&x&&!o&&b)return{country:a,phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0}}if(!Bu(o,h)&&!Bu(o,p)){var S,E;if(o){o&&Op(o),S=Mp(o,n);var C=_p(i,n);S&&S.country?(!C||C.indexOf(S.country)>=0)&&(E=S.country):(E=Dp(o,{country:void 0,countries:C,metadata:n}),E||a&&o.indexOf(it(a,n))===0&&(E=a))}var A;return o?y&&((E?y===E:Kt(o,y,n))?E||(E=y):A={latestCountrySelectedByUser:void 0}):A={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},cn(cn({},A),{},{phoneDigits:g({phoneNumber:S,value:o,defaultCountry:a}),value:o,country:o?E:a})}}function Bu(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 Uu(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?Uu(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uu(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 Wu(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,Vp(n.key),n)}}function y5(e,t,r){return t&&Wu(e.prototype,t),r&&Wu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g5(e,t,r){return t=ci(t),$5(e,Lp()?Reflect.construct(t,r||[],ci(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 Lp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lp=function(){return!!e})()}function ci(e){return ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ci(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=Vp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vp(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(y){Z6([n.props.inputRef,n.inputRef],y)}),Be(n,"isCountrySupportedWithError",function(y){var g=n.props.metadata;return Di(y,g)}),Be(n,"onCountryChange",function(y){var g=n.props,x=g.international,b=g.metadata,S=g.onChange,E=g.focusInputOnCountrySelection,C=n.state,A=C.phoneDigits,N=C.country,O=r5(A,{prevCountry:N,newCountry:y,metadata:b,useNationalFormat:!x}),M=zt(O,y,b);E&&n.inputRef.current.focus(),n.setState({country:y,latestCountrySelectedByUser:y,hasUserSelectedACountry:!0,phoneDigits:O,value:M},function(){S(M)})}),Be(n,"onChange",function(y){var g=n.props,x=g.defaultCountry,b=g.onChange,S=g.addInternationalOption,E=g.international,C=g.limitMaxLength,A=g.countryCallingCodeEditable,N=g.metadata,O=n.state,M=O.countries,B=O.phoneDigits,K=O.country,te=O.latestCountrySelectedByUser,w=a5(y,{prevPhoneDigits:B,country:K,countryRequired:!S,defaultCountry:x,latestCountrySelectedByUser:te,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:M})},countries:M,international:E,limitMaxLength:C,countryCallingCodeEditable:A,metadata:N}),R=w.phoneDigits,W=w.country,k=w.value,J={phoneDigits:R,value:k,country:W};te&&k&&!Kt(k,te,N)&&(J.latestCountrySelectedByUser=void 0),A===!1&&!k&&R===n.state.phoneDigits&&(J.forceRerender={}),n.setState(J,function(){return b(k)})}),Be(n,"_onFocus",function(){return n.setState({isFocused:!0})}),Be(n,"_onBlur",function(){return n.setState({isFocused:!1})}),Be(n,"onFocus",function(y){n._onFocus();var g=n.props.onFocus;g&&g(y)}),Be(n,"onBlur",function(y){var g=n.props.onBlur;n._onBlur(),g&&g(y)}),Be(n,"onCountryFocus",function(y){n._onFocus();var g=n.props.countrySelectProps;if(g){var x=g.onFocus;x&&x(y)}}),Be(n,"onCountryBlur",function(y){n._onBlur();var g=n.props.countrySelectProps;if(g){var x=g.onBlur;x&&x(y)}}),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,m=f.countries;h&&(n.isCountrySupportedWithError(h)||(h=void 0)),a&&Op(a),m=_p(m,d);var p=Mp(a,d);n.CountryIcon=Ap(n.props);var v=Q6({value:a,phoneNumber:p,defaultCountry:h,required:!s,countries:m||Iu(d),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:m})},metadata:d});return n.state={props:n.props,country:v,countries:m,phoneDigits:kp({value:a,phoneNumber:p,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||Iu(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,m=n.countrySelectComponent,p=n.countrySelectProps,v=n.containerComponent,y=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 x=n.metadata,b=n.international;n.locales;var S=p5(n,h5),E=this.state,C=E.country,A=E.countries,N=E.phoneDigits,O=E.isFocused,M=h?$6:N6,B=this.getCountrySelectOptions({countries:A});return $.default.createElement(v,qt({style:l,className:(0,oi.default)(u,"PhoneInput",{"PhoneInput--focus":O,"PhoneInput--disabled":a,"PhoneInput--readOnly":o})},y),$.default.createElement(m,qt({name:i?"".concat(i,"Country"):void 0,"aria-label":g.country},p,{value:C,options:B,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:a||p&&p.disabled,readOnly:o||p&&p.readOnly,iconComponent:this.CountryIcon})),$.default.createElement(M,qt({ref:this.setInputRef,type:"tel",autoComplete:s},f,S,{inputFormat:b===!0?"INTERNATIONAL":b===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:b?!0:void 0,withCountryCallingCode:b?!0:void 0,name:i,metadata:x,country:C,value:N||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:a,readOnly:o,inputComponent:d,className:(0,oi.default)("PhoneInputInput",f&&f.className,S.className)})))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return Fp({props:n},f5(n,i.props,i))}}])})($.default.PureComponent),Bp=$.default.forwardRef(function(e,t){return $.default.createElement(C5,qt({},N5(e),{inputRef:t}))});Bp.propTypes={value:_.default.string,onChange:_.default.func.isRequired,onFocus:_.default.func,onBlur:_.default.func,disabled:_.default.bool,readOnly:_.default.bool,autoComplete:_.default.string,initialValueFormat:_.default.oneOf(["national"]),displayInitialValueAsLocalNumber:_.default.bool,defaultCountry:_.default.string,countries:_.default.arrayOf(_.default.string),labels:Ip,locales:_.default.oneOfType([_.default.string,_.default.arrayOf(_.default.string)]),flagUrl:_.default.string,flags:_.default.objectOf(_.default.elementType),flagComponent:_.default.elementType,addInternationalOption:_.default.bool,internationalIcon:_.default.elementType,countryOptionsOrder:_.default.arrayOf(_.default.string),style:_.default.object,className:_.default.string,countrySelectComponent:_.default.elementType,countrySelectProps:_.default.object,inputComponent:_.default.elementType,numberInputProps:_.default.object,containerComponent:_.default.elementType,containerComponentProps:_.default.object,smartCaret:_.default.bool,international:_.default.bool,limitMaxLength:_.default.bool,countryCallingCodeEditable:_.default.bool,metadata:jp,onCountryChange:_.default.func,focusInputOnCountrySelection:_.default.bool};var zu={autoComplete:"tel",countrySelectComponent:wp,flagComponent:Cs,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:Mi,inputComponent:"input",containerComponent:"div",reset:_.default.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function N5(e){e=Fp({},e);for(var t in zu)e[t]===void 0&&(e[t]=zu[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 Up(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(Bp,Co({},l,{ref:n,metadata:a,labels:s}))});return t.propTypes={metadata:jp,labels:Ip},t}var J5=Up();function _5(e,t){var r=Array.prototype.slice.call(t);return r.push(ep),e.apply(this,r)}var A5=Up(ep);function ya(){return _5(Q9,arguments)}var j5=["IN","US","CA","PH","NZ","AU","CN"];function I5(){const e=(0,G.useDispatch)(),{tenantId:t}=(0,G.useSelector)(w=>w?.outletDetails),{height:r}=Yr(),{userDetails:n}=(0,G.useSelector)(w=>w.appointment),[i,a]=(0,$.useState)(!1),[o,s]=(0,$.useState)(null),[l,u]=(0,$.useState)(!1),d=(0,$.useRef)(""),f=(0,$.useRef)(null),{register:h,handleSubmit:m,control:p,watch:v,reset:y,trigger:g,setValue:x,formState:{errors:b,isSubmitted:S,isSubmitting:E}}=(0,nt.useForm)({defaultValues:{firstName:"",lastName:"",phone:"",email:""},mode:"onSubmit"}),C=v("phone"),A=v("email");(0,$.useEffect)(()=>{y({...n,phone:n?.phone||""},{keepErrors:!0,keepDirty:!1})},[n,y]),(0,$.useEffect)(()=>{S&&g(["phone","email"])},[C,A,S,g]);const N=w=>w?.replace(/\s+/g,"")||"",O=w=>/^\S+@\S+\.\S+$/.test(w),M=w=>{e(cl({...w,phone:w?.phone??""})),e(we())},B=(0,$.useCallback)(async({value:w,type:R})=>{if(!w)return;let W="";if(R==="phone"){if(!ya(w))return;W=N(w)}if(R==="email"){if(!O(w))return;W=w.trim()}if(W&&!(d.current===W&&l)){d.current=W,a(!0),s(R);try{const k=(await s1({search:W,tenantId:t}))?.data?.[0];k?(x("firstName",k.first_name||"",{shouldValidate:!0}),x("lastName",k.last_name||""),k.phone&&ya(k.phone)&&x("phone",k.phone),k.email&&x("email",k.email),e(cl({email:k.email,firstName:k.first_name,lastName:k.last_name,phone:k.phone})),u(!0)):u(!1)}catch(k){console.error(k)}finally{a(!1),s(null)}}},[e,x,l]),K=()=>{y({firstName:"",lastName:"",email:"",phone:""}),u(!1),d.current="",e(h1())};(0,$.useEffect)(()=>(f.current=(0,h0.debounce)(B,800),()=>{f.current?.cancel?.()}),[B]);const te=(w,R,W)=>{if(R&&R(w),!w){f.current?.cancel?.(),d.current="",u(!1),s(null);return}s(W),f.current?.({value:w,type:W})};return(0,c.jsx)(Dt,{sidebar:(0,c.jsx)("div",{className:"aaravpos-aside",children:(0,c.jsx)(vs,{buttonText:"Confirm Details",onButtonClick:m(M)})}),renderButton:(0,c.jsx)("button",{onClick:m(M),disabled:E,className:"aaravpos-btn",children:(0,c.jsx)("span",{className:"aaravpos-btn-content",children:E?"Submitting...":"Confirm Details"})}),children:(0,c.jsxs)("form",{children:[(0,c.jsx)(Mt,{}),(0,c.jsxs)("div",{className:"arravpos-details-section",children:[(0,c.jsx)("h1",{className:"aaravpos-page-title aaravpos-margin-bottom-20 ",children:"Your Details"}),(0,c.jsx)("div",{className:"arravpos-details-scroll",style:{height:`${r-200}px`},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 ",!A&&(0,c.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,c.jsx)(nt.Controller,{control:p,name:"phone",rules:{validate:w=>{const R=!!N(w),W=!!A?.trim();return!R&&!W?"Enter phone or email":R&&!ya(w)?"Enter valid phone number":!0}},render:({field:w})=>(0,c.jsxs)("div",{className:"arravpos-input-wrapper",children:[(0,c.jsx)(A5,{...w,id:"phone",international:!0,countries:j5,defaultCountry:"US",value:w.value||"",onChange:R=>te(R??"",w.onChange,"phone"),countryCallingCodeEditable:!1,className:"arravpos-custom-input"}),i&&o==="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}),l&&(0,c.jsxs)("div",{className:"arravpos-autofill-text",children:["Using existing customer",(0,c.jsx)("span",{onClick:K,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 ",!C&&(0,c.jsx)("span",{className:"arravpos-required",children:"*"})]}),(0,c.jsx)("input",{id:"email",...h("email",{validate:w=>{const R=!!w?.trim(),W=!!N(C);return!R&&!W?"Enter phone or email":R&&!/^\S+@\S+\.\S+$/.test(w)?"Invalid email":!0},onChange:w=>{te(w.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",...h("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",...h("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,G.useDispatch)(),t=(0,G.useSelector)(C=>C.appointment.appointmentId),{tenantId:r}=(0,G.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 A=await o1(t,r);A.success?i(A?.data?.appointment):l("Failed to load appointment details")}catch(A){console.error(A),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)(Ac,{}),"Book Another Appointment"]})]});const{staff:h,outlet:m,services:p}=n,v=p?.reduce((C,A)=>C+Number(A.price||0),0),y=(n.tipsCents||0)/100,g=(n.taxCents||0)/100,x=(n.totalCents||0)/100,b=x>0?x.toFixed(2):(v+y+g).toFixed(2),S=u?p:p.slice(0,5),E=p.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:m?.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 (",p.length,")"]}),p.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)(Uh,{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)(me,{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)(me,{size:14}),y.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)(me,{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)(me,{size:14}),b]})]})]}),(0,c.jsxs)("button",{onClick:f,className:"arravpos-book-btn",children:[(0,c.jsx)(Ac,{}),"Book Another Appointment"]})]})]})})}function R5(){const{currentStep:e}=(0,G.useSelector)(n=>n.breadcrumbs),{isService:t}=(0,G.useSelector)(n=>n.outletDetails),r={services:t?M$:j$,professionals:t?_$:E$,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 F5=({bookingCode:e})=>{const t=(0,G.useDispatch)(),r=(0,G.useSelector)(u=>u.outletList.outlets),[n,i]=(0,$.useState)(null),{id:a}=(0,G.useSelector)(u=>u.outletDetails),o=(0,$.useCallback)(async()=>{try{i(null);const u=await il(e);if(u?.success){const d=u?.data?.data?.outlets||[];t(m1(d)),w1(u?.data?.result),d.length===1&&l(d[0])}else i(u?.message||"Failed to fetch data")}catch(u){console.error(u),i(u?.message||"Something went wrong")}},[e]),s=async(u,d)=>{try{const f=await il(e,u,d);f?.success||i(f?.message||"Failed to fetch outlet data"),t(e1(f?.data?.token)),t(Xm(f?.data?.data?.outlets[0]?.isService)),t(r1({standaloneCategories:f?.data?.data?.standaloneCategories,superCategories:f?.data?.data?.superCategories,staff:f?.data?.data?.staff}))}catch(f){console.error(f),i(f?.message||"Something went wrong")}},l=async u=>{u&&(await s(String(u?.tenantId),String(u?.id)),t(Qm({...u,tenantId:u.tenantId??"",currency:u.currency??"",outletTimeZoneDate:De.DateTime.now().setZone(u?.timeZone).toFormat("yyyy-MM-dd"),outletTimeZoneYear:De.DateTime.fromISO(u?.createdAt,{zone:"utc"}).setZone(u?.timeZone).year})),t(_a(u?.isService?"services":"professionals")))};return(0,$.useEffect)(()=>{o()},[o]),n?(0,c.jsx)("div",{className:"arravpos-error-box",children:n}):(0,c.jsx)(c.Fragment,{children:r.length>1&&!a?(0,c.jsx)(x$,{outlets:r,onSelectOutlet:u=>{u?.id&&l(u)}}):(0,c.jsx)(k5,{})})},L5=e=>(0,c.jsx)(N1,{children:(0,c.jsx)(F5,{...e})});exports.BookingPlugin=L5;
|