@aws-amplify/ui-vue 4.4.5 → 4.4.6

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 CHANGED
@@ -17,7 +17,7 @@ Event: `).concat(JSON.stringify(p.data))),o.state;if(o.status!==Q.Running&&!o.op
17
17
  Event: `).concat(JSON.stringify(p.data)));return o.scheduler.schedule(function(){o.forward(p);var m=o._nextState(p);o.update(m,p)}),o._state},this.sendTo=function(d,f,p){var m=o.parent&&(f===Fe.Parent||o.parent.id===f),v=m?o.parent:z(f)?f===Fe.Internal?o:o.children.get(f)||Xe.get(f):Ep(f)?f:void 0;if(!v){if(!m)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(o.id,"'."));W||ee(!1,"Service '".concat(o.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in v){if(o.status!==Q.Stopped||o.parent!==v||o.state.done){var y=M(M({},d),{name:d.name===pp?"".concat(We(o.id)):d.name,origin:o.sessionId});!p&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([v,y]):v.send(y)}}else!p&&o.machine.config.predictableActionArguments?o._outgoingQueue.push([v,d.data]):v.send(d.data)},this._exec=function(d,f,p,m){m===void 0&&(m=o.machine.options.actions);var v=d.exec||qt(d.type,m),y=q(v)?v:v?v.exec:d.exec;if(y)try{return y(f,p.data,o.machine.config.predictableActionArguments?{action:d,_event:p}:{action:d,state:o.state,_event:p})}catch(R){throw o.parent&&o.parent.send({type:"xstate.error",data:R}),R}switch(d.type){case vt:{var S=d;o.defer(S);break}case Wt:var h=d;if(typeof h.delay=="number"){o.defer(h);return}else h.to?o.sendTo(h._event,h.to,p===Ue):o.send(h._event);break;case sc:o.cancel(d.sendId);break;case bi:{if(o.status!==Q.Running)return;var g=d.activity;if(!o.machine.config.predictableActionArguments&&!o.state.activities[g.id||g.type])break;if(g.type===G.Invoke){var _=hc(g.src),w=o.machine.options.services?o.machine.options.services[_.type]:void 0,P=g.id,b=g.data;W||ee(!("forward"in g),"`forward` property is deprecated (found in invocation of '".concat(g.src,"' in in machine '").concat(o.machine.id,"'). ")+"Please use `autoForward` instead.");var C="autoForward"in g?g.autoForward:!!g.forward;if(!w){W||ee(!1,"No service found for invocation '".concat(g.src,"' in machine '").concat(o.machine.id,"'."));return}var E=b?zt(b,f,p):void 0;if(typeof w=="string")return;var T=q(w)?w(f,p.data,{data:E,src:_,meta:g.meta}):w;if(!T)return;var I=void 0;Ee(T)&&(T=E?T.withContext(E):T,I={autoForward:C}),o.spawn(T,P,I)}else o.spawnActivity(g);break}case Oi:{o.stopChild(d.activity.id);break}case uc:var A=d,k=A.label,N=A.value;k?o.logger(k,N):o.logger(N);break;default:W||ee(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var i=M(M({},t.defaultOptions),r),a=i.clock,s=i.logger,u=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=a,this.parent=u,this.options=i,this.scheduler=new Ra({deferEvents:this.options.deferEvents}),this.sessionId=Xe.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:je(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return W||ee(this.status!==Q.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,r){var o,i;try{for(var a=B(e.actions),s=a.next();!s.done;s=a.next()){var u=s.value;this.exec(u,e,r)}}catch(l){o={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},t.prototype.update=function(e,r){var o,i,a,s,u,l,c,d,f=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||r===Ue)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(T){f.state.children[T.id]=T}),this.devTools&&this.devTools.send(r.data,e),e.event)try{for(var m=B(this.eventListeners),v=m.next();!v.done;v=m.next()){var y=v.value;y(e.event)}}catch(T){o={error:T}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var S=B(this.listeners),h=S.next();!h.done;h=S.next()){var y=h.value;y(e,e.event)}}catch(T){a={error:T}}finally{try{h&&!h.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var g=B(this.contextListeners),_=g.next();!_.done;_=g.next()){var w=_.value;w(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(T){u={error:T}}finally{try{_&&!_.done&&(l=g.return)&&l.call(g)}finally{if(u)throw u.error}}if(this.state.done){var P=e.configuration.find(function(T){return T.type==="final"&&T.parent===f.machine}),b=P&&P.doneData?zt(P.doneData,e.context,r):void 0;this._doneEvent=ft(this.id,b);try{for(var C=B(this.doneListeners),E=C.next();!E.done;E=C.next()){var y=E.value;y(this._doneEvent)}}catch(T){c={error:T}}finally{try{E&&!E.done&&(d=C.return)&&d.call(C)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),Xe.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Q.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,r,o){var i=this,a=Ot(e,r,o);this.listeners.add(a.next),this.status!==Q.NotStarted&&a.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),a.complete()};return this.status===Q.Stopped?a.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(a.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Q.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var r=this;if(this.status===Q.Running)return this;this.machine._init(),Xe.register(this.sessionId,this),this.initialized=!0,this.status=Q.Running;var o=e===void 0?this.initialState:je(this,function(){return Vp(e)?r.machine.resolveState(e):r.machine.resolveState(_e.from(e,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(o,Ue)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){q(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,r,o,i,a,s,u,l,c,d;try{for(var f=B(this.listeners),p=f.next();!p.done;p=f.next()){var m=p.value;this.listeners.delete(m)}}catch(C){e={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}try{for(var v=B(this.stopListeners),y=v.next();!y.done;y=v.next()){var m=y.value;m(),this.stopListeners.delete(m)}}catch(C){o={error:C}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var S=B(this.contextListeners),h=S.next();!h.done;h=S.next()){var m=h.value;this.contextListeners.delete(m)}}catch(C){a={error:C}}finally{try{h&&!h.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var g=B(this.doneListeners),_=g.next();!_.done;_=g.next()){var m=_.value;this.doneListeners.delete(m)}}catch(C){u={error:C}}finally{try{_&&!_.done&&(l=g.return)&&l.call(g)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Q.Stopped,this._initialState=void 0;try{for(var w=B(Object.keys(this.delayedEventsMap)),P=w.next();!P.done;P=w.next()){var b=P.value;this.clock.clearTimeout(this.delayedEventsMap[b])}}catch(C){c={error:C}}finally{try{P&&!P.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new Ra({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,r=this.scheduler;return this._stop(),r.schedule(function(){var o;if(!(!((o=e._state)===null||o===void 0)&&o.done)){var i=te({type:"xstate.stop"}),a=je(e,function(){var s=$(j([],V(e.state.configuration),!1).sort(function(f,p){return p.order-f.order}).map(function(f){return be(f.onExit,e.machine.options.actions)})),u=V(ht(e.machine,e.state,e.state.context,i,[{type:"exit",actions:s}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=u[0],c=u[1],d=new _e({value:e.state.value,context:c,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(f){return!Ii(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return d.changed=!0,d});e.update(a,i),e._stopChildren(),Xe.free(e.sessionId)}}),this},t.prototype.batch=function(e){var r=this;if(this.status===Q.NotStarted&&this.options.deferEvents)W||ee(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
18
18
  Event: `).concat(JSON.stringify(event)));else if(this.status!==Q.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var o=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,a,s=r.state,u=!1,l=[],c=function(m){var v=te(m);r.forward(v),s=je(r,function(){return r.machine.transition(s,v,void 0,o||void 0)}),l.push.apply(l,j([],V(r.machine.config.predictableActionArguments?s.actions:s.actions.map(function(y){return zp(y,s)})),!1)),u=u||!!s.changed};try{for(var d=B(e),f=d.next();!f.done;f=d.next()){var p=f.value;c(p)}}catch(m){i={error:m}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}s.changed=u,s.actions=l,r.update(s,te(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,r){var o=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var i=te(e);if(i.name.indexOf(Ta)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Ta)===0}))throw i.data.data;var a=je(this,function(){return o.machine.transition(o.state,i,void 0,r||void 0)});return a},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var r,o;try{for(var i=B(this.forwardTo),a=i.next();!a.done;a=i.next()){var s=a.value,u=this.children.get(s);if(!u)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));u.send(e)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.defer=function(e){var r=this,o=this.clock.setTimeout(function(){"to"in e&&e.to?r.sendTo(e._event,e.to,!0):r.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=o)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,r,o){o===void 0&&(o=this.machine.options.actions),this._exec(e,r.context,r._event,o)},t.prototype.removeChild=function(e){var r;this.children.delete(e),this.forwardTo.delete(e),(r=this.state)===null||r===void 0||delete r.children[e]},t.prototype.stopChild=function(e){var r=this.children.get(e);r&&(this.removeChild(e),q(r.stop)&&r.stop())},t.prototype.spawn=function(e,r,o){if(this.status!==Q.Running)return zi(e,r);if(ka(e))return this.spawnPromise(Promise.resolve(e),r);if(q(e))return this.spawnCallback(e,r);if(Up(e))return this.spawnActor(e,r);if(Ap(e))return this.spawnObservable(e,r);if(Ee(e))return this.spawnMachine(e,M(M({},o),{id:r}));if(wp(e))return this.spawnBehavior(e,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,r){var o=this;r===void 0&&(r={});var i=new t(e,M(M({},this.options),{parent:this,id:r.id||e.id})),a=M(M({},ki),r);a.sync&&i.onTransition(function(u){o.send(Bi,{state:u,id:i.id})});var s=i;return this.children.set(i.id,s),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(u){o.removeChild(i.id),o.send(te(u,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,r){var o=$p(e,{id:r,parent:this});return this.children.set(r,o),o},t.prototype.spawnPromise=function(e,r){var o,i=this,a=!1,s;e.then(function(l){a||(s=l,i.removeChild(r),i.send(te(ft(r,l),{origin:r})))},function(l){if(!a){i.removeChild(r);var c=We(r,l);try{i.send(te(c,{origin:r}))}catch(d){Pp(l,d,r),i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var u=(o={id:r,send:function(){},subscribe:function(l,c,d){var f=Ot(l,c,d),p=!1;return e.then(function(m){p||(f.next(m),!p&&f.complete())},function(m){p||f.error(m)}),{unsubscribe:function(){return p=!0}}},stop:function(){a=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return s}},o[Me]=function(){return this},o);return this.children.set(r,u),u},t.prototype.spawnCallback=function(e,r){var o,i=this,a=!1,s=new Set,u=new Set,l,c=function(p){l=p,u.forEach(function(m){return m(p)}),!a&&i.send(te(p,{origin:r}))},d;try{d=e(c,function(p){s.add(p)})}catch(p){this.send(We(r,p))}if(ka(d))return this.spawnPromise(d,r);var f=(o={id:r,send:function(p){return s.forEach(function(m){return m(p)})},subscribe:function(p){var m=Ot(p);return u.add(m.next),{unsubscribe:function(){u.delete(m.next)}}},stop:function(){a=!0,q(d)&&d()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},o[Me]=function(){return this},o);return this.children.set(r,f),f},t.prototype.spawnObservable=function(e,r){var o,i=this,a,s=e.subscribe(function(l){a=l,i.send(te(l,{origin:r}))},function(l){i.removeChild(r),i.send(te(We(r,l),{origin:r}))},function(){i.removeChild(r),i.send(te(ft(r),{origin:r}))}),u=(o={id:r,send:function(){},subscribe:function(l,c,d){return e.subscribe(l,c,d)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:r}}},o[Me]=function(){return this},o);return this.children.set(r,u),u},t.prototype.spawnActor=function(e,r){return this.children.set(r,e),e},t.prototype.spawnActivity=function(e){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(!r){W||ee(!1,"No implementation found for activity '".concat(e.type,"'"));return}var o=r(this.state.context,e);this.spawnEffect(e.id,o)},t.prototype.spawnEffect=function(e,r){var o;this.children.set(e,(o={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},o[Me]=function(){return this},o))},t.prototype.attachDev=function(){var e=qi();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(M(M({name:this.id,autoPause:!0,stateSanitizer:function(o){return{value:o.value,context:o.context,actions:o.actions}}},r),{features:M({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}jp(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Me]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Q.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,r){return setTimeout(e,r)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Fc,t})(),Hp=function(t){return z(t)?M(M({},ki),{name:t}):M(M(M({},ki),{name:Tp()}),t)};function et(t,e){var r=Hp(e);return Mp(function(o){if(!W){var i=Ee(t)||q(t);ee(!!o||i,'Attempted to spawn an Actor (ID: "'.concat(Ee(t)?t.id:"undefined",'") outside of a service. This will have no effect.'))}return o?o.spawn(t,r.name,r):zi(t,r.name)})}function Fc(t,e){var r=new Wp(t,e);return r}function Kp(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function It(t){return M(M({type:Ai},t),{toJSON:function(){t.onDone,t.onError;var e=Fi(t,["onDone","onError"]);return M(M({},e),{type:Ai,src:Kp(t.src)})}})}var $e="",Ni="#",tt="*",qe={},Le=function(t){return t[0]===Ni},Yp=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Jp=function(t,e,r){var o=r.slice(0,-1).some(function(a){return!("cond"in a)&&!("in"in a)&&(z(a.target)||Ee(a.target))}),i=e===$e?"the transient event":"event '".concat(e,"'");ee(!o,"One or more transitions for ".concat(i," on state '").concat(t.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},Zp=(function(){function t(e,r,o,i){o===void 0&&(o="context"in e?e.context:void 0);var a=this,s;this.config=e,this._context=o,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Yp(),r),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:lc),this.id=this.config.id||j([this.machine.key],V(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,W||ee(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?ot(this.config.states,function(c,d){var f,p=new t(c,{},void 0,{parent:a,key:d});return Object.assign(a.idMap,M((f={},f[p.id]=p,f),p.idMap)),p}):qe;var u=0;function l(c){var d,f;c.order=u++;try{for(var p=B(Mc(c)),m=p.next();!m.done;m=p.next()){var v=m.value;l(v)}}catch(y){d={error:y}}finally{try{m&&!m.done&&(f=p.return)&&f.call(p)}finally{if(d)throw d.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var d=c.event;return d===$e}):$e in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=he(this.config.entry||this.config.onEntry).map(function(c){return He(c)}),this.onExit=he(this.config.exit||this.config.onExit).map(function(c){return He(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=he(this.config.invoke).map(function(c,d){var f,p;if(Ee(c)){var m=Tt(a.id,d);return a.machine.options.services=M((f={},f[m]=c,f),a.machine.options.services),It({src:m,id:m})}else if(z(c.src)){var m=c.id||Tt(a.id,d);return It(M(M({},c),{id:m,src:c.src}))}else if(Ee(c.src)||q(c.src)){var m=c.id||Tt(a.id,d);return a.machine.options.services=M((p={},p[m]=c.src,p),a.machine.options.services),It(M(M({id:m},c),{src:m}))}else{var v=c.src;return It(M(M({id:Tt(a.id,d)},c),{src:v}))}}),this.activities=he(this.config.activities).concat(this.invoke).map(function(c){return Kt(c)}),this.transition=this.transition.bind(this),this.tags=he(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Rc(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,r){var o=this.options,i=o.actions,a=o.activities,s=o.guards,u=o.services,l=o.delays;return new t(this.config,{actions:M(M({},i),e.actions),activities:M(M({},a),e.activities),guards:M(M({},s),e.guards),services:M(M({},u),e.services),delays:M(M({},l),e.delays)},r??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return q(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:ot(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(r,o){return r[o.eventType]=r[o.eventType]||[],r[o.eventType].push(o),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var r=e===$e,o=this.transitions.filter(function(i){var a=i.eventType===e;return r?a:a||i.eventType===tt});return this.__cache.candidates[e]=o,o},t.prototype.getDelayedTransitions=function(){var e=this,r=this.config.after;if(!r)return[];var o=function(a,s){var u=q(a)?"".concat(e.id,":delay[").concat(s,"]"):a,l=Ic(u,e.id);return e.onEntry.push(Yt(l,{delay:a})),e.onExit.push(Cc(l)),l},i=Ke(r)?r.map(function(a,s){var u=o(a.delay,s);return M(M({},a),{event:u})}):$(Object.keys(r).map(function(a,s){var u=r[a],l=z(u)?{target:u}:u,c=isNaN(+a)?a:+a,d=o(c,s);return he(l).map(function(f){return M(M({},f),{event:d,delay:c})})}));return i.map(function(a){var s=a.delay;return M(M({},e.formatTransition(a)),{delay:s})})},t.prototype.getStateNodes=function(e){var r,o=this;if(!e)return[];var i=e instanceof _e?e.value:dt(e,this.delimiter);if(z(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((r={},r[i]=a,r)):[this,this.states[i]]}var s=Object.keys(i),u=[this];return u.push.apply(u,j([],V($(s.map(function(l){return o.getStateNode(l).getStateNodes(i[l])}))),!1)),u},t.prototype.handles=function(e){var r=cc(e);return this.events.includes(r)},t.prototype.resolveState=function(e){var r=e instanceof _e?e:_e.create(e),o=Array.from(at([],this.getStateNodes(r.value)));return new _e(M(M({},r),{value:this.resolve(r.value),configuration:o,done:Dt(o,this),tags:Ma(o),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,r,o){var i=this.getStateNode(e),a=i.next(r,o);return!a||!a.transitions.length?this.next(r,o):a},t.prototype.transitionCompoundNode=function(e,r,o){var i=Object.keys(e),a=this.getStateNode(i[0]),s=a._transition(e[i[0]],r,o);return!s||!s.transitions.length?this.next(r,o):s},t.prototype.transitionParallelNode=function(e,r,o){var i,a,s={};try{for(var u=B(Object.keys(e)),l=u.next();!l.done;l=u.next()){var c=l.value,d=e[c];if(d){var f=this.getStateNode(c),p=f._transition(d,r,o);p&&(s[c]=p)}}}catch(h){i={error:h}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}var m=Object.keys(s).map(function(h){return s[h]}),v=$(m.map(function(h){return h.transitions})),y=m.some(function(h){return h.transitions.length>0});if(!y)return this.next(r,o);var S=$(Object.keys(s).map(function(h){return s[h].configuration}));return{transitions:v,exitSet:$(m.map(function(h){return h.exitSet})),configuration:S,source:r,actions:$(Object.keys(s).map(function(h){return s[h].actions}))}},t.prototype._transition=function(e,r,o){return z(e)?this.transitionLeafNode(e,r,o):Object.keys(e).length===1?this.transitionCompoundNode(e,r,o):this.transitionParallelNode(e,r,o)},t.prototype.getTransitionData=function(e,r){return this._transition(e.value,e,te(r))},t.prototype.next=function(e,r){var o,i,a=this,s=r.name,u=[],l=[],c;try{for(var d=B(this.getCandidates(s)),f=d.next();!f.done;f=d.next()){var p=f.value,m=p.cond,v=p.in,y=e.context,S=v?z(v)&&Le(v)?e.matches(dt(this.getStateNodeById(v).path,this.delimiter)):Vi(dt(v,this.delimiter),vp(this.path.slice(0,-2))(e.value)):!0,h=!1;try{h=!m||mc(this.machine,m,y,r,e)}catch(w){throw new Error("Unable to evaluate guard '".concat(m.name||m.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
19
19
  `).concat(w.message))}if(h&&S){p.target!==void 0&&(l=p.target),u.push.apply(u,j([],V(p.actions),!1)),c=p;break}}}catch(w){o={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var g=$(l.map(function(w){return a.getRelativeStateNodes(w,e.historyValue)})),_=!!c.internal;return{transitions:[c],exitSet:_?[]:$(l.map(function(w){return a.getPotentiallyReenteringNodes(w)})),configuration:g,source:e,actions:u}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var r=[],o=this,i=e;o&&o!==i;)r.push(o),o=o.parent;return o!==i?[]:(r.push(i),r)},t.prototype.getActions=function(e,r,o,i,a,s,u){var l,c,d,f,p=this,m=s?at([],this.getStateNodes(s.value)):[],v=new Set;try{for(var y=B(Array.from(e).sort(function(A,k){return A.order-k.order})),S=y.next();!S.done;S=y.next()){var h=S.value;(!st(m,h)||st(o.exitSet,h)||h.parent&&v.has(h.parent))&&v.add(h)}}catch(A){l={error:A}}finally{try{S&&!S.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}try{for(var g=B(m),_=g.next();!_.done;_=g.next()){var h=_.value;(!st(e,h)||st(o.exitSet,h.parent))&&o.exitSet.push(h)}}catch(A){d={error:A}}finally{try{_&&!_.done&&(f=g.return)&&f.call(g)}finally{if(d)throw d.error}}o.exitSet.sort(function(A,k){return k.order-A.order});var w=Array.from(v).sort(function(A,k){return A.order-k.order}),P=new Set(o.exitSet),b=$(w.map(function(A){var k=[];if(A.type!=="final")return k;var N=A.parent;if(!N.parent)return k;k.push(it(A.id,A.doneData),it(N.id,A.doneData?zt(A.doneData,i,a):void 0));var R=N.parent;return R.type==="parallel"&&gt(R).every(function(L){return Dt(o.configuration,L)})&&k.push(it(R.id)),k})),C=w.map(function(A){var k=A.onEntry,N=A.activities.map(function(R){return bc(R)});return{type:"entry",actions:be(u?j(j([],V(k),!1),V(N),!1):j(j([],V(N),!1),V(k),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:b.map(function(A){return gc(A)})}),E=Array.from(P).map(function(A){return{type:"exit",actions:be(j(j([],V(A.onExit),!1),V(A.activities.map(function(k){return Ac(k)})),!1),p.machine.options.actions)}}),T=E.concat({type:"transition",actions:be(o.actions,this.machine.options.actions)}).concat(C);if(r){var I=be($(j([],V(e),!1).sort(function(A,k){return k.order-A.order}).map(function(A){return A.onExit})),this.machine.options.actions).filter(function(A){return!Ii(A)});return T.concat({type:"stop",actions:I})}return T},t.prototype.transition=function(e,r,o,i){e===void 0&&(e=this.initialState);var a=te(r),s;if(e instanceof _e)s=o===void 0?e:this.resolveState(_e.from(e,o));else{var u=z(e)?this.resolve(Vt(this.getResolvedPath(e))):this.resolve(e),l=o??this.machine.context;s=this.resolveState(_e.from(u,l))}if(!W&&a.name===tt)throw new Error("An event cannot have the wildcard type ('".concat(tt,"')"));if(this.strict&&!this.events.includes(a.name)&&!Sp(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(s.value,s,a)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},d=at([],this.getStateNodes(s.value)),f=c.configuration.length?at(d,c.configuration):d;return c.configuration=j([],V(f),!1),this.resolveTransition(c,s,s.context,i,a)},t.prototype.resolveRaisedTransition=function(e,r,o,i){var a,s=e.actions;return e=this.transition(e,r,void 0,i),e._event=o,e.event=o.data,(a=e.actions).unshift.apply(a,j([],V(s),!1)),e},t.prototype.resolveTransition=function(e,r,o,i,a){var s,u,l,c,d=this;a===void 0&&(a=Ue);var f=e.configuration,p=!r||e.transitions.length>0,m=p?e.configuration:r?r.configuration:[],v=Dt(m,this),y=p?Op(this.machine,f):void 0,S=r?r.historyValue?r.historyValue:e.source?this.machine.historyValue(r.value):void 0:void 0,h=this.getActions(new Set(m),v,e,o,a,r,i),g=r?M({},r.activities):{};try{for(var _=B(h),w=_.next();!w.done;w=_.next()){var P=w.value;try{for(var b=(l=void 0,B(P.actions)),C=b.next();!C.done;C=b.next()){var E=C.value;E.type===bi?g[E.activity.id||E.activity.type]=E:E.type===Oi&&(g[E.activity.id||E.activity.type]=!1)}}catch(U){l={error:U}}finally{try{C&&!C.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}}}catch(U){s={error:U}}finally{try{w&&!w.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}var T=V(ht(this,r,o,a,h,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),I=T[0],A=T[1],k=V(Cp(I,Ii),2),N=k[0],R=k[1],L=I.filter(function(U){var pe;return U.type===bi&&((pe=U.activity)===null||pe===void 0?void 0:pe.type)===Ai}),H=L.reduce(function(U,pe){return U[pe.activity.id]=Rp(pe.activity,d.machine,A,a),U},r?M({},r.children):{}),Y=new _e({value:y||r.value,context:A,_event:a,_sessionid:r?r._sessionid:null,historyValue:y?S?bp(S,y):void 0:r?r.historyValue:void 0,history:!y||e.source?r:void 0,actions:y?R:[],activities:y?g:r?r.activities:{},events:[],configuration:m,transitions:e.transitions,children:H,done:v,tags:Ma(m),machine:this}),J=o!==A;Y.changed=a.name===Bi||J;var Z=Y.history;Z&&delete Z.history;var ye=!v&&(this._transient||f.some(function(U){return U._transient}));if(!p&&(!ye||a.name===$e))return Y;var X=Y;if(!v)for(ye&&(X=this.resolveRaisedTransition(X,{type:dp},a,i));N.length;){var Pe=N.shift();X=this.resolveRaisedTransition(X,Pe._event,a,i)}var xe=X.changed||(Z?!!X.actions.length||J||typeof Z.value!=typeof X.value||!Uc(X.value,Z.value):void 0);return X.changed=xe,X.history=Z,X},t.prototype.getStateNode=function(e){if(Le(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[e];if(!r)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return r},t.prototype.getStateNodeById=function(e){var r=Le(e)?e.slice(Ni.length):e;if(r===this.id)return this;var o=this.machine.idMap[r];if(!o)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return o},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Le(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var r=Ti(e,this.delimiter).slice(),o=this;r.length;){var i=r.shift();if(!i.length)break;o=o.getStateNode(i)}return o},t.prototype.resolve=function(e){var r,o=this;if(!e)return this.initialStateValue||qe;switch(this.type){case"parallel":return ot(this.initialStateValue,function(a,s){return a?o.getStateNode(s).resolve(e[s]||a):qe});case"compound":if(z(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(r={},r[e]=i.initialStateValue,r):e}return Object.keys(e).length?ot(e,function(a,s){return a?o.getStateNode(s).resolve(a):qe}):this.initialStateValue||{};default:return e||qe}},t.prototype.getResolvedPath=function(e){if(Le(e)){var r=this.machine.idMap[e.slice(Ni.length)];if(!r)throw new Error("Unable to find state node '".concat(e,"'"));return r.path}return Ti(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=Pa(this.states,function(o){return o.initialStateValue||qe},function(o){return o.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=Gt(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,r){this._init();var o=this.getStateNodes(e);return this.resolveTransition({configuration:o,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var r=this.config;z(r.target)?e=Le(r.target)?Vt(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:e=r.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,r,o){return o===void 0&&(o=!0),o?e.type==="history"?e.resolveHistory(r):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Gt(this))return[this];if(this.type==="compound"&&!this.initial)return W||ee(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Ft(this.initialStateValue);return $(r.map(function(o){return e.getFromRelativePath(o)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var r=V(e),o=r[0],i=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(o,"' from node with no states"));var a=this.getStateNode(o);if(a.type==="history")return a.resolveHistory();if(!this.states[o])throw new Error("Child state '".concat(o,"' does not exist on '").concat(this.id,"'"));return this.states[o].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Pa(this.states,function(r,o){if(!e)return r.historyValue();var i=z(e)?void 0:e[o];return r.historyValue(i||r.initialStateValue)},function(r){return!r.history})}},t.prototype.resolveHistory=function(e){var r=this;if(this.type!=="history")return[this];var o=this.parent;if(!e){var i=this.target;return i?$(Ft(i).map(function(s){return o.getFromRelativePath(s)})):o.initialStateNodes}var a=_p(o.path,"states")(e).current;return z(a)?[o.getStateNode(a)]:$(Ft(a).map(function(s){return r.history==="deep"?o.getFromRelativePath(s):[o.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,r=$(Object.keys(this.states).map(function(o){return e.states[o].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,r,o,i;if(this.__cache.events)return this.__cache.events;var a=this.states,s=new Set(this.ownEvents);if(a)try{for(var u=B(Object.keys(a)),l=u.next();!l.done;l=u.next()){var c=l.value,d=a[c];if(d.states)try{for(var f=(o=void 0,B(d.events)),p=f.next();!p.done;p=f.next()){var m=p.value;s.add("".concat(m))}}catch(v){o={error:v}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}}catch(v){e={error:v}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var r=this;if(e!==void 0)return e.map(function(o){if(!z(o))return o;var i=o[0]===r.delimiter;if(i&&!r.parent)return r.getStateNodeByPath(o.slice(1));var a=i?r.key+o:o;if(r.parent)try{var s=r.parent.getStateNodeByPath(a);return s}catch(u){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
20
- `).concat(u.message))}else return r.getStateNodeByPath(a)})},t.prototype.formatTransition=function(e){var r=this,o=Ip(e.target),i="internal"in e?e.internal:o?o.some(function(l){return z(l)&&l[0]===r.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),u=M(M({},e),{actions:be(he(e.actions)),cond:pc(e.cond,a),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return M(M({},u),{target:u.target?u.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return u},t.prototype.formatTransitions=function(){var e,r,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=tt,u=a[s],l=u===void 0?[]:u,c=Fi(a,[typeof s=="symbol"?s:s+""]);i=$(Object.keys(c).map(function(g){!W&&g===$e&&ee(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(o.id,'".'));var _=ze(g,c[g]);return W||Jp(o,g,_),_}).concat(ze(tt,l)))}var d=this.config.always?ze("",this.config.always):[],f=this.config.onDone?ze(String(it(this.id)),this.config.onDone):[];W||ee(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=$(this.invoke.map(function(g){var _=[];return g.onDone&&_.push.apply(_,j([],V(ze(String(ft(g.id)),g.onDone)),!1)),g.onError&&_.push.apply(_,j([],V(ze(String(We(g.id)),g.onError)),!1)),_})),m=this.after,v=$(j(j(j(j([],V(f),!1),V(p),!1),V(i),!1),V(d),!1).map(function(g){return he(g).map(function(_){return o.formatTransition(_)})}));try{for(var y=B(m),S=y.next();!S.done;S=y.next()){var h=S.value;v.push(h)}}catch(g){e={error:g}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(e)throw e.error}}return v},t})(),xa=!1;function Ye(t,e){return!W&&!("predictableActionArguments"in t)&&!xa&&(xa=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new Zp(t,e)}var Ce=Tc,Jt=Sc,Qp=Pc,Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Li(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lr,Ua;function Oc(){if(Ua)return lr;Ua=1;function t(e,r){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=r(e[o],o,e);return a}return lr=t,lr}var cr,Fa;function Xp(){if(Fa)return cr;Fa=1;function t(){this.__data__=[],this.size=0}return cr=t,cr}var dr,Oa;function _t(){if(Oa)return dr;Oa=1;function t(e,r){return e===r||e!==e&&r!==r}return dr=t,dr}var fr,Da;function Zt(){if(Da)return fr;Da=1;var t=_t();function e(r,o){for(var i=r.length;i--;)if(t(r[i][0],o))return i;return-1}return fr=e,fr}var pr,Ba;function em(){if(Ba)return pr;Ba=1;var t=Zt(),e=Array.prototype,r=e.splice;function o(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():r.call(a,s,1),--this.size,!0}return pr=o,pr}var mr,Va;function tm(){if(Va)return mr;Va=1;var t=Zt();function e(r){var o=this.__data__,i=t(o,r);return i<0?void 0:o[i][1]}return mr=e,mr}var hr,za;function rm(){if(za)return hr;za=1;var t=Zt();function e(r){return t(this.__data__,r)>-1}return hr=e,hr}var gr,qa;function nm(){if(qa)return gr;qa=1;var t=Zt();function e(r,o){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,o])):i[a][1]=o,this}return gr=e,gr}var yr,La;function Qt(){if(La)return yr;La=1;var t=Xp(),e=em(),r=tm(),o=rm(),i=nm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,yr=a,yr}var vr,Ga;function om(){if(Ga)return vr;Ga=1;var t=Qt();function e(){this.__data__=new t,this.size=0}return vr=e,vr}var _r,ja;function im(){if(ja)return _r;ja=1;function t(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}return _r=t,_r}var Sr,$a;function am(){if($a)return Sr;$a=1;function t(e){return this.__data__.get(e)}return Sr=t,Sr}var wr,Wa;function sm(){if(Wa)return wr;Wa=1;function t(e){return this.__data__.has(e)}return wr=t,wr}var Cr,Ha;function Dc(){if(Ha)return Cr;Ha=1;var t=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt;return Cr=t,Cr}var br,Ka;function Se(){if(Ka)return br;Ka=1;var t=Dc(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return br=r,br}var Ar,Ya;function Xt(){if(Ya)return Ar;Ya=1;var t=Se(),e=t.Symbol;return Ar=e,Ar}var Er,Ja;function um(){if(Ja)return Er;Ja=1;var t=Xt(),e=Object.prototype,r=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=r.call(s,i),l=s[i];try{s[i]=void 0;var c=!0}catch{}var d=o.call(s);return c&&(u?s[i]=l:delete s[i]),d}return Er=a,Er}var Tr,Za;function lm(){if(Za)return Tr;Za=1;var t=Object.prototype,e=t.toString;function r(o){return e.call(o)}return Tr=r,Tr}var Ir,Qa;function Je(){if(Qa)return Ir;Qa=1;var t=Xt(),e=um(),r=lm(),o="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:o:a&&a in Object(u)?e(u):r(u)}return Ir=s,Ir}var Pr,Xa;function Te(){if(Xa)return Pr;Xa=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return Pr=t,Pr}var kr,es;function Gi(){if(es)return kr;es=1;var t=Je(),e=Te(),r="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var l=t(u);return l==o||l==i||l==r||l==a}return kr=s,kr}var Nr,ts;function cm(){if(ts)return Nr;ts=1;var t=Se(),e=t["__core-js_shared__"];return Nr=e,Nr}var Mr,rs;function dm(){if(rs)return Mr;rs=1;var t=cm(),e=(function(){var o=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function r(o){return!!e&&e in o}return Mr=r,Mr}var Rr,ns;function Bc(){if(ns)return Rr;ns=1;var t=Function.prototype,e=t.toString;function r(o){if(o!=null){try{return e.call(o)}catch{}try{return o+""}catch{}}return""}return Rr=r,Rr}var xr,os;function fm(){if(os)return xr;os=1;var t=Gi(),e=dm(),r=Te(),o=Bc(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,c=u.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||e(p))return!1;var m=t(p)?d:a;return m.test(o(p))}return xr=f,xr}var Ur,is;function pm(){if(is)return Ur;is=1;function t(e,r){return e==null?void 0:e[r]}return Ur=t,Ur}var Fr,as;function Oe(){if(as)return Fr;as=1;var t=fm(),e=pm();function r(o,i){var a=e(o,i);return t(a)?a:void 0}return Fr=r,Fr}var Or,ss;function ji(){if(ss)return Or;ss=1;var t=Oe(),e=Se(),r=t(e,"Map");return Or=r,Or}var Dr,us;function er(){if(us)return Dr;us=1;var t=Oe(),e=t(Object,"create");return Dr=e,Dr}var Br,ls;function mm(){if(ls)return Br;ls=1;var t=er();function e(){this.__data__=t?t(null):{},this.size=0}return Br=e,Br}var Vr,cs;function hm(){if(cs)return Vr;cs=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Vr=t,Vr}var zr,ds;function gm(){if(ds)return zr;ds=1;var t=er(),e="__lodash_hash_undefined__",r=Object.prototype,o=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return o.call(s,a)?s[a]:void 0}return zr=i,zr}var qr,fs;function ym(){if(fs)return qr;fs=1;var t=er(),e=Object.prototype,r=e.hasOwnProperty;function o(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return qr=o,qr}var Lr,ps;function vm(){if(ps)return Lr;ps=1;var t=er(),e="__lodash_hash_undefined__";function r(o,i){var a=this.__data__;return this.size+=this.has(o)?0:1,a[o]=t&&i===void 0?e:i,this}return Lr=r,Lr}var Gr,ms;function _m(){if(ms)return Gr;ms=1;var t=mm(),e=hm(),r=gm(),o=ym(),i=vm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Gr=a,Gr}var jr,hs;function Sm(){if(hs)return jr;hs=1;var t=_m(),e=Qt(),r=ji();function o(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return jr=o,jr}var $r,gs;function wm(){if(gs)return $r;gs=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return $r=t,$r}var Wr,ys;function tr(){if(ys)return Wr;ys=1;var t=wm();function e(r,o){var i=r.__data__;return t(o)?i[typeof o=="string"?"string":"hash"]:i.map}return Wr=e,Wr}var Hr,vs;function Cm(){if(vs)return Hr;vs=1;var t=tr();function e(r){var o=t(this,r).delete(r);return this.size-=o?1:0,o}return Hr=e,Hr}var Kr,_s;function bm(){if(_s)return Kr;_s=1;var t=tr();function e(r){return t(this,r).get(r)}return Kr=e,Kr}var Yr,Ss;function Am(){if(Ss)return Yr;Ss=1;var t=tr();function e(r){return t(this,r).has(r)}return Yr=e,Yr}var Jr,ws;function Em(){if(ws)return Jr;ws=1;var t=tr();function e(r,o){var i=t(this,r),a=i.size;return i.set(r,o),this.size+=i.size==a?0:1,this}return Jr=e,Jr}var Zr,Cs;function $i(){if(Cs)return Zr;Cs=1;var t=Sm(),e=Cm(),r=bm(),o=Am(),i=Em();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Zr=a,Zr}var Qr,bs;function Tm(){if(bs)return Qr;bs=1;var t=Qt(),e=ji(),r=$i(),o=200;function i(a,s){var u=this.__data__;if(u instanceof t){var l=u.__data__;if(!e||l.length<o-1)return l.push([a,s]),this.size=++u.size,this;u=this.__data__=new r(l)}return u.set(a,s),this.size=u.size,this}return Qr=i,Qr}var Xr,As;function Wi(){if(As)return Xr;As=1;var t=Qt(),e=om(),r=im(),o=am(),i=sm(),a=Tm();function s(u){var l=this.__data__=new t(u);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,Xr=s,Xr}var en,Es;function Im(){if(Es)return en;Es=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return en=e,en}var tn,Ts;function Pm(){if(Ts)return tn;Ts=1;function t(e){return this.__data__.has(e)}return tn=t,tn}var rn,Is;function km(){if(Is)return rn;Is=1;var t=$i(),e=Im(),r=Pm();function o(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return o.prototype.add=o.prototype.push=e,o.prototype.has=r,rn=o,rn}var nn,Ps;function Nm(){if(Ps)return nn;Ps=1;function t(e,r){for(var o=-1,i=e==null?0:e.length;++o<i;)if(r(e[o],o,e))return!0;return!1}return nn=t,nn}var on,ks;function Mm(){if(ks)return on;ks=1;function t(e,r){return e.has(r)}return on=t,on}var an,Ns;function Vc(){if(Ns)return an;Ns=1;var t=km(),e=Nm(),r=Mm(),o=1,i=2;function a(s,u,l,c,d,f){var p=l&o,m=s.length,v=u.length;if(m!=v&&!(p&&v>m))return!1;var y=f.get(s),S=f.get(u);if(y&&S)return y==u&&S==s;var h=-1,g=!0,_=l&i?new t:void 0;for(f.set(s,u),f.set(u,s);++h<m;){var w=s[h],P=u[h];if(c)var b=p?c(P,w,h,u,s,f):c(w,P,h,s,u,f);if(b!==void 0){if(b)continue;g=!1;break}if(_){if(!e(u,function(C,E){if(!r(_,E)&&(w===C||d(w,C,l,c,f)))return _.push(E)})){g=!1;break}}else if(!(w===P||d(w,P,l,c,f))){g=!1;break}}return f.delete(s),f.delete(u),g}return an=a,an}var sn,Ms;function zc(){if(Ms)return sn;Ms=1;var t=Se(),e=t.Uint8Array;return sn=e,sn}var un,Rs;function Rm(){if(Rs)return un;Rs=1;function t(e){var r=-1,o=Array(e.size);return e.forEach(function(i,a){o[++r]=[a,i]}),o}return un=t,un}var ln,xs;function xm(){if(xs)return ln;xs=1;function t(e){var r=-1,o=Array(e.size);return e.forEach(function(i){o[++r]=i}),o}return ln=t,ln}var cn,Us;function Um(){if(Us)return cn;Us=1;var t=Xt(),e=zc(),r=_t(),o=Vc(),i=Rm(),a=xm(),s=1,u=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",v="[object Set]",y="[object String]",S="[object Symbol]",h="[object ArrayBuffer]",g="[object DataView]",_=t?t.prototype:void 0,w=_?_.valueOf:void 0;function P(b,C,E,T,I,A,k){switch(E){case g:if(b.byteLength!=C.byteLength||b.byteOffset!=C.byteOffset)return!1;b=b.buffer,C=C.buffer;case h:return!(b.byteLength!=C.byteLength||!A(new e(b),new e(C)));case l:case c:case p:return r(+b,+C);case d:return b.name==C.name&&b.message==C.message;case m:case y:return b==C+"";case f:var N=i;case v:var R=T&s;if(N||(N=a),b.size!=C.size&&!R)return!1;var L=k.get(b);if(L)return L==C;T|=u,k.set(b,C);var H=o(N(b),N(C),T,I,A,k);return k.delete(b),H;case S:if(w)return w.call(b)==w.call(C)}return!1}return cn=P,cn}var dn,Fs;function qc(){if(Fs)return dn;Fs=1;function t(e,r){for(var o=-1,i=r.length,a=e.length;++o<i;)e[a+o]=r[o];return e}return dn=t,dn}var fn,Os;function Ie(){if(Os)return fn;Os=1;var t=Array.isArray;return fn=t,fn}var pn,Ds;function Lc(){if(Ds)return pn;Ds=1;var t=qc(),e=Ie();function r(o,i,a){var s=i(o);return e(o)?s:t(s,a(o))}return pn=r,pn}var mn,Bs;function Fm(){if(Bs)return mn;Bs=1;function t(e,r){for(var o=-1,i=e==null?0:e.length,a=0,s=[];++o<i;){var u=e[o];r(u,o,e)&&(s[a++]=u)}return s}return mn=t,mn}var hn,Vs;function Gc(){if(Vs)return hn;Vs=1;function t(){return[]}return hn=t,hn}var gn,zs;function jc(){if(zs)return gn;zs=1;var t=Fm(),e=Gc(),r=Object.prototype,o=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return o.call(s,u)}))}:e;return gn=a,gn}var yn,qs;function Om(){if(qs)return yn;qs=1;function t(e,r){for(var o=-1,i=Array(e);++o<e;)i[o]=r(o);return i}return yn=t,yn}var vn,Ls;function De(){if(Ls)return vn;Ls=1;function t(e){return e!=null&&typeof e=="object"}return vn=t,vn}var _n,Gs;function Dm(){if(Gs)return _n;Gs=1;var t=Je(),e=De(),r="[object Arguments]";function o(i){return e(i)&&t(i)==r}return _n=o,_n}var Sn,js;function Hi(){if(js)return Sn;js=1;var t=Dm(),e=De(),r=Object.prototype,o=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&o.call(s,"callee")&&!i.call(s,"callee")};return Sn=a,Sn}var ut={exports:{}},wn,$s;function Bm(){if($s)return wn;$s=1;function t(){return!1}return wn=t,wn}ut.exports;var Ws;function Ki(){return Ws||(Ws=1,(function(t,e){var r=Se(),o=Bm(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||o;t.exports=c})(ut,ut.exports)),ut.exports}var Cn,Hs;function rr(){if(Hs)return Cn;Hs=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(o,i){var a=typeof o;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return Cn=r,Cn}var bn,Ks;function Yi(){if(Ks)return bn;Ks=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return bn=e,bn}var An,Ys;function Vm(){if(Ys)return An;Ys=1;var t=Je(),e=Yi(),r=De(),o="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",S="[object ArrayBuffer]",h="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",w="[object Int8Array]",P="[object Int16Array]",b="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",A={};A[g]=A[_]=A[w]=A[P]=A[b]=A[C]=A[E]=A[T]=A[I]=!0,A[o]=A[i]=A[S]=A[a]=A[h]=A[s]=A[u]=A[l]=A[c]=A[d]=A[f]=A[p]=A[m]=A[v]=A[y]=!1;function k(N){return r(N)&&e(N.length)&&!!A[t(N)]}return An=k,An}var En,Js;function zm(){if(Js)return En;Js=1;function t(e){return function(r){return e(r)}}return En=t,En}var lt={exports:{}};lt.exports;var Zs;function qm(){return Zs||(Zs=1,(function(t,e){var r=Dc(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&r.process,u=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();t.exports=u})(lt,lt.exports)),lt.exports}var Tn,Qs;function Ji(){if(Qs)return Tn;Qs=1;var t=Vm(),e=zm(),r=qm(),o=r&&r.isTypedArray,i=o?e(o):t;return Tn=i,Tn}var In,Xs;function $c(){if(Xs)return In;Xs=1;var t=Om(),e=Hi(),r=Ie(),o=Ki(),i=rr(),a=Ji(),s=Object.prototype,u=s.hasOwnProperty;function l(c,d){var f=r(c),p=!f&&e(c),m=!f&&!p&&o(c),v=!f&&!p&&!m&&a(c),y=f||p||m||v,S=y?t(c.length,String):[],h=S.length;for(var g in c)(d||u.call(c,g))&&!(y&&(g=="length"||m&&(g=="offset"||g=="parent")||v&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||i(g,h)))&&S.push(g);return S}return In=l,In}var Pn,eu;function Zi(){if(eu)return Pn;eu=1;var t=Object.prototype;function e(r){var o=r&&r.constructor,i=typeof o=="function"&&o.prototype||t;return r===i}return Pn=e,Pn}var kn,tu;function Wc(){if(tu)return kn;tu=1;function t(e,r){return function(o){return e(r(o))}}return kn=t,kn}var Nn,ru;function Lm(){if(ru)return Nn;ru=1;var t=Wc(),e=t(Object.keys,Object);return Nn=e,Nn}var Mn,nu;function Gm(){if(nu)return Mn;nu=1;var t=Zi(),e=Lm(),r=Object.prototype,o=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))o.call(a,u)&&u!="constructor"&&s.push(u);return s}return Mn=i,Mn}var Rn,ou;function nr(){if(ou)return Rn;ou=1;var t=Gi(),e=Yi();function r(o){return o!=null&&e(o.length)&&!t(o)}return Rn=r,Rn}var xn,iu;function Hc(){if(iu)return xn;iu=1;var t=$c(),e=Gm(),r=nr();function o(i){return r(i)?t(i):e(i)}return xn=o,xn}var Un,au;function jm(){if(au)return Un;au=1;var t=Lc(),e=jc(),r=Hc();function o(i){return t(i,r,e)}return Un=o,Un}var Fn,su;function $m(){if(su)return Fn;su=1;var t=jm(),e=1,r=Object.prototype,o=r.hasOwnProperty;function i(a,s,u,l,c,d){var f=u&e,p=t(a),m=p.length,v=t(s),y=v.length;if(m!=y&&!f)return!1;for(var S=m;S--;){var h=p[S];if(!(f?h in s:o.call(s,h)))return!1}var g=d.get(a),_=d.get(s);if(g&&_)return g==s&&_==a;var w=!0;d.set(a,s),d.set(s,a);for(var P=f;++S<m;){h=p[S];var b=a[h],C=s[h];if(l)var E=f?l(C,b,h,s,a,d):l(b,C,h,a,s,d);if(!(E===void 0?b===C||c(b,C,u,l,d):E)){w=!1;break}P||(P=h=="constructor")}if(w&&!P){var T=a.constructor,I=s.constructor;T!=I&&"constructor"in a&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(w=!1)}return d.delete(a),d.delete(s),w}return Fn=i,Fn}var On,uu;function Wm(){if(uu)return On;uu=1;var t=Oe(),e=Se(),r=t(e,"DataView");return On=r,On}var Dn,lu;function Hm(){if(lu)return Dn;lu=1;var t=Oe(),e=Se(),r=t(e,"Promise");return Dn=r,Dn}var Bn,cu;function Km(){if(cu)return Bn;cu=1;var t=Oe(),e=Se(),r=t(e,"Set");return Bn=r,Bn}var Vn,du;function Ym(){if(du)return Vn;du=1;var t=Oe(),e=Se(),r=t(e,"WeakMap");return Vn=r,Vn}var zn,fu;function Jm(){if(fu)return zn;fu=1;var t=Wm(),e=ji(),r=Hm(),o=Km(),i=Ym(),a=Je(),s=Bc(),u="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(t),v=s(e),y=s(r),S=s(o),h=s(i),g=a;return(t&&g(new t(new ArrayBuffer(1)))!=p||e&&g(new e)!=u||r&&g(r.resolve())!=c||o&&g(new o)!=d||i&&g(new i)!=f)&&(g=function(_){var w=a(_),P=w==l?_.constructor:void 0,b=P?s(P):"";if(b)switch(b){case m:return p;case v:return u;case y:return c;case S:return d;case h:return f}return w}),zn=g,zn}var qn,pu;function Zm(){if(pu)return qn;pu=1;var t=Wi(),e=Vc(),r=Um(),o=$m(),i=Jm(),a=Ie(),s=Ki(),u=Ji(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function v(y,S,h,g,_,w){var P=a(y),b=a(S),C=P?d:i(y),E=b?d:i(S);C=C==c?f:C,E=E==c?f:E;var T=C==f,I=E==f,A=C==E;if(A&&s(y)){if(!s(S))return!1;P=!0,T=!1}if(A&&!T)return w||(w=new t),P||u(y)?e(y,S,h,g,_,w):r(y,S,C,h,g,_,w);if(!(h&l)){var k=T&&m.call(y,"__wrapped__"),N=I&&m.call(S,"__wrapped__");if(k||N){var R=k?y.value():y,L=N?S.value():S;return w||(w=new t),_(R,L,h,g,w)}}return A?(w||(w=new t),o(y,S,h,g,_,w)):!1}return qn=v,qn}var Ln,mu;function Kc(){if(mu)return Ln;mu=1;var t=Zm(),e=De();function r(o,i,a,s,u){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:t(o,i,a,s,r,u)}return Ln=r,Ln}var Gn,hu;function Qm(){if(hu)return Gn;hu=1;var t=Wi(),e=Kc(),r=1,o=2;function i(a,s,u,l){var c=u.length,d=c,f=!l;if(a==null)return!d;for(a=Object(a);c--;){var p=u[c];if(f&&p[2]?p[1]!==a[p[0]]:!(p[0]in a))return!1}for(;++c<d;){p=u[c];var m=p[0],v=a[m],y=p[1];if(f&&p[2]){if(v===void 0&&!(m in a))return!1}else{var S=new t;if(l)var h=l(v,y,m,a,s,S);if(!(h===void 0?e(y,v,r|o,l,S):h))return!1}}return!0}return Gn=i,Gn}var jn,gu;function Yc(){if(gu)return jn;gu=1;var t=Te();function e(r){return r===r&&!t(r)}return jn=e,jn}var $n,yu;function Xm(){if(yu)return $n;yu=1;var t=Yc(),e=Hc();function r(o){for(var i=e(o),a=i.length;a--;){var s=i[a],u=o[s];i[a]=[s,u,t(u)]}return i}return $n=r,$n}var Wn,vu;function Jc(){if(vu)return Wn;vu=1;function t(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==void 0||e in Object(o))}}return Wn=t,Wn}var Hn,_u;function eh(){if(_u)return Hn;_u=1;var t=Qm(),e=Xm(),r=Jc();function o(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return Hn=o,Hn}var Kn,Su;function Qi(){if(Su)return Kn;Su=1;var t=Je(),e=De(),r="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&t(i)==r}return Kn=o,Kn}var Yn,wu;function Xi(){if(wu)return Yn;wu=1;var t=Ie(),e=Qi(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:o.test(a)||!r.test(a)||s!=null&&a in Object(s)}return Yn=i,Yn}var Jn,Cu;function th(){if(Cu)return Jn;Cu=1;var t=$i(),e="Expected a function";function r(o,i){if(typeof o!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],l=a.cache;if(l.has(u))return l.get(u);var c=o.apply(this,s);return a.cache=l.set(u,c)||l,c};return a.cache=new(r.Cache||t),a}return r.Cache=t,Jn=r,Jn}var Zn,bu;function rh(){if(bu)return Zn;bu=1;var t=th(),e=500;function r(o){var i=t(o,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Zn=r,Zn}var Qn,Au;function nh(){if(Au)return Qn;Au=1;var t=rh(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,o=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,l,c){a.push(l?c.replace(r,"$1"):u||s)}),a});return Qn=o,Qn}var Xn,Eu;function oh(){if(Eu)return Xn;Eu=1;var t=Xt(),e=Oc(),r=Ie(),o=Qi(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(r(u))return e(u,s)+"";if(o(u))return a?a.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Xn=s,Xn}var eo,Tu;function ih(){if(Tu)return eo;Tu=1;var t=oh();function e(r){return r==null?"":t(r)}return eo=e,eo}var to,Iu;function or(){if(Iu)return to;Iu=1;var t=Ie(),e=Xi(),r=nh(),o=ih();function i(a,s){return t(a)?a:e(a,s)?[a]:r(o(a))}return to=i,to}var ro,Pu;function St(){if(Pu)return ro;Pu=1;var t=Qi();function e(r){if(typeof r=="string"||t(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}return ro=e,ro}var no,ku;function ea(){if(ku)return no;ku=1;var t=or(),e=St();function r(o,i){i=t(i,o);for(var a=0,s=i.length;o!=null&&a<s;)o=o[e(i[a++])];return a&&a==s?o:void 0}return no=r,no}var oo,Nu;function ah(){if(Nu)return oo;Nu=1;var t=ea();function e(r,o,i){var a=r==null?void 0:t(r,o);return a===void 0?i:a}return oo=e,oo}var io,Mu;function sh(){if(Mu)return io;Mu=1;function t(e,r){return e!=null&&r in Object(e)}return io=t,io}var ao,Ru;function uh(){if(Ru)return ao;Ru=1;var t=or(),e=Hi(),r=Ie(),o=rr(),i=Yi(),a=St();function s(u,l,c){l=t(l,u);for(var d=-1,f=l.length,p=!1;++d<f;){var m=a(l[d]);if(!(p=u!=null&&c(u,m)))break;u=u[m]}return p||++d!=f?p:(f=u==null?0:u.length,!!f&&i(f)&&o(m,f)&&(r(u)||e(u)))}return ao=s,ao}var so,xu;function lh(){if(xu)return so;xu=1;var t=sh(),e=uh();function r(o,i){return o!=null&&e(o,i,t)}return so=r,so}var uo,Uu;function ch(){if(Uu)return uo;Uu=1;var t=Kc(),e=ah(),r=lh(),o=Xi(),i=Yc(),a=Jc(),s=St(),u=1,l=2;function c(d,f){return o(d)&&i(f)?a(s(d),f):function(p){var m=e(p,d);return m===void 0&&m===f?r(p,d):t(f,m,u|l)}}return uo=c,uo}var lo,Fu;function ta(){if(Fu)return lo;Fu=1;function t(e){return e}return lo=t,lo}var co,Ou;function dh(){if(Ou)return co;Ou=1;function t(e){return function(r){return r==null?void 0:r[e]}}return co=t,co}var fo,Du;function fh(){if(Du)return fo;Du=1;var t=ea();function e(r){return function(o){return t(o,r)}}return fo=e,fo}var po,Bu;function ph(){if(Bu)return po;Bu=1;var t=dh(),e=fh(),r=Xi(),o=St();function i(a){return r(a)?t(o(a)):e(a)}return po=i,po}var mo,Vu;function mh(){if(Vu)return mo;Vu=1;var t=eh(),e=ch(),r=ta(),o=Ie(),i=ph();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?o(s)?e(s[0],s[1]):t(s):i(s)}return mo=a,mo}var ho,zu;function Zc(){if(zu)return ho;zu=1;var t=Oe(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return ho=e,ho}var go,qu;function ra(){if(qu)return go;qu=1;var t=Zc();function e(r,o,i){o=="__proto__"&&t?t(r,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[o]=i}return go=e,go}var yo,Lu;function Qc(){if(Lu)return yo;Lu=1;var t=ra(),e=_t(),r=Object.prototype,o=r.hasOwnProperty;function i(a,s,u){var l=a[s];(!(o.call(a,s)&&e(l,u))||u===void 0&&!(s in a))&&t(a,s,u)}return yo=i,yo}var vo,Gu;function hh(){if(Gu)return vo;Gu=1;var t=Qc(),e=or(),r=rr(),o=Te(),i=St();function a(s,u,l,c){if(!o(s))return s;u=e(u,s);for(var d=-1,f=u.length,p=f-1,m=s;m!=null&&++d<f;){var v=i(u[d]),y=l;if(v==="__proto__"||v==="constructor"||v==="prototype")return s;if(d!=p){var S=m[v];y=c?c(S,v,m):void 0,y===void 0&&(y=o(S)?S:r(u[d+1])?[]:{})}t(m,v,y),m=m[v]}return s}return vo=a,vo}var _o,ju;function gh(){if(ju)return _o;ju=1;var t=ea(),e=hh(),r=or();function o(i,a,s){for(var u=-1,l=a.length,c={};++u<l;){var d=a[u],f=t(i,d);s(f,d)&&e(c,r(d,i),f)}return c}return _o=o,_o}var So,$u;function na(){if($u)return So;$u=1;var t=Wc(),e=t(Object.getPrototypeOf,Object);return So=e,So}var wo,Wu;function yh(){if(Wu)return wo;Wu=1;var t=qc(),e=na(),r=jc(),o=Gc(),i=Object.getOwnPropertySymbols,a=i?function(s){for(var u=[];s;)t(u,r(s)),s=e(s);return u}:o;return wo=a,wo}var Co,Hu;function vh(){if(Hu)return Co;Hu=1;function t(e){var r=[];if(e!=null)for(var o in Object(e))r.push(o);return r}return Co=t,Co}var bo,Ku;function _h(){if(Ku)return bo;Ku=1;var t=Te(),e=Zi(),r=vh(),o=Object.prototype,i=o.hasOwnProperty;function a(s){if(!t(s))return r(s);var u=e(s),l=[];for(var c in s)c=="constructor"&&(u||!i.call(s,c))||l.push(c);return l}return bo=a,bo}var Ao,Yu;function oa(){if(Yu)return Ao;Yu=1;var t=$c(),e=_h(),r=nr();function o(i){return r(i)?t(i,!0):e(i)}return Ao=o,Ao}var Eo,Ju;function Sh(){if(Ju)return Eo;Ju=1;var t=Lc(),e=yh(),r=oa();function o(i){return t(i,r,e)}return Eo=o,Eo}var To,Zu;function wh(){if(Zu)return To;Zu=1;var t=Oc(),e=mh(),r=gh(),o=Sh();function i(a,s){if(a==null)return{};var u=t(o(a),function(l){return[l]});return s=e(s),r(a,u,function(l,c){return s(l,c[0])})}return To=i,To}var Ch=wh();const bh=Li(Ch),Ah=!0,Eh="",yt=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),Th=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},Ih=t=>{const{phone_number:e,...r}=bh(t,Th);if(tc(e)&&e!==Eh){const{country_code:o}=t;return{...r,phone_number:yt(o,e)}}return r},Ph=(t,e,r,o)=>{const{password:i,...a}=e,s=Ih(a),u=o&&o!=="PASSWORD";let l=s;o==="SMS_OTP"&&s.email&&(l={...s,email:""});const c={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:Ah,userAttributes:{...r==="phone_number"?{...l,phone_number:t}:l}};return{username:t,password:u?void 0:i,options:c}},kh=({formValues:t,loginMechanisms:e})=>{const r=t.__authMethod;if(r==="SMS_OTP"){const{country_code:i,phone_number:a}=t;return yt(i,a)}if(r==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const o=e[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=t;return yt(i,a)}return t[o]},Nh=(t,e)=>{const r=[],o=e!==void 0;r.push("PASSWORD"),(o||t!=null&&t.emailOtpEnabled)&&r.push("EMAIL_OTP"),(o||t!=null&&t.smsOtpEnabled)&&r.push("SMS_OTP"),(o||t!=null&&t.webAuthnEnabled)&&r.push("WEB_AUTHN");const i=e??[],a=r.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:D}=kc,Mh=D({actorDoneData:void 0}),Rh=D({challengeName:void 0}),xh=D({missingAttributes:void 0}),Uh=D({remoteError:void 0}),Fh=D({formValues:t=>{var e;return{username:(e=t.formValues)==null?void 0:e.username}}}),Oh=D({touched:{}}),Dh=D({user:void 0}),Bh=D({validationError:{}}),Vh=D({totpSecretCode:(t,{data:e})=>{var o;const{sharedSecret:r}=((o=e.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),zh=D({allowedMfaTypes:(t,{data:e})=>{var r;return(r=e.nextStep)==null?void 0:r.allowedMFATypes}}),qh=D({step:"SIGN_IN"}),Lh=D({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Gh=D({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),jh=D({challengeName:(t,{data:e})=>{const{signInStep:r}=e.nextStep;switch(r){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),$h=D({username:({formValues:t,loginMechanisms:e})=>{const r=e[0],{username:o,country_code:i}=t;return r==="phone_number"?yt(i,o):o}}),Wh=D({username:kh}),Hh=D({username:({formValues:t,loginMechanisms:e})=>{const r=e[0],{username:o,country_code:i}=t;return r==="phone_number"?yt(i,o):o}}),Kh=D({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Yh=D({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Jh=D({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),Zh=D({missingAttributes:(t,{data:e})=>{var r;return(r=e.nextStep)==null?void 0:r.missingAttributes}}),Qh=D({validationError:(t,{data:e})=>e}),Xh=D({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const r=(e==null?void 0:e.message)||"";return r.includes("USER_AUTH flow not enabled")?x(O.PASSWORDLESS_NOT_ENABLED):r.includes("Cannot send code to either")?x(O.CODE_DELIVERY_FAILED):r.includes("Invalid code or auth state")?x(O.VERIFICATION_CODE_INVALID):r.includes("session is expired")?x(O.VERIFICATION_CODE_EXPIRED):r.includes("ceremony has been canceled")?x(O.PASSKEY_AUTHENTICATION_CANCELED):r||e}}),eg=D({user:(t,{data:e})=>e}),Qu=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),tg=D({codeDeliveryDetails:(t,{data:e})=>{var r;return(r=e==null?void 0:e.nextStep)!=null&&r.codeDeliveryDetails?Qu(e.nextStep.codeDeliveryDetails):Qu(e)}}),rg=D({formValues:(t,{data:e})=>{const{name:r,value:o}=e;return{...t.formValues,[r]:o}}}),ng=D({formValues:(t,{data:e})=>Yd({...t.formValues,...e},"password")}),og=D({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),ig=D({unverifiedUserAttributes:(t,{data:e})=>{const r=e||t.fetchedUserAttributes;if(!r)return{};const{email:o,phone_number:i}=r;return{...o&&{email:o},...i&&{phone_number:i}}}}),ag=D({selectedUserAttribute:void 0}),sg=D({selectedUserAttribute:t=>{var e;return(e=t.formValues)==null?void 0:e.unverifiedAttr}}),ug=D({step:"CONFIRM_SIGN_UP"}),lg=D({selectedAuthMethod:(t,{data:e})=>e.method}),cg=D({selectedAuthMethod:(t,{data:e})=>(e==null?void 0:e.__authMethod)||"PASSWORD"}),dg=D({step:"SELECT_AUTH_METHOD"}),fg=D({fetchedUserAttributes:(t,e)=>e.data}),pg=D({hasExistingPasskeys:(t,e)=>e.data}),mg=D({hasExistingPasskeys:!1}),wt={clearActorDoneData:Mh,clearChallengeName:Rh,clearError:Uh,clearFormValues:Fh,clearHasExistingPasskeys:mg,clearMissingAttributes:xh,clearSelectedUserAttribute:ag,clearTouched:Oh,clearUser:Dh,clearValidationError:Bh,handleBlur:og,handleInput:rg,handleSubmit:ng,setAllowedMfaTypes:zh,setChallengeName:jh,setCodeDeliveryDetails:tg,setFetchedUserAttributes:fg,setFieldErrors:Qh,setHasExistingPasskeys:pg,setMissingAttributes:Zh,setNextResetPasswordStep:Jh,setNextSignInStep:Kh,setNextSignUpStep:Yh,setRemoteError:Xh,setConfirmAttributeCompleteStep:Gh,setConfirmSignUpSignUpStep:ug,setSelectAuthMethodStep:dg,setSelectedAuthMethod:lg,setSelectedAuthMethodFromForm:cg,setShouldVerifyUserAttributeStep:Lh,setSelectedUserAttribute:sg,setSignInStep:qh,setTotpSecretCode:Vh,setUser:eg,setUnverifiedUserAttributes:ig,setUsernameForgotPassword:$h,setUsernameSignIn:Hh,setUsernameSignUp:Wh},hg=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],gg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",yg=(t,{data:e})=>{var r;return((r=e==null?void 0:e.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},vg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_UP",_g=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",Sg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE"&&t.step==="CONFIRM_SIGN_UP",wg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="DONE",Cg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE",bg=(t,{data:e})=>(e==null?void 0:e.nextStep.resetPasswordStep)==="DONE",Ag=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_COMPLETE",Eg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",Tg=(t,{data:e})=>(e==null?void 0:e.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",Ig=(t,{data:e})=>(e==null?void 0:e.step)==="RESET_PASSWORD",Pg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_SIGN_UP",kg=({step:t})=>hg.includes(t),Ng=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Mg=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Rg=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),xg=({step:t})=>t==="RESET_PASSWORD",Ug=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Fg=({step:t})=>t==="CONFIRM_SIGN_UP",Og=(t,e)=>{const r=e.data||t.fetchedUserAttributes;if(!r)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=r;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},Dg=(t,{data:e})=>e.message==="User is already confirmed.",Bg=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:r})=>t&&t.length>1&&(!e||r===null),Vg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:r}=t||{};return!r||e?!1:typeof r=="boolean"?r:r.afterSignin==="ALWAYS"},zg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:r}=t||{};return!r||e?!1:typeof r=="boolean"?r:r.afterSignup==="ALWAYS"},qg=({passwordless:t})=>(t==null?void 0:t.passkeyRegistrationPrompts)!=null,Lg=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",ir={hasCompletedAttributeConfirmation:Ag,hasCompletedResetPassword:bg,hasCompletedSignIn:wg,hasCompletedSignUp:Cg,hasPasskeyRegistrationPrompts:qg,isConfirmSignUpStep:Pg,isConfirmUserAttributeStep:Eg,isResetPasswordStep:Ig,isShouldConfirmUserAttributeStep:Tg,isUserAlreadyConfirmed:Dg,shouldAutoSignIn:_g,shouldManualSignIn:Sg,shouldConfirmResetPassword:Ug,shouldConfirmSignIn:kg,shouldConfirmSignInWithNewPassword:gg,shouldConfirmSignUp:Fg,shouldConfirmSignUpFromSignIn:vg,shouldResetPassword:xg,shouldResetPasswordFromSignIn:yg,shouldReturnToSelectMethod:Lg,shouldSelectAuthMethod:Bg,shouldSetupTotp:Ng,shouldSetupEmail:Mg,shouldSelectMfaType:Rg,shouldVerifyAttribute:Og,shouldPromptPasskeyRegistration:Vg,shouldPromptPasskeyRegistrationAfterSignup:zg};var Io,Xu;function Xc(){if(Xu)return Io;Xu=1;var t=ra(),e=_t();function r(o,i,a){(a!==void 0&&!e(o[i],a)||a===void 0&&!(i in o))&&t(o,i,a)}return Io=r,Io}var Po,el;function Gg(){if(el)return Po;el=1;function t(e){return function(r,o,i){for(var a=-1,s=Object(r),u=i(r),l=u.length;l--;){var c=u[e?l:++a];if(o(s[c],c,s)===!1)break}return r}}return Po=t,Po}var ko,tl;function jg(){if(tl)return ko;tl=1;var t=Gg(),e=t();return ko=e,ko}var ct={exports:{}};ct.exports;var rl;function $g(){return rl||(rl=1,(function(t,e){var r=Se(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,p=u?u(f):new c.constructor(f);return c.copy(p),p}t.exports=l})(ct,ct.exports)),ct.exports}var No,nl;function Wg(){if(nl)return No;nl=1;var t=zc();function e(r){var o=new r.constructor(r.byteLength);return new t(o).set(new t(r)),o}return No=e,No}var Mo,ol;function Hg(){if(ol)return Mo;ol=1;var t=Wg();function e(r,o){var i=o?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Mo=e,Mo}var Ro,il;function Kg(){if(il)return Ro;il=1;function t(e,r){var o=-1,i=e.length;for(r||(r=Array(i));++o<i;)r[o]=e[o];return r}return Ro=t,Ro}var xo,al;function Yg(){if(al)return xo;al=1;var t=Te(),e=Object.create,r=(function(){function o(){}return function(i){if(!t(i))return{};if(e)return e(i);o.prototype=i;var a=new o;return o.prototype=void 0,a}})();return xo=r,xo}var Uo,sl;function Jg(){if(sl)return Uo;sl=1;var t=Yg(),e=na(),r=Zi();function o(i){return typeof i.constructor=="function"&&!r(i)?t(e(i)):{}}return Uo=o,Uo}var Fo,ul;function Zg(){if(ul)return Fo;ul=1;var t=nr(),e=De();function r(o){return e(o)&&t(o)}return Fo=r,Fo}var Oo,ll;function Qg(){if(ll)return Oo;ll=1;var t=Je(),e=na(),r=De(),o="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,l=s.call(Object);function c(d){if(!r(d)||t(d)!=o)return!1;var f=e(d);if(f===null)return!0;var p=u.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return Oo=c,Oo}var Do,cl;function ed(){if(cl)return Do;cl=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return Do=t,Do}var Bo,dl;function Xg(){if(dl)return Bo;dl=1;var t=Qc(),e=ra();function r(o,i,a,s){var u=!a;a||(a={});for(var l=-1,c=i.length;++l<c;){var d=i[l],f=s?s(a[d],o[d],d,a,o):void 0;f===void 0&&(f=o[d]),u?e(a,d,f):t(a,d,f)}return a}return Bo=r,Bo}var Vo,fl;function ey(){if(fl)return Vo;fl=1;var t=Xg(),e=oa();function r(o){return t(o,e(o))}return Vo=r,Vo}var zo,pl;function ty(){if(pl)return zo;pl=1;var t=Xc(),e=$g(),r=Hg(),o=Kg(),i=Jg(),a=Hi(),s=Ie(),u=Zg(),l=Ki(),c=Gi(),d=Te(),f=Qg(),p=Ji(),m=ed(),v=ey();function y(S,h,g,_,w,P,b){var C=m(S,g),E=m(h,g),T=b.get(E);if(T){t(S,g,T);return}var I=P?P(C,E,g+"",S,h,b):void 0,A=I===void 0;if(A){var k=s(E),N=!k&&l(E),R=!k&&!N&&p(E);I=E,k||N||R?s(C)?I=C:u(C)?I=o(C):N?(A=!1,I=e(E,!0)):R?(A=!1,I=r(E,!0)):I=[]:f(E)||a(E)?(I=C,a(C)?I=v(C):(!d(C)||c(C))&&(I=i(E))):A=!1}A&&(b.set(E,I),w(I,E,_,P,b),b.delete(E)),t(S,g,I)}return zo=y,zo}var qo,ml;function ry(){if(ml)return qo;ml=1;var t=Wi(),e=Xc(),r=jg(),o=ty(),i=Te(),a=oa(),s=ed();function u(l,c,d,f,p){l!==c&&r(c,function(m,v){if(p||(p=new t),i(m))o(l,c,v,d,u,f,p);else{var y=f?f(s(l,v),m,v+"",l,c,p):void 0;y===void 0&&(y=m),e(l,v,y)}},a)}return qo=u,qo}var Lo,hl;function ny(){if(hl)return Lo;hl=1;function t(e,r,o){switch(o.length){case 0:return e.call(r);case 1:return e.call(r,o[0]);case 2:return e.call(r,o[0],o[1]);case 3:return e.call(r,o[0],o[1],o[2])}return e.apply(r,o)}return Lo=t,Lo}var Go,gl;function oy(){if(gl)return Go;gl=1;var t=ny(),e=Math.max;function r(o,i,a){return i=e(i===void 0?o.length-1:i,0),function(){for(var s=arguments,u=-1,l=e(s.length-i,0),c=Array(l);++u<l;)c[u]=s[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=s[u];return d[i]=a(c),t(o,this,d)}}return Go=r,Go}var jo,yl;function iy(){if(yl)return jo;yl=1;function t(e){return function(){return e}}return jo=t,jo}var $o,vl;function ay(){if(vl)return $o;vl=1;var t=iy(),e=Zc(),r=ta(),o=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return $o=o,$o}var Wo,_l;function sy(){if(_l)return Wo;_l=1;var t=800,e=16,r=Date.now;function o(i){var a=0,s=0;return function(){var u=r(),l=e-(u-s);if(s=u,l>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wo=o,Wo}var Ho,Sl;function uy(){if(Sl)return Ho;Sl=1;var t=ay(),e=sy(),r=e(t);return Ho=r,Ho}var Ko,wl;function ly(){if(wl)return Ko;wl=1;var t=ta(),e=oy(),r=uy();function o(i,a){return r(e(i,a,t),i+"")}return Ko=o,Ko}var Yo,Cl;function cy(){if(Cl)return Yo;Cl=1;var t=_t(),e=nr(),r=rr(),o=Te();function i(a,s,u){if(!o(u))return!1;var l=typeof s;return(l=="number"?e(u)&&r(s,u.length):l=="string"&&s in u)?t(u[s],a):!1}return Yo=i,Yo}var Jo,bl;function dy(){if(bl)return Jo;bl=1;var t=ly(),e=cy();function r(o){return t(function(i,a){var s=-1,u=a.length,l=u>1?a[u-1]:void 0,c=u>2?a[2]:void 0;for(l=o.length>3&&typeof l=="function"?(u--,l):void 0,c&&e(a[0],a[1],c)&&(l=u<3?void 0:l,u=1),i=Object(i);++s<u;){var d=a[s];d&&o(i,d,s,l)}return i})}return Jo=r,Jo}var Zo,Al;function fy(){if(Al)return Zo;Al=1;var t=ry(),e=dy(),r=e(function(o,i,a){t(o,i,a)});return Zo=r,Zo}var py=fy();const my=Li(py),ar=async(t,e,r,o)=>{const i=await Promise.all(o.map(s=>s(t,e,r))),a=my({},...i);return rc(a)?Promise.resolve():Promise.reject(a)},hy=8,gy=t=>Array.isArray(t),yy=t=>{if(t)return gy(t)?Object.entries(t).map(([e,r])=>Object.keys(r)[0]):Object.keys(t)},Re={async getAmplifyConfig(){var c,d,f,p,m,v;const t=pd.Amplify.getConfig(),e=(c=t.Auth)==null?void 0:c.Cognito,{loginWith:r,userAttributes:o}=((d=t.Auth)==null?void 0:d.Cognito)??{},i=r?Object.entries(r).filter(([y,S])=>y!=="oauth").filter(([y,S])=>!!S).map(y=>y[0]==="phone"?"phone_number":y[0]):void 0,a=yy(o),s=(f=r==null?void 0:r.oauth)!=null&&f.providers?(p=r.oauth.providers)==null?void 0:p.map(y=>y.toString().toLowerCase()):void 0,u=(v=(m=t.Auth)==null?void 0:m.Cognito)==null?void 0:v.passwordless,l={emailOtpEnabled:(u==null?void 0:u.emailOtpEnabled)??(u==null?void 0:u.email_otp_enabled)===!0,smsOtpEnabled:(u==null?void 0:u.smsOtpEnabled)??(u==null?void 0:u.sms_otp_enabled)===!0,webAuthnEnabled:!!((u==null?void 0:u.webAuthn)??(u==null?void 0:u.web_authn)),preferredChallenge:(u==null?void 0:u.preferredChallenge)??(u==null?void 0:u.preferred_challenge)};return{...e,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:l}},getCurrentUser:K.getCurrentUser,handleSignIn:K.signIn,handleSignUp:K.signUp,handleConfirmSignIn:K.confirmSignIn,handleConfirmSignUp:K.confirmSignUp,handleForgotPasswordSubmit:K.confirmResetPassword,handleForgotPassword:K.resetPassword,handleResendSignUpCode:K.resendSignUpCode,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,r){const{password:o}=t,{password:i}=e;if(!i||!r)return null;const a=[],s=r.minLength??hy;return o.length<s&&a.push(`Password must have at least ${s} characters`),r.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),r.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),r.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),r.requireSpecialCharacters&&!Hd(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(t,e){const{password:r,confirm_password:o}=t,{confirm_password:i,password:a}=e;if(!r&&!o)return null;if((r||o)&&r!==o&&(i&&a||(r==null?void 0:r.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const r={};return t.password||(r.password="Password is required"),t.confirm_password||(r.confirm_password="Confirm Password is required"),Object.keys(r).length>0?r:null}return null}};function vy({services:t}){return Ye({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:r}){const{confirmation_code:o,password:i}=e;return t.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:r})},validateFields(e){return ar(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const td=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),_y=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Bt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},kt=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Bt}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Sy({services:t}){return Ye({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...td("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await K.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Bt.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Bt.onError]}}}},confirmSignIn:{...kt(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Bt}}}}}},setupTotp:{...kt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...kt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...kt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{async fetchUserAttributes(){return K.fetchUserAttributes()},resetPassword({username:e}){return K.resetPassword({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:i}){const a=r??i??(o==null?void 0:o[0])??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:e,username:r,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:r,password:u})}else return t.handleSignIn({username:r,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:e,step:r}){const o=_y(r),{[o]:i}=e;return t.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:e}){let{password:r,phone_number:o,country_code:i,confirm_password:a,username:s,...u}=e,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:l});const c={challengeResponse:r,options:{userAttributes:u}};return K.confirmSignIn(c)},signInWithRedirect(e,{data:r}){return K.signInWithRedirect(r)},async validateFields(e){return ar(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const wy={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Cy={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function by({services:t}){return Ye({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Cy}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await K.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...td("signUp")},resetPassword:{invoke:{src:"resetPassword",...wy}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{autoSignIn(){return K.autoSignIn()},async fetchUserAttributes(){return K.fetchUserAttributes()},confirmSignUp({formValues:e,username:r}){const{confirmation_code:o}=e,i={username:r,confirmationCode:o};return t.handleConfirmSignUp(i)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:r}){return K.signInWithRedirect(r)},handleSignUp(e){const{formValues:r,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=e,u=o[0],c=Ph(i,r,u,a??s);return t.handleSignUp(c)},async validateSignUp(e){return ar(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const Ay=()=>Ye({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>K.signOut()}});function Ey(){return Ye({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...wt,sendUpdate:Jt()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){const e={userAttributeKey:t};return K.sendUserAttributeVerificationCode(e)},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){const r={confirmationCode:t,userAttributeKey:e};return K.confirmUserAttribute(r)},async validateFields(t){return ar(t.formValues,t.touched,t.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const Nt=(t,e)=>{var i,a,s,u,l,c,d,f,p,m,v,y;const r=Nh(t.passwordlessCapabilities,(a=(i=t.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((u=(s=t.config)==null?void 0:s.passwordless)==null?void 0:u.preferredAuthMethod)??((l=t.passwordlessCapabilities)==null?void 0:l.preferredChallenge);return{...t.actorDoneData,step:((c=t==null?void 0:t.actorDoneData)==null?void 0:c.step)??e,formValues:{},touched:{},validationError:{},formFields:(d=t.config)==null?void 0:d.formFields,loginMechanisms:(f=t.config)==null?void 0:f.loginMechanisms,passwordSettings:(p=t.config)==null?void 0:p.passwordSettings,signUpAttributes:(m=t.config)==null?void 0:m.signUpAttributes,socialProviders:(v=t.config)==null?void 0:v.socialProviders,availableAuthMethods:r,preferredChallenge:o,passwordless:(y=t.config)==null?void 0:y.passwordless}},{choose:Ty,stop:Iy}=kc,rt=t=>Iy(t),Py={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},ky={always:{actions:"configure",target:"getConfig"}};function Ny(t){const{useNextWaitConfig:e,...r}={};return Ye({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Re,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?ky:Py,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...wt,forwardToActor:Ty([{cond:"hasActor",actions:Qp(({actorRef:i})=>i)}]),setActorDoneData:Ce({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes,allowedMfaTypes:a.data.allowedMfaTypes})}),applyAmplifyConfig:Ce({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:u=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:c,formFields:d,passwordSettings:f=a.passwordFormat??{},passwordless:p}=i.config;return s.length===0&&s.push("username"),{formFields:My(d)??{},initialState:c,loginMechanisms:s,passwordSettings:f,passwordless:p,signUpAttributes:u,socialProviders:l}}}),spawnSignInActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=Sy({services:s}).withContext(Nt(i,"SIGN_IN"));return et(u,{name:"signInActor"})}}),spawnSignUpActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=by({services:s}).withContext(Nt(i,"SIGN_UP"));return et(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=vy({services:s}).withContext(Nt(i,"FORGOT_PASSWORD"));return et(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Ce({actorRef:i=>{const a=Ey().withContext(Nt(i));return et(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Ce({actorRef:i=>{const a=Ay().withContext({user:i==null?void 0:i.user});return et(a,{name:"signOutActor"})}}),configure:Ce((i,a)=>{const{services:s,...u}=Pd(r)?a.data??{}:r;return{services:{...Re,...s},config:u}}),setHasSetup:Ce({hasSetup:!0})},guards:{...ir,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i,hasUser:({user:i})=>!!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function My(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{let o=t[e][r];o.required=o.isRequired})}),t}const ie={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Avatar:"amplify-avatar",AvatarIcon:"amplify-avatar__icon",AvatarImage:"amplify-avatar__image",AvatarLoader:"amplify-avatar__loader",AIConversation:"amplify-ai-conversation",AIConversationScrollView:"amplify-ai-conversation__scrollview",AIConversationAttachment:"amplify-ai-conversation__attachment",AIConversationAttachmentList:"amplify-ai-conversation__attachment__list",AIConversationAttachmentImage:"amplify-ai-conversation__attachment__image",AIConversationAttachmentName:"amplify-ai-conversation__attachment__name",AIConversationAttachmentSize:"amplify-ai-conversation__attachment__size",AIConversationAttachmentRemove:"amplify-ai-conversation__attachment__remove",AIConversationForm:"amplify-ai-conversation__form",AIConversationFormAttach:"amplify-ai-conversation__form__attach",AIConversationFormError:"amplify-ai-conversation__form__error",AIConversationFormSend:"amplify-ai-conversation__form__send",AIConversationFormField:"amplify-ai-conversation__form__field",AIConversationFormDropzone:"amplify-ai-conversation__form__dropzone",AIConversationMessage:"amplify-ai-conversation__message",AIConversationMessageAvatar:"amplify-ai-conversation__message__avatar",AIConversationMessageSender:"amplify-ai-conversation__message__sender",AIConversationMessageSenderUsername:"amplify-ai-conversation__message__sender__username",AIConversationMessageSenderTimestamp:"amplify-ai-conversation__message__sender__timestamp",AIConversationMessageBody:"amplify-ai-conversation__message__body",AIConversationMessageContent:"amplify-ai-conversation__message__content",AIConversationMessageActions:"amplify-ai-conversation__message__actions",AIConversationMessageList:"amplify-ai-conversation__message__list",AIConversationPrompt:"amplify-ai-conversation__prompt",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",FileUploader:"amplify-fileuploader",FileUploaderDropZone:"amplify-fileuploader__dropzone",FileUploaderDropZoneIcon:"amplify-fileuploader__dropzone__icon",FileUploaderDropZoneText:"amplify-fileuploader__dropzone__text",FileUploaderFilePicker:"amplify-fileuploader__file__picker",FileUploaderFile:"amplify-fileuploader__file",FileUploaderFileWrapper:"amplify-fileuploader__file__wrapper",FileUploaderFileList:"amplify-fileuploader__file__list",FileUploaderFileName:"amplify-fileuploader__file__name",FileUploaderFileSize:"amplify-fileuploader__file__size",FileUploaderFileInfo:"amplify-fileuploader__file__info",FileUploaderFileImage:"amplify-fileuploader__file__image",FileUploaderFileMain:"amplify-fileuploader__file__main",FileUploaderFileStatus:"amplify-fileuploader__file__status",FileUploaderLoader:"amplify-fileuploader__loader",FileUploaderPreviewer:"amplify-fileuploader__previewer",FileUploaderPreviewerText:"amplify-fileuploader__previewer__text",FileUploaderPreviewerActions:"amplify-fileuploader__previewer__actions",FileUploaderPreviewerFooter:"amplify-fileuploader__previewer__footer",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},Ry=({componentName:t,packageName:e,version:r})=>{const o=[`ui-${e}`,r];switch(t){case"AIConversation":{F.setCustomUserAgent({...yd,additionalDetails:[[t],o]});break}case"Authenticator":{F.setCustomUserAgent({..._d,additionalDetails:[[t],o]});break}case"ChangePassword":case"DeleteUser":{F.setCustomUserAgent({...vd,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{F.setCustomUserAgent({...Sd,additionalDetails:[[t],o]});break}case"InAppMessaging":{F.setCustomUserAgent({...wd,additionalDetails:[[t],o]});break}case"LocationSearch":{F.setCustomUserAgent({...Cd,additionalDetails:[[t],o]});break}case"MapView":{F.setCustomUserAgent({...bd,additionalDetails:[[t],o]});break}case"StorageManager":{F.setCustomUserAgent({...Ad,additionalDetails:[[t],o]});break}case"StorageBrowser":{F.setCustomUserAgent({...Ed,additionalDetails:[[t],o]});break}}return Nd},xy={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},Uy={class:"amplify-flex amplify-authenticator__icon-wrapper"},de=n.defineComponent({__name:"base-alert",setup(t){const e=n.ref(!0),r=x("Dismiss alert");function o(){e.value=!1}return(i,a)=>{const s=oe;return e.value?(n.openBlock(),n.createElementBlock("div",xy,[n.createElementVNode("div",Uy,[a[0]||(a[0]=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1)),n.createElementVNode("div",null,[n.renderSlot(i.$slots,"default")])]),n.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":n.unref(r),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:n.withCtx(()=>[...a[1]||(a[1]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])]),_:1},8,["aria-label"])])):n.createCommentVNode("",!0)}}}),fe=n.defineComponent({__name:"base-field-set",setup(t){const e=n.useSlots();return(r,o)=>n.renderSlot(r.$slots,"fieldSetI",n.mergeProps(r.$attrs,{slotData:n.unref(e).default&&n.unref(e).default()}),()=>[n.createElementVNode("fieldset",n.mergeProps(r.$attrs,{"data-amplify-fieldset":""}),[n.renderSlot(r.$slots,"default")],16)])}});function Fy(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function rd(t){let e=0,r,o;const i=()=>{e-=1,o&&e<=0&&(o.stop(),r=void 0,o=void 0)};return(...a)=>(e+=1,r||(o=n.effectScope(!0),r=o.run(()=>t(...a))),Fy(i),r)}function Oy(t){return"state"in t}var El=function(){};function Dy(t){return"getSnapshot"in t?t.getSnapshot():Oy(t)?t.state:void 0}function By(t,e){e===void 0&&(e=Dy);var r=n.isRef(t)?t:n.shallowRef(t),o=n.shallowRef(e(r.value)),i=function(a){r.value.send(a)};return n.watch(r,function(a,s,u){o.value=e(a);var l=a.subscribe({next:function(c){return o.value=c},error:El,complete:El}).unsubscribe;u(function(){return l()})},{immediate:!0}),{state:o,send:i}}const Vy=t=>{var e,r,o;return{...(o=(r=(e=xi(t))==null?void 0:e.formFields)==null?void 0:r.setupTotp)==null?void 0:o.QR}},ia=rd(()=>{const t=Ny(),e=Fc(t).start(),r=n.ref("configuring"),{state:o,send:i}=By(e),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},u=Md(e,(l,c)=>nc(l,c,{onSignIn:a,onSignOut:s}));return K.getCurrentUser().then(()=>{r.value="authenticated"}).catch(()=>{r.value="unauthenticated"}),n.onScopeDispose(()=>{u()}),{authStatus:r,service:e,send:i,state:o}}),ne=rd(()=>{const{authStatus:t,state:e,send:r}=ia(),o=n.reactive({});return n.watchEffect(()=>{const i=Dd({send:r,state:e.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?Vy(e.value):null;o.QRFields=a,o.authStatus=t.value,o.send=r,o.state=e}),o});let zy=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),"");const Ct=n.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=i=>{r("update:modelValue",i.target.value)};return(i,a)=>(n.openBlock(),n.createElementBlock("input",{onChange:a[0]||(a[0]=s=>o(s)),"data-amplify-input":""},null,32))}}),qy={},Ly={"data-amplify-label":""};function Gy(t,e){return n.openBlock(),n.createElementBlock("label",Ly,[n.renderSlot(t.$slots,"default")])}const bt=jt(qy,[["render",Gy]]),jy=["aria-label","aria-checked"],$y={inheritAttrs:!1},aa=n.defineComponent({...$y,__name:"password-control",props:{name:{},label:{},autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:{},required:{type:Boolean,default:!0},describedBy:{}},setup(t){const e=x("Show password"),r=x("Hide password"),o=n.ref("password"),i=n.ref(e),a=Math.floor(Math.random()*999999),s=t,{name:u,label:l,autocomplete:c,hasError:d,labelHidden:f,placeholder:p,required:m}=n.toRefs(s),v=n.ref("");function y(){i.value=i.value===e?r:e,o.value=o.value==="password"?"text":"password"}const S=x((p==null?void 0:p.value)??l.value),h=x(l.value);return(g,_)=>{const w=bt,P=Ct,b=re;return n.openBlock(),n.createBlock(b,{class:n.normalizeClass([n.unref(ie).Flex,n.unref(ie).Field,n.unref(ie).TextField,n.unref(ie).PasswordField])},{default:n.withCtx(()=>[n.createVNode(w,{class:n.normalizeClass(["amplify-label",{"amplify-visually-hidden":n.unref(f)}]),for:"amplify-field-"+n.unref(a)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(h)),1)]),_:1},8,["class","for"]),n.createVNode(b,{class:n.normalizeClass([n.unref(ie).Flex,n.unref(ie).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(b,{class:n.normalizeClass(n.unref(ie).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(P,n.mergeProps(g.$attrs,{modelValue:v.value,"onUpdate:modelValue":_[0]||(_[0]=C=>v.value=C),class:[n.unref(ie).Input,n.unref(ie).FieldGroupControl],id:"amplify-field-"+n.unref(a),"data-amplify-password":"true",name:n.unref(u),autocomplete:n.unref(c),required:n.unref(m)??!0,placeholder:n.unref(S),type:o.value,"aria-invalid":n.unref(d),"aria-describedBy":t.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),n.createVNode(b,{class:n.normalizeClass(n.unref(ie).FieldGroupOuterEnd)},{default:n.withCtx(()=>[n.createElementVNode("button",{"aria-label":i.value,"aria-checked":o.value!=="password",class:n.normalizeClass([n.unref(ie).Button,n.unref(ie).FieldGroupControl,n.unref(ie).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:y},[o.value==="password"?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(ie).Icon)},[..._[1]||(_[1]=[n.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1)])],2)):(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(ie).Icon)},[..._[2]||(_[2]=[n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1)])],2))],10,jy)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),Wy=["value","selected"],Hy=n.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:{}},emits:["update:selectValue"],setup(t,{emit:e}){const r=t,{options:o,selectValue:i}=n.toRefs(r),a=e,s=u=>{a("update:selectValue",u.target.value)};return(u,l)=>(n.openBlock(),n.createElementBlock("select",{onChange:l[0]||(l[0]=c=>s(c))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(o),(c,d)=>(n.openBlock(),n.createElementBlock("option",{key:d,value:c,selected:c==n.unref(i)?!0:void 0},n.toDisplayString(c),9,Wy))),128))],32))}}),Ky=n.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:{},dialCodeList:{},type:{default:"text"},hasError:{type:Boolean},describedBy:{}},setup(t){const e=t,{label:r,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:u,dialCode:l,dialCodeList:c}=n.toRefs(e),d=Math.floor(Math.random()*999999),f=Math.floor(Math.random()*999999);return(p,m)=>{const v=bt,y=Hy,S=re,h=Ct;return n.openBlock(),n.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(v,n.mergeProps({for:"amplify-field-"+n.unref(d),class:["amplify-label",{"amplify-visually-hidden":n.unref(s)}]},p.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)),1)]),_:1},16,["for","class"]),n.createVNode(S,{class:"amplify-flex amplify-field-group"},{default:n.withCtx(()=>[n.createVNode(S,{class:"amplify-field-group__outer-start"},{default:n.withCtx(()=>[t.type==="tel"?(n.openBlock(),n.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(v,n.mergeProps({for:"amplify-field-"+n.unref(f),class:"amplify-label amplify-visually-hidden"},p.$attrs),{default:n.withCtx(()=>[...m[0]||(m[0]=[n.createTextVNode(n.toDisplayString("Country Code"),-1)])]),_:1},16,["for"]),n.createVNode(S,{class:"amplify-select__wrapper"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+n.unref(f),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:n.unref(c),"select-value":n.unref(l)},null,8,["id","options","select-value"]),n.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:n.withCtx(()=>[...m[1]||(m[1]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[n.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1)])]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+n.unref(d),autocomplete:n.unref(a),name:n.unref(o),required:n.unref(u)??!0,type:t.type,placeholder:n.unref(i),"aria-invalid":t.hasError,"aria-describedBy":t.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),Yy=["id"],nd=n.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(t){const e=t,{name:r,formField:o}=n.toRefs(e),{validationErrors:i}=n.toRefs(ne()),{type:a}=o.value,s=a==="password",u=zy(12),l=n.computed(()=>Ld(i.value[r.value])),c=n.computed(()=>{var f;return((f=l.value)==null?void 0:f.length)>0}),d=n.computed(()=>c.value?u:void 0);return(f,p)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s?(n.openBlock(),n.createBlock(aa,{key:0,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,hasError:c.value,describedBy:d.value},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(n.openBlock(),n.createBlock(Ky,{key:1,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,"dial-code":n.unref(o).dialCode,"dial-code-list":n.unref(o).dialCodeList,type:n.unref(o).type,hasError:c.value,describedBy:d.value},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),c.value?(n.openBlock(),n.createElementBlock("div",{key:2,id:d.value},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,(m,v)=>(n.openBlock(),n.createElementBlock("p",{key:v,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(x)(m)),1))),128))],8,Yy)):n.createCommentVNode("",!0)],64))}}),ge=n.defineComponent({__name:"base-form-fields",props:{route:{}},setup(t){const e=t,{route:r}=n.toRefs(e),{state:o}=ia();let i=[];return n.onBeforeMount(()=>{i=Xf(r.value,o.value)}),(a,s)=>(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(i),([u,l])=>(n.openBlock(),n.createBlock(nd,{name:u,key:u,formField:l},null,8,["name","formField"]))),128))}}),Mt=n.defineComponent({__name:"federated-sign-in-button",props:{provider:{}},setup(t){const e=t,{provider:r}=n.toRefs(e),{toFederatedSignIn:o}=ne(),i=()=>{o({provider:r.value})};return(a,s)=>{const u=oe;return n.openBlock(),n.createBlock(u,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default")]),_:3})}}}),Jy={class:"amplify-text"},Zy={class:"amplify-text"},Qy={class:"amplify-text"},Xy={class:"amplify-text"},ev=["data-label"],sr=n.defineComponent({__name:"federated-sign-in",setup(t){const e=ne(),{route:r,socialProviders:o}=e,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),u=o==null?void 0:o.includes("google"),l=s||u||i||a,{getSignInWithFederationText:c,getOrText:d}=ae,f=n.computed(()=>Ci),p=n.computed(()=>c(r,"amazon")),m=n.computed(()=>c(r,"apple")),v=n.computed(()=>c(r,"facebook")),y=n.computed(()=>c(r,"google")),S=n.computed(()=>d());return(h,g)=>{const _=re;return n.unref(l)?(n.openBlock(),n.createBlock(_,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:n.withCtx(()=>[n.unref(i)?(n.openBlock(),n.createBlock(Mt,{key:0,provider:f.value.Amazon},{default:n.withCtx(()=>[g[0]||(g[0]=n.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[n.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1)),n.createElementVNode("span",Jy,n.toDisplayString(p.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(a)?(n.openBlock(),n.createBlock(Mt,{key:1,provider:f.value.Apple},{default:n.withCtx(()=>[g[1]||(g[1]=n.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1)),n.createElementVNode("span",Zy,n.toDisplayString(m.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock(Mt,{key:2,provider:f.value.Facebook},{default:n.withCtx(()=>[g[2]||(g[2]=n.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[n.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1)),n.createElementVNode("span",Qy,n.toDisplayString(v.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(u)?(n.openBlock(),n.createBlock(Mt,{key:3,provider:f.value.Google},{default:n.withCtx(()=>[g[3]||(g[3]=n.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[n.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),n.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),n.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),n.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1)),n.createElementVNode("span",Xy,n.toDisplayString(y.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":S.value},null,8,ev)]),_:1})):n.createCommentVNode("",!0)}}}),tv={"data-amplify-footer":""},sa=n.defineComponent({__name:"sign-in",setup(t){const e=ne(),{submitForm:r,updateForm:o,toForgotPassword:i}=e,{error:a,isPending:s}=n.toRefs(e),{getForgotPasswordText:u,getSignInText:l,getSigningInText:c}=ae,d=n.computed(()=>u()),f=n.computed(()=>l()),p=n.computed(()=>c()),m=S=>{const{name:h,value:g}=S.target;o({name:h,value:g})},v=S=>{r(ce(S))},y=()=>{i()};return(S,h)=>{const g=fe,_=de,w=oe,P=re,b=le,C=ue;return n.renderSlot(S.$slots,"signInSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.renderSlot(S.$slots,"header"),n.createVNode(P,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(b,{"data-amplify-authenticator-signin":"",onInput:m,onSubmit:n.withModifiers(v,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:E})=>[n.renderSlot(S.$slots,"form",{info:E,onSignInSubmit:v,onInput:m,onForgotPasswordClicked:y})]),default:n.withCtx(()=>[n.createVNode(sr),n.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(g,{disabled:n.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:n.withCtx(({slotData:E})=>[n.renderSlot(S.$slots,"signin-fields",{info:E})]),default:n.withCtx(()=>[h[0]||(h[0]=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1)),n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(_,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(w,{disabled:n.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)?p.value:f.value),1)]),_:1},8,["disabled"])]),_:3})]),_:3})]),_:3},16),n.createVNode(C,null,{default:n.withCtx(()=>[n.renderSlot(S.$slots,"footer",{},()=>[n.createElementVNode("div",tv,[n.createVNode(w,{onClick:y,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(d.value),1)]),_:1})])])]),_:3})])}}}),ua=n.defineComponent({__name:"authenticator-sign-up-form-fields",setup(t){return(e,r)=>(n.openBlock(),n.createBlock(ge,{route:"signUp"}))}}),la=n.defineComponent({__name:"sign-up",setup(t){const e=ne(),{submitForm:r,updateBlur:o,updateForm:i}=e,{error:a,hasValidationErrors:s,isPending:u}=n.toRefs(e),{getCreateAccountText:l}=ae,c=n.computed(()=>l()),d=m=>{const{checked:v,name:y,type:S,value:h}=m.target;i({name:y,value:S==="checkbox"&&!v?void 0:h})};function f(m){const{name:v}=m.target;o({name:v})}const p=m=>{r(ce(m))};return(m,v)=>{const y=fe,S=de,h=oe,g=re,_=le,w=ue;return n.renderSlot(m.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(m.$attrs)),()=>[n.renderSlot(m.$slots,"header"),n.createVNode(g,n.normalizeProps(n.guardReactiveProps(m.$attrs)),{default:n.withCtx(()=>[n.createVNode(_,{onInput:d,onBlurCapture:f,onSubmit:n.withModifiers(p,["prevent"])},{default:n.withCtx(()=>[n.createVNode(sr),n.createVNode(g,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(u)},{fieldSetI:n.withCtx(({slotData:P})=>[n.renderSlot(m.$slots,"signup-fields",{info:P})]),default:n.withCtx(()=>[n.createVNode(ua)]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(S,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:n.unref(u)||n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(c.value),1)]),_:1},8,["disabled"])]),_:3})]),_:3})]),_:3},16),n.createVNode(w,null,{default:n.withCtx(()=>[n.renderSlot(m.$slots,"footer")]),_:3})])}}}),rv={};function nv(t,e){const r=re;return n.openBlock(),n.createBlock(r,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:n.withCtx(()=>[n.createVNode(r,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3})]),_:3})}const ov=jt(rv,[["render",nv]]),iv=["tabindex","aria-selected","id","aria-controls"],av=n.defineComponent({__name:"base-two-tab-item",props:{label:{},id:{},active:{type:Boolean,default:!1}},setup(t){const e=t,{active:r,id:o,label:i}=n.toRefs(e);return(a,s)=>(n.openBlock(),n.createElementBlock("button",{tabindex:n.unref(r)?0:-1,"aria-selected":n.unref(r)?"true":"false",class:n.normalizeClass([{"amplify-tabs__item--active":n.unref(r)},"amplify-tabs__item"]),id:`${n.unref(o)}-tab`,"aria-controls":`${n.unref(o)}-panel`,role:"tab"},n.toDisplayString(n.unref(i)),11,iv))}}),sv="4.4.5",uv={};function lv(t,e){return n.renderSlot(t.$slots,"textI",n.normalizeProps(n.guardReactiveProps(t.$attrs)),()=>[n.createElementVNode("span",n.mergeProps(t.$attrs,{"data-amplify-text":""}),[n.renderSlot(t.$slots,"default")],16)])}const ca=jt(uv,[["render",lv]]),we=n.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(t,{slots:e,attrs:r}){var s,u;const o=e.default?e.default():[],i=e.headingI?e.headingI():[],a=`${r.class||""} amplify-heading--${t.level}`;if(((u=(s=i[0])==null?void 0:s.children)==null?void 0:u.length)===0)i[0].children=[n.h(`h${t.level}`,{...r,class:a},[o])];else return()=>n.h(`h${t.level}`,{"data-amplify-heading":"",...r,class:a},[i[0]?n.h(i[0].children[0]):n.h(o[0])]);return()=>i}}),da=n.defineComponent({__name:"confirm-sign-up",setup(t){const e=ne(),{codeDeliveryDetails:r,error:o,isPending:i}=n.toRefs(e),{resendCode:a,submitForm:s,updateForm:u}=e,{getDeliveryMethodText:l,getDeliveryMessageText:c,getResendCodeText:d,getConfirmText:f}=ae,p=n.computed(()=>l(r.value)),m=n.computed(()=>d()),v=n.computed(()=>f()),y=n.computed(()=>c(r.value)),S=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{g(w)},g=w=>{s(ce(w))},_=()=>{a()};return(w,P)=>{const b=we,C=ca,E=fe,T=de,I=oe,A=ue,k=re,N=le;return n.renderSlot(w.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(w.$attrs)),()=>[n.createVNode(k,n.normalizeProps(n.guardReactiveProps(w.$attrs)),{default:n.withCtx(()=>[n.createVNode(N,{onInput:S,onSubmit:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(w.$slots,"header",{},()=>[n.createVNode(b,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.value),1)]),_:1})]),n.createVNode(C,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(y.value),1)]),_:1}),n.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),n.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(o)?(n.openBlock(),n.createBlock(T,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(o))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value),1)]),_:1},8,["disabled"]),n.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(_,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value),1)]),_:1}),n.renderSlot(w.$slots,"footer")]),_:3})]),_:3})]),_:3})]),_:3},16)])}}}),fa=n.defineComponent({__name:"confirm-sign-in",setup(t){const e=ne(),{submitForm:r,toSignIn:o,updateForm:i}=e,{error:a,isPending:s,challengeName:u}=n.toRefs(e),l=n.computed(()=>u.value),{getBackToSignInText:c,getConfirmText:d,getChallengeText:f}=ae,p=n.computed(()=>f(l.value)),m=n.computed(()=>c()),v=n.computed(()=>d()),y=g=>{const{name:_,value:w}=g.target;i({name:_,value:w})},S=g=>{r(ce(g))},h=()=>{o()};return(g,_)=>{const w=we,P=re,b=de,C=oe,E=ue,T=fe,I=le;return n.renderSlot(g.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(g.$attrs)),()=>[n.createVNode(P,n.normalizeProps(n.guardReactiveProps(g.$attrs)),{default:n.withCtx(()=>[n.createVNode(I,{"data-amplify-authenticator-confirmsignin":"",onInput:y,onSubmit:n.withModifiers(S,["prevent"])},{default:n.withCtx(()=>[n.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"header",{},()=>[n.createVNode(w,{level:3,class:"amplify-heading"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.value),1)]),_:1})]),n.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignIn"})]),_:1}),n.createVNode(E,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(a)?(n.openBlock(),n.createBlock(b,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value),1)]),_:1},8,["disabled"]),n.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value),1)]),_:1}),n.renderSlot(g.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3})]),_:3},16)])}}});var Ge={},Qo,Tl;function cv(){return Tl||(Tl=1,Qo=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Qo}var Xo={},Ne={},Il;function Be(){if(Il)return Ne;Il=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ne.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},Ne.getSymbolTotalCodewords=function(o){return e[o]},Ne.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},Ne.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},Ne.isKanjiModeEnabled=function(){return typeof t<"u"},Ne.toSJIS=function(o){return t(o)},Ne}var ei={},Pl;function pa(){return Pl||(Pl=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,i){if(t.isValid(o))return o;try{return e(o)}catch{return i}}})(ei)),ei}var ti,kl;function dv(){if(kl)return ti;kl=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const r=Math.floor(e/8);return(this.buffer[r]>>>7-e%8&1)===1},put:function(e,r){for(let o=0;o<r;o++)this.putBit((e>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),e&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ti=t,ti}var ri,Nl;function fv(){if(Nl)return ri;Nl=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,r,o,i){const a=e*this.size+r;this.data[a]=o,i&&(this.reservedBit[a]=!0)},t.prototype.get=function(e,r){return this.data[e*this.size+r]},t.prototype.xor=function(e,r,o){this.data[e*this.size+r]^=o},t.prototype.isReserved=function(e,r){return this.reservedBit[e*this.size+r]},ri=t,ri}var ni={},Ml;function pv(){return Ml||(Ml=1,(function(t){const e=Be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=e(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,u=[a-7];for(let l=1;l<i-1;l++)u[l]=u[l-1]-s;return u.push(6),u.reverse()},t.getPositions=function(o){const i=[],a=t.getRowColCoords(o),s=a.length;for(let u=0;u<s;u++)for(let l=0;l<s;l++)u===0&&l===0||u===0&&l===s-1||u===s-1&&l===0||i.push([a[u],a[l]]);return i}})(ni)),ni}var oi={},Rl;function mv(){if(Rl)return oi;Rl=1;const t=Be().getSymbolSize,e=7;return oi.getPositions=function(o){const i=t(o);return[[0,0],[i-e,0],[0,i-e]]},oi}var ii={},xl;function hv(){return xl||(xl=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const a=i.size;let s=0,u=0,l=0,c=null,d=null;for(let f=0;f<a;f++){u=l=0,c=d=null;for(let p=0;p<a;p++){let m=i.get(f,p);m===c?u++:(u>=5&&(s+=e.N1+(u-5)),c=m,u=1),m=i.get(p,f),m===d?l++:(l>=5&&(s+=e.N1+(l-5)),d=m,l=1)}u>=5&&(s+=e.N1+(u-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(i){const a=i.size;let s=0;for(let u=0;u<a-1;u++)for(let l=0;l<a-1;l++){const c=i.get(u,l)+i.get(u,l+1)+i.get(u+1,l)+i.get(u+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(i){const a=i.size;let s=0,u=0,l=0;for(let c=0;c<a;c++){u=l=0;for(let d=0;d<a;d++)u=u<<1&2047|i.get(c,d),d>=10&&(u===1488||u===93)&&s++,l=l<<1&2047|i.get(d,c),d>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*e.N4};function r(o,i,a){switch(o){case t.Patterns.PATTERN000:return(i+a)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(i+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return i*a%2+i*a%3===0;case t.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case t.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(i,a){const s=a.size;for(let u=0;u<s;u++)for(let l=0;l<s;l++)a.isReserved(l,u)||a.xor(l,u,r(i,l,u))},t.getBestMask=function(i,a){const s=Object.keys(t.Patterns).length;let u=0,l=1/0;for(let c=0;c<s;c++){a(c),t.applyMask(c,i);const d=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(c,i),d<l&&(l=d,u=c)}return u}})(ii)),ii}var Rt={},Ul;function od(){if(Ul)return Rt;Ul=1;const t=pa(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Rt.getBlocksCount=function(i,a){switch(a){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},Rt.getTotalCodewordsCount=function(i,a){switch(a){case t.L:return r[(i-1)*4+0];case t.M:return r[(i-1)*4+1];case t.Q:return r[(i-1)*4+2];case t.H:return r[(i-1)*4+3];default:return}},Rt}var ai={},nt={},Fl;function gv(){if(Fl)return nt;Fl=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let o=1;for(let i=0;i<255;i++)t[i]=o,e[o]=i,o<<=1,o&256&&(o^=285);for(let i=255;i<512;i++)t[i]=t[i-255]})(),nt.log=function(o){if(o<1)throw new Error("log("+o+")");return e[o]},nt.exp=function(o){return t[o]},nt.mul=function(o,i){return o===0||i===0?0:t[e[o]+e[i]]},nt}var Ol;function yv(){return Ol||(Ol=1,(function(t){const e=gv();t.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let u=0;u<i.length;u++)a[s+u]^=e.mul(o[s],i[u]);return a},t.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=e.mul(i[l],s);let u=0;for(;u<a.length&&a[u]===0;)u++;a=a.slice(u)}return a},t.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=t.mul(i,new Uint8Array([1,e.exp(a)]));return i}})(ai)),ai}var si,Dl;function vv(){if(Dl)return si;Dl=1;const t=yv();function e(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(o){this.degree=o,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(o.length+this.degree);i.set(o);const a=t.mod(i,this.genPoly),s=this.degree-a.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(a,s),u}return a},si=e,si}var ui={},li={},ci={},Bl;function id(){return Bl||(Bl=1,ci.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),ci}var ve={},Vl;function ad(){if(Vl)return ve;Vl=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
20
+ `).concat(u.message))}else return r.getStateNodeByPath(a)})},t.prototype.formatTransition=function(e){var r=this,o=Ip(e.target),i="internal"in e?e.internal:o?o.some(function(l){return z(l)&&l[0]===r.delimiter}):!0,a=this.machine.options.guards,s=this.resolveTarget(o),u=M(M({},e),{actions:be(he(e.actions)),cond:pc(e.cond,a),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return M(M({},u),{target:u.target?u.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return u},t.prototype.formatTransitions=function(){var e,r,o=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,s=tt,u=a[s],l=u===void 0?[]:u,c=Fi(a,[typeof s=="symbol"?s:s+""]);i=$(Object.keys(c).map(function(g){!W&&g===$e&&ee(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(o.id,'".'));var _=ze(g,c[g]);return W||Jp(o,g,_),_}).concat(ze(tt,l)))}var d=this.config.always?ze("",this.config.always):[],f=this.config.onDone?ze(String(it(this.id)),this.config.onDone):[];W||ee(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=$(this.invoke.map(function(g){var _=[];return g.onDone&&_.push.apply(_,j([],V(ze(String(ft(g.id)),g.onDone)),!1)),g.onError&&_.push.apply(_,j([],V(ze(String(We(g.id)),g.onError)),!1)),_})),m=this.after,v=$(j(j(j(j([],V(f),!1),V(p),!1),V(i),!1),V(d),!1).map(function(g){return he(g).map(function(_){return o.formatTransition(_)})}));try{for(var y=B(m),S=y.next();!S.done;S=y.next()){var h=S.value;v.push(h)}}catch(g){e={error:g}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(e)throw e.error}}return v},t})(),xa=!1;function Ye(t,e){return!W&&!("predictableActionArguments"in t)&&!xa&&(xa=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new Zp(t,e)}var Ce=Tc,Jt=Sc,Qp=Pc,Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Li(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lr,Ua;function Oc(){if(Ua)return lr;Ua=1;function t(e,r){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=r(e[o],o,e);return a}return lr=t,lr}var cr,Fa;function Xp(){if(Fa)return cr;Fa=1;function t(){this.__data__=[],this.size=0}return cr=t,cr}var dr,Oa;function _t(){if(Oa)return dr;Oa=1;function t(e,r){return e===r||e!==e&&r!==r}return dr=t,dr}var fr,Da;function Zt(){if(Da)return fr;Da=1;var t=_t();function e(r,o){for(var i=r.length;i--;)if(t(r[i][0],o))return i;return-1}return fr=e,fr}var pr,Ba;function em(){if(Ba)return pr;Ba=1;var t=Zt(),e=Array.prototype,r=e.splice;function o(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():r.call(a,s,1),--this.size,!0}return pr=o,pr}var mr,Va;function tm(){if(Va)return mr;Va=1;var t=Zt();function e(r){var o=this.__data__,i=t(o,r);return i<0?void 0:o[i][1]}return mr=e,mr}var hr,za;function rm(){if(za)return hr;za=1;var t=Zt();function e(r){return t(this.__data__,r)>-1}return hr=e,hr}var gr,qa;function nm(){if(qa)return gr;qa=1;var t=Zt();function e(r,o){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,o])):i[a][1]=o,this}return gr=e,gr}var yr,La;function Qt(){if(La)return yr;La=1;var t=Xp(),e=em(),r=tm(),o=rm(),i=nm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,yr=a,yr}var vr,Ga;function om(){if(Ga)return vr;Ga=1;var t=Qt();function e(){this.__data__=new t,this.size=0}return vr=e,vr}var _r,ja;function im(){if(ja)return _r;ja=1;function t(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}return _r=t,_r}var Sr,$a;function am(){if($a)return Sr;$a=1;function t(e){return this.__data__.get(e)}return Sr=t,Sr}var wr,Wa;function sm(){if(Wa)return wr;Wa=1;function t(e){return this.__data__.has(e)}return wr=t,wr}var Cr,Ha;function Dc(){if(Ha)return Cr;Ha=1;var t=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt;return Cr=t,Cr}var br,Ka;function Se(){if(Ka)return br;Ka=1;var t=Dc(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return br=r,br}var Ar,Ya;function Xt(){if(Ya)return Ar;Ya=1;var t=Se(),e=t.Symbol;return Ar=e,Ar}var Er,Ja;function um(){if(Ja)return Er;Ja=1;var t=Xt(),e=Object.prototype,r=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=r.call(s,i),l=s[i];try{s[i]=void 0;var c=!0}catch{}var d=o.call(s);return c&&(u?s[i]=l:delete s[i]),d}return Er=a,Er}var Tr,Za;function lm(){if(Za)return Tr;Za=1;var t=Object.prototype,e=t.toString;function r(o){return e.call(o)}return Tr=r,Tr}var Ir,Qa;function Je(){if(Qa)return Ir;Qa=1;var t=Xt(),e=um(),r=lm(),o="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:o:a&&a in Object(u)?e(u):r(u)}return Ir=s,Ir}var Pr,Xa;function Te(){if(Xa)return Pr;Xa=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return Pr=t,Pr}var kr,es;function Gi(){if(es)return kr;es=1;var t=Je(),e=Te(),r="[object AsyncFunction]",o="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var l=t(u);return l==o||l==i||l==r||l==a}return kr=s,kr}var Nr,ts;function cm(){if(ts)return Nr;ts=1;var t=Se(),e=t["__core-js_shared__"];return Nr=e,Nr}var Mr,rs;function dm(){if(rs)return Mr;rs=1;var t=cm(),e=(function(){var o=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function r(o){return!!e&&e in o}return Mr=r,Mr}var Rr,ns;function Bc(){if(ns)return Rr;ns=1;var t=Function.prototype,e=t.toString;function r(o){if(o!=null){try{return e.call(o)}catch{}try{return o+""}catch{}}return""}return Rr=r,Rr}var xr,os;function fm(){if(os)return xr;os=1;var t=Gi(),e=dm(),r=Te(),o=Bc(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,c=u.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||e(p))return!1;var m=t(p)?d:a;return m.test(o(p))}return xr=f,xr}var Ur,is;function pm(){if(is)return Ur;is=1;function t(e,r){return e==null?void 0:e[r]}return Ur=t,Ur}var Fr,as;function Oe(){if(as)return Fr;as=1;var t=fm(),e=pm();function r(o,i){var a=e(o,i);return t(a)?a:void 0}return Fr=r,Fr}var Or,ss;function ji(){if(ss)return Or;ss=1;var t=Oe(),e=Se(),r=t(e,"Map");return Or=r,Or}var Dr,us;function er(){if(us)return Dr;us=1;var t=Oe(),e=t(Object,"create");return Dr=e,Dr}var Br,ls;function mm(){if(ls)return Br;ls=1;var t=er();function e(){this.__data__=t?t(null):{},this.size=0}return Br=e,Br}var Vr,cs;function hm(){if(cs)return Vr;cs=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Vr=t,Vr}var zr,ds;function gm(){if(ds)return zr;ds=1;var t=er(),e="__lodash_hash_undefined__",r=Object.prototype,o=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return o.call(s,a)?s[a]:void 0}return zr=i,zr}var qr,fs;function ym(){if(fs)return qr;fs=1;var t=er(),e=Object.prototype,r=e.hasOwnProperty;function o(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return qr=o,qr}var Lr,ps;function vm(){if(ps)return Lr;ps=1;var t=er(),e="__lodash_hash_undefined__";function r(o,i){var a=this.__data__;return this.size+=this.has(o)?0:1,a[o]=t&&i===void 0?e:i,this}return Lr=r,Lr}var Gr,ms;function _m(){if(ms)return Gr;ms=1;var t=mm(),e=hm(),r=gm(),o=ym(),i=vm();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Gr=a,Gr}var jr,hs;function Sm(){if(hs)return jr;hs=1;var t=_m(),e=Qt(),r=ji();function o(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return jr=o,jr}var $r,gs;function wm(){if(gs)return $r;gs=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return $r=t,$r}var Wr,ys;function tr(){if(ys)return Wr;ys=1;var t=wm();function e(r,o){var i=r.__data__;return t(o)?i[typeof o=="string"?"string":"hash"]:i.map}return Wr=e,Wr}var Hr,vs;function Cm(){if(vs)return Hr;vs=1;var t=tr();function e(r){var o=t(this,r).delete(r);return this.size-=o?1:0,o}return Hr=e,Hr}var Kr,_s;function bm(){if(_s)return Kr;_s=1;var t=tr();function e(r){return t(this,r).get(r)}return Kr=e,Kr}var Yr,Ss;function Am(){if(Ss)return Yr;Ss=1;var t=tr();function e(r){return t(this,r).has(r)}return Yr=e,Yr}var Jr,ws;function Em(){if(ws)return Jr;ws=1;var t=tr();function e(r,o){var i=t(this,r),a=i.size;return i.set(r,o),this.size+=i.size==a?0:1,this}return Jr=e,Jr}var Zr,Cs;function $i(){if(Cs)return Zr;Cs=1;var t=Sm(),e=Cm(),r=bm(),o=Am(),i=Em();function a(s){var u=-1,l=s==null?0:s.length;for(this.clear();++u<l;){var c=s[u];this.set(c[0],c[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Zr=a,Zr}var Qr,bs;function Tm(){if(bs)return Qr;bs=1;var t=Qt(),e=ji(),r=$i(),o=200;function i(a,s){var u=this.__data__;if(u instanceof t){var l=u.__data__;if(!e||l.length<o-1)return l.push([a,s]),this.size=++u.size,this;u=this.__data__=new r(l)}return u.set(a,s),this.size=u.size,this}return Qr=i,Qr}var Xr,As;function Wi(){if(As)return Xr;As=1;var t=Qt(),e=om(),r=im(),o=am(),i=sm(),a=Tm();function s(u){var l=this.__data__=new t(u);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,Xr=s,Xr}var en,Es;function Im(){if(Es)return en;Es=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return en=e,en}var tn,Ts;function Pm(){if(Ts)return tn;Ts=1;function t(e){return this.__data__.has(e)}return tn=t,tn}var rn,Is;function km(){if(Is)return rn;Is=1;var t=$i(),e=Im(),r=Pm();function o(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return o.prototype.add=o.prototype.push=e,o.prototype.has=r,rn=o,rn}var nn,Ps;function Nm(){if(Ps)return nn;Ps=1;function t(e,r){for(var o=-1,i=e==null?0:e.length;++o<i;)if(r(e[o],o,e))return!0;return!1}return nn=t,nn}var on,ks;function Mm(){if(ks)return on;ks=1;function t(e,r){return e.has(r)}return on=t,on}var an,Ns;function Vc(){if(Ns)return an;Ns=1;var t=km(),e=Nm(),r=Mm(),o=1,i=2;function a(s,u,l,c,d,f){var p=l&o,m=s.length,v=u.length;if(m!=v&&!(p&&v>m))return!1;var y=f.get(s),S=f.get(u);if(y&&S)return y==u&&S==s;var h=-1,g=!0,_=l&i?new t:void 0;for(f.set(s,u),f.set(u,s);++h<m;){var w=s[h],P=u[h];if(c)var b=p?c(P,w,h,u,s,f):c(w,P,h,s,u,f);if(b!==void 0){if(b)continue;g=!1;break}if(_){if(!e(u,function(C,E){if(!r(_,E)&&(w===C||d(w,C,l,c,f)))return _.push(E)})){g=!1;break}}else if(!(w===P||d(w,P,l,c,f))){g=!1;break}}return f.delete(s),f.delete(u),g}return an=a,an}var sn,Ms;function zc(){if(Ms)return sn;Ms=1;var t=Se(),e=t.Uint8Array;return sn=e,sn}var un,Rs;function Rm(){if(Rs)return un;Rs=1;function t(e){var r=-1,o=Array(e.size);return e.forEach(function(i,a){o[++r]=[a,i]}),o}return un=t,un}var ln,xs;function xm(){if(xs)return ln;xs=1;function t(e){var r=-1,o=Array(e.size);return e.forEach(function(i){o[++r]=i}),o}return ln=t,ln}var cn,Us;function Um(){if(Us)return cn;Us=1;var t=Xt(),e=zc(),r=_t(),o=Vc(),i=Rm(),a=xm(),s=1,u=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",v="[object Set]",y="[object String]",S="[object Symbol]",h="[object ArrayBuffer]",g="[object DataView]",_=t?t.prototype:void 0,w=_?_.valueOf:void 0;function P(b,C,E,T,I,A,k){switch(E){case g:if(b.byteLength!=C.byteLength||b.byteOffset!=C.byteOffset)return!1;b=b.buffer,C=C.buffer;case h:return!(b.byteLength!=C.byteLength||!A(new e(b),new e(C)));case l:case c:case p:return r(+b,+C);case d:return b.name==C.name&&b.message==C.message;case m:case y:return b==C+"";case f:var N=i;case v:var R=T&s;if(N||(N=a),b.size!=C.size&&!R)return!1;var L=k.get(b);if(L)return L==C;T|=u,k.set(b,C);var H=o(N(b),N(C),T,I,A,k);return k.delete(b),H;case S:if(w)return w.call(b)==w.call(C)}return!1}return cn=P,cn}var dn,Fs;function qc(){if(Fs)return dn;Fs=1;function t(e,r){for(var o=-1,i=r.length,a=e.length;++o<i;)e[a+o]=r[o];return e}return dn=t,dn}var fn,Os;function Ie(){if(Os)return fn;Os=1;var t=Array.isArray;return fn=t,fn}var pn,Ds;function Lc(){if(Ds)return pn;Ds=1;var t=qc(),e=Ie();function r(o,i,a){var s=i(o);return e(o)?s:t(s,a(o))}return pn=r,pn}var mn,Bs;function Fm(){if(Bs)return mn;Bs=1;function t(e,r){for(var o=-1,i=e==null?0:e.length,a=0,s=[];++o<i;){var u=e[o];r(u,o,e)&&(s[a++]=u)}return s}return mn=t,mn}var hn,Vs;function Gc(){if(Vs)return hn;Vs=1;function t(){return[]}return hn=t,hn}var gn,zs;function jc(){if(zs)return gn;zs=1;var t=Fm(),e=Gc(),r=Object.prototype,o=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return o.call(s,u)}))}:e;return gn=a,gn}var yn,qs;function Om(){if(qs)return yn;qs=1;function t(e,r){for(var o=-1,i=Array(e);++o<e;)i[o]=r(o);return i}return yn=t,yn}var vn,Ls;function De(){if(Ls)return vn;Ls=1;function t(e){return e!=null&&typeof e=="object"}return vn=t,vn}var _n,Gs;function Dm(){if(Gs)return _n;Gs=1;var t=Je(),e=De(),r="[object Arguments]";function o(i){return e(i)&&t(i)==r}return _n=o,_n}var Sn,js;function Hi(){if(js)return Sn;js=1;var t=Dm(),e=De(),r=Object.prototype,o=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&o.call(s,"callee")&&!i.call(s,"callee")};return Sn=a,Sn}var ut={exports:{}},wn,$s;function Bm(){if($s)return wn;$s=1;function t(){return!1}return wn=t,wn}ut.exports;var Ws;function Ki(){return Ws||(Ws=1,(function(t,e){var r=Se(),o=Bm(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||o;t.exports=c})(ut,ut.exports)),ut.exports}var Cn,Hs;function rr(){if(Hs)return Cn;Hs=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(o,i){var a=typeof o;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(o))&&o>-1&&o%1==0&&o<i}return Cn=r,Cn}var bn,Ks;function Yi(){if(Ks)return bn;Ks=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return bn=e,bn}var An,Ys;function Vm(){if(Ys)return An;Ys=1;var t=Je(),e=Yi(),r=De(),o="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",S="[object ArrayBuffer]",h="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",w="[object Int8Array]",P="[object Int16Array]",b="[object Int32Array]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",A={};A[g]=A[_]=A[w]=A[P]=A[b]=A[C]=A[E]=A[T]=A[I]=!0,A[o]=A[i]=A[S]=A[a]=A[h]=A[s]=A[u]=A[l]=A[c]=A[d]=A[f]=A[p]=A[m]=A[v]=A[y]=!1;function k(N){return r(N)&&e(N.length)&&!!A[t(N)]}return An=k,An}var En,Js;function zm(){if(Js)return En;Js=1;function t(e){return function(r){return e(r)}}return En=t,En}var lt={exports:{}};lt.exports;var Zs;function qm(){return Zs||(Zs=1,(function(t,e){var r=Dc(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&r.process,u=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();t.exports=u})(lt,lt.exports)),lt.exports}var Tn,Qs;function Ji(){if(Qs)return Tn;Qs=1;var t=Vm(),e=zm(),r=qm(),o=r&&r.isTypedArray,i=o?e(o):t;return Tn=i,Tn}var In,Xs;function $c(){if(Xs)return In;Xs=1;var t=Om(),e=Hi(),r=Ie(),o=Ki(),i=rr(),a=Ji(),s=Object.prototype,u=s.hasOwnProperty;function l(c,d){var f=r(c),p=!f&&e(c),m=!f&&!p&&o(c),v=!f&&!p&&!m&&a(c),y=f||p||m||v,S=y?t(c.length,String):[],h=S.length;for(var g in c)(d||u.call(c,g))&&!(y&&(g=="length"||m&&(g=="offset"||g=="parent")||v&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||i(g,h)))&&S.push(g);return S}return In=l,In}var Pn,eu;function Zi(){if(eu)return Pn;eu=1;var t=Object.prototype;function e(r){var o=r&&r.constructor,i=typeof o=="function"&&o.prototype||t;return r===i}return Pn=e,Pn}var kn,tu;function Wc(){if(tu)return kn;tu=1;function t(e,r){return function(o){return e(r(o))}}return kn=t,kn}var Nn,ru;function Lm(){if(ru)return Nn;ru=1;var t=Wc(),e=t(Object.keys,Object);return Nn=e,Nn}var Mn,nu;function Gm(){if(nu)return Mn;nu=1;var t=Zi(),e=Lm(),r=Object.prototype,o=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))o.call(a,u)&&u!="constructor"&&s.push(u);return s}return Mn=i,Mn}var Rn,ou;function nr(){if(ou)return Rn;ou=1;var t=Gi(),e=Yi();function r(o){return o!=null&&e(o.length)&&!t(o)}return Rn=r,Rn}var xn,iu;function Hc(){if(iu)return xn;iu=1;var t=$c(),e=Gm(),r=nr();function o(i){return r(i)?t(i):e(i)}return xn=o,xn}var Un,au;function jm(){if(au)return Un;au=1;var t=Lc(),e=jc(),r=Hc();function o(i){return t(i,r,e)}return Un=o,Un}var Fn,su;function $m(){if(su)return Fn;su=1;var t=jm(),e=1,r=Object.prototype,o=r.hasOwnProperty;function i(a,s,u,l,c,d){var f=u&e,p=t(a),m=p.length,v=t(s),y=v.length;if(m!=y&&!f)return!1;for(var S=m;S--;){var h=p[S];if(!(f?h in s:o.call(s,h)))return!1}var g=d.get(a),_=d.get(s);if(g&&_)return g==s&&_==a;var w=!0;d.set(a,s),d.set(s,a);for(var P=f;++S<m;){h=p[S];var b=a[h],C=s[h];if(l)var E=f?l(C,b,h,s,a,d):l(b,C,h,a,s,d);if(!(E===void 0?b===C||c(b,C,u,l,d):E)){w=!1;break}P||(P=h=="constructor")}if(w&&!P){var T=a.constructor,I=s.constructor;T!=I&&"constructor"in a&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(w=!1)}return d.delete(a),d.delete(s),w}return Fn=i,Fn}var On,uu;function Wm(){if(uu)return On;uu=1;var t=Oe(),e=Se(),r=t(e,"DataView");return On=r,On}var Dn,lu;function Hm(){if(lu)return Dn;lu=1;var t=Oe(),e=Se(),r=t(e,"Promise");return Dn=r,Dn}var Bn,cu;function Km(){if(cu)return Bn;cu=1;var t=Oe(),e=Se(),r=t(e,"Set");return Bn=r,Bn}var Vn,du;function Ym(){if(du)return Vn;du=1;var t=Oe(),e=Se(),r=t(e,"WeakMap");return Vn=r,Vn}var zn,fu;function Jm(){if(fu)return zn;fu=1;var t=Wm(),e=ji(),r=Hm(),o=Km(),i=Ym(),a=Je(),s=Bc(),u="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(t),v=s(e),y=s(r),S=s(o),h=s(i),g=a;return(t&&g(new t(new ArrayBuffer(1)))!=p||e&&g(new e)!=u||r&&g(r.resolve())!=c||o&&g(new o)!=d||i&&g(new i)!=f)&&(g=function(_){var w=a(_),P=w==l?_.constructor:void 0,b=P?s(P):"";if(b)switch(b){case m:return p;case v:return u;case y:return c;case S:return d;case h:return f}return w}),zn=g,zn}var qn,pu;function Zm(){if(pu)return qn;pu=1;var t=Wi(),e=Vc(),r=Um(),o=$m(),i=Jm(),a=Ie(),s=Ki(),u=Ji(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function v(y,S,h,g,_,w){var P=a(y),b=a(S),C=P?d:i(y),E=b?d:i(S);C=C==c?f:C,E=E==c?f:E;var T=C==f,I=E==f,A=C==E;if(A&&s(y)){if(!s(S))return!1;P=!0,T=!1}if(A&&!T)return w||(w=new t),P||u(y)?e(y,S,h,g,_,w):r(y,S,C,h,g,_,w);if(!(h&l)){var k=T&&m.call(y,"__wrapped__"),N=I&&m.call(S,"__wrapped__");if(k||N){var R=k?y.value():y,L=N?S.value():S;return w||(w=new t),_(R,L,h,g,w)}}return A?(w||(w=new t),o(y,S,h,g,_,w)):!1}return qn=v,qn}var Ln,mu;function Kc(){if(mu)return Ln;mu=1;var t=Zm(),e=De();function r(o,i,a,s,u){return o===i?!0:o==null||i==null||!e(o)&&!e(i)?o!==o&&i!==i:t(o,i,a,s,r,u)}return Ln=r,Ln}var Gn,hu;function Qm(){if(hu)return Gn;hu=1;var t=Wi(),e=Kc(),r=1,o=2;function i(a,s,u,l){var c=u.length,d=c,f=!l;if(a==null)return!d;for(a=Object(a);c--;){var p=u[c];if(f&&p[2]?p[1]!==a[p[0]]:!(p[0]in a))return!1}for(;++c<d;){p=u[c];var m=p[0],v=a[m],y=p[1];if(f&&p[2]){if(v===void 0&&!(m in a))return!1}else{var S=new t;if(l)var h=l(v,y,m,a,s,S);if(!(h===void 0?e(y,v,r|o,l,S):h))return!1}}return!0}return Gn=i,Gn}var jn,gu;function Yc(){if(gu)return jn;gu=1;var t=Te();function e(r){return r===r&&!t(r)}return jn=e,jn}var $n,yu;function Xm(){if(yu)return $n;yu=1;var t=Yc(),e=Hc();function r(o){for(var i=e(o),a=i.length;a--;){var s=i[a],u=o[s];i[a]=[s,u,t(u)]}return i}return $n=r,$n}var Wn,vu;function Jc(){if(vu)return Wn;vu=1;function t(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==void 0||e in Object(o))}}return Wn=t,Wn}var Hn,_u;function eh(){if(_u)return Hn;_u=1;var t=Qm(),e=Xm(),r=Jc();function o(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return Hn=o,Hn}var Kn,Su;function Qi(){if(Su)return Kn;Su=1;var t=Je(),e=De(),r="[object Symbol]";function o(i){return typeof i=="symbol"||e(i)&&t(i)==r}return Kn=o,Kn}var Yn,wu;function Xi(){if(wu)return Yn;wu=1;var t=Ie(),e=Qi(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:o.test(a)||!r.test(a)||s!=null&&a in Object(s)}return Yn=i,Yn}var Jn,Cu;function th(){if(Cu)return Jn;Cu=1;var t=$i(),e="Expected a function";function r(o,i){if(typeof o!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],l=a.cache;if(l.has(u))return l.get(u);var c=o.apply(this,s);return a.cache=l.set(u,c)||l,c};return a.cache=new(r.Cache||t),a}return r.Cache=t,Jn=r,Jn}var Zn,bu;function rh(){if(bu)return Zn;bu=1;var t=th(),e=500;function r(o){var i=t(o,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Zn=r,Zn}var Qn,Au;function nh(){if(Au)return Qn;Au=1;var t=rh(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,o=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,l,c){a.push(l?c.replace(r,"$1"):u||s)}),a});return Qn=o,Qn}var Xn,Eu;function oh(){if(Eu)return Xn;Eu=1;var t=Xt(),e=Oc(),r=Ie(),o=Qi(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(r(u))return e(u,s)+"";if(o(u))return a?a.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Xn=s,Xn}var eo,Tu;function ih(){if(Tu)return eo;Tu=1;var t=oh();function e(r){return r==null?"":t(r)}return eo=e,eo}var to,Iu;function or(){if(Iu)return to;Iu=1;var t=Ie(),e=Xi(),r=nh(),o=ih();function i(a,s){return t(a)?a:e(a,s)?[a]:r(o(a))}return to=i,to}var ro,Pu;function St(){if(Pu)return ro;Pu=1;var t=Qi();function e(r){if(typeof r=="string"||t(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}return ro=e,ro}var no,ku;function ea(){if(ku)return no;ku=1;var t=or(),e=St();function r(o,i){i=t(i,o);for(var a=0,s=i.length;o!=null&&a<s;)o=o[e(i[a++])];return a&&a==s?o:void 0}return no=r,no}var oo,Nu;function ah(){if(Nu)return oo;Nu=1;var t=ea();function e(r,o,i){var a=r==null?void 0:t(r,o);return a===void 0?i:a}return oo=e,oo}var io,Mu;function sh(){if(Mu)return io;Mu=1;function t(e,r){return e!=null&&r in Object(e)}return io=t,io}var ao,Ru;function uh(){if(Ru)return ao;Ru=1;var t=or(),e=Hi(),r=Ie(),o=rr(),i=Yi(),a=St();function s(u,l,c){l=t(l,u);for(var d=-1,f=l.length,p=!1;++d<f;){var m=a(l[d]);if(!(p=u!=null&&c(u,m)))break;u=u[m]}return p||++d!=f?p:(f=u==null?0:u.length,!!f&&i(f)&&o(m,f)&&(r(u)||e(u)))}return ao=s,ao}var so,xu;function lh(){if(xu)return so;xu=1;var t=sh(),e=uh();function r(o,i){return o!=null&&e(o,i,t)}return so=r,so}var uo,Uu;function ch(){if(Uu)return uo;Uu=1;var t=Kc(),e=ah(),r=lh(),o=Xi(),i=Yc(),a=Jc(),s=St(),u=1,l=2;function c(d,f){return o(d)&&i(f)?a(s(d),f):function(p){var m=e(p,d);return m===void 0&&m===f?r(p,d):t(f,m,u|l)}}return uo=c,uo}var lo,Fu;function ta(){if(Fu)return lo;Fu=1;function t(e){return e}return lo=t,lo}var co,Ou;function dh(){if(Ou)return co;Ou=1;function t(e){return function(r){return r==null?void 0:r[e]}}return co=t,co}var fo,Du;function fh(){if(Du)return fo;Du=1;var t=ea();function e(r){return function(o){return t(o,r)}}return fo=e,fo}var po,Bu;function ph(){if(Bu)return po;Bu=1;var t=dh(),e=fh(),r=Xi(),o=St();function i(a){return r(a)?t(o(a)):e(a)}return po=i,po}var mo,Vu;function mh(){if(Vu)return mo;Vu=1;var t=eh(),e=ch(),r=ta(),o=Ie(),i=ph();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?o(s)?e(s[0],s[1]):t(s):i(s)}return mo=a,mo}var ho,zu;function Zc(){if(zu)return ho;zu=1;var t=Oe(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return ho=e,ho}var go,qu;function ra(){if(qu)return go;qu=1;var t=Zc();function e(r,o,i){o=="__proto__"&&t?t(r,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[o]=i}return go=e,go}var yo,Lu;function Qc(){if(Lu)return yo;Lu=1;var t=ra(),e=_t(),r=Object.prototype,o=r.hasOwnProperty;function i(a,s,u){var l=a[s];(!(o.call(a,s)&&e(l,u))||u===void 0&&!(s in a))&&t(a,s,u)}return yo=i,yo}var vo,Gu;function hh(){if(Gu)return vo;Gu=1;var t=Qc(),e=or(),r=rr(),o=Te(),i=St();function a(s,u,l,c){if(!o(s))return s;u=e(u,s);for(var d=-1,f=u.length,p=f-1,m=s;m!=null&&++d<f;){var v=i(u[d]),y=l;if(v==="__proto__"||v==="constructor"||v==="prototype")return s;if(d!=p){var S=m[v];y=c?c(S,v,m):void 0,y===void 0&&(y=o(S)?S:r(u[d+1])?[]:{})}t(m,v,y),m=m[v]}return s}return vo=a,vo}var _o,ju;function gh(){if(ju)return _o;ju=1;var t=ea(),e=hh(),r=or();function o(i,a,s){for(var u=-1,l=a.length,c={};++u<l;){var d=a[u],f=t(i,d);s(f,d)&&e(c,r(d,i),f)}return c}return _o=o,_o}var So,$u;function na(){if($u)return So;$u=1;var t=Wc(),e=t(Object.getPrototypeOf,Object);return So=e,So}var wo,Wu;function yh(){if(Wu)return wo;Wu=1;var t=qc(),e=na(),r=jc(),o=Gc(),i=Object.getOwnPropertySymbols,a=i?function(s){for(var u=[];s;)t(u,r(s)),s=e(s);return u}:o;return wo=a,wo}var Co,Hu;function vh(){if(Hu)return Co;Hu=1;function t(e){var r=[];if(e!=null)for(var o in Object(e))r.push(o);return r}return Co=t,Co}var bo,Ku;function _h(){if(Ku)return bo;Ku=1;var t=Te(),e=Zi(),r=vh(),o=Object.prototype,i=o.hasOwnProperty;function a(s){if(!t(s))return r(s);var u=e(s),l=[];for(var c in s)c=="constructor"&&(u||!i.call(s,c))||l.push(c);return l}return bo=a,bo}var Ao,Yu;function oa(){if(Yu)return Ao;Yu=1;var t=$c(),e=_h(),r=nr();function o(i){return r(i)?t(i,!0):e(i)}return Ao=o,Ao}var Eo,Ju;function Sh(){if(Ju)return Eo;Ju=1;var t=Lc(),e=yh(),r=oa();function o(i){return t(i,r,e)}return Eo=o,Eo}var To,Zu;function wh(){if(Zu)return To;Zu=1;var t=Oc(),e=mh(),r=gh(),o=Sh();function i(a,s){if(a==null)return{};var u=t(o(a),function(l){return[l]});return s=e(s),r(a,u,function(l,c){return s(l,c[0])})}return To=i,To}var Ch=wh();const bh=Li(Ch),Ah=!0,Eh="",yt=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),Th=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},Ih=t=>{const{phone_number:e,...r}=bh(t,Th);if(tc(e)&&e!==Eh){const{country_code:o}=t;return{...r,phone_number:yt(o,e)}}return r},Ph=(t,e,r,o)=>{const{password:i,...a}=e,s=Ih(a),u=o&&o!=="PASSWORD";let l=s;o==="SMS_OTP"&&s.email&&(l={...s,email:""});const c={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:o}:Ah,userAttributes:{...r==="phone_number"?{...l,phone_number:t}:l}};return{username:t,password:u?void 0:i,options:c}},kh=({formValues:t,loginMechanisms:e})=>{const r=t.__authMethod;if(r==="SMS_OTP"){const{country_code:i,phone_number:a}=t;return yt(i,a)}if(r==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const o=e[0];if(o==="phone_number"){const{country_code:i,phone_number:a}=t;return yt(i,a)}return t[o]},Nh=(t,e)=>{const r=[],o=e!==void 0;r.push("PASSWORD"),(o||t!=null&&t.emailOtpEnabled)&&r.push("EMAIL_OTP"),(o||t!=null&&t.smsOtpEnabled)&&r.push("SMS_OTP"),(o||t!=null&&t.webAuthnEnabled)&&r.push("WEB_AUTHN");const i=e??[],a=r.filter(s=>!i.includes(s));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:D}=kc,Mh=D({actorDoneData:void 0}),Rh=D({challengeName:void 0}),xh=D({missingAttributes:void 0}),Uh=D({remoteError:void 0}),Fh=D({formValues:t=>{var e;return{username:(e=t.formValues)==null?void 0:e.username}}}),Oh=D({touched:{}}),Dh=D({user:void 0}),Bh=D({validationError:{}}),Vh=D({totpSecretCode:(t,{data:e})=>{var o;const{sharedSecret:r}=((o=e.nextStep)==null?void 0:o.totpSetupDetails)??{};return r}}),zh=D({allowedMfaTypes:(t,{data:e})=>{var r;return(r=e.nextStep)==null?void 0:r.allowedMFATypes}}),qh=D({step:"SIGN_IN"}),Lh=D({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Gh=D({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),jh=D({challengeName:(t,{data:e})=>{const{signInStep:r}=e.nextStep;switch(r){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),$h=D({username:({formValues:t,loginMechanisms:e})=>{const r=e[0],{username:o,country_code:i}=t;return r==="phone_number"?yt(i,o):o}}),Wh=D({username:kh}),Hh=D({username:({formValues:t,loginMechanisms:e})=>{const r=e[0],{username:o,country_code:i}=t;return r==="phone_number"?yt(i,o):o}}),Kh=D({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Yh=D({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Jh=D({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),Zh=D({missingAttributes:(t,{data:e})=>{var r;return(r=e.nextStep)==null?void 0:r.missingAttributes}}),Qh=D({validationError:(t,{data:e})=>e}),Xh=D({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const r=(e==null?void 0:e.message)||"";return r.includes("USER_AUTH flow not enabled")?x(O.PASSWORDLESS_NOT_ENABLED):r.includes("Cannot send code to either")?x(O.CODE_DELIVERY_FAILED):r.includes("Invalid code or auth state")?x(O.VERIFICATION_CODE_INVALID):r.includes("session is expired")?x(O.VERIFICATION_CODE_EXPIRED):r.includes("ceremony has been canceled")?x(O.PASSKEY_AUTHENTICATION_CANCELED):r||e}}),eg=D({user:(t,{data:e})=>e}),Qu=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),tg=D({codeDeliveryDetails:(t,{data:e})=>{var r;return(r=e==null?void 0:e.nextStep)!=null&&r.codeDeliveryDetails?Qu(e.nextStep.codeDeliveryDetails):Qu(e)}}),rg=D({formValues:(t,{data:e})=>{const{name:r,value:o}=e;return{...t.formValues,[r]:o}}}),ng=D({formValues:(t,{data:e})=>Yd({...t.formValues,...e},"password")}),og=D({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),ig=D({unverifiedUserAttributes:(t,{data:e})=>{const r=e||t.fetchedUserAttributes;if(!r)return{};const{email:o,phone_number:i}=r;return{...o&&{email:o},...i&&{phone_number:i}}}}),ag=D({selectedUserAttribute:void 0}),sg=D({selectedUserAttribute:t=>{var e;return(e=t.formValues)==null?void 0:e.unverifiedAttr}}),ug=D({step:"CONFIRM_SIGN_UP"}),lg=D({selectedAuthMethod:(t,{data:e})=>e.method}),cg=D({selectedAuthMethod:(t,{data:e})=>(e==null?void 0:e.__authMethod)||"PASSWORD"}),dg=D({step:"SELECT_AUTH_METHOD"}),fg=D({fetchedUserAttributes:(t,e)=>e.data}),pg=D({hasExistingPasskeys:(t,e)=>e.data}),mg=D({hasExistingPasskeys:!1}),wt={clearActorDoneData:Mh,clearChallengeName:Rh,clearError:Uh,clearFormValues:Fh,clearHasExistingPasskeys:mg,clearMissingAttributes:xh,clearSelectedUserAttribute:ag,clearTouched:Oh,clearUser:Dh,clearValidationError:Bh,handleBlur:og,handleInput:rg,handleSubmit:ng,setAllowedMfaTypes:zh,setChallengeName:jh,setCodeDeliveryDetails:tg,setFetchedUserAttributes:fg,setFieldErrors:Qh,setHasExistingPasskeys:pg,setMissingAttributes:Zh,setNextResetPasswordStep:Jh,setNextSignInStep:Kh,setNextSignUpStep:Yh,setRemoteError:Xh,setConfirmAttributeCompleteStep:Gh,setConfirmSignUpSignUpStep:ug,setSelectAuthMethodStep:dg,setSelectedAuthMethod:lg,setSelectedAuthMethodFromForm:cg,setShouldVerifyUserAttributeStep:Lh,setSelectedUserAttribute:sg,setSignInStep:qh,setTotpSecretCode:Vh,setUser:eg,setUnverifiedUserAttributes:ig,setUsernameForgotPassword:$h,setUsernameSignIn:Hh,setUsernameSignUp:Wh},hg=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],gg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",yg=(t,{data:e})=>{var r;return((r=e==null?void 0:e.nextStep)==null?void 0:r.signInStep)==="RESET_PASSWORD"},vg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="CONFIRM_SIGN_UP",_g=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="COMPLETE_AUTO_SIGN_IN",Sg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE"&&t.step==="CONFIRM_SIGN_UP",wg=(t,{data:e})=>(e==null?void 0:e.nextStep.signInStep)==="DONE",Cg=(t,{data:e})=>(e==null?void 0:e.nextStep.signUpStep)==="DONE",bg=(t,{data:e})=>(e==null?void 0:e.nextStep.resetPasswordStep)==="DONE",Ag=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_COMPLETE",Eg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_ATTRIBUTE_WITH_CODE",Tg=(t,{data:e})=>(e==null?void 0:e.step)==="SHOULD_CONFIRM_USER_ATTRIBUTE",Ig=(t,{data:e})=>(e==null?void 0:e.step)==="RESET_PASSWORD",Pg=(t,{data:e})=>(e==null?void 0:e.step)==="CONFIRM_SIGN_UP",kg=({step:t})=>hg.includes(t),Ng=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Mg=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Rg=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),xg=({step:t})=>t==="RESET_PASSWORD",Ug=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Fg=({step:t})=>t==="CONFIRM_SIGN_UP",Og=(t,e)=>{const r=e.data||t.fetchedUserAttributes;if(!r)return!1;const{email:o,phone_number:i,phone_number_verified:a,email_verified:s}=r;return!o&&!i?!1:(s===void 0||s==="false")&&(a===void 0||a==="false")},Dg=(t,{data:e})=>e.message==="User is already confirmed.",Bg=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:r})=>t&&t.length>1&&(!e||r===null),Vg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:r}=t||{};return!r||e?!1:typeof r=="boolean"?r:r.afterSignin==="ALWAYS"},zg=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:r}=t||{};return!r||e?!1:typeof r=="boolean"?r:r.afterSignup==="ALWAYS"},qg=({passwordless:t})=>(t==null?void 0:t.passkeyRegistrationPrompts)!=null,Lg=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",ir={hasCompletedAttributeConfirmation:Ag,hasCompletedResetPassword:bg,hasCompletedSignIn:wg,hasCompletedSignUp:Cg,hasPasskeyRegistrationPrompts:qg,isConfirmSignUpStep:Pg,isConfirmUserAttributeStep:Eg,isResetPasswordStep:Ig,isShouldConfirmUserAttributeStep:Tg,isUserAlreadyConfirmed:Dg,shouldAutoSignIn:_g,shouldManualSignIn:Sg,shouldConfirmResetPassword:Ug,shouldConfirmSignIn:kg,shouldConfirmSignInWithNewPassword:gg,shouldConfirmSignUp:Fg,shouldConfirmSignUpFromSignIn:vg,shouldResetPassword:xg,shouldResetPasswordFromSignIn:yg,shouldReturnToSelectMethod:Lg,shouldSelectAuthMethod:Bg,shouldSetupTotp:Ng,shouldSetupEmail:Mg,shouldSelectMfaType:Rg,shouldVerifyAttribute:Og,shouldPromptPasskeyRegistration:Vg,shouldPromptPasskeyRegistrationAfterSignup:zg};var Io,Xu;function Xc(){if(Xu)return Io;Xu=1;var t=ra(),e=_t();function r(o,i,a){(a!==void 0&&!e(o[i],a)||a===void 0&&!(i in o))&&t(o,i,a)}return Io=r,Io}var Po,el;function Gg(){if(el)return Po;el=1;function t(e){return function(r,o,i){for(var a=-1,s=Object(r),u=i(r),l=u.length;l--;){var c=u[e?l:++a];if(o(s[c],c,s)===!1)break}return r}}return Po=t,Po}var ko,tl;function jg(){if(tl)return ko;tl=1;var t=Gg(),e=t();return ko=e,ko}var ct={exports:{}};ct.exports;var rl;function $g(){return rl||(rl=1,(function(t,e){var r=Se(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,p=u?u(f):new c.constructor(f);return c.copy(p),p}t.exports=l})(ct,ct.exports)),ct.exports}var No,nl;function Wg(){if(nl)return No;nl=1;var t=zc();function e(r){var o=new r.constructor(r.byteLength);return new t(o).set(new t(r)),o}return No=e,No}var Mo,ol;function Hg(){if(ol)return Mo;ol=1;var t=Wg();function e(r,o){var i=o?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Mo=e,Mo}var Ro,il;function Kg(){if(il)return Ro;il=1;function t(e,r){var o=-1,i=e.length;for(r||(r=Array(i));++o<i;)r[o]=e[o];return r}return Ro=t,Ro}var xo,al;function Yg(){if(al)return xo;al=1;var t=Te(),e=Object.create,r=(function(){function o(){}return function(i){if(!t(i))return{};if(e)return e(i);o.prototype=i;var a=new o;return o.prototype=void 0,a}})();return xo=r,xo}var Uo,sl;function Jg(){if(sl)return Uo;sl=1;var t=Yg(),e=na(),r=Zi();function o(i){return typeof i.constructor=="function"&&!r(i)?t(e(i)):{}}return Uo=o,Uo}var Fo,ul;function Zg(){if(ul)return Fo;ul=1;var t=nr(),e=De();function r(o){return e(o)&&t(o)}return Fo=r,Fo}var Oo,ll;function Qg(){if(ll)return Oo;ll=1;var t=Je(),e=na(),r=De(),o="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,l=s.call(Object);function c(d){if(!r(d)||t(d)!=o)return!1;var f=e(d);if(f===null)return!0;var p=u.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return Oo=c,Oo}var Do,cl;function ed(){if(cl)return Do;cl=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return Do=t,Do}var Bo,dl;function Xg(){if(dl)return Bo;dl=1;var t=Qc(),e=ra();function r(o,i,a,s){var u=!a;a||(a={});for(var l=-1,c=i.length;++l<c;){var d=i[l],f=s?s(a[d],o[d],d,a,o):void 0;f===void 0&&(f=o[d]),u?e(a,d,f):t(a,d,f)}return a}return Bo=r,Bo}var Vo,fl;function ey(){if(fl)return Vo;fl=1;var t=Xg(),e=oa();function r(o){return t(o,e(o))}return Vo=r,Vo}var zo,pl;function ty(){if(pl)return zo;pl=1;var t=Xc(),e=$g(),r=Hg(),o=Kg(),i=Jg(),a=Hi(),s=Ie(),u=Zg(),l=Ki(),c=Gi(),d=Te(),f=Qg(),p=Ji(),m=ed(),v=ey();function y(S,h,g,_,w,P,b){var C=m(S,g),E=m(h,g),T=b.get(E);if(T){t(S,g,T);return}var I=P?P(C,E,g+"",S,h,b):void 0,A=I===void 0;if(A){var k=s(E),N=!k&&l(E),R=!k&&!N&&p(E);I=E,k||N||R?s(C)?I=C:u(C)?I=o(C):N?(A=!1,I=e(E,!0)):R?(A=!1,I=r(E,!0)):I=[]:f(E)||a(E)?(I=C,a(C)?I=v(C):(!d(C)||c(C))&&(I=i(E))):A=!1}A&&(b.set(E,I),w(I,E,_,P,b),b.delete(E)),t(S,g,I)}return zo=y,zo}var qo,ml;function ry(){if(ml)return qo;ml=1;var t=Wi(),e=Xc(),r=jg(),o=ty(),i=Te(),a=oa(),s=ed();function u(l,c,d,f,p){l!==c&&r(c,function(m,v){if(p||(p=new t),i(m))o(l,c,v,d,u,f,p);else{var y=f?f(s(l,v),m,v+"",l,c,p):void 0;y===void 0&&(y=m),e(l,v,y)}},a)}return qo=u,qo}var Lo,hl;function ny(){if(hl)return Lo;hl=1;function t(e,r,o){switch(o.length){case 0:return e.call(r);case 1:return e.call(r,o[0]);case 2:return e.call(r,o[0],o[1]);case 3:return e.call(r,o[0],o[1],o[2])}return e.apply(r,o)}return Lo=t,Lo}var Go,gl;function oy(){if(gl)return Go;gl=1;var t=ny(),e=Math.max;function r(o,i,a){return i=e(i===void 0?o.length-1:i,0),function(){for(var s=arguments,u=-1,l=e(s.length-i,0),c=Array(l);++u<l;)c[u]=s[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=s[u];return d[i]=a(c),t(o,this,d)}}return Go=r,Go}var jo,yl;function iy(){if(yl)return jo;yl=1;function t(e){return function(){return e}}return jo=t,jo}var $o,vl;function ay(){if(vl)return $o;vl=1;var t=iy(),e=Zc(),r=ta(),o=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return $o=o,$o}var Wo,_l;function sy(){if(_l)return Wo;_l=1;var t=800,e=16,r=Date.now;function o(i){var a=0,s=0;return function(){var u=r(),l=e-(u-s);if(s=u,l>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wo=o,Wo}var Ho,Sl;function uy(){if(Sl)return Ho;Sl=1;var t=ay(),e=sy(),r=e(t);return Ho=r,Ho}var Ko,wl;function ly(){if(wl)return Ko;wl=1;var t=ta(),e=oy(),r=uy();function o(i,a){return r(e(i,a,t),i+"")}return Ko=o,Ko}var Yo,Cl;function cy(){if(Cl)return Yo;Cl=1;var t=_t(),e=nr(),r=rr(),o=Te();function i(a,s,u){if(!o(u))return!1;var l=typeof s;return(l=="number"?e(u)&&r(s,u.length):l=="string"&&s in u)?t(u[s],a):!1}return Yo=i,Yo}var Jo,bl;function dy(){if(bl)return Jo;bl=1;var t=ly(),e=cy();function r(o){return t(function(i,a){var s=-1,u=a.length,l=u>1?a[u-1]:void 0,c=u>2?a[2]:void 0;for(l=o.length>3&&typeof l=="function"?(u--,l):void 0,c&&e(a[0],a[1],c)&&(l=u<3?void 0:l,u=1),i=Object(i);++s<u;){var d=a[s];d&&o(i,d,s,l)}return i})}return Jo=r,Jo}var Zo,Al;function fy(){if(Al)return Zo;Al=1;var t=ry(),e=dy(),r=e(function(o,i,a){t(o,i,a)});return Zo=r,Zo}var py=fy();const my=Li(py),ar=async(t,e,r,o)=>{const i=await Promise.all(o.map(s=>s(t,e,r))),a=my({},...i);return rc(a)?Promise.resolve():Promise.reject(a)},hy=8,gy=t=>Array.isArray(t),yy=t=>{if(t)return gy(t)?Object.entries(t).map(([e,r])=>Object.keys(r)[0]):Object.keys(t)},Re={async getAmplifyConfig(){var c,d,f,p,m,v;const t=pd.Amplify.getConfig(),e=(c=t.Auth)==null?void 0:c.Cognito,{loginWith:r,userAttributes:o}=((d=t.Auth)==null?void 0:d.Cognito)??{},i=r?Object.entries(r).filter(([y,S])=>y!=="oauth").filter(([y,S])=>!!S).map(y=>y[0]==="phone"?"phone_number":y[0]):void 0,a=yy(o),s=(f=r==null?void 0:r.oauth)!=null&&f.providers?(p=r.oauth.providers)==null?void 0:p.map(y=>y.toString().toLowerCase()):void 0,u=(v=(m=t.Auth)==null?void 0:m.Cognito)==null?void 0:v.passwordless,l={emailOtpEnabled:(u==null?void 0:u.emailOtpEnabled)??(u==null?void 0:u.email_otp_enabled)===!0,smsOtpEnabled:(u==null?void 0:u.smsOtpEnabled)??(u==null?void 0:u.sms_otp_enabled)===!0,webAuthnEnabled:!!((u==null?void 0:u.webAuthn)??(u==null?void 0:u.web_authn)),preferredChallenge:(u==null?void 0:u.preferredChallenge)??(u==null?void 0:u.preferred_challenge)};return{...e,loginMechanisms:i,signUpAttributes:a,socialProviders:s,passwordlessCapabilities:l}},getCurrentUser:K.getCurrentUser,handleSignIn:K.signIn,handleSignUp:K.signUp,handleConfirmSignIn:K.confirmSignIn,handleConfirmSignUp:K.confirmSignUp,handleForgotPasswordSubmit:K.confirmResetPassword,handleForgotPassword:K.resetPassword,handleResendSignUpCode:K.resendSignUpCode,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,r){const{password:o}=t,{password:i}=e;if(!i||!r)return null;const a=[],s=r.minLength??hy;return o.length<s&&a.push(`Password must have at least ${s} characters`),r.requireLowercase&&!/[a-z]/.test(o)&&a.push("Password must have lower case letters"),r.requireUppercase&&!/[A-Z]/.test(o)&&a.push("Password must have upper case letters"),r.requireNumbers&&!/[0-9]/.test(o)&&a.push("Password must have numbers"),r.requireSpecialCharacters&&!Hd(o)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(t,e){const{password:r,confirm_password:o}=t,{confirm_password:i,password:a}=e;if(!r&&!o)return null;if((r||o)&&r!==o&&(i&&a||(r==null?void 0:r.length)>=6&&(o==null?void 0:o.length)>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const r={};return t.password||(r.password="Password is required"),t.confirm_password||(r.confirm_password="Confirm Password is required"),Object.keys(r).length>0?r:null}return null}};function vy({services:t}){return Ye({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:r}){const{confirmation_code:o,password:i}=e;return t.handleForgotPasswordSubmit({confirmationCode:o,newPassword:i,username:r})},validateFields(e){return ar(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const td=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),_y=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Bt={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},kt=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Bt}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Sy({services:t}){return Ye({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...td("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await K.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Bt.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Bt.onError]}}}},confirmSignIn:{...kt(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Bt}}}}}},setupTotp:{...kt(["clearFormValues","clearError","clearTouched"])},setupEmail:{...kt(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...kt(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{async fetchUserAttributes(){return K.fetchUserAttributes()},resetPassword({username:e}){return K.resetPassword({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:i}){const a=r??i??(o==null?void 0:o[0])??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:e,username:r,selectedAuthMethod:o,availableAuthMethods:i,preferredChallenge:a}){const s=o??a??(i==null?void 0:i[0])??"PASSWORD";if(s==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:r,password:u})}else return t.handleSignIn({username:r,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},confirmSignIn({formValues:e,step:r}){const o=_y(r),{[o]:i}=e;return t.handleConfirmSignIn({challengeResponse:i})},async handleForceChangePassword({formValues:e}){let{password:r,phone_number:o,country_code:i,confirm_password:a,username:s,...u}=e,l;o&&(l=`${i}${o}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:l});const c={challengeResponse:r,options:{userAttributes:u}};return K.confirmSignIn(c)},signInWithRedirect(e,{data:r}){return K.signInWithRedirect(r)},async validateFields(e){return ar(e.formValues,e.touched,e.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const wy={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Cy={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function by({services:t}){return Ye({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Cy}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await K.listWebAuthnCredentials();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...td("signUp")},resetPassword:{invoke:{src:"resetPassword",...wy}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...wt,sendUpdate:Jt()},guards:ir,services:{autoSignIn(){return K.autoSignIn()},async fetchUserAttributes(){return K.fetchUserAttributes()},confirmSignUp({formValues:e,username:r}){const{confirmation_code:o}=e,i={username:r,confirmationCode:o};return t.handleConfirmSignUp(i)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:r}){return K.signInWithRedirect(r)},handleSignUp(e){const{formValues:r,loginMechanisms:o,username:i,selectedAuthMethod:a,preferredChallenge:s}=e,u=o[0],c=Ph(i,r,u,a??s);return t.handleSignUp(c)},async validateSignUp(e){return ar(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const Ay=()=>Ye({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>K.signOut()}});function Ey(){return Ye({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...wt,sendUpdate:Jt()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){const e={userAttributeKey:t};return K.sendUserAttributeVerificationCode(e)},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){const r={confirmationCode:t,userAttributeKey:e};return K.confirmUserAttribute(r)},async validateFields(t){return ar(t.formValues,t.touched,t.passwordSettings,[Re.validateFormPassword,Re.validateConfirmPassword])}}})}const Nt=(t,e)=>{var i,a,s,u,l,c,d,f,p,m,v,y;const r=Nh(t.passwordlessCapabilities,(a=(i=t.config)==null?void 0:i.passwordless)==null?void 0:a.hiddenAuthMethods),o=((u=(s=t.config)==null?void 0:s.passwordless)==null?void 0:u.preferredAuthMethod)??((l=t.passwordlessCapabilities)==null?void 0:l.preferredChallenge);return{...t.actorDoneData,step:((c=t==null?void 0:t.actorDoneData)==null?void 0:c.step)??e,formValues:{},touched:{},validationError:{},formFields:(d=t.config)==null?void 0:d.formFields,loginMechanisms:(f=t.config)==null?void 0:f.loginMechanisms,passwordSettings:(p=t.config)==null?void 0:p.passwordSettings,signUpAttributes:(m=t.config)==null?void 0:m.signUpAttributes,socialProviders:(v=t.config)==null?void 0:v.socialProviders,availableAuthMethods:r,preferredChallenge:o,passwordless:(y=t.config)==null?void 0:y.passwordless}},{choose:Ty,stop:Iy}=kc,rt=t=>Iy(t),Py={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},ky={always:{actions:"configure",target:"getConfig"}};function Ny(t){const{useNextWaitConfig:e,...r}={};return Ye({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Re,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}},on:{SIGN_OUT:"#authenticator.signOut"}},setup:{initial:"initConfig",states:{initConfig:e?ky:Py,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}},on:{SIGN_OUT:"#authenticator.signOut"}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:rt("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{INIT:{cond:"shouldInitialize",actions:"configure",target:"#authenticator.setup.getConfig"},SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...wt,forwardToActor:Ty([{cond:"hasActor",actions:Qp(({actorRef:i})=>i)}]),setActorDoneData:Ce({actorDoneData:(i,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes,allowedMfaTypes:a.data.allowedMfaTypes})}),applyAmplifyConfig:Ce({passwordlessCapabilities:(i,{data:a})=>a.passwordlessCapabilities,config(i,{data:a}){const{loginMechanisms:s=a.loginMechanisms??[],signUpAttributes:u=a.signUpAttributes??[],socialProviders:l=a.socialProviders??[],initialState:c,formFields:d,passwordSettings:f=a.passwordFormat??{},passwordless:p}=i.config;return s.length===0&&s.push("username"),{formFields:My(d)??{},initialState:c,loginMechanisms:s,passwordSettings:f,passwordless:p,signUpAttributes:u,socialProviders:l}}}),spawnSignInActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=Sy({services:s}).withContext(Nt(i,"SIGN_IN"));return et(u,{name:"signInActor"})}}),spawnSignUpActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=by({services:s}).withContext(Nt(i,"SIGN_UP"));return et(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:Ce({actorRef:(i,a)=>{const{services:s}=i,u=vy({services:s}).withContext(Nt(i,"FORGOT_PASSWORD"));return et(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:Ce({actorRef:i=>{const a=Ey().withContext(Nt(i));return et(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:Ce({actorRef:i=>{const a=Ay().withContext({user:i==null?void 0:i.user});return et(a,{name:"signOutActor"})}}),configure:Ce((i,a)=>{const{services:s,...u}=Pd(r)?a.data??{}:r;return{services:{...Re,...s},config:u,hasInitialized:!0}}),setHasSetup:Ce({hasSetup:!0})},guards:{...ir,hasActor:({actorRef:i})=>!!i,isInitialStateSignUp:({config:i})=>i.initialState==="signUp",isInitialStateResetPassword:({config:i})=>i.initialState==="forgotPassword",shouldSetup:({hasSetup:i})=>!i,shouldInitialize:({hasSetup:i,hasInitialized:a})=>i&&!a,hasUser:({user:i})=>!!i},services:{getAmplifyConfig:({services:i})=>i.getAmplifyConfig(),handleGetCurrentUser:({services:i})=>i.getCurrentUser()}})}function My(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{let o=t[e][r];o.required=o.isRequired})}),t}const ie={Accordion:"amplify-accordion",AccordionItem:"amplify-accordion__item",AccordionItemTrigger:"amplify-accordion__item__trigger",AccordionItemContent:"amplify-accordion__item__content",AccordionItemIcon:"amplify-accordion__item__icon",Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Autocomplete:"amplify-autocomplete",AutocompleteMenu:"amplify-autocomplete__menu",AutocompleteMenuEmpty:"amplify-autocomplete__menu--empty",AutocompleteMenuFooter:"amplify-autocomplete__menu__footer",AutocompleteMenuHeader:"amplify-autocomplete__menu__header",AutocompleteMenuLoading:"amplify-autocomplete__menu--loading",AutocompleteMenuOption:"amplify-autocomplete__menu__option",AutocompleteMenuOptions:"amplify-autocomplete__menu__options",Avatar:"amplify-avatar",AvatarIcon:"amplify-avatar__icon",AvatarImage:"amplify-avatar__image",AvatarLoader:"amplify-avatar__loader",AIConversation:"amplify-ai-conversation",AIConversationScrollView:"amplify-ai-conversation__scrollview",AIConversationAttachment:"amplify-ai-conversation__attachment",AIConversationAttachmentList:"amplify-ai-conversation__attachment__list",AIConversationAttachmentImage:"amplify-ai-conversation__attachment__image",AIConversationAttachmentName:"amplify-ai-conversation__attachment__name",AIConversationAttachmentSize:"amplify-ai-conversation__attachment__size",AIConversationAttachmentRemove:"amplify-ai-conversation__attachment__remove",AIConversationForm:"amplify-ai-conversation__form",AIConversationFormAttach:"amplify-ai-conversation__form__attach",AIConversationFormError:"amplify-ai-conversation__form__error",AIConversationFormSend:"amplify-ai-conversation__form__send",AIConversationFormField:"amplify-ai-conversation__form__field",AIConversationFormDropzone:"amplify-ai-conversation__form__dropzone",AIConversationMessage:"amplify-ai-conversation__message",AIConversationMessageAvatar:"amplify-ai-conversation__message__avatar",AIConversationMessageSender:"amplify-ai-conversation__message__sender",AIConversationMessageSenderUsername:"amplify-ai-conversation__message__sender__username",AIConversationMessageSenderTimestamp:"amplify-ai-conversation__message__sender__timestamp",AIConversationMessageBody:"amplify-ai-conversation__message__body",AIConversationMessageContent:"amplify-ai-conversation__message__content",AIConversationMessageActions:"amplify-ai-conversation__message__actions",AIConversationMessageList:"amplify-ai-conversation__message__list",AIConversationPrompt:"amplify-ai-conversation__prompt",Badge:"amplify-badge",Breadcrumbs:"amplify-breadcrumbs",BreadcrumbsList:"amplify-breadcrumbs__list",BreadcrumbsItem:"amplify-breadcrumbs__item",BreadcrumbsSeparator:"amplify-breadcrumbs__separator",BreadcrumbsLink:"amplify-breadcrumbs__link",Button:"amplify-button",ButtonGroup:"amplify-buttongroup",ButtonLoaderWrapper:"amplify-button__loader-wrapper",Card:"amplify-card",Checkbox:"amplify-checkbox",CheckboxButton:"amplify-checkbox__button",CheckboxIcon:"amplify-checkbox__icon",CheckboxInput:"amplify-checkbox__input",CheckboxLabel:"amplify-checkbox__label",CheckboxField:"amplify-checkboxfield",Collection:"amplify-collection",CollectionItems:"amplify-collection-items",CollectionSearch:"amplify-collection-search",CollectionPagination:"amplify-collection-pagination",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",DividerLabel:"amplify-divider--label",DropZone:"amplify-dropzone",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupIcon:"amplify-field-group__icon",FieldGroupIconButton:"amplify-field-group__icon-button",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",FileUploader:"amplify-fileuploader",FileUploaderDropZone:"amplify-fileuploader__dropzone",FileUploaderDropZoneIcon:"amplify-fileuploader__dropzone__icon",FileUploaderDropZoneText:"amplify-fileuploader__dropzone__text",FileUploaderFilePicker:"amplify-fileuploader__file__picker",FileUploaderFile:"amplify-fileuploader__file",FileUploaderFileWrapper:"amplify-fileuploader__file__wrapper",FileUploaderFileList:"amplify-fileuploader__file__list",FileUploaderFileName:"amplify-fileuploader__file__name",FileUploaderFileSize:"amplify-fileuploader__file__size",FileUploaderFileInfo:"amplify-fileuploader__file__info",FileUploaderFileImage:"amplify-fileuploader__file__image",FileUploaderFileMain:"amplify-fileuploader__file__main",FileUploaderFileStatus:"amplify-fileuploader__file__status",FileUploaderLoader:"amplify-fileuploader__loader",FileUploaderPreviewer:"amplify-fileuploader__previewer",FileUploaderPreviewerText:"amplify-fileuploader__previewer__text",FileUploaderPreviewerActions:"amplify-fileuploader__previewer__actions",FileUploaderPreviewerFooter:"amplify-fileuploader__previewer__footer",Flex:"amplify-flex",Grid:"amplify-grid",Heading:"amplify-heading",HighlightMatch:"amplify-highlightmatch",HighlightMatchHighlighted:"amplify-highlightmatch__highlighted",Icon:"amplify-icon",Image:"amplify-image",Input:"amplify-input",Label:"amplify-label",Link:"amplify-link",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",MenuContent:"amplify-menu__content",MenuItem:"amplify-menu__content__item",MenuTrigger:"amplify-menu__trigger",MenuWrapper:"amplify-menu__wrapper",Message:"amplify-message",MessageIcon:"amplify-message__icon",MessageHeading:"amplify-message__heading",MessageBody:"amplify-message__body",MessageContent:"amplify-message__content",MessageDismiss:"amplify-message__dismiss",Pagination:"amplify-pagination",PaginationItem:"amplify-pagination__item",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Placeholder:"amplify-placeholder",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Rating:"amplify-rating",RatingItem:"amplify-rating__item",RatingIcon:"amplify-rating__icon",RatingLabel:"amplify-rating__label",ScrollView:"amplify-scrollview",SearchField:"amplify-searchfield",SearchFieldClear:"amplify-searchfield__clear",SearchFieldSearch:"amplify-searchfield__search",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",SliderField:"amplify-sliderfield",SliderFieldGroup:"amplify-sliderfield__group",SliderFieldLabel:"amplify-sliderfield__label",SliderFieldRange:"amplify-sliderfield__range",SliderFieldRoot:"amplify-sliderfield__root",SliderFieldThumb:"amplify-sliderfield__thumb",SliderFieldTrack:"amplify-sliderfield__track",StepperField:"amplify-stepperfield",StepperFieldButtonDecrease:"amplify-stepperfield__button--decrease",StepperFieldButtonIncrease:"amplify-stepperfield__button--increase",StepperFieldInput:"amplify-stepperfield__input",StorageImage:"amplify-storageimage",StorageManager:"amplify-storagemanager",StorageManagerDropZone:"amplify-storagemanager__dropzone",StorageManagerDropZoneIcon:"amplify-storagemanager__dropzone__icon",StorageManagerDropZoneText:"amplify-storagemanager__dropzone__text",StorageManagerFilePicker:"amplify-storagemanager__file__picker",StorageManagerFile:"amplify-storagemanager__file",StorageManagerFileWrapper:"amplify-storagemanager__file__wrapper",StorageManagerFileList:"amplify-storagemanager__file__list",StorageManagerFileName:"amplify-storagemanager__file__name",StorageManagerFileSize:"amplify-storagemanager__file__size",StorageManagerFileInfo:"amplify-storagemanager__file__info",StorageManagerFileImage:"amplify-storagemanager__file__image",StorageManagerFileMain:"amplify-storagemanager__file__main",StorageManagerFileStatus:"amplify-storagemanager__file__status",StorageManagerLoader:"amplify-storagemanager__loader",StorageManagerPreviewer:"amplify-storagemanager__previewer",StorageManagerPreviewerText:"amplify-storagemanager__previewer__text",StorageManagerPreviewerActions:"amplify-storagemanager__previewer__actions",StorageManagerPreviewerFooter:"amplify-storagemanager__previewer__footer",SwitchField:"amplify-switchfield",SwitchLabel:"amplify-switch__label",SwitchThumb:"amplify-switch__thumb",SwitchTrack:"amplify-switch__track",SwitchWrapper:"amplify-switch__wrapper",Table:"amplify-table",TableCaption:"amplify-table__caption",TableBody:"amplify-table__body",TableTd:"amplify-table__td",TableTh:"amplify-table__th",TableFoot:"amplify-table__foot",TableHead:"amplify-table__head",TableRow:"amplify-table__row",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",Textarea:"amplify-textarea",TextAreaField:"amplify-textareafield",TextField:"amplify-textfield",ToggleButton:"amplify-togglebutton",ToggleButtonGroup:"amplify-togglebuttongroup",VisuallyHidden:"amplify-visually-hidden"},Ry=({componentName:t,packageName:e,version:r})=>{const o=[`ui-${e}`,r];switch(t){case"AIConversation":{F.setCustomUserAgent({...yd,additionalDetails:[[t],o]});break}case"Authenticator":{F.setCustomUserAgent({..._d,additionalDetails:[[t],o]});break}case"ChangePassword":case"DeleteUser":{F.setCustomUserAgent({...vd,additionalDetails:[["AccountSettings"],o]});break}case"FileUploader":{F.setCustomUserAgent({...Sd,additionalDetails:[[t],o]});break}case"InAppMessaging":{F.setCustomUserAgent({...wd,additionalDetails:[[t],o]});break}case"LocationSearch":{F.setCustomUserAgent({...Cd,additionalDetails:[[t],o]});break}case"MapView":{F.setCustomUserAgent({...bd,additionalDetails:[[t],o]});break}case"StorageManager":{F.setCustomUserAgent({...Ad,additionalDetails:[[t],o]});break}case"StorageBrowser":{F.setCustomUserAgent({...Ed,additionalDetails:[[t],o]});break}}return Nd},xy={key:0,class:"amplify-flex amplify-alert amplify-alert--error amplify-authenticator__base","data-variation":"error",role:"alert"},Uy={class:"amplify-flex amplify-authenticator__icon-wrapper"},de=n.defineComponent({__name:"base-alert",setup(t){const e=n.ref(!0),r=x("Dismiss alert");function o(){e.value=!1}return(i,a)=>{const s=oe;return e.value?(n.openBlock(),n.createElementBlock("div",xy,[n.createElementVNode("div",Uy,[a[0]||(a[0]=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1)),n.createElementVNode("div",null,[n.renderSlot(i.$slots,"default")])]),n.createVNode(s,{class:"amplify-field-group__control amplify-alert__dismiss","aria-label":n.unref(r),fullwidth:!1,variation:"link",type:"button",onClick:o},{default:n.withCtx(()=>[...a[1]||(a[1]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"amplify-icon","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},[n.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])]),_:1},8,["aria-label"])])):n.createCommentVNode("",!0)}}}),fe=n.defineComponent({__name:"base-field-set",setup(t){const e=n.useSlots();return(r,o)=>n.renderSlot(r.$slots,"fieldSetI",n.mergeProps(r.$attrs,{slotData:n.unref(e).default&&n.unref(e).default()}),()=>[n.createElementVNode("fieldset",n.mergeProps(r.$attrs,{"data-amplify-fieldset":""}),[n.renderSlot(r.$slots,"default")],16)])}});function Fy(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function rd(t){let e=0,r,o;const i=()=>{e-=1,o&&e<=0&&(o.stop(),r=void 0,o=void 0)};return(...a)=>(e+=1,r||(o=n.effectScope(!0),r=o.run(()=>t(...a))),Fy(i),r)}function Oy(t){return"state"in t}var El=function(){};function Dy(t){return"getSnapshot"in t?t.getSnapshot():Oy(t)?t.state:void 0}function By(t,e){e===void 0&&(e=Dy);var r=n.isRef(t)?t:n.shallowRef(t),o=n.shallowRef(e(r.value)),i=function(a){r.value.send(a)};return n.watch(r,function(a,s,u){o.value=e(a);var l=a.subscribe({next:function(c){return o.value=c},error:El,complete:El}).unsubscribe;u(function(){return l()})},{immediate:!0}),{state:o,send:i}}const Vy=t=>{var e,r,o;return{...(o=(r=(e=xi(t))==null?void 0:e.formFields)==null?void 0:r.setupTotp)==null?void 0:o.QR}},ia=rd(()=>{const t=Ny(),e=Fc(t).start(),r=n.ref("configuring"),{state:o,send:i}=By(e),a=()=>{r.value="authenticated"},s=()=>{r.value="unauthenticated"},u=Md(e,(l,c)=>nc(l,c,{onSignIn:a,onSignOut:s}));return K.getCurrentUser().then(()=>{r.value="authenticated"}).catch(()=>{r.value="unauthenticated"}),n.onScopeDispose(()=>{u()}),{authStatus:r,service:e,send:i,state:o}}),ne=rd(()=>{const{authStatus:t,state:e,send:r}=ia(),o=n.reactive({});return n.watchEffect(()=>{const i=Dd({send:r,state:e.value});for(const s of Object.keys(i))o[s]=i[s];const a=i.route==="setupTotp"?Vy(e.value):null;o.QRFields=a,o.authStatus=t.value,o.send=r,o.state=e}),o});let zy=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),"");const Ct=n.defineComponent({__name:"base-input",emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=i=>{r("update:modelValue",i.target.value)};return(i,a)=>(n.openBlock(),n.createElementBlock("input",{onChange:a[0]||(a[0]=s=>o(s)),"data-amplify-input":""},null,32))}}),qy={},Ly={"data-amplify-label":""};function Gy(t,e){return n.openBlock(),n.createElementBlock("label",Ly,[n.renderSlot(t.$slots,"default")])}const bt=jt(qy,[["render",Gy]]),jy=["aria-label","aria-checked"],$y={inheritAttrs:!1},aa=n.defineComponent({...$y,__name:"password-control",props:{name:{},label:{},autocomplete:{default:"new-password"},hasError:{type:Boolean,default:!1},labelHidden:{type:Boolean},placeholder:{},required:{type:Boolean,default:!0},describedBy:{}},setup(t){const e=x("Show password"),r=x("Hide password"),o=n.ref("password"),i=n.ref(e),a=Math.floor(Math.random()*999999),s=t,{name:u,label:l,autocomplete:c,hasError:d,labelHidden:f,placeholder:p,required:m}=n.toRefs(s),v=n.ref("");function y(){i.value=i.value===e?r:e,o.value=o.value==="password"?"text":"password"}const S=x((p==null?void 0:p.value)??l.value),h=x(l.value);return(g,_)=>{const w=bt,P=Ct,b=re;return n.openBlock(),n.createBlock(b,{class:n.normalizeClass([n.unref(ie).Flex,n.unref(ie).Field,n.unref(ie).TextField,n.unref(ie).PasswordField])},{default:n.withCtx(()=>[n.createVNode(w,{class:n.normalizeClass(["amplify-label",{"amplify-visually-hidden":n.unref(f)}]),for:"amplify-field-"+n.unref(a)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(h)),1)]),_:1},8,["class","for"]),n.createVNode(b,{class:n.normalizeClass([n.unref(ie).Flex,n.unref(ie).FieldGroup])},{default:n.withCtx(()=>[n.createVNode(b,{class:n.normalizeClass(n.unref(ie).FieldGroupFieldWrapper)},{default:n.withCtx(()=>[n.createVNode(P,n.mergeProps(g.$attrs,{modelValue:v.value,"onUpdate:modelValue":_[0]||(_[0]=C=>v.value=C),class:[n.unref(ie).Input,n.unref(ie).FieldGroupControl],id:"amplify-field-"+n.unref(a),"data-amplify-password":"true",name:n.unref(u),autocomplete:n.unref(c),required:n.unref(m)??!0,placeholder:n.unref(S),type:o.value,"aria-invalid":n.unref(d),"aria-describedBy":t.describedBy,autocapitalize:"off"}),null,16,["modelValue","class","id","name","autocomplete","required","placeholder","type","aria-invalid","aria-describedBy"])]),_:1},8,["class"]),n.createVNode(b,{class:n.normalizeClass(n.unref(ie).FieldGroupOuterEnd)},{default:n.withCtx(()=>[n.createElementVNode("button",{"aria-label":i.value,"aria-checked":o.value!=="password",class:n.normalizeClass([n.unref(ie).Button,n.unref(ie).FieldGroupControl,n.unref(ie).FieldShowPassword]),"data-fullwidth":"false",type:"button",role:"switch",onClick:y},[o.value==="password"?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(ie).Icon)},[..._[1]||(_[1]=[n.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},null,-1)])],2)):(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:n.normalizeClass(n.unref(ie).Icon)},[..._[2]||(_[2]=[n.createElementVNode("path",{d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},null,-1)])],2))],10,jy)]),_:1},8,["class"])]),_:1},8,["class"])]),_:1},8,["class"])}}}),Wy=["value","selected"],Hy=n.defineComponent({__name:"base-select",props:{selectValue:{default:""},options:{}},emits:["update:selectValue"],setup(t,{emit:e}){const r=t,{options:o,selectValue:i}=n.toRefs(r),a=e,s=u=>{a("update:selectValue",u.target.value)};return(u,l)=>(n.openBlock(),n.createElementBlock("select",{onChange:l[0]||(l[0]=c=>s(c))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(o),(c,d)=>(n.openBlock(),n.createElementBlock("option",{key:d,value:c,selected:c==n.unref(i)?!0:void 0},n.toDisplayString(c),9,Wy))),128))],32))}}),Ky=n.defineComponent({__name:"alias-control",props:{label:{default:"Username"},name:{default:"username"},placeholder:{default:""},autocomplete:{default:""},labelHidden:{type:Boolean},required:{type:Boolean,default:!0},dialCode:{},dialCodeList:{},type:{default:"text"},hasError:{type:Boolean},describedBy:{}},setup(t){const e=t,{label:r,name:o,placeholder:i,autocomplete:a,labelHidden:s,required:u,dialCode:l,dialCodeList:c}=n.toRefs(e),d=Math.floor(Math.random()*999999),f=Math.floor(Math.random()*999999);return(p,m)=>{const v=bt,y=Hy,S=re,h=Ct;return n.openBlock(),n.createBlock(S,{class:"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield"},{default:n.withCtx(()=>[n.createVNode(v,n.mergeProps({for:"amplify-field-"+n.unref(d),class:["amplify-label",{"amplify-visually-hidden":n.unref(s)}]},p.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)),1)]),_:1},16,["for","class"]),n.createVNode(S,{class:"amplify-flex amplify-field-group"},{default:n.withCtx(()=>[n.createVNode(S,{class:"amplify-field-group__outer-start"},{default:n.withCtx(()=>[t.type==="tel"?(n.openBlock(),n.createBlock(S,{key:0,class:"amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect amplify-dialcodeselect amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(v,n.mergeProps({for:"amplify-field-"+n.unref(f),class:"amplify-label amplify-visually-hidden"},p.$attrs),{default:n.withCtx(()=>[...m[0]||(m[0]=[n.createTextVNode(n.toDisplayString("Country Code"),-1)])]),_:1},16,["for"]),n.createVNode(S,{class:"amplify-select__wrapper"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-select amplify-field-group__control",id:"amplify-field-"+n.unref(f),autocomplete:"tel-country-code","aria-label":"country code",name:"country_code",options:n.unref(c),"select-value":n.unref(l)},null,8,["id","options","select-value"]),n.createVNode(S,{class:"amplify-flex amplify-select__icon"},{default:n.withCtx(()=>[...m[1]||(m[1]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",class:"amplify-icon"},[n.createElementVNode("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})],-1)])]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(S,{class:"amplify-field-group__field-wrapper"},{default:n.withCtx(()=>[n.createVNode(h,{class:"amplify-input amplify-field-group__control",id:"amplify-field-"+n.unref(d),autocomplete:n.unref(a),name:n.unref(o),required:n.unref(u)??!0,type:t.type,placeholder:n.unref(i),"aria-invalid":t.hasError,"aria-describedBy":t.describedBy,autocapitalize:"off"},null,8,["id","autocomplete","name","required","type","placeholder","aria-invalid","aria-describedBy"])]),_:1})]),_:1})]),_:1})}}}),Yy=["id"],nd=n.defineComponent({__name:"base-form-field",props:{name:{default:""},formField:{default:()=>({})}},setup(t){const e=t,{name:r,formField:o}=n.toRefs(e),{validationErrors:i}=n.toRefs(ne()),{type:a}=o.value,s=a==="password",u=zy(12),l=n.computed(()=>Ld(i.value[r.value])),c=n.computed(()=>{var f;return((f=l.value)==null?void 0:f.length)>0}),d=n.computed(()=>c.value?u:void 0);return(f,p)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[s?(n.openBlock(),n.createBlock(aa,{key:0,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,hasError:c.value,describedBy:d.value},null,8,["name","label","placeholder","required","label-hidden","autocomplete","hasError","describedBy"])):(n.openBlock(),n.createBlock(Ky,{key:1,name:n.unref(r),label:n.unref(o).label,placeholder:n.unref(o).placeholder,required:n.unref(o).isRequired,"label-hidden":n.unref(o).labelHidden,autocomplete:n.unref(o).autocomplete,"dial-code":n.unref(o).dialCode,"dial-code-list":n.unref(o).dialCodeList,type:n.unref(o).type,hasError:c.value,describedBy:d.value},null,8,["name","label","placeholder","required","label-hidden","autocomplete","dial-code","dial-code-list","type","hasError","describedBy"])),c.value?(n.openBlock(),n.createElementBlock("div",{key:2,id:d.value},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,(m,v)=>(n.openBlock(),n.createElementBlock("p",{key:v,role:"alert","data-variation":"error",class:"amplify-text amplify-text--error"},n.toDisplayString(n.unref(x)(m)),1))),128))],8,Yy)):n.createCommentVNode("",!0)],64))}}),ge=n.defineComponent({__name:"base-form-fields",props:{route:{}},setup(t){const e=t,{route:r}=n.toRefs(e),{state:o}=ia();let i=[];return n.onBeforeMount(()=>{i=Xf(r.value,o.value)}),(a,s)=>(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(i),([u,l])=>(n.openBlock(),n.createBlock(nd,{name:u,key:u,formField:l},null,8,["name","formField"]))),128))}}),Mt=n.defineComponent({__name:"federated-sign-in-button",props:{provider:{}},setup(t){const e=t,{provider:r}=n.toRefs(e),{toFederatedSignIn:o}=ne(),i=()=>{o({provider:r.value})};return(a,s)=>{const u=oe;return n.openBlock(),n.createBlock(u,{class:"amplify-authenticator__federated-button",type:"button",onClick:i},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default")]),_:3})}}}),Jy={class:"amplify-text"},Zy={class:"amplify-text"},Qy={class:"amplify-text"},Xy={class:"amplify-text"},ev=["data-label"],sr=n.defineComponent({__name:"federated-sign-in",setup(t){const e=ne(),{route:r,socialProviders:o}=e,i=o==null?void 0:o.includes("amazon"),a=o==null?void 0:o.includes("apple"),s=o==null?void 0:o.includes("facebook"),u=o==null?void 0:o.includes("google"),l=s||u||i||a,{getSignInWithFederationText:c,getOrText:d}=ae,f=n.computed(()=>Ci),p=n.computed(()=>c(r,"amazon")),m=n.computed(()=>c(r,"apple")),v=n.computed(()=>c(r,"facebook")),y=n.computed(()=>c(r,"google")),S=n.computed(()=>d());return(h,g)=>{const _=re;return n.unref(l)?(n.openBlock(),n.createBlock(_,{key:0,class:"amplify-flex amplify-authenticator__federated-buttons"},{default:n.withCtx(()=>[n.unref(i)?(n.openBlock(),n.createBlock(Mt,{key:0,provider:f.value.Amazon},{default:n.withCtx(()=>[g[0]||(g[0]=n.createElementVNode("svg",{"aria-label":"Amazon icon",class:"amplify-icon",viewBox:"0 0 248 268"},[n.createElementVNode("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",fill:"#FF9900"})],-1)),n.createElementVNode("span",Jy,n.toDisplayString(p.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(a)?(n.openBlock(),n.createBlock(Mt,{key:1,provider:f.value.Apple},{default:n.withCtx(()=>[g[1]||(g[1]=n.createElementVNode("svg",{"aria-label":"Apple icon",class:"amplify-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})],-1)),n.createElementVNode("span",Zy,n.toDisplayString(m.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(s)?(n.openBlock(),n.createBlock(Mt,{key:2,provider:f.value.Facebook},{default:n.withCtx(()=>[g[2]||(g[2]=n.createElementVNode("svg",{"aria-label":"Facebook icon",class:"amplify-icon",viewBox:"0 0 279 538"},[n.createElementVNode("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"})],-1)),n.createElementVNode("span",Qy,n.toDisplayString(v.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.unref(u)?(n.openBlock(),n.createBlock(Mt,{key:3,provider:f.value.Google},{default:n.withCtx(()=>[g[3]||(g[3]=n.createElementVNode("svg",{"aria-label":"Google icon",class:"amplify-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},[n.createElementVNode("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),n.createElementVNode("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),n.createElementVNode("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),n.createElementVNode("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})],-1)),n.createElementVNode("span",Xy,n.toDisplayString(y.value),1)]),_:1},8,["provider"])):n.createCommentVNode("",!0),n.createElementVNode("hr",{class:"amplify-divider amplify-divider--horizontal amplify-divider--small","aria-orientation":"horizontal","data-label":S.value},null,8,ev)]),_:1})):n.createCommentVNode("",!0)}}}),tv={"data-amplify-footer":""},sa=n.defineComponent({__name:"sign-in",setup(t){const e=ne(),{submitForm:r,updateForm:o,toForgotPassword:i}=e,{error:a,isPending:s}=n.toRefs(e),{getForgotPasswordText:u,getSignInText:l,getSigningInText:c}=ae,d=n.computed(()=>u()),f=n.computed(()=>l()),p=n.computed(()=>c()),m=S=>{const{name:h,value:g}=S.target;o({name:h,value:g})},v=S=>{r(ce(S))},y=()=>{i()};return(S,h)=>{const g=fe,_=de,w=oe,P=re,b=le,C=ue;return n.renderSlot(S.$slots,"signInSlotI",n.normalizeProps(n.guardReactiveProps(S.$attrs)),()=>[n.renderSlot(S.$slots,"header"),n.createVNode(P,n.normalizeProps(n.guardReactiveProps(S.$attrs)),{default:n.withCtx(()=>[n.createVNode(b,{"data-amplify-authenticator-signin":"",onInput:m,onSubmit:n.withModifiers(v,["prevent"]),method:"post"},{formt:n.withCtx(({slotData:E})=>[n.renderSlot(S.$slots,"form",{info:E,onSignInSubmit:v,onInput:m,onForgotPasswordClicked:y})]),default:n.withCtx(()=>[n.createVNode(sr),n.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(g,{disabled:n.unref(s),class:"amplify-flex amplify-authenticator__column"},{fieldSetI:n.withCtx(({slotData:E})=>[n.renderSlot(S.$slots,"signin-fields",{info:E})]),default:n.withCtx(()=>[h[0]||(h[0]=n.createElementVNode("legend",{class:"amplify-visually-hidden"},"Sign in",-1)),n.createVNode(ge,{route:"signIn"})]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(_,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(w,{disabled:n.unref(s),class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)?p.value:f.value),1)]),_:1},8,["disabled"])]),_:3})]),_:3})]),_:3},16),n.createVNode(C,null,{default:n.withCtx(()=>[n.renderSlot(S.$slots,"footer",{},()=>[n.createElementVNode("div",tv,[n.createVNode(w,{onClick:y,class:"amplify-field-group__control amplify-authenticator__font",variation:"link",fullwidth:!0,size:"small",style:{"font-weight":"normal"},type:"button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(d.value),1)]),_:1})])])]),_:3})])}}}),ua=n.defineComponent({__name:"authenticator-sign-up-form-fields",setup(t){return(e,r)=>(n.openBlock(),n.createBlock(ge,{route:"signUp"}))}}),la=n.defineComponent({__name:"sign-up",setup(t){const e=ne(),{submitForm:r,updateBlur:o,updateForm:i}=e,{error:a,hasValidationErrors:s,isPending:u}=n.toRefs(e),{getCreateAccountText:l}=ae,c=n.computed(()=>l()),d=m=>{const{checked:v,name:y,type:S,value:h}=m.target;i({name:y,value:S==="checkbox"&&!v?void 0:h})};function f(m){const{name:v}=m.target;o({name:v})}const p=m=>{r(ce(m))};return(m,v)=>{const y=fe,S=de,h=oe,g=re,_=le,w=ue;return n.renderSlot(m.$slots,"signUpSlotI",n.normalizeProps(n.guardReactiveProps(m.$attrs)),()=>[n.renderSlot(m.$slots,"header"),n.createVNode(g,n.normalizeProps(n.guardReactiveProps(m.$attrs)),{default:n.withCtx(()=>[n.createVNode(_,{onInput:d,onBlurCapture:f,onSubmit:n.withModifiers(p,["prevent"])},{default:n.withCtx(()=>[n.createVNode(sr),n.createVNode(g,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(y,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(u)},{fieldSetI:n.withCtx(({slotData:P})=>[n.renderSlot(m.$slots,"signup-fields",{info:P})]),default:n.withCtx(()=>[n.createVNode(ua)]),_:3},8,["disabled"]),n.unref(a)?(n.openBlock(),n.createBlock(S,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(h,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!0,loading:!1,variation:"primary",style:{"border-radius":"0px","font-weight":"normal"},disabled:n.unref(u)||n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(c.value),1)]),_:1},8,["disabled"])]),_:3})]),_:3})]),_:3},16),n.createVNode(w,null,{default:n.withCtx(()=>[n.renderSlot(m.$slots,"footer")]),_:3})])}}}),rv={};function nv(t,e){const r=re;return n.openBlock(),n.createBlock(r,{tabindex:"0","aria-orientation":"horizontal","data-orientation":"horizontal",class:"amplify-authenticator__tabs amplify-tabs"},{default:n.withCtx(()=>[n.createVNode(r,{class:"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal amplify-authenticator__tabs-wrapper",role:"tablist"},{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3})]),_:3})}const ov=jt(rv,[["render",nv]]),iv=["tabindex","aria-selected","id","aria-controls"],av=n.defineComponent({__name:"base-two-tab-item",props:{label:{},id:{},active:{type:Boolean,default:!1}},setup(t){const e=t,{active:r,id:o,label:i}=n.toRefs(e);return(a,s)=>(n.openBlock(),n.createElementBlock("button",{tabindex:n.unref(r)?0:-1,"aria-selected":n.unref(r)?"true":"false",class:n.normalizeClass([{"amplify-tabs__item--active":n.unref(r)},"amplify-tabs__item"]),id:`${n.unref(o)}-tab`,"aria-controls":`${n.unref(o)}-panel`,role:"tab"},n.toDisplayString(n.unref(i)),11,iv))}}),sv="4.4.6",uv={};function lv(t,e){return n.renderSlot(t.$slots,"textI",n.normalizeProps(n.guardReactiveProps(t.$attrs)),()=>[n.createElementVNode("span",n.mergeProps(t.$attrs,{"data-amplify-text":""}),[n.renderSlot(t.$slots,"default")],16)])}const ca=jt(uv,[["render",lv]]),we=n.defineComponent({props:{level:{type:Number,default:1}},inheritAttrs:!1,setup(t,{slots:e,attrs:r}){var s,u;const o=e.default?e.default():[],i=e.headingI?e.headingI():[],a=`${r.class||""} amplify-heading--${t.level}`;if(((u=(s=i[0])==null?void 0:s.children)==null?void 0:u.length)===0)i[0].children=[n.h(`h${t.level}`,{...r,class:a},[o])];else return()=>n.h(`h${t.level}`,{"data-amplify-heading":"",...r,class:a},[i[0]?n.h(i[0].children[0]):n.h(o[0])]);return()=>i}}),da=n.defineComponent({__name:"confirm-sign-up",setup(t){const e=ne(),{codeDeliveryDetails:r,error:o,isPending:i}=n.toRefs(e),{resendCode:a,submitForm:s,updateForm:u}=e,{getDeliveryMethodText:l,getDeliveryMessageText:c,getResendCodeText:d,getConfirmText:f}=ae,p=n.computed(()=>l(r.value)),m=n.computed(()=>d()),v=n.computed(()=>f()),y=n.computed(()=>c(r.value)),S=w=>{const{name:P,value:b}=w.target;u({name:P,value:b})},h=w=>{g(w)},g=w=>{s(ce(w))},_=()=>{a()};return(w,P)=>{const b=we,C=ca,E=fe,T=de,I=oe,A=ue,k=re,N=le;return n.renderSlot(w.$slots,"confirmSignUpSlotI",n.normalizeProps(n.guardReactiveProps(w.$attrs)),()=>[n.createVNode(k,n.normalizeProps(n.guardReactiveProps(w.$attrs)),{default:n.withCtx(()=>[n.createVNode(N,{onInput:S,onSubmit:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createVNode(k,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.renderSlot(w.$slots,"header",{},()=>[n.createVNode(b,{class:"amplify-heading amplify-authenticator__heading",level:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.value),1)]),_:1})]),n.createVNode(C,{class:"amplify-authenticator__subtitle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(y.value),1)]),_:1}),n.createVNode(E,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignUp"})]),_:1},8,["disabled"]),n.createVNode(A,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(o)?(n.openBlock(),n.createBlock(T,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(o))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",type:"submit",disabled:n.unref(i)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value),1)]),_:1},8,["disabled"]),n.createVNode(I,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,variation:"default",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(_,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value),1)]),_:1}),n.renderSlot(w.$slots,"footer")]),_:3})]),_:3})]),_:3})]),_:3},16)])}}}),fa=n.defineComponent({__name:"confirm-sign-in",setup(t){const e=ne(),{submitForm:r,toSignIn:o,updateForm:i}=e,{error:a,isPending:s,challengeName:u}=n.toRefs(e),l=n.computed(()=>u.value),{getBackToSignInText:c,getConfirmText:d,getChallengeText:f}=ae,p=n.computed(()=>f(l.value)),m=n.computed(()=>c()),v=n.computed(()=>d()),y=g=>{const{name:_,value:w}=g.target;i({name:_,value:w})},S=g=>{r(ce(g))},h=()=>{o()};return(g,_)=>{const w=we,P=re,b=de,C=oe,E=ue,T=fe,I=le;return n.renderSlot(g.$slots,"confirmSignInSlotI",n.normalizeProps(n.guardReactiveProps(g.$attrs)),()=>[n.createVNode(P,n.normalizeProps(n.guardReactiveProps(g.$attrs)),{default:n.withCtx(()=>[n.createVNode(I,{"data-amplify-authenticator-confirmsignin":"",onInput:y,onSubmit:n.withModifiers(S,["prevent"])},{default:n.withCtx(()=>[n.createVNode(T,{class:"amplify-flex amplify-authenticator__column",disabled:n.unref(s)},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"header",{},()=>[n.createVNode(w,{level:3,class:"amplify-heading"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.value),1)]),_:1})]),n.createVNode(P,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.createVNode(ge,{route:"confirmSignIn"})]),_:1}),n.createVNode(E,{class:"amplify-flex amplify-authenticator__column"},{default:n.withCtx(()=>[n.unref(a)?(n.openBlock(),n.createBlock(b,{key:0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(x)(n.unref(a))),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,loading:!1,variation:"primary",style:{"font-weight":"normal"},disabled:n.unref(s)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value),1)]),_:1},8,["disabled"]),n.createVNode(C,{class:"amplify-field-group__control amplify-authenticator__font",fullwidth:!1,size:"small",variation:"link",style:{"font-weight":"normal"},type:"button",onClick:n.withModifiers(h,["prevent"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value),1)]),_:1}),n.renderSlot(g.$slots,"footer")]),_:3})]),_:3},8,["disabled"])]),_:3})]),_:3},16)])}}});var Ge={},Qo,Tl;function cv(){return Tl||(Tl=1,Qo=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Qo}var Xo={},Ne={},Il;function Be(){if(Il)return Ne;Il=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ne.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},Ne.getSymbolTotalCodewords=function(o){return e[o]},Ne.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},Ne.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},Ne.isKanjiModeEnabled=function(){return typeof t<"u"},Ne.toSJIS=function(o){return t(o)},Ne}var ei={},Pl;function pa(){return Pl||(Pl=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,i){if(t.isValid(o))return o;try{return e(o)}catch{return i}}})(ei)),ei}var ti,kl;function dv(){if(kl)return ti;kl=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const r=Math.floor(e/8);return(this.buffer[r]>>>7-e%8&1)===1},put:function(e,r){for(let o=0;o<r;o++)this.putBit((e>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),e&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ti=t,ti}var ri,Nl;function fv(){if(Nl)return ri;Nl=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,r,o,i){const a=e*this.size+r;this.data[a]=o,i&&(this.reservedBit[a]=!0)},t.prototype.get=function(e,r){return this.data[e*this.size+r]},t.prototype.xor=function(e,r,o){this.data[e*this.size+r]^=o},t.prototype.isReserved=function(e,r){return this.reservedBit[e*this.size+r]},ri=t,ri}var ni={},Ml;function pv(){return Ml||(Ml=1,(function(t){const e=Be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,a=e(o),s=a===145?26:Math.ceil((a-13)/(2*i-2))*2,u=[a-7];for(let l=1;l<i-1;l++)u[l]=u[l-1]-s;return u.push(6),u.reverse()},t.getPositions=function(o){const i=[],a=t.getRowColCoords(o),s=a.length;for(let u=0;u<s;u++)for(let l=0;l<s;l++)u===0&&l===0||u===0&&l===s-1||u===s-1&&l===0||i.push([a[u],a[l]]);return i}})(ni)),ni}var oi={},Rl;function mv(){if(Rl)return oi;Rl=1;const t=Be().getSymbolSize,e=7;return oi.getPositions=function(o){const i=t(o);return[[0,0],[i-e,0],[0,i-e]]},oi}var ii={},xl;function hv(){return xl||(xl=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const a=i.size;let s=0,u=0,l=0,c=null,d=null;for(let f=0;f<a;f++){u=l=0,c=d=null;for(let p=0;p<a;p++){let m=i.get(f,p);m===c?u++:(u>=5&&(s+=e.N1+(u-5)),c=m,u=1),m=i.get(p,f),m===d?l++:(l>=5&&(s+=e.N1+(l-5)),d=m,l=1)}u>=5&&(s+=e.N1+(u-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(i){const a=i.size;let s=0;for(let u=0;u<a-1;u++)for(let l=0;l<a-1;l++){const c=i.get(u,l)+i.get(u,l+1)+i.get(u+1,l)+i.get(u+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(i){const a=i.size;let s=0,u=0,l=0;for(let c=0;c<a;c++){u=l=0;for(let d=0;d<a;d++)u=u<<1&2047|i.get(c,d),d>=10&&(u===1488||u===93)&&s++,l=l<<1&2047|i.get(d,c),d>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(i){let a=0;const s=i.data.length;for(let l=0;l<s;l++)a+=i.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*e.N4};function r(o,i,a){switch(o){case t.Patterns.PATTERN000:return(i+a)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(i+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return i*a%2+i*a%3===0;case t.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case t.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(i,a){const s=a.size;for(let u=0;u<s;u++)for(let l=0;l<s;l++)a.isReserved(l,u)||a.xor(l,u,r(i,l,u))},t.getBestMask=function(i,a){const s=Object.keys(t.Patterns).length;let u=0,l=1/0;for(let c=0;c<s;c++){a(c),t.applyMask(c,i);const d=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(c,i),d<l&&(l=d,u=c)}return u}})(ii)),ii}var Rt={},Ul;function od(){if(Ul)return Rt;Ul=1;const t=pa(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Rt.getBlocksCount=function(i,a){switch(a){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},Rt.getTotalCodewordsCount=function(i,a){switch(a){case t.L:return r[(i-1)*4+0];case t.M:return r[(i-1)*4+1];case t.Q:return r[(i-1)*4+2];case t.H:return r[(i-1)*4+3];default:return}},Rt}var ai={},nt={},Fl;function gv(){if(Fl)return nt;Fl=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let o=1;for(let i=0;i<255;i++)t[i]=o,e[o]=i,o<<=1,o&256&&(o^=285);for(let i=255;i<512;i++)t[i]=t[i-255]})(),nt.log=function(o){if(o<1)throw new Error("log("+o+")");return e[o]},nt.exp=function(o){return t[o]},nt.mul=function(o,i){return o===0||i===0?0:t[e[o]+e[i]]},nt}var Ol;function yv(){return Ol||(Ol=1,(function(t){const e=gv();t.mul=function(o,i){const a=new Uint8Array(o.length+i.length-1);for(let s=0;s<o.length;s++)for(let u=0;u<i.length;u++)a[s+u]^=e.mul(o[s],i[u]);return a},t.mod=function(o,i){let a=new Uint8Array(o);for(;a.length-i.length>=0;){const s=a[0];for(let l=0;l<i.length;l++)a[l]^=e.mul(i[l],s);let u=0;for(;u<a.length&&a[u]===0;)u++;a=a.slice(u)}return a},t.generateECPolynomial=function(o){let i=new Uint8Array([1]);for(let a=0;a<o;a++)i=t.mul(i,new Uint8Array([1,e.exp(a)]));return i}})(ai)),ai}var si,Dl;function vv(){if(Dl)return si;Dl=1;const t=yv();function e(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(o){this.degree=o,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(o.length+this.degree);i.set(o);const a=t.mod(i,this.genPoly),s=this.degree-a.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(a,s),u}return a},si=e,si}var ui={},li={},ci={},Bl;function id(){return Bl||(Bl=1,ci.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),ci}var ve={},Vl;function ad(){if(Vl)return ve;Vl=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
21
21
  ]))+`;ve.KANJI=new RegExp(r,"g"),ve.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ve.BYTE=new RegExp(o,"g"),ve.NUMERIC=new RegExp(t,"g"),ve.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ve.testKanji=function(l){return i.test(l)},ve.testNumeric=function(l){return a.test(l)},ve.testAlphanumeric=function(l){return s.test(l)},ve}var zl;function Ve(){return zl||(zl=1,(function(t){const e=id(),r=ad();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},t.getBestModeForData=function(a){return r.testNumeric(a)?t.NUMERIC:r.testAlphanumeric(a)?t.ALPHANUMERIC:r.testKanji(a)?t.KANJI:t.BYTE},t.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},t.isValid=function(a){return a&&a.bit&&a.ccBits};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(a,s){if(t.isValid(a))return a;try{return o(a)}catch{return s}}})(li)),li}var ql;function _v(){return ql||(ql=1,(function(t){const e=Be(),r=od(),o=pa(),i=Ve(),a=id(),s=7973,u=e.getBCHDigit(s);function l(p,m,v){for(let y=1;y<=40;y++)if(m<=t.getCapacity(y,v,p))return y}function c(p,m){return i.getCharCountIndicator(p,m)+4}function d(p,m){let v=0;return p.forEach(function(y){const S=c(y.mode,m);v+=S+y.getBitsLength()}),v}function f(p,m){for(let v=1;v<=40;v++)if(d(p,v)<=t.getCapacity(v,m,i.MIXED))return v}t.from=function(m,v){return a.isValid(m)?parseInt(m,10):v},t.getCapacity=function(m,v,y){if(!a.isValid(m))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=i.BYTE);const S=e.getSymbolTotalCodewords(m),h=r.getTotalCodewordsCount(m,v),g=(S-h)*8;if(y===i.MIXED)return g;const _=g-c(y,m);switch(y){case i.NUMERIC:return Math.floor(_/10*3);case i.ALPHANUMERIC:return Math.floor(_/11*2);case i.KANJI:return Math.floor(_/13);case i.BYTE:default:return Math.floor(_/8)}},t.getBestVersionForData=function(m,v){let y;const S=o.from(v,o.M);if(Array.isArray(m)){if(m.length>1)return f(m,S);if(m.length===0)return 1;y=m[0]}else y=m;return l(y.mode,y.getLength(),S)},t.getEncodedBits=function(m){if(!a.isValid(m)||m<7)throw new Error("Invalid QR Code version");let v=m<<12;for(;e.getBCHDigit(v)-u>=0;)v^=s<<e.getBCHDigit(v)-u;return m<<12|v}})(ui)),ui}var di={},Ll;function Sv(){if(Ll)return di;Ll=1;const t=Be(),e=1335,r=21522,o=t.getBCHDigit(e);return di.getEncodedBits=function(a,s){const u=a.bit<<3|s;let l=u<<10;for(;t.getBCHDigit(l)-o>=0;)l^=e<<t.getBCHDigit(l)-o;return(u<<10|l)^r},di}var fi={},pi,Gl;function wv(){if(Gl)return pi;Gl=1;const t=Ve();function e(r){this.mode=t.NUMERIC,this.data=r.toString()}return e.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(o){let i,a,s;for(i=0;i+3<=this.data.length;i+=3)a=this.data.substr(i,3),s=parseInt(a,10),o.put(s,10);const u=this.data.length-i;u>0&&(a=this.data.substr(i),s=parseInt(a,10),o.put(s,u*3+1))},pi=e,pi}var mi,jl;function Cv(){if(jl)return mi;jl=1;const t=Ve(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(o){this.mode=t.ALPHANUMERIC,this.data=o}return r.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(i){let a;for(a=0;a+2<=this.data.length;a+=2){let s=e.indexOf(this.data[a])*45;s+=e.indexOf(this.data[a+1]),i.put(s,11)}this.data.length%2&&i.put(e.indexOf(this.data[a]),6)},mi=r,mi}var hi,$l;function bv(){return $l||($l=1,hi=function(e){for(var r=[],o=e.length,i=0;i<o;i++){var a=e.charCodeAt(i);if(a>=55296&&a<=56319&&o>i+1){var s=e.charCodeAt(i+1);s>=56320&&s<=57343&&(a=(a-55296)*1024+s-56320+65536,i+=1)}if(a<128){r.push(a);continue}if(a<2048){r.push(a>>6|192),r.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){r.push(a>>12|224),r.push(a>>6&63|128),r.push(a&63|128);continue}if(a>=65536&&a<=1114111){r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(a&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}),hi}var gi,Wl;function Av(){if(Wl)return gi;Wl=1;const t=bv(),e=Ve();function r(o){this.mode=e.BYTE,this.data=new Uint8Array(t(o))}return r.getBitsLength=function(i){return i*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){for(let i=0,a=this.data.length;i<a;i++)o.put(this.data[i],8)},gi=r,gi}var yi,Hl;function Ev(){if(Hl)return yi;Hl=1;const t=Ve(),e=Be();function r(o){this.mode=t.KANJI,this.data=o}return r.getBitsLength=function(i){return i*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let i;for(i=0;i<this.data.length;i++){let a=e.toSJIS(this.data[i]);if(a>=33088&&a<=40956)a-=33088;else if(a>=57408&&a<=60351)a-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
22
22
  Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),o.put(a,13)}},yi=r,yi}var vi={exports:{}},Kl;function Tv(){return Kl||(Kl=1,(function(t){var e={single_source_shortest_paths:function(r,o,i){var a={},s={};s[o]=0;var u=e.PriorityQueue.make();u.push(o,0);for(var l,c,d,f,p,m,v,y,S;!u.empty();){l=u.pop(),c=l.value,f=l.cost,p=r[c]||{};for(d in p)p.hasOwnProperty(d)&&(m=p[d],v=f+m,y=s[d],S=typeof s[d]>"u",(S||y>v)&&(s[d]=v,u.push(d,v),a[d]=c))}if(typeof i<"u"&&typeof s[i]>"u"){var h=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(h)}return a},extract_shortest_path_from_predecessor_list:function(r,o){for(var i=[],a=o;a;)i.push(a),r[a],a=r[a];return i.reverse(),i},find_path:function(r,o,i){var a=e.single_source_shortest_paths(r,o,i);return e.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(r){var o=e.PriorityQueue,i={},a;r=r||{};for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);return i.queue=[],i.sorter=r.sorter||o.default_sorter,i},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var i={value:r,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(vi)),vi.exports}var Yl;function Iv(){return Yl||(Yl=1,(function(t){const e=Ve(),r=wv(),o=Cv(),i=Av(),a=Ev(),s=ad(),u=Be(),l=Tv();function c(h){return unescape(encodeURIComponent(h)).length}function d(h,g,_){const w=[];let P;for(;(P=h.exec(_))!==null;)w.push({data:P[0],index:P.index,mode:g,length:P[0].length});return w}function f(h){const g=d(s.NUMERIC,e.NUMERIC,h),_=d(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let w,P;return u.isKanjiModeEnabled()?(w=d(s.BYTE,e.BYTE,h),P=d(s.KANJI,e.KANJI,h)):(w=d(s.BYTE_KANJI,e.BYTE,h),P=[]),g.concat(_,w,P).sort(function(C,E){return C.index-E.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function p(h,g){switch(g){case e.NUMERIC:return r.getBitsLength(h);case e.ALPHANUMERIC:return o.getBitsLength(h);case e.KANJI:return a.getBitsLength(h);case e.BYTE:return i.getBitsLength(h)}}function m(h){return h.reduce(function(g,_){const w=g.length-1>=0?g[g.length-1]:null;return w&&w.mode===_.mode?(g[g.length-1].data+=_.data,g):(g.push(_),g)},[])}function v(h){const g=[];for(let _=0;_<h.length;_++){const w=h[_];switch(w.mode){case e.NUMERIC:g.push([w,{data:w.data,mode:e.ALPHANUMERIC,length:w.length},{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.ALPHANUMERIC:g.push([w,{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.KANJI:g.push([w,{data:w.data,mode:e.BYTE,length:c(w.data)}]);break;case e.BYTE:g.push([{data:w.data,mode:e.BYTE,length:c(w.data)}])}}return g}function y(h,g){const _={},w={start:{}};let P=["start"];for(let b=0;b<h.length;b++){const C=h[b],E=[];for(let T=0;T<C.length;T++){const I=C[T],A=""+b+T;E.push(A),_[A]={node:I,lastCount:0},w[A]={};for(let k=0;k<P.length;k++){const N=P[k];_[N]&&_[N].node.mode===I.mode?(w[N][A]=p(_[N].lastCount+I.length,I.mode)-p(_[N].lastCount,I.mode),_[N].lastCount+=I.length):(_[N]&&(_[N].lastCount=I.length),w[N][A]=p(I.length,I.mode)+4+e.getCharCountIndicator(I.mode,g))}}P=E}for(let b=0;b<P.length;b++)w[P[b]].end=0;return{map:w,table:_}}function S(h,g){let _;const w=e.getBestModeForData(h);if(_=e.from(g,w),_!==e.BYTE&&_.bit<w.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(_)+`.
23
23
  Suggested mode is: `+e.toString(w));switch(_===e.KANJI&&!u.isKanjiModeEnabled()&&(_=e.BYTE),_){case e.NUMERIC:return new r(h);case e.ALPHANUMERIC:return new o(h);case e.KANJI:return new a(h);case e.BYTE:return new i(h)}}t.fromArray=function(g){return g.reduce(function(_,w){return typeof w=="string"?_.push(S(w,null)):w.data&&_.push(S(w.data,w.mode)),_},[])},t.fromString=function(g,_){const w=f(g,u.isKanjiModeEnabled()),P=v(w),b=y(P,_),C=l.find_path(b.map,"start","end"),E=[];for(let T=1;T<C.length-1;T++)E.push(b.table[C[T]].node);return t.fromArray(m(E))},t.rawSplit=function(g){return t.fromArray(f(g,u.isKanjiModeEnabled()))}})(fi)),fi}var Jl;function Pv(){if(Jl)return Xo;Jl=1;const t=Be(),e=pa(),r=dv(),o=fv(),i=pv(),a=mv(),s=hv(),u=od(),l=vv(),c=_v(),d=Sv(),f=Ve(),p=Iv();function m(b,C){const E=b.size,T=a.getPositions(C);for(let I=0;I<T.length;I++){const A=T[I][0],k=T[I][1];for(let N=-1;N<=7;N++)if(!(A+N<=-1||E<=A+N))for(let R=-1;R<=7;R++)k+R<=-1||E<=k+R||(N>=0&&N<=6&&(R===0||R===6)||R>=0&&R<=6&&(N===0||N===6)||N>=2&&N<=4&&R>=2&&R<=4?b.set(A+N,k+R,!0,!0):b.set(A+N,k+R,!1,!0))}}function v(b){const C=b.size;for(let E=8;E<C-8;E++){const T=E%2===0;b.set(E,6,T,!0),b.set(6,E,T,!0)}}function y(b,C){const E=i.getPositions(C);for(let T=0;T<E.length;T++){const I=E[T][0],A=E[T][1];for(let k=-2;k<=2;k++)for(let N=-2;N<=2;N++)k===-2||k===2||N===-2||N===2||k===0&&N===0?b.set(I+k,A+N,!0,!0):b.set(I+k,A+N,!1,!0)}}function S(b,C){const E=b.size,T=c.getEncodedBits(C);let I,A,k;for(let N=0;N<18;N++)I=Math.floor(N/3),A=N%3+E-8-3,k=(T>>N&1)===1,b.set(I,A,k,!0),b.set(A,I,k,!0)}function h(b,C,E){const T=b.size,I=d.getEncodedBits(C,E);let A,k;for(A=0;A<15;A++)k=(I>>A&1)===1,A<6?b.set(A,8,k,!0):A<8?b.set(A+1,8,k,!0):b.set(T-15+A,8,k,!0),A<8?b.set(8,T-A-1,k,!0):A<9?b.set(8,15-A-1+1,k,!0):b.set(8,15-A-1,k,!0);b.set(T-8,8,1,!0)}function g(b,C){const E=b.size;let T=-1,I=E-1,A=7,k=0;for(let N=E-1;N>0;N-=2)for(N===6&&N--;;){for(let R=0;R<2;R++)if(!b.isReserved(I,N-R)){let L=!1;k<C.length&&(L=(C[k]>>>A&1)===1),b.set(I,N-R,L),A--,A===-1&&(k++,A=7)}if(I+=T,I<0||E<=I){I-=T,T=-T;break}}}function _(b,C,E){const T=new r;E.forEach(function(R){T.put(R.mode.bit,4),T.put(R.getLength(),f.getCharCountIndicator(R.mode,b)),R.write(T)});const I=t.getSymbolTotalCodewords(b),A=u.getTotalCodewordsCount(b,C),k=(I-A)*8;for(T.getLengthInBits()+4<=k&&T.put(0,4);T.getLengthInBits()%8!==0;)T.putBit(0);const N=(k-T.getLengthInBits())/8;for(let R=0;R<N;R++)T.put(R%2?17:236,8);return w(T,b,C)}function w(b,C,E){const T=t.getSymbolTotalCodewords(C),I=u.getTotalCodewordsCount(C,E),A=T-I,k=u.getBlocksCount(C,E),N=T%k,R=k-N,L=Math.floor(T/k),H=Math.floor(A/k),Y=H+1,J=L-H,Z=new l(J);let ye=0;const X=new Array(k),Pe=new Array(k);let xe=0;const U=new Uint8Array(b.buffer);for(let ke=0;ke<k;ke++){const Qe=ke<R?H:Y;X[ke]=U.slice(ye,ye+Qe),Pe[ke]=Z.encode(X[ke]),ye+=Qe,xe=Math.max(xe,Qe)}const pe=new Uint8Array(T);let Ze=0,me,se;for(me=0;me<xe;me++)for(se=0;se<k;se++)me<X[se].length&&(pe[Ze++]=X[se][me]);for(me=0;me<J;me++)for(se=0;se<k;se++)pe[Ze++]=Pe[se][me];return pe}function P(b,C,E,T){let I;if(Array.isArray(b))I=p.fromArray(b);else if(typeof b=="string"){let L=C;if(!L){const H=p.rawSplit(b);L=c.getBestVersionForData(H,E)}I=p.fromString(b,L||40)}else throw new Error("Invalid data");const A=c.getBestVersionForData(I,E);if(!A)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=A;else if(C<A)throw new Error(`
package/dist/index.js CHANGED
@@ -9369,7 +9369,10 @@ function Pv(t) {
9369
9369
  src: "handleGetCurrentUser",
9370
9370
  onDone: { actions: "setUser", target: "setup" },
9371
9371
  onError: { target: "setup" }
9372
- }
9372
+ },
9373
+ // handle a sign out occurring while `handleGetCurrentUser` is in flight,
9374
+ // exiting cancels the invoke so a stale user cannot be applied
9375
+ on: { SIGN_OUT: "#authenticator.signOut" }
9373
9376
  },
9374
9377
  setup: {
9375
9378
  initial: "initConfig",
@@ -9414,7 +9417,8 @@ function Pv(t) {
9414
9417
  target: "#authenticator.authenticated"
9415
9418
  },
9416
9419
  onError: { target: "#authenticator.setup" }
9417
- }
9420
+ },
9421
+ on: { SIGN_OUT: "#authenticator.signOut" }
9418
9422
  },
9419
9423
  signInActor: {
9420
9424
  initial: "spawnActor",
@@ -9568,6 +9572,14 @@ function Pv(t) {
9568
9572
  }
9569
9573
  },
9570
9574
  on: {
9575
+ // `SIGN_OUT` handled by `setup.initConfig` moves the machine past setup without
9576
+ // the UI ever sending `INIT`, leaving it configured with defaults. Accept `INIT`
9577
+ // late so a subsequently rendered UI can still apply its `config` and `services`.
9578
+ INIT: {
9579
+ cond: "shouldInitialize",
9580
+ actions: "configure",
9581
+ target: "#authenticator.setup.getConfig"
9582
+ },
9571
9583
  SIGN_IN_WITH_REDIRECT: { target: "#authenticator.getCurrentUser" },
9572
9584
  CHANGE: { actions: "forwardToActor" },
9573
9585
  BLUR: { actions: "forwardToActor" },
@@ -9645,7 +9657,8 @@ function Pv(t) {
9645
9657
  const { services: a, ...s } = Pf(r) ? o.data ?? {} : r;
9646
9658
  return {
9647
9659
  services: { ...et, ...a },
9648
- config: s
9660
+ config: s,
9661
+ hasInitialized: !0
9649
9662
  };
9650
9663
  }),
9651
9664
  setHasSetup: Be({ hasSetup: !0 })
@@ -9656,6 +9669,9 @@ function Pv(t) {
9656
9669
  isInitialStateSignUp: ({ config: i }) => i.initialState === "signUp",
9657
9670
  isInitialStateResetPassword: ({ config: i }) => i.initialState === "forgotPassword",
9658
9671
  shouldSetup: ({ hasSetup: i }) => !i,
9672
+ // `hasSetup` prevents the late `INIT` from interrupting `idle`, which must
9673
+ // resolve `handleGetCurrentUser` before the machine leaves it
9674
+ shouldInitialize: ({ hasSetup: i, hasInitialized: o }) => i && !o,
9659
9675
  hasUser: ({ user: i }) => !!i
9660
9676
  },
9661
9677
  services: {
@@ -10805,7 +10821,7 @@ const r_ = /* @__PURE__ */ hr(e_, [["render", t_]]), n_ = ["tabindex", "aria-sel
10805
10821
  role: "tab"
10806
10822
  }, q(v(i)), 11, n_));
10807
10823
  }
10808
- }), o_ = "4.4.5", a_ = {};
10824
+ }), o_ = "4.4.6", a_ = {};
10809
10825
  function s_(t, e) {
10810
10826
  return U(t.$slots, "textI", ne(ie(t.$attrs)), () => [
10811
10827
  G("span", Ee(t.$attrs, { "data-amplify-text": "" }), [
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.4.5";
1
+ export declare const VERSION = "4.4.6";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-vue",
3
- "version": "4.4.5",
3
+ "version": "4.4.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -38,10 +38,10 @@
38
38
  "typecheck": "vue-tsc --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@aws-amplify/ui": "6.15.5",
41
+ "@aws-amplify/ui": "6.15.6",
42
42
  "@vueuse/core": "7.5.5",
43
43
  "@xstate/vue": "0.8.1",
44
- "nanoid": "3.3.8",
44
+ "nanoid": "3.3.18",
45
45
  "qrcode": "1.5.0",
46
46
  "xstate": "^4.33.6"
47
47
  },