@aaravpos/appointment-booking-plugin 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,47 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var om=Object.create,yr=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,lm=Object.getOwnPropertyNames,dm=Object.getPrototypeOf,Wc=Object.prototype.hasOwnProperty,cm=(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=lm(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=sm(t,s))||n.enumerable});return e},um=(e,t,r)=>(Tn(e,t,"default"),r&&Tn(r,t,"default")),Lr=(e,t,r)=>(r=e!=null?om(dm(e)):{},Tn(t||!e||!e.__esModule?yr(r,"default",{value:e,enumerable:!0}):r,e)),fm=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"),hm=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 mm(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 pm(e,t,r){return t&&ks(e.prototype,t),r&&ks(e,r),e}function ym(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 gm(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){gm(t,e);function t(){var r,n;mm(this,t);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=ym(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 pm(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"),vm=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=vm[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 bm=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===bm}function $m(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 xm(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 wm(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 mi(e,t=!1){return pi(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)=>{mi(n,!0)},!1)),e}function Sm(){je(2)}var Zr={[gr]:Sm};function pi(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,Cm=(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(Nm),e.drafts_=null}function Na(e){e===vr&&(vr=e.parent_)}var Us=e=>vr=Cm(vr,e);function Nm(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 Pm(t,e,!0),Ca(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kc?e:void 0}function Ws(e,t){if(pi(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 Pm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mi(t,r)}function Zc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yi=(e,t)=>e.scope_===t,Em=[];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)??Em;for(const s of o)An(i,s,r,a)}function Tm(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 jm(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)||pi(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 Om(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 _m(e,i,t);const a=i[t];if(e.finalized_||!He(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&wm(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(xm(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),jm(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 _m(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 Am=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_&&mi(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):Om(t,r);return(r?.scope_??Xc()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?Tm(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)||pi(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 Im=new Am,vi=Im.produce,Mm=(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
+ \`createSelector([state => state.todos], todos => todos)\`
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})}}},km=(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(c){({stack:l}=c)}console.warn(`An input selector returned a different result when passed same arguments.
5
+ This means your output selector will likely run more frequently than intended.
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})}},Dm={inputStabilityCheck:"once",identityFunctionCheck:"once"},Dn=Symbol("NOT_FOUND");function Rm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Lm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fm(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 Gs=e=>Array.isArray(e)?e:[e];function Vm(e){const t=Array.isArray(e[0])?e[0]:e;return Fm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Hs(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var Bm=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...Dm,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:Mm},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:km}}};function Um(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Dn},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function zm(e,t){let r=[];function n(s){const l=r.findIndex(c=>t(s,c.key));if(l>-1){const c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return Dn}function i(s,l){n(s)===Dn&&(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 Wm=(e,t)=>e===t;function Gm(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 Hm(e,t){const{equalityCheck:r=Wm,maxSize:n=1,resultEqualityCheck:i}=typeof t=="object"?t:{equalityCheck:t},a=Gm(r);let o=0;const s=n<=1?Um(a):zm(n,a);function l(){let c=s.get(arguments);if(c===Dn){if(c=e.apply(null,arguments),o++,i){const u=s.getEntries().find(f=>i(f.value,c));u&&(c=u.value,o!==0&&o--)}s.put(arguments,c)}return c}return l.clearCache=()=>{s.clear(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}var Km=class{constructor(e){this.value=e}deref(){return this.value}},qm=typeof WeakRef<"u"?WeakRef:Km,Ym=0,Ks=1;function Jr(){return{s:Ym,v:void 0,o:null,p:null}}function bi(e,t={}){let r=Jr();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 p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let m=s.o;m===null&&(s.o=m=new WeakMap);const y=m.get(p);y===void 0?(s=Jr(),m.set(p,s)):s=y}else{let m=s.p;m===null&&(s.p=m=new Map);const y=m.get(p);y===void 0?(s=Jr(),m.set(p,s)):s=y}}const c=s;let u;if(s.s===Ks)u=s.v;else if(u=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new qm(u):u}return c.s=Ks,c.v=u,u}return o.clearCache=()=>{r=Jr(),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={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),Rm(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const{memoize:u,memoizeOptions:f=[],argsMemoize:h=bi,argsMemoizeOptions:p=[],devModeChecks:m={}}={...r,...l},y=Gs(f),g=Gs(p),v=Vm(i),x=u(function(){return a++,c.apply(null,arguments)},...y);let $=!0;const w=h(function(){o++;const C=Hs(v,arguments);if(s=x.apply(null,C),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:_,inputStabilityCheck:S}=Bm($,m);if(_.shouldRun&&_.run(c,C,s),S.shouldRun){const j=Hs(v,arguments);S.run({inputSelectorResults:C,inputSelectorResultsCopy:j},{memoize:u,memoizeOptions:y},arguments)}$&&($=!1)}return s},...g);return Object.assign(w,{resultFunc:c,memoizedResultFunc:x,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:u,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var ru=Po(bi),Xm=Object.assign((e,t=ru)=>{Lm(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:()=>Xm});function nu(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var Zm=nu(),Jm=nu,iu=Gc({ReducerType:()=>Ou,SHOULD_AUTOBATCH:()=>jo,TaskAbortError:()=>Ur,Tuple:()=>Eo,addListener:()=>Ao,asyncThunkCreator:()=>cp,autoBatchEnhancer:()=>vu,buildCreateSlice:()=>_u,clearAllListeners:()=>Uu,combineSlices:()=>qp,configureStore:()=>bu,createAction:()=>ze,createActionCreatorInvariantMiddleware:()=>cu,createAsyncThunk:()=>xi,createDraftSafeSelector:()=>ou,createDraftSafeSelectorCreator:()=>au,createDynamicMiddleware:()=>Fp,createEntityAdapter:()=>Pp,createImmutableStateInvariantMiddleware:()=>pu,createListenerMiddleware:()=>Dp,createNextState:()=>vi,createReducer:()=>xu,createSelector:()=>ru,createSelectorCreator:()=>Po,createSerializableStateInvariantMiddleware:()=>gu,createSlice:()=>It,current:()=>gi,findNonSerializableValue:()=>Rn,formatProdErrorMessage:()=>ee,freeze:()=>mi,isActionCreator:()=>lu,isAllOf:()=>Ln,isAnyOf:()=>nr,isAsyncThunkAction:()=>Pu,isDraft:()=>_e,isFluxStandardAction:()=>du,isFulfilled:()=>Nu,isImmutableDefault:()=>fu,isPending:()=>Su,isPlain:()=>To,isRejected:()=>Fn,isRejectedWithValue:()=>Cu,lruMemoize:()=>Hm,miniSerializeError:()=>Eu,nanoid:()=>Br,original:()=>$m,prepareAutoBatched:()=>ip,removeListener:()=>Io,unwrapResult:()=>Tu,weakMapMemoize:()=>bi});um(iu,require("redux"));var au=(...e)=>{const t=Po(...e),r=Object.assign((...n)=>{const i=t(...n),a=(o,...s)=>i(_e(o)?gi(o):o,...s);return Object.assign(a,i),a},{withTypes:()=>r});return r},ou=au(bi),Qm=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 su=e=>e&&typeof e.match=="function";function ze(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 lu(e){return typeof e=="function"&&"type"in e&&su(e)}function du(e){return(0,Te.isAction)(e)&&Object.keys(e).every(ep)}function ep(e){return["type","payload","error","meta"].indexOf(e)>-1}function tp(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 cu(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=lu}=e;return()=>r=>n=>(t(n)&&console.warn(tp(n.type)),r(n))}function uu(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
+ 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 ur extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ur.prototype)}static get[Symbol.species](){return ur}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ur(...t[0].concat(this)):new ur(...t.concat(this))}};function qs(e){return He(e)?vi(e,()=>{}):e}function wt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function fu(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function rp(e,t,r){const n=hu(e,t,r);return{detectMutations(){return mu(e,t,n,r)}}}function hu(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(c=>c instanceof RegExp?c.test(l):l===c)||(a.children[s]=hu(e,t,r[s],l))}}return a}function mu(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 u in r.children)l[u]=!0;for(let u in n)l[u]=!0;const c=t.length>0;for(let u in l){const f=a?a+"."+u:u;if(c&&t.some(p=>p instanceof RegExp?p.test(f):f===p))continue;const h=mu(e,t,r.children[u],n[u],s,f);if(h.wasMutated)return h}return{wasMutated:!1}}function pu(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(s,l,c,u){return JSON.stringify(s,r(l,u),c)},r=function(s,l){let c=[],u=[];return l||(l=function(f,h){return c[0]===h?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(h)).join(".")+"]"}),function(f,h){if(c.length>0){var p=c.indexOf(this);~p?c.splice(p+1):c.push(this),~p?u.splice(p,1/0,f):u.push(f),~c.indexOf(h)&&(h=l.call(this,f,h))}else c.push(h);return s==null?h:s.call(this,f,h)}},{isImmutable:n=fu,ignoredPaths:i,warnAfter:a=32}=e;const o=rp.bind(null,n,i);return({getState:s})=>{let l=s(),c=o(l),u;return f=>h=>{const p=uu(a,"ImmutableStateInvariantMiddleware");p.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=o(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ee(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(h);return p.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=o(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ee(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(h)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),p.warnIfExceeded(),m}}}}function To(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||(0,Te.isPlainObject)(e)}function Rn(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[c,u]of s){const f=t?t+"."+c:c;if(!(l&&i.some(h=>h instanceof RegExp?h.test(f):f===h))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(o=Rn(u,f,r,n,i,a),o))return o}}return a&&yu(e)&&a.add(e),!1}function yu(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!yu(t))return!1;return!0}function gu(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:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return f=>h=>p=>{if(!(0,Te.isAction)(p))return h(p);const m=h(p),y=uu(o,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(p.type)!==-1)&&y.measureTime(()=>{const g=Rn(p,"",t,r,i,u);if(g){const{keyPath:v,value:x}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${v}\`. Value:`,x,`
11
+ Take a look at the logic that dispatched this action: `,p,`
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||(y.measureTime(()=>{const g=Rn(f.getState(),"",t,r,a,u);if(g){const{keyPath:v,value:x}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${v}\`. Value:`,x,`
14
+ Take a look at the reducer(s) handling this action type: ${p.type}.
15
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),y.warnIfExceeded()),m}}}function Qr(e){return typeof e=="boolean"}var np=()=>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(Zm):o.push(Jm(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};Qr(n)||(s=n),o.unshift(pu(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",ip=()=>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}}})},ap=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=np(),{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=Qm({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=(0,Te.applyMiddleware)(...c),h=ap(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 p=typeof s=="function"?s(h):h();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?ee(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(y=>typeof y!="function"))throw new Error(process.env.NODE_ENV==="production"?ee(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!p.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...p);return(0,Te.createStore)(l,o,m)}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 op(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(op(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 sp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Br=(e=21)=>{let t="",r=e;for(;r--;)t+=sp[Math.random()*64|0];return t},lp=["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 lp)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 p=n?.idGenerator?n.idGenerator(l):Br(),m=new AbortController;let y,g;function v($){g=$,m.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(dp(w)&&(w=await w),w===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,_)=>{y=()=>{_({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",y,{once:!0})});u(a(p,l,n?.getPendingMeta?.({requestId:p,arg:l},{getState:f,extra:h}))),$=await Promise.race([E,Promise.resolve(r(l,{dispatch:u,getState:f,extra:h,requestId:p,signal:m.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,p,l,C.meta):i(C,p,l)})])}catch(w){$=w instanceof Ui?o(null,p,l,w.payload,w.meta):o(w,p,l)}finally{y&&m.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&o.match($)&&$.meta.condition||u($),$})();return Object.assign(x,{abort:v,requestId:p,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 dp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ju=Symbol.for("rtk-slice-createasyncthunk"),cp={[ju]:xi},Ou=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(Ou||{});function up(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(hp()):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:up(i,$),createNotation:typeof n.reducers=="function"};pp(w)?gp(E,w,c,t):mp(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,p=new WeakMap;let m;function y($,w){return m||(m=u()),m($,w)}function g(){return m||(m=u()),m.getInitialState()}function v($,w=!1){function E(_){let S=_[$];if(typeof S>"u"){if(w)S=wt(p,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]=fp(M,_,()=>wt(p,_,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 fp(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 hp(){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 mp({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!yp(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 pp(e){return e._reducerDefinitionType==="asyncThunk"}function yp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gp({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 vp(){return{ids:[],entities:{}}}function bp(e){function t(r={},n){const i=Object.assign(vp(),r);return n?e.setAll(i,n):i}return{getInitialState:t}}function $p(){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(p=>h[p])),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 xp=_e;function wp(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 xp(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 mn(e){return _e(e)?gi(e):e}function Au(e,t,r){e=ct(e);const n=mn(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(m,y){const g=Vt(m,e);g in y.entities||(y.ids.push(g),y.entities[g]=m)}function r(m,y){m=ct(m);for(const g of m)t(g,y)}function n(m,y){const g=Vt(m,e);g in y.entities||y.ids.push(g),y.entities[g]=m}function i(m,y){m=ct(m);for(const g of m)n(g,y)}function a(m,y){m=ct(m),y.ids=[],y.entities={},r(m,y)}function o(m,y){return s([m],y)}function s(m,y){let g=!1;m.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(m){Object.assign(m,{ids:[],entities:{}})}function c(m,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&&(m[y.id]=$,delete g.entities[y.id]),g.entities[$]=x,w}function u(m,y){return f([m],y)}function f(m,y){const g={},v={};m.forEach(x=>{x.id in y.entities&&(v[x.id]={id:x.id,changes:{...v[x.id]?.changes,...x.changes}})}),m=Object.values(v),m.length>0&&m.filter(x=>c(g,x,y)).length>0&&(y.ids=Object.values(y.entities).map(x=>Vt(x,e)))}function h(m,y){return p([m],y)}function p(m,y){const[g,v]=Au(m,e,y);r(g,y),f(v,y)}return{removeAll:wp(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(p),removeOne:fe(o),removeMany:fe(s)}}function Sp(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 Cp(e,t,r){const n=Sp(e,t,r);return e.splice(n,0,t),e}function Np(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??mn(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 p([g],v)}function p(g,v){const[x,$,w]=Au(g,e,v);x.length&&o(x,v,w),$.length&&f($,v)}function m(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=mn(g.entities),E=mn(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||Cp(S,V,t);j?S=v.slice().sort(t):x&&S.sort(t);const M=S.map(e);m(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(p)}}function Pp(e={}){const{selectId:t,sortComparer:r}={sortComparer:!1,selectId:o=>o.id,...e},n=r?Np(t,r):Iu(t),i=bp(n),a=$p();return{selectId:t,sortComparer:r,...i,...a,...n}}var Ep="task",Mu="listener",ku="completed",Oo="cancelled",Tp=`task-${Oo}`,jp=`task-${ku}`,Ta=`${Mu}-${Oo}`,Op=`${Mu}-${ku}`,Ur=class{constructor(e){this.code=e,this.message=`${Ep} ${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 _p=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",Ap=(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=_p(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(jp));return i?.autoJoin&&t.push(o.catch(Vn)),{result:Bn(e)(o),cancel(){a.abort(Tp)}}}},Ip=(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)})},Mp=(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}),kp=(...e)=>{console.error(`${zr}/error`,...e)},Dp=(e={})=>{const t=new Map,r=new Map,n=p=>{const m=r.get(p)??0;r.set(p,m+1)},i=p=>{const m=r.get(p)??1;m===1?r.delete(p):r.set(p,m-1)},{extra:a,onError:o=kp}=e;_o(o,"onError");const s=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),m=>{p.unsubscribe(),m?.cancelActive&&ja(p)}),l=p=>s(Qs(t,p)??Bu(p));Ht(l,{withTypes:()=>l});const c=p=>{const m=Qs(t,p);return m&&(m.unsubscribe(),p.cancelActive&&ja(m)),!!m};Ht(c,{withTypes:()=>c});const u=async(p,m,y,g)=>{const v=new AbortController,x=Ip(l,v.signal),$=[];try{p.pending.add(v),n(p),await Promise.resolve(p.effect(m,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:Ap(v.signal,$),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((w,E,C)=>{w!==v&&(w.abort(Ta),C.delete(w))})},cancel:()=>{v.abort(Ta),p.pending.delete(v)},throwIfCancelled:()=>{Nt(v.signal)}})))}catch(w){w instanceof Ur||el(o,w,{raisedBy:"effect"})}finally{await Promise.all($),v.abort(Op),i(p),p.pending.delete(v)}},f=Mp(t,r);return{middleware:p=>m=>y=>{if(!(0,Te.isAction)(y))return m(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=p.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=m(y),t.size>0){const $=p.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,p,v)}}}finally{g=Js}return x},startListening:l,stopListening:c,clearListeners:f}},Rp=e=>({middleware:e,applied:new Map}),Lp=e=>t=>t?.meta?.instanceId===e,Fp=()=>{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,Rp)})},{withTypes:()=>n}),i=s=>(0,Te.compose)(...Array.from(t.values()).map(l=>wt(l.applied,s,l.middleware))),a=Ln(r,Lp(e));return{middleware:s=>l=>c=>a(c)?(n(...c.payload),s.dispatch):i(s)(l)(c),addMiddleware:n,withMiddleware:r,instanceId:e}},Vp=e=>"reducerPath"in e&&typeof e.reducerPath=="string",Bp=e=>e.flatMap(t=>Vp(t)?[[t.reducerPath,t.reducer]]:Object.entries(t)),Mo=Symbol.for("rtk-state-proxy-original"),Up=e=>!!e&&!!e[Mo],zp=new WeakMap,Wp=(e,t,r)=>wt(zp,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}})),Gp=e=>{if(!Up(e))throw new Error(process.env.NODE_ENV==="production"?ee(25):"original must be used on state Proxy");return e[Mo]},Hp={},Kp=(e=Hp)=>e;function qp(...e){const t=Object.fromEntries(Bp(e)),r=()=>Object.keys(t).length?(0,Te.combineReducers)(t):Kp;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,...p){return c(Wp(u?u(h,...p):h,t,a),...p)}},{original:Gp});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"],Yp={currentStep:"services",completedSteps:["services"],isOrder:!0},zu=It({name:"breadcrumbs",initialState:Yp,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:Xp,goToStep:Oa,completeStep:V5,nextStep:Ne,prevStep:B5,clearSteps:U5}=zu.actions,Zp=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:Jp,setOutletData:Qp,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",pt=()=>({"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:pt()});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:pt(),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:pt()});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:pt()});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:pt(),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:pt()}),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:pt()});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 p=await fetch(`${st}/concent/customer-sign`,{method:"POST",headers:pt(),body:JSON.stringify(h)}),m=await p.json();if(!p.ok)throw m;return m},pn=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(pn.pending,t=>{t.loading=!0}).addCase(pn.fulfilled,(t,r)=>{t.loading=!1,t.slots=r.payload?.data?.groups||{morning:[],afternoon:[],evening:[]}}).addCase(pn.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,m1=Yu.reducer,Xu=It({name:"outletList",initialState:{outlets:[]},reducers:{setOutletList:(e,t)=>{e.outlets=t.payload},clearOutletList:e=>{e.outlets=[]}}}),{setOutletList:p1,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:Zp,outletDetails:t1,service:n1,slots:u1,appointment:m1,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,p=!1)=>{const m=p&&i?r:n;return h&&o.add(f),m.add(f),f},cancel:f=>{n.delete(f),o.delete(f)},process:f=>{if(s=f,i){a=!0;return}i=!0;const h=r;r=n,n=h,r.forEach(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 mf(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:p,postRender:m}=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),p.process(i),m.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}=mf(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},pf=e=>t=>typeof t=="string"&&t.startsWith(e),yf=pf("--"),L1=pf("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"),ml={...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))+")"},me={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=me.parse(e);return t.alpha=0,me.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(",pl="${}",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=>(me.test(o)?(n.color.push(a),i.push(bf),r.push(me.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,pl)).split(pl),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+=me.transform(n[a]):i+=n[a]}return i}}function J1(e){return $f(Zt(e))}var Q1=e=>typeof e=="number"?0:me.test(e)?me.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:me.test(e)?gl:dy:Array.isArray(e)?xf:typeof e=="object"?me.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 my({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,p=Ma(c,o),m=Math.exp(-f);return Ji-h/p*m},a=c=>{const u=c*o*e,f=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*e,p=Math.exp(-u),m=Ma(Math.pow(c,2),o);return(-i(c)+Ji>0?-1:1)*((f-h)*p)/m}):(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 py=["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,py))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=my({...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:p}=gy({...r,velocity:-De(r.velocity||0)}),m=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=(m+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+(m+v*g)*V);const M=m+v*g;w=V=>Math.exp(-v*V)*(v*M*V-m)}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*((m+y*v*g)*Math.sinh(G)+M*g*Math.cosh(G))/M};const V=(m+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:p&&f||null,velocity:M=>Oe(w(M)),next:M=>{if(!p&&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(p)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},p=S=>s!==void 0&&S<s||l!==void 0&&S>l,m=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=>{p(h.value)&&(E=S,C=Kn({keyframes:[h.value,m(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:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const 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&&p!==ka&&(w.value=Ci(c,this.options,y,this.speed)),m&&m(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 p=e.animate(u,h);return Xe.value&&p.finished.finally(()=>{Pt.waapi--}),p}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,(p,m,y)=>this.onKeyframesResolved(p,m,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),p=f.motionValue?.owner?.current;let m;if(h)try{m=new Wy({...f,element:p})}catch{m=new qn(f)}else m=new qn(f);m.finished.then(()=>{this.notifyFinished()}).catch(Re),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),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 mg(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 pg(e){return!!(xe(e)&&e.add)}function Ga(e,t){const r=e.getValue("willChange");if(pg(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 p=e.getValue(h,e.latestValues[h]??null),m=s[h];if(m===void 0||f&&gg(f,h))continue;const y={delay:r,...Zo(a||{},h)},g=p.get();if(g!==void 0&&!p.isAnimating()&&!Array.isArray(m)&&m===g&&!y.velocity){ae.update(()=>p.set(m));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;p.start(Jo(h,p,m,x&&Vf.has(h)?{type:!1}:y,e,v));const $=p.animation;$&&u.push($)}if(o){const h=()=>ae.update(()=>{o&&mg(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: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,...Ng,zIndex:jl,fillOpacity:xr,strokeOpacity:xr,numOctaves:jl},Pg={...ts,color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:Ka,WebkitFilter:Ka,mask:qa,WebkitMask:qa},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}=mf(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",m)},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))},p=()=>{s=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=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",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,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=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),$n.has(l)&&$n.delete(l),_l(p)&&typeof c=="function"&&c(p,{success:m})},f=p=>{u(p,l===window||l===document||r.useGlobalTarget||Jf(l,p.target))},h=p=>{u(p,!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,me,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 p=f[h];l[h]!==void 0&&xe(p)&&p.set(l[h])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,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"},mv={offset:"strokeDashoffset",array:"strokeDasharray"};function pv(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?hv:mv;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 p of yv)f[p]!==void 0&&(h[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&pv(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 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<bv;r++){const n=os[r],i=e.props[n];(wr(i)||i===!1)&&(t[n]=i)}return t}function ph(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:p,transitionEnd:m,...y}=h;u={...u,...y,...m}}return u};function o(c){t=c(e)}function s(c){const{props:u}=e,f=mh(e.parent)||{},h=[],p=new Set;let m={},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={...m},!$.isActive&&C===null||!w&&!$.prevProp||Ni(w)||typeof w=="boolean")continue;if(x==="exit"&&$.isActive&&C!==!0){$.prevResolvedValues&&(m={...m,...$.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,p.has(H)&&(M=!0,p.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(m.hasOwnProperty(H))continue;let ue=!1;Wa(te)&&Wa(re)?ue=!ph(te,re):ue=te!==re,ue?te!=null?W(H):p.add(H):te!==void 0&&p.has(H)?W(H):$.protectedKeys[H]=!0}$.prevProp=w,$.prevResolvedValues=P,$.isActive&&(m={...m,...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(p.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)}p.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)?!ph(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 mr(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:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var $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 p=window.innerWidth;p!==f&&(f=p,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:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||s2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!bh(this.targetLayout,p),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(m,"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=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(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:p}=o;if(!p){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)),mr(this.projectionDelta,this.layoutCorrected,p,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",p)),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(),p=(l?l.source:void 0)!==(this.layout?this.layout.source:void 0),m=this.getStack(),y=!m||m.members.length<=1,g=!!(p&&!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)),p&&(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),mr(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:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.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 m in Ja){if(u[m]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:v}=Ja[m],x=f==="none"?u[m]:y(u[m],c);if(g){const $=g.length;for(let w=0;w<$;w++)o[g[w]]=x}else v?this.options.visualElement.renderState.vars[m]=x:o[m]=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();mr(o,r,t.layoutBox);const s=Wt();a?mr(s,e.applyTransform(n,!0),t.measuredBox):mr(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 p=e.options.layoutAnchor||void 0,m=ge();Zn(m,t.layoutBox,f.layoutBox,p);const y=ge();Zn(y,r,h.layoutBox,p),bh(m,y)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,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 md(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=md(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():md(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 m2({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:p,left:m,right:y,bottom:g}=l.current;if(t||a===!1||!s.current||!f||!h)return;const v=r==="left"?`left: ${m}`:`right: ${y}`,x=n==="bottom"?`bottom: ${g}`:`top: ${p}`;s.current.dataset.motionPopId=o;const $=document.createElement("style");c&&($.nonce=c);const w=i??document.head;return w.appendChild($),$.sheet&&$.sheet.insertRule(`
16
+ [data-motion-pop-id="${o}"] {
17
+ position: absolute !important;
18
+ width: ${f}px !important;
19
+ height: ${h}px !important;
20
+ ${v}px !important;
21
+ ${x}px !important;
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 p2=({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,p=(0,b.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:i,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;n&&n()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[r,u,n]);return a&&h&&(p={...p}),(0,b.useMemo)(()=>{u.forEach((m,y)=>u.set(y,!1))},[r]),b.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=(0,d.jsx)(m2,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:c,children:e}),(0,d.jsx)(Si.Provider,{value:p,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 pd(e){const t=[];return b.Children.forEach(e,r=>{(0,b.isValidElement)(r)&&t.push(r)}),t}var mt=({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)(()=>pd(e),[e]),p=o&&!u?[]:h.map(nn),m=(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(()=>{m.current=!1,y.current=h;for(let S=0;S<w.length;S++){const j=nn(w[S]);p.includes(j)?(g.delete(j),v.current.delete(j)):g.get(j)!==!0&&g.set(j,!1)}},[w,p.length,p.join("-")]);const C=[];if(h!==x){let S=[...h];for(let j=0;j<w.length;j++){const M=w[j],V=nn(M);p.includes(V)||(S.splice(j,0,M),C.push(M))}return a==="wait"&&C.length&&(S=C),E(pd(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||p.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)(p2,{isPresent:M,initial:!m.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=cm((()=>{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(),fm($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 p=0;p<h.length;p++){const m=Qo(e,h[p]);if(m){const{transitionEnd:y,transition:g,...v}=m;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),p=(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}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=(0,b.useContext)(Mh);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&F2(h.current,r,i,y);const g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(r,l)});const v=r[Bf],x=(0,b.useRef)(!!v&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Zu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),m.enteringChildren=void 0)}),m}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:p}=h,m=N2(c),y=o(c,p);if(!p&&typeof window<"u"){B2(h,n);const g=U2(h);f=g.MeasureLayout,m.visualElement=L2(e,y,h,i,g.ProjectionNode,a)}return(0,d.jsxs)(Ei.Provider,{value:m,children:[f&&m.visualElement?(0,d.jsx)(f,{visualElement:m.visualElement,...h}):null,_2(e,c,R2(y,m.visualElement,u),y,p,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 pr(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,p=X2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:m}=f,{timestamp:y}=be;this.history.push({...m,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:p,onSessionEnd:m,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&&p&&p(f,g),m&&m(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(pr(this.contextWindow,"pointermove",this.handlePointerMove),pr(this.contextWindow,"pointerup",this.handlePointerUp),pr(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);($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:p,onDragStart:m}=this.getProps();if(h&&!p&&(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}),m&&ae.update(()=>m(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:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=f;if(p&&this.currentDirection===null){this.currentDirection=lb(g),this.currentDirection!==null&&m&&m(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,p={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(c,p)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return Ga(this.visualElement,e),r.start(Jo(e,r,0,t,this.visualElement,!1))}stopAnimation(){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=pr(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=pr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},la=!1,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(){}},mb=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 pb=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:pb},focus:{Feature:mb},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:p=""}=Ob()??{},m=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:m,className:Vh("lucide",p,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"}]],ms=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),m3=[["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"}]],p3=ie("sunrise",m3),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:`inline-flex rounded-tr-md rounded-bl-md items-center px-2 py-0.5 text-[10px] font-bold uppercase tracking-widest border ${e?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-red-100 text-red-400 border-red-200"}`,children:e?"Open":"Closed"}),$3=({item:e,onSelect:t,selected:r})=>(0,d.jsxs)("div",{className:`group cursor-pointer overflow-hidden relative flex flex-col justify-between rounded-md border transition-all duration-300
24
+ ${r?"border-btn-bg-hover bg-white shadow-lg":e.isOpen?"border-gray-200 bg-white hover:border-gray-300 hover:shadow-md":"border-red-300 bg-red-50/50"}`,onClick:()=>t(String(e?.id)),children:[(0,d.jsx)("div",{className:"flex items-start justify-end",children:(0,d.jsx)(b3,{status:e.isOpen})}),(0,d.jsx)("div",{className:"px-4 pb-4 pt-1",children:(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h2",{className:"text-lg font-black uppercase tracking-tight text-gray-900 line-clamp-1",children:e.outletName}),(0,d.jsx)("p",{className:"text-sm text-neutral-500 mt-1 break-all line-clamp-2 min-h-10",children:e.address})]})})]});function x3({outlets:e,onSelectOutlet:t}){const[r,n]=(0,b.useState)(null),[i,a]=(0,b.useState)(""),o=l=>{n(l);const c=e.find(u=>u.id==l);c&&setTimeout(()=>{t(c)},100)},s=(0,b.useMemo)(()=>{if(!i.trim())return e;const l=i.toLowerCase();return e.filter(c=>c.outletName?.toLowerCase().includes(l)||c.address?.toLowerCase().includes(l))},[e,i]);return(0,d.jsxs)("div",{className:"min-h-screen bg-[#f3f1ee] px-4 py-10 sm:px-8 lg:px-16",children:[(0,d.jsxs)("div",{className:"mb-8 flex flex-col lg:flex-row lg:items-center gap-4 justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-3xl sm:text-4xl xl:text-5xl font-black uppercase tracking-tight text-gray-900 mb-3",children:"Choose Your Outlet"}),(0,d.jsx)("div",{className:"w-14 h-0.5 bg-btn-bg"})]}),(0,d.jsxs)("div",{className:"relative w-full lg:max-w-md flex items-center",children:[(0,d.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:(0,d.jsx)(ms,{size:18})}),(0,d.jsx)("input",{type:"text",placeholder:"Search outlet...",value:i,onChange:l=>a(l.target.value),className:"w-full h-11 rounded-md border border-gray-300 bg-white pl-10 pr-20 text-sm outline-none transition-all focus:border-gray-400"}),(0,d.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2",children:i&&(0,d.jsx)("button",{onClick:()=>a(""),className:"text-gray-400 hover:text-black transition-all cursor-pointer",children:(0,d.jsx)(_t,{size:16})})})]})]}),(0,d.jsx)("div",{className:"py-2 max-h-[70vh] md:max-h-[80vh] overflow-auto scrollbar-none",children:s.length>0?(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4",children:(0,d.jsx)(mt,{mode:"popLayout",children:s.map((l,c)=>(0,d.jsx)(at.div,{variants:v3,initial:"hidden",animate:"visible",exit:"exit",custom:c,layout:"position",style:{willChange:"transform, opacity"},children:(0,d.jsx)($3,{item:l,onSelect:o,selected:r===l.id})},l.id))})}):(0,d.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"No outlets found"}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Try searching with a different keyword"})]})})})]})}var w3={USD:Uh,INR:qb,EUR:Hb,GBP:a3},$e=({size:e=20})=>{const t=(0,K.useSelector)(r=>r.outletDetails?.currency);return(0,d.jsx)(t?w3[t]:Uh,{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()},S3=e=>Number(e.price||e.min_price||0),_d=(e,{perUnit:t=!1}={})=>{const r=S3(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 qr(){const[e,t]=(0,b.useState)({width:0,height:0});return(0,b.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var C3=[{label:"Services",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Time Slot",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,d.jsx)(ro,{size:16})}],N3=[{label:"Professional",page:"professionals",icon:(0,d.jsx)(Kh,{size:16})},{label:"Service",page:"services",icon:(0,d.jsx)(Hh,{size:16})},{label:"Time",page:"time",icon:(0,d.jsx)(Ti,{size:16})},{label:"Details",page:"details",icon:(0,d.jsx)(zh,{size:16})},{label:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,d.jsx)(ro,{size:13})]}),page:"confirm",icon:(0,d.jsx)(ro,{size:16})}];function kt(){const e=(0,K.useDispatch)(),{width:t}=qr(),{isService:r}=(0,K.useSelector)(f=>f.outletDetails),n=(0,K.useSelector)(f=>f.outletList.outlets),{currentStep:i,completedSteps:a}=(0,K.useSelector)(f=>f.breadcrumbs),o=r?C3:N3,s=o.findIndex(f=>f.page===i),l=()=>{e({type:"RESET_ALL"}),Do.purge()},c=()=>{if(s===0&&n.length>1){l(),e(Jp());return}if(s<=0)return;const f=o[s-1];e(Oa(f.page))},u=o[s];return(0,d.jsx)(d.Fragment,{children:t<480?(0,d.jsxs)("div",{className:"flex items-center flex-row gap-4 font-semibold",children:[(0,d.jsx)("button",{onClick:c,disabled:!1,className:"flex items-center text-xl disabled:text-gray-200 mr-2 cursor-pointer",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("span",{className:"flex flex-row items-center text-base",children:u?.label})]}):(0,d.jsxs)("div",{className:"hidden md:flex items-center gap-4 w-full",children:[(0,d.jsx)("button",{onClick:c,className:"flex cursor-pointer items-center justify-center h-10 w-10 rounded-full border border-gray-200 hover:bg-gray-100 transition outline-none!",children:(0,d.jsx)(Qn,{size:20})}),(0,d.jsx)("nav",{className:"grid grid-cols-5 w-full overflow-hidden",children:o.map((f,h)=>{const p=i===f.page,m=a?.includes(f.page)||h<=s;return(0,d.jsxs)("button",{onClick:()=>{m&&e(Oa(f.page))},className:["relative h-10 flex items-center justify-center gap-2 uppercase tracking-[1px] text-[11px] font-semibold transition-all border-b-2",m?"cursor-pointer":"cursor-not-allowed opacity-40",p?"border-btn-bg text-black bg-btn-bg-hover/5":"border-transparent text-black/60 hover:text-black"].join(" "),children:[(0,d.jsx)("span",{className:`${p?"text-btn-bg":"text-btn-bg-hover"}`,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-md object-cover"}):(0,d.jsx)("div",{className:"w-10 h-10 rounded-md 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)(mt,{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-red-500",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)(mt,{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)(m=>m.service),[a,o]=(0,b.useState)(!1),s=n.map(m=>m.id),l=(0,b.useMemo)(()=>{if(!i?.id)return[];const m=r.find(y=>y.id===i.id);return m?n.map(y=>{const g=m?.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((m,y)=>m+Number(y.price||0)*y.qty,0),u=l.reduce((m,y)=>m+(y?.duration||0)*y.qty,0),f=(0,b.useMemo)(()=>s.length?r.filter(m=>{const y=m.assignments??[];return s?.every(g=>y.some(v=>String(v.id)==String(g)&&!!v?.assigned))}):[],[r,s]),h=t<768,p=s.length>0;return(0,b.useEffect)(()=>{if(p&&f.length===0){const m=setTimeout(()=>o(!0),300);return()=>clearTimeout(m)}else o(!1)},[p,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)(mt,{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-red-500",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)(mt,{mode:"popLayout",children:f.map((m,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(m)),e(Kt(null)),h&&e(Ne())},className:`pro-card border border-border rounded-sm p-4 cursor-pointer transition flex items-center gap-4 ${i?.id===m.id?"border-red bg-[#fff8f8]":"bg-white hover:border-red"}`,children:[m.imageUrl?(0,d.jsx)("img",{src:m.imageUrl,alt:m.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:m.color||"#111"},children:lr(m.name)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-sm",children:m.name}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:m.staff_type})]})]},m.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,p]=(0,b.useState)(null),[m,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=m.trim().toLowerCase();return P?S.filter(U=>U.name?.toLowerCase().includes(P)||U.description?.toLowerCase().includes(P)):_},[m,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),p(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"),p(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)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,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"}),m&&(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),p(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:()=>p(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:()=>p(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)(mt,{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,p]=(0,b.useState)(null),[m,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=m.trim().toLowerCase();return S?w.filter(j=>j.name?.toLowerCase().includes(S)||j.description?.toLowerCase().includes(S)):$},[m,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),p(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"),p(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)(ms,{size:18})}),(0,d.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:m,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"}),m&&(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),p(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:()=>p(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:()=>p(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)(mt,{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 ps({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:p,slots:m,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)(()=>[...m?.morning||[],...m?.afternoon||[],...m?.evening||[]],[m]),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=p?.[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:`
25
+ px-2 py-1.5 border rounded-sm cursor-pointer text-xs text-center
26
+ ${Ke||Yr?"flex-none w-16":"flex-1"}
27
+ ${ye?"bg-red text-white border-red":"bg-white border-border"}
28
+ `,children:ne?"Custom":D===0?"No tip":`${D}%`},D)})}),(0,d.jsx)(mt,{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,p)=>{r(Kt({month:h,day:p,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,p)=>(0,d.jsx)("div",{className:"text-[10px] font-semibold uppercase text-muted text-center py-1",children:h},p)),Array.from({length:c?.startDow||0}).map((h,p)=>(0,d.jsx)("div",{},`e${p}`)),Array.from({length:c?.days||0},(h,p)=>p+1).map(h=>{const p=n?.month===c?.monthIdx&&n?.day===h,m=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",!p&&!y?"hover:bg-red/10 hover:text-red cursor-pointer":"",m&&!p?"outline-[1.5px] outline-border outline-offset-1":"",p?"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:p}=(0,K.useSelector)(N=>N.slots),[m,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(pn({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);!p&&T&&Ee()},[k,W,G]),(0,d.jsxs)(Dt,{sidebar:(0,d.jsx)(ps,{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:[p?(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)(p3,{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:m,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 p=ke.DateTime.now().setZone(n),m=p.year%100,y=p.month;return h<m||h===m&&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,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,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 m: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=m,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)===m},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===p||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===m||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,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,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===p||typeof A=="object"&&A!==null&&(A.$$typeof===y||A.$$typeof===m||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 m: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=m,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)===m}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 p in c)n.call(c,p)&&(u[p]=c[p]);if(r){f=r(c);for(var m=0;m<f.length;m++)i.call(c,f[m])&&(u[f[m]]=c[f[m]])}}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 p;try{if(typeof s[h]!="function"){var m=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 m.name="Invariant Violation",m}p=s[h](l,h,u,c,null,n)}catch(g){p=g}if(p&&!(p 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 p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var y=f?f():"";r("Failed "+c+" type: "+p.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 p(N){var T=N&&(f&&N[f]||N[h]);if(typeof T=="function")return T}var m="<<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||m,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||m,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," ")+`
29
+ 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=p(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?m: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,p){if(p!==r){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}a.isRequired=a;function o(){return a}var s={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return s.PropTypes=s,s}})),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,p=u/(c+u),m={x:l.x+f*p,y:l.y+h*p},y=t.x-m.x,g=t.y-m.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,p=h*e.startPoint.x;p+=3*f*s*e.control1.x,p+=3*u*l*e.control2.x,p+=c*e.endPoint.x;var m=h*e.startPoint.y;m+=3*f*s*e.control1.y,m+=3*u*l*e.control2.y,m+=c*e.endPoint.y;var y=t+c*i;this._drawPoint(p,m,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"),p=l.childNodes;h.innerHTML="";for(var m=0;m<p.length;m+=1)h.appendChild(p[m].cloneNode(!0));f=h.innerHTML}var y=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,p=u.getImageData(0,0,f,h).data,m=s(!0,f,h,p),y=s(!1,f,h,p),g=l(!0,f,h,p),v=l(!1,f,h,p)-g+1,x=y-m+1,$=u.getImageData(g,m,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 p=c?1:-1,m=c?0:f-1;c?m<f:m>-1;m+=p)for(var y=0;y<u;y++)if(o(y,m,u,h))return m;return null}function l(c,u,f,h){for(var p=c?1:-1,m=c?0:u-1;c?m<u:m>-1;m+=p)for(var y=0;y<f;y++)if(o(m,y,u,h))return m;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(),p=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof u>"u"&&(h.width=h.offsetWidth*p),typeof f>"u"&&(h.height=h.offsetHeight*p),h.getContext("2d").scale(p,p),n.clear()}},n.render=function(){var s=n.props.canvasProps;return 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:p}}=(0,rt.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),m=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=!p&&(r==="CHECKBOX_ONLY"?m: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"]})]})]})]})]})},m$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sn="consentDraftByService",p$=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:p,bookingMode:m,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/p$),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?`${m$[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)(()=>{p&&Me?.length>0&&q0()},[p,Me?.length]);const q0=async()=>{const I=p?.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(!p?.firstName){de.toast.warn("Please enter First Name before signing consent.");return}if(!p?.email&&!p?.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=p?.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 em={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:p?.firstName,last_name:p?.lastName,email:p?.email,phone:p?.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(em)).unwrap(),R=I?.data??I,Q=R.id||"",se=R.customerId||R.customer?.id||"",ve=R.staffId||c?.id||"";m==="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)}},tm=async()=>{if(!h&&m==="booking")return void de.toast.error("Select time");if(!p?.firstName)return void de.toast.error("Enter first name");if(!p?.email&&!p?.phone)return void de.toast.error("Email or phone required");Me.length>0?_s?await Fi():await As():await Fi()},rm=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"},nm=async I=>{try{w(!0);const R=_?.appointmentId,Q=String(_?.customerId);if(!R||!r)return de.toast.error("Something went wrong."),!1;const se=rm(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:p?.firstName??"",lastName:p?.lastName??""},email:p?.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)}},im=()=>C(!1),am=()=>!h||!p?.firstName||!p?.email&&!p?.phone;return(0,d.jsxs)(Dt,{isSidebarOpen:X,handleSidebarOpen:()=>q(I=>!I),sidebar:(0,d.jsx)(ps,{buttonText:"Book Appointment",onButtonClick:tm,showTip:j==="card",tipPct:y,onTipChange:I=>e(f1(I??0)),consentRequired:Me?.length>0,consentCompleted:Os,totalConsents:js,checkingConsent:B,loading:$,isBookingDisabled:am(),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:im,onPay:nm,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.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C$(e,t){if(e){if(typeof e=="string")return Rd(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 Rd(e,t)}}function Rd(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=S$(t.split("")),i;!(i=n()).done;)i.value===e&&r++;return r}function N$(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 P$(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=E$(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.
31
+ 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]),p=(0,b.useCallback)(function(g){return D$(g,f.current,r,n,l)},[f,r,n,l]),m=(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:p,onKeyDown:m});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,p=K$(e,W$),m=z$(G$({ref:t,parse:i,format:a,value:o,defaultValue:s,onChange:l,controlled:c,onKeyDown:u,type:h},p));return b.default.createElement(n,m)}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+$/,pe=(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 pe(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.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sx(e,t){if(e){if(typeof e=="string")return qd(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)?qd(e,t):void 0}}function qd(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 lx(e,t){for(var r=e.slice(),n=ox(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 Ai(e,t,r){return a0(e,t,void 0,r)}function a0(e,t,r,n){t&&(n=new pe(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 a0(e,t,"MOBILE",n);var o=n.type("MOBILE");o&&(a=lx(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 dx(e,t,r){if(t===void 0&&(t={}),r=new pe(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 o0(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 o0(e,t,r){return Ai(e,t,r)==="IS_POSSIBLE"}function ot(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function cx(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=ux(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 ux(e,t){if(e){if(typeof e=="string")return Yd(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)?Yd(e,t):void 0}}function Yd(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 fx=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function vs(e,t,r){if(t=t||{},!(!e.country&&!e.countryCallingCode)){r=new pe(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=cx(fx),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 hx(e,t,r){return t=t||{},r=new pe(r),r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?vs(e,t,r.metadata)!==void 0:ot(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}function mx(e,t,r){var n=new pe(r).getCountryCodesForCallingCode(e);return n?n.filter(function(i){return px(t,i,r)}):[]}function px(e,t,r){var n=new pe(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}var Pe="0-90-9٠-٩۰-۹",yx="-‐-―−ー-",gx="//",vx="..",bx="  ­​⁠ ",$x="()()[]\\[\\]",xx="~⁓∼~",Ge="".concat(yx).concat(gx).concat(vx).concat(bx).concat($x).concat(xx),Ii="++",wx=new RegExp("(["+Pe+"])");function s0(e,t,r,n){if(t){var i=new pe(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(wx);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 c;if(s){var u=e.indexOf(n[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(c=t.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:a}}}return{nationalNumber:e}}function Sx(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=Cx(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 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 pe(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 pe(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 pe(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 pe(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}|;)",p=Ox+Lt(t),m=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 p+"|"+m+"|"+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 pe(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),ma(o,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return a?(o=ri(a,null,"INTERNATIONAL",n,r),o="+".concat(i," ").concat(o),ma(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?ma(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 ma(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=m0(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,m0(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 m0(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,p0=(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]:mx(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 pe(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 pe(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.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c4(e,t){if(e){if(typeof e=="string")return nc(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)?nc(e,t):void 0}}function nc(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 u4={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 y0(e){return u4[e]}function ni(e){for(var t="",r=d4(e.split("")),n;!(n=r()).done;){var i=n.value,a=y0(i);a&&(t+=a)}return t}function f4(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=h4(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 h4(e,t){if(e){if(typeof e=="string")return ic(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)?ic(e,t):void 0}}function ic(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=f4(e.split("")),n;!(n=r()).done;){var i=n.value;t+=g0(i,t)||""}return t}function g0(e,t,r){if(e==="+"){if(t){typeof r=="function"&&r("end");return}return"+"}return y0(e)}var ac="(["+Pe+"]|[\\-\\.\\(\\)]?)",m4="^\\+"+ac+"*["+Pe+"]"+ac+"*$",p4=new RegExp(m4,"g"),ho=Pe,y4="["+ho+"]+((\\-)*["+ho+"])*",g4="[a-zA-Z]+((\\-)*["+ho+"])*",v4="^("+y4+"\\.)*"+g4+"\\.?$",b4=new RegExp(v4,"g"),oc="tel:",mo=";phone-context=",$4=";isub=";function x4(e){var t=e.indexOf(mo);if(t<0)return null;var r=t+mo.length;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}function w4(e){return e===null?!0:e.length===0?!1:p4.test(e)||b4.test(e)}function S4(e,t){var r=t.extractFormattedPhoneNumber,n=x4(e);if(!w4(n))throw new tt("NOT_A_NUMBER");var i;if(n===null)i=r(e)||"";else{i="",n.charAt(0)==="+"&&(i+=n);var a=e.indexOf(oc),o;a>=0?o=a+oc.length:o=0;var s=e.indexOf(mo);i+=e.substring(o,s)}var l=i.indexOf($4);if(l>0&&(i=i.substring(0,l)),i!=="")return i}var C4=250,N4=new RegExp("["+Ii+Pe+"]"),P4=new RegExp("[^"+Pe+"#]+$"),E4=!1;function T4(e,t,r){if(t=t||{},r=new pe(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new tt("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=O4(e,t.v2,t.extract),i=n.number,a=n.ext,o=n.error;if(!i){if(t.v2)throw o==="TOO_SHORT"?new tt("TOO_SHORT"):new tt("NOT_A_NUMBER");return{}}var s=A4(i,t.defaultCountry,t.defaultCallingCode,r),l=s.country,c=s.nationalNumber,u=s.countryCallingCode,f=s.countryCallingCodeSource,h=s.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new tt("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new tt("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new tt("TOO_LONG");return{}}if(t.v2){var p=new p0(u,c,r.metadata);return l&&(p.country=l),h&&(p.carrierCode=h),a&&(p.ext=a),p.__countryCallingCodeSource=f,p}var m=(t.extended?r.hasSelectedNumberingPlan():l)?ot(c,r.nationalNumberPattern()):!1;return t.extended?{country:l,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(t.extended===!0&&r.possibleLengths()&&o0(c,l,r)),phone:c,ext:a}:m?_4(l,c,a):{}}function j4(e,t,r){if(e){if(e.length>C4){if(r)throw new tt("TOO_LONG");return}if(t===!1)return e;var n=e.search(N4);if(!(n<0))return e.slice(n).replace(P4,"")}}function O4(e,t,r){var n=S4(e,{extractFormattedPhoneNumber:function(o){return j4(o,r,t)}});if(!n)return{};if(!Dx(n))return Rx(n)?{error:"TOO_SHORT"}:{};var i=l4(n);return i.ext?i:{number:n}}function _4(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function A4(e,t,r,n){var i=$s(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:E4&&n.isNonGeographicCallingCode(r)&&(l="001"),o=r||gt(t,n.metadata);else return{};if(!s)return{countryCallingCodeSource:a,countryCallingCode:o};var c=co(fo(s),l,n),u=c.nationalNumber,f=c.carrierCode,h=bs(o,{nationalNumber:u,metadata:n});return h&&(l=h,h==="001"||n.selectNumberingPlan(l)),{country:l,countryCallingCode:o,countryCallingCodeSource:a,nationalNumber:u,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 sc(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 lc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sc(Object(r),!0).forEach(function(n){I4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I4(e,t,r){return(t=M4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M4(e){var t=k4(e,"string");return Er(t)=="symbol"?t:t+""}function k4(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 D4(e,t,r){return T4(e,lc(lc({},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 dc(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 R4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dc(Object(r),!0).forEach(function(n){L4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L4(e,t,r){return(t=F4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F4(e){var t=V4(e,"string");return Tr(t)=="symbol"?t:t+""}function V4(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 B4(e,t){return G4(e)||W4(e,t)||z4(e,t)||U4()}function U4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z4(e,t){if(e){if(typeof e=="string")return cc(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)?cc(e,t):void 0}}function cc(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 W4(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 G4(e){if(Array.isArray(e))return e}function v0(e){var t=B4(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=R4({defaultCountry:n},s));else if(jt(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 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 uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uc(Object(r),!0).forEach(function(n){H4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H4(e,t,r){return(t=K4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K4(e){var t=q4(e,"string");return jr(t)=="symbol"?t:t+""}function q4(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)}function b0(e,t,r){t&&t.defaultCountry&&!n0(t.defaultCountry,r)&&(t=fc(fc({},t),{},{defaultCountry:void 0}));try{return D4(e,t,r)}catch(n){if(!(n instanceof tt))throw n}}function Y4(){var e=v0(arguments),t=e.text,r=e.options,n=e.metadata;return b0(t,r,n)}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 hc(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 mc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hc(Object(r),!0).forEach(function(n){X4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X4(e,t,r){return(t=Z4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z4(e){var t=J4(e,"string");return Or(t)=="symbol"?t:t+""}function J4(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 Q4(){var e=v0(arguments),t=e.text,r=e.options,n=e.metadata;r=mc(mc({},r),{},{extract:!1});var i=b0(t,r,n);return i&&i.isValid()||!1}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 e9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pc(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,r9(n.key),n)}}function t9(e,t,r){return t&&pc(e.prototype,t),r&&pc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r9(e){var t=n9(e,"string");return _r(t)=="symbol"?t:t+""}function n9(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)}var i9=(function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;e9(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return t9(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 a9(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=o9(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 o9(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}var pa=new RegExp("x");function En(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function gc(e,t){return e[t]===")"&&t++,s9(e.slice(0,t))}function s9(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 l9(e,t,r){for(var n=a9(r.split("")),i;!(i=n()).done;){var a=i.value;if(e.slice(t+1).search(pa)<0)return;t=e.search(pa),e=e.replace(pa,a)}return[e,t]}function d9(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return u9(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:a})}function c9(e,t,r){return Ai(e,t,r)==="IS_POSSIBLE"}function u9(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=vc(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:n});if(o)return o}return vc(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:n})}function vc(e,t,r){var n=r.metadata,i=r.useNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix,o=f0(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)),f9(o,e))return o}function f9(e,t){return ni(e)===t.getNationalDigits()}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 h9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bc(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,p9(n.key),n)}}function m9(e,t,r){return t&&bc(e.prototype,t),r&&bc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p9(e){var t=y9(e,"string");return Ar(t)=="symbol"?t:t+""}function y9(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 g9=(function(){function e(){h9(this,e)}return m9(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([ya(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($9);if(!n){if(b9.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(ya(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(ya(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:v9(a)});break;default:throw new Error("Unknown operator: ".concat(i))}o&&this.parsePattern(o)}}])})();function v9(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 b9=/[\(\)\[\]\?\:\|]/,$9=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function ya(e){return e.length===1?e[0]:e}function $c(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=x9(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
39
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x9(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}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 w9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wc(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,C9(n.key),n)}}function S9(e,t,r){return t&&wc(e.prototype,t),r&&wc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function C9(e){var t=N9(e,"string");return Ir(t)=="symbol"?t:t+""}function N9(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 P9=(function(){function e(t){w9(this,e),this.matchTree=new g9().parse(t)}return S9(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=po(r.split(""),this.matchTree,!0);if(i&&i.match&&delete i.matchedChars,!(i&&i.overflow&&!n))return i}}])})();function po(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=po(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:
40
+ `.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,c=$c(t.args),u;!(u=c()).done;){var f=u.value,h=po(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:
41
+ `.concat(JSON.stringify(h,null,2)))}}return l?{partialMatch:!0}:void 0;case"[]":for(var p=$c(t.args),m;!(m=p()).done;){var y=m.value;if(e[0]===y)return e.length===1?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[y]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function 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.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E9(e,t){if(e){if(typeof e=="string")return Cc(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)?Cc(e,t):void 0}}function Cc(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 T9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nc(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,O9(n.key),n)}}function j9(e,t,r){return t&&Nc(e.prototype,t),r&&Nc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function O9(e){var t=_9(e,"string");return Mr(t)=="symbol"?t:t+""}function _9(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 yo="9",A9=En(yo,15),I9=/[- ]/,ii=!0,M9=ii&&function(){return/\[([^\[\]])*\]/g},k9=ii&&function(){return/\d(?=[^,}][^,}])/g},D9=new RegExp("["+Ge+"]*\\$1["+Ge+"]*(\\$\\d["+Ge+"]*)*$"),Pc=3,R9=(function(){function e(t){t.state;var r=t.metadata;T9(this,e),this.metadata=r,this.resetFormat()}return j9(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(c9(n.nationalSignificantNumber,n.country,this.metadata))for(var a=Sc(this.matchingFormats),o;!(o=a()).done;){var s=o.value,l=d9(n,s,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return i.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return i.getSeparatorAfterNationalPrefix(u)}});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-Pc;l<0&&(l=0),this.matchingFormats=this.matchingFormats.filter(function(c){return n.formatSuits(c,o,a)&&n.formatMatches(c,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<Pc)try{return new P9(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 c=s.value;return n.chosenFormat===c?0:D9.test(n.getFormatFormat(c,r.international))?n.createTemplateForFormat(c,r)?(n.chosenFormat=c,0):(n.matchingFormats=n.matchingFormats.filter(function(u){return u!==c}),1):1},a,o=Sc(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(!(ii&&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()&&I9.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 gc(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")+En("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();ii&&(l=l.replace(M9(),"\\d").replace(k9(),"\\d"));var c=A9.match(l)[0];if(!(i.length>c.length)){var u=new RegExp("^"+l+"$"),f=i.replace(/\d/g,yo);u.test(f)&&(c=f);var h=this.getFormatFormat(r,a),p;if(this.shouldTryNationalPrefixFormattingRule(r,{international:a,nationalPrefix:o})){var m=h.replace(u0,r.nationalPrefixFormattingRule());if(ni(r.nationalPrefixFormattingRule())===(o||"")+ni("$1")&&(h=m,p=!0,o))for(var y=o.length;y>0;)h=h.replace(/\d/,"x"),y--}var g=c.replace(new RegExp(l),h).replace(new RegExp(yo,"g"),"x");return p||(s?g=En("x",s.length)+" "+g:o&&(g=En("x",o.length)+this.getSeparatorAfterNationalPrefix(r)+g)),a&&(g=c0(g)),g}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=l9(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],gc(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 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 $0(e,t){return B9(e)||V9(e,t)||F9(e,t)||L9()}function L9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F9(e,t){if(e){if(typeof e=="string")return Ec(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)?Ec(e,t):void 0}}function Ec(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 V9(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 B9(e){if(Array.isArray(e))return e}function U9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,W9(n.key),n)}}function z9(e,t,r){return t&&Tc(e.prototype,t),r&&Tc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W9(e){var t=G9(e,"string");return kr(t)=="symbol"?t:t+""}function G9(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)}var H9="["+Ge+Pe+"]+",K9=new RegExp("^"+H9+"$","i"),q9="(?:["+Ii+"]["+Ge+Pe+"]*|["+Ge+Pe+"]+)",Y9=new RegExp("[^"+Ge+Pe+"]+.*$"),X9=/[^\d\[\]]/,Z9=(function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,i=t.metadata,a=t.onNationalSignificantNumberChange;U9(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=i,this.onNationalSignificantNumberChange=a}return z9(e,[{key:"input",value:function(r,n){var i=$0(e8(r),2),a=i[0],o=i[1],s=ni(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=$s("+"+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&&X9.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,c=a.lastIndexOf(i);if(c<0||c!==a.length-i.length)s=!0;else{var u=a.slice(0,c);u&&u!==r&&(l=u)}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=s0(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=d0(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 J9(e){var t=e.search(q9);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(Y9,""),r&&(e="+"+e),e}}function Q9(e){var t=J9(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function e8(e){var t=$0(Q9(e),2),r=t[0],n=t[1];return K9.test(r)||(r=""),[r,n]}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 t8(e,t){return a8(e)||i8(e,t)||n8(e,t)||r8()}function r8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
+ 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 pe(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 pe(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 p0(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 pe(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)===m8.length){n.preventDefault();return}t&&t(n)},[t,r])}function f8(e){return e.selectionStart}var h8=8,m8="+",p8=["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,p8),u=(0,b.useCallback)(function(h){var p=new dr(a,l),m=x0({inputFormat:o,country:a,metadata:l}),y=p.input(m+h),g=p.getTemplate();return m&&(y=go(y,m),g&&(g=go(g,m))),{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 p=x8(r,$8),m=x0({inputFormat:l,country:s,metadata:u}),y=(0,b.useCallback)(function(v){var x=fo(v.target.value);x===i&&Ic(m,x,s,u).indexOf(v.target.value)===0&&(x=x.slice(0,-1)),a(x)},[m,i,a,s,u]),g=w0({onKeyDown:o,inputFormat:l});return b.default.createElement(h,bo({},p,{ref:n,value:Ic(m,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.
45
+ 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.
46
+ 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(p){return p.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.
47
+ 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 pe(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 p=nt(n,h);if(e.indexOf(p)!==0){var m;return e&&e[0]!=="+"?(e=p+e,m=Gt(e,n,h)):e=p,{phoneDigits:e,value:m,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,p=t.reset;r.country;var m=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!==p)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),$=!m||l&&m===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,m)){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 m5(e,t){if(e==null)return{};var r=p5(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 p5(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,p=f.countries;h&&(n.isCountrySupportedWithError(h)||(h=void 0)),a&&j0(a),p=O0(p,u);var m=M0(a,u);n.CountryIcon=_0(n.props);var y=Q8({value:a,phoneNumber:m,defaultCountry:h,required:!s,countries:p||Ac(u),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:p})},metadata:u});return n.state={props:n.props,country:y,countries:p,phoneDigits:R0({value:a,phoneNumber:m,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,p=n.countrySelectComponent,m=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=m5(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(p,Yt({name:i?"".concat(i,"Country"):void 0,"aria-label":v.country},m,{value:C,options:V,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:a||m&&m.disabled,readOnly:o||m&&m.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:p,control:m,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,hm.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)(ps,{buttonText:"Confirm Details",onButtonClick:p(M)}),renderButton:(0,d.jsx)("button",{onClick:p(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:m,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:p,services:m}=n,y=m?.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?m:m.slice(0,5),E=m.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:p?.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 (",m.length,")"]}),m.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(p1(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(Xp(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(Qp({...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:"p-4 text-red-500",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;