From 79b622ab61ed3309de3cbfc4a1f095df9c942e78 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Tue, 12 Sep 2023 08:41:11 +0000 Subject: [PATCH] deploy: c11c205ae42c9fb2bcc979bce70493b1f0203dc8 --- ...tlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js} | 2 +- assets/{index-252c9f2d.js => index-d6de182a.js} | 2 +- index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/{dotlottie-state-machine-manager-ZRIRTQK3-CAKXEFIF-791a2fc5.js => dotlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js} (99%) rename assets/{index-252c9f2d.js => index-d6de182a.js} (99%) diff --git a/assets/dotlottie-state-machine-manager-ZRIRTQK3-CAKXEFIF-791a2fc5.js b/assets/dotlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js similarity index 99% rename from assets/dotlottie-state-machine-manager-ZRIRTQK3-CAKXEFIF-791a2fc5.js rename to assets/dotlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js index 737db5a4..81c5dc42 100644 --- a/assets/dotlottie-state-machine-manager-ZRIRTQK3-CAKXEFIF-791a2fc5.js +++ b/assets/dotlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js @@ -1,4 +1,4 @@ -var Ee=Object.defineProperty;var Oe=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var X=(e,t,n)=>(Oe(e,typeof t!="symbol"?t+"":t,n),n);import{y as It,B as Ht,U as ke,G as Te}from"./index-252c9f2d.js";var v=function(){return v=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),r,o=[],a;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function V(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i"u"||typeof i=="string"||rt(i)?{target:i,event:e}:v(v({},i),{event:e})});return n}function qe(e){if(!(e===void 0||e===Le))return $(e)}function de(e,t,n,i,r){var o=e.options.guards,a={state:r,cond:t,_event:i};if(t.type===Rt)return((o==null?void 0:o[t.name])||t.predicate)(n,i.data,a);var s=o==null?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,i.data,a)}function ve(e){return typeof e=="string"?{type:e}:e}function wt(e,t,n){var i=function(){},r=typeof e=="object",o=r?e:null;return{next:((r?e.next:e)||i).bind(o),error:((r?e.error:t)||i).bind(o),complete:((r?e.complete:n)||i).bind(o)}}function mt(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Ut(e){return(e.type===yt||e.type===jt&&e.to===it.Internal)&&typeof e.delay!="number"}var nt=R({type:Pe});function zt(e,t){return t&&t[e]||void 0}function vt(e,t){var n;if(j(e)||typeof e=="number"){var i=zt(e,t);T(i)?n={type:e,exec:i}:i?n=i:n={type:e,exec:void 0}}else if(T(e))n={type:e.name||e.toString(),exec:e};else{var i=zt(e.type,t);if(T(i))n=v(v({},e),{exec:i});else if(i){var r=i.type||e.type;n=v(v(v({},i),e),{type:r})}else n=e}return n}var G=function(e,t){if(!e)return[];var n=ot(e)?e:[e];return n.map(function(i){return vt(i,t)})};function Qt(e){var t=vt(e);return v(v({id:j(e)?e:t.id},t),{type:t.type})}function Fe(e,t){return{type:yt,event:typeof e=="function"?e:Nt(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function Xe(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(j(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;return v(v({},e),{type:yt,_event:o,delay:a})}function Qe(e,t){return{to:t?t.to:void 0,type:jt,event:T(e)?e:Nt(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:T(e)?e.name:ue(e)}}function Ge(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(j(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;var c=T(e.to)?e.to(t,n.data,r):e.to;return v(v({},e),{to:c,_event:o,event:o.data,delay:a})}var We=function(e,t,n){return v(v({},e),{value:j(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},He=function(e){return{type:re,sendId:e}};function Ye(e){var t=Qt(e);return{type:N.Start,activity:t,exec:void 0}}function Ze(e){var t=T(e)?e:Qt(e);return{type:N.Stop,activity:t,exec:void 0}}function Ke(e,t,n){var i=T(e.activity)?e.activity(t,n.data):e.activity,r=typeof i=="string"?{id:i}:i,o={type:N.Stop,activity:r};return o}function tn(e,t){var n=t?"#".concat(t):"";return"".concat(N.After,"(").concat(e,")").concat(n)}function xt(e,t){var n="".concat(N.DoneState,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function Et(e,t){var n="".concat(N.DoneInvoke,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function ut(e,t){var n="".concat(N.ErrorPlatform,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}var en=function(e){var t,n,i=[];try{for(var r=E(e),o=r.next();!o.done;o=r.next())for(var a=o.value,s=0;s0;){var u=r.shift();n=e.transition(n,u,c),i.forEach(function(f){return f.next(n)})}o=!1}},s=an({id:t.id,send:function(u){r.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,f,d){var h=wt(u,f,d);return i.add(h),h.next(n),{unsubscribe:function(){i.delete(h)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:i};return n=e.start?e.start(c):n,s}var gn={sync:!1,autoForward:!1},C;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(C||(C={}));var mn=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var i=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=C.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(ot(f))return i.batch(f),i.state;var h=R(Nt(f,d));if(i.status===C.Stopped)return i.state;if(i.status!==C.Running&&!i.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(i.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options. +var Ee=Object.defineProperty;var Oe=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var X=(e,t,n)=>(Oe(e,typeof t!="symbol"?t+"":t,n),n);import{y as It,B as Ht,U as ke,G as Te}from"./index-d6de182a.js";var v=function(){return v=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),r,o=[],a;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function V(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i"u"||typeof i=="string"||rt(i)?{target:i,event:e}:v(v({},i),{event:e})});return n}function qe(e){if(!(e===void 0||e===Le))return $(e)}function de(e,t,n,i,r){var o=e.options.guards,a={state:r,cond:t,_event:i};if(t.type===Rt)return((o==null?void 0:o[t.name])||t.predicate)(n,i.data,a);var s=o==null?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,i.data,a)}function ve(e){return typeof e=="string"?{type:e}:e}function wt(e,t,n){var i=function(){},r=typeof e=="object",o=r?e:null;return{next:((r?e.next:e)||i).bind(o),error:((r?e.error:t)||i).bind(o),complete:((r?e.complete:n)||i).bind(o)}}function mt(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Ut(e){return(e.type===yt||e.type===jt&&e.to===it.Internal)&&typeof e.delay!="number"}var nt=R({type:Pe});function zt(e,t){return t&&t[e]||void 0}function vt(e,t){var n;if(j(e)||typeof e=="number"){var i=zt(e,t);T(i)?n={type:e,exec:i}:i?n=i:n={type:e,exec:void 0}}else if(T(e))n={type:e.name||e.toString(),exec:e};else{var i=zt(e.type,t);if(T(i))n=v(v({},e),{exec:i});else if(i){var r=i.type||e.type;n=v(v(v({},i),e),{type:r})}else n=e}return n}var G=function(e,t){if(!e)return[];var n=ot(e)?e:[e];return n.map(function(i){return vt(i,t)})};function Qt(e){var t=vt(e);return v(v({id:j(e)?e:t.id},t),{type:t.type})}function Fe(e,t){return{type:yt,event:typeof e=="function"?e:Nt(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function Xe(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(j(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;return v(v({},e),{type:yt,_event:o,delay:a})}function Qe(e,t){return{to:t?t.to:void 0,type:jt,event:T(e)?e:Nt(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:T(e)?e.name:ue(e)}}function Ge(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(j(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;var c=T(e.to)?e.to(t,n.data,r):e.to;return v(v({},e),{to:c,_event:o,event:o.data,delay:a})}var We=function(e,t,n){return v(v({},e),{value:j(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},He=function(e){return{type:re,sendId:e}};function Ye(e){var t=Qt(e);return{type:N.Start,activity:t,exec:void 0}}function Ze(e){var t=T(e)?e:Qt(e);return{type:N.Stop,activity:t,exec:void 0}}function Ke(e,t,n){var i=T(e.activity)?e.activity(t,n.data):e.activity,r=typeof i=="string"?{id:i}:i,o={type:N.Stop,activity:r};return o}function tn(e,t){var n=t?"#".concat(t):"";return"".concat(N.After,"(").concat(e,")").concat(n)}function xt(e,t){var n="".concat(N.DoneState,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function Et(e,t){var n="".concat(N.DoneInvoke,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function ut(e,t){var n="".concat(N.ErrorPlatform,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}var en=function(e){var t,n,i=[];try{for(var r=E(e),o=r.next();!o.done;o=r.next())for(var a=o.value,s=0;s0;){var u=r.shift();n=e.transition(n,u,c),i.forEach(function(f){return f.next(n)})}o=!1}},s=an({id:t.id,send:function(u){r.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,f,d){var h=wt(u,f,d);return i.add(h),h.next(n),{unsubscribe:function(){i.delete(h)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:i};return n=e.start?e.start(c):n,s}var gn={sync:!1,autoForward:!1},C;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(C||(C={}));var mn=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var i=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=C.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(ot(f))return i.batch(f),i.state;var h=R(Nt(f,d));if(i.status===C.Stopped)return i.state;if(i.status!==C.Running&&!i.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(i.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options. Event: `).concat(JSON.stringify(h.data)));return i.scheduler.schedule(function(){i.forward(h);var l=i._nextState(h);i.update(l,h)}),i._state},this.sendTo=function(f,d,h){var l=i.parent&&(d===it.Parent||i.parent.id===d),y=l?i.parent:j(d)?d===it.Internal?i:i.children.get(d)||st.get(d):$e(d)?d:void 0;if(!y){if(!l)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(i.id,"'."));return}if("machine"in y){if(i.status!==C.Stopped||i.parent!==y||i.state.done){var p=v(v({},f),{name:f.name===je?"".concat(ut(i.id)):f.name,origin:i.sessionId});!h&&i.machine.config.predictableActionArguments?i._outgoingQueue.push([y,p]):y.send(p)}}else!h&&i.machine.config.predictableActionArguments?i._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,h,l){l===void 0&&(l=i.machine.options.actions);var y=f.exec||zt(f.type,l),p=T(y)?y:y?y.exec:f.exec;if(p)try{return p(d,h.data,i.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:i.state,_event:h})}catch(U){throw i.parent&&i.parent.send({type:"xstate.error",data:U}),U}switch(f.type){case yt:{var _=f;i.defer(_);break}case jt:var g=f;if(typeof g.delay=="number"){i.defer(g);return}else g.to?i.sendTo(g._event,g.to,h===nt):i.send(g._event);break;case re:i.cancel(f.sendId);break;case Mt:{if(i.status!==C.Running)return;var m=f.activity;if(!i.machine.config.predictableActionArguments&&!i.state.activities[m.id||m.type])break;if(m.type===N.Invoke){var x=ve(m.src),b=i.machine.options.services?i.machine.options.services[x.type]:void 0,A=m.id,L=m.data,k="autoForward"in m?m.autoForward:!!m.forward;if(!b)return;var I=L?Tt(L,d,h):void 0;if(typeof b=="string")return;var w=T(b)?b(d,h.data,{data:I,src:x,meta:m.meta}):b;if(!w)return;var M=void 0;rt(w)&&(w=I?w.withContext(I):w,M={autoForward:k}),i.spawn(w,A,M)}else i.spawnActivity(m);break}case Ft:{i.stopChild(f.activity.id);break}case ae:var S=f,P=S.label,B=S.value;P?i.logger(P,B):i.logger(B);break}};var r=v(v({},e.defaultOptions),n),o=r.clock,a=r.logger,s=r.parent,c=r.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=o,this.parent=s,this.options=r,this.scheduler=new ie({deferEvents:this.options.deferEvents}),this.sessionId=st.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:et(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var i,r;try{for(var o=E(t.actions),a=o.next();!a.done;a=o.next()){var s=a.value;this.exec(s,t,n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}},e.prototype.update=function(t,n){var i,r,o,a,s,c,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===nt)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(w){d.state.children[w.id]=w}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var l=E(this.eventListeners),y=l.next();!y.done;y=l.next()){var p=y.value;p(t.event)}}catch(w){i={error:w}}finally{try{y&&!y.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}try{for(var _=E(this.listeners),g=_.next();!g.done;g=_.next()){var p=g.value;p(t,t.event)}}catch(w){o={error:w}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}try{for(var m=E(this.contextListeners),x=m.next();!x.done;x=m.next()){var b=x.value;b(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(w){s={error:w}}finally{try{x&&!x.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}if(this.state.done){var A=t.configuration.find(function(w){return w.type==="final"&&w.parent===d.machine}),L=A&&A.doneData?Tt(A.doneData,t.context,n):void 0;this._doneEvent=Et(this.id,L);try{for(var k=E(this.doneListeners),I=k.next();!I.done;I=k.next()){var p=I.value;p(this._doneEvent)}}catch(w){u={error:w}}finally{try{I&&!I.done&&(f=k.return)&&f.call(k)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),st.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===C.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,i){var r=this,o=wt(t,n,i);this.listeners.add(o.next),this.status!==C.NotStarted&&o.next(this.state);var a=function(){r.doneListeners.delete(a),r.stopListeners.delete(a),o.complete()};return this.status===C.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(a),r.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===C.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===C.Running)return this;this.machine._init(),st.register(this.sessionId,this),this.initialized=!0,this.status=C.Running;var i=t===void 0?this.initialState:et(this,function(){return hn(t)?n.machine.resolveState(t):n.machine.resolveState(F.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(i,nt)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){T(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,i,r,o,a,s,c,u,f;try{for(var d=E(this.listeners),h=d.next();!h.done;h=d.next()){var l=h.value;this.listeners.delete(l)}}catch(k){t={error:k}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var y=E(this.stopListeners),p=y.next();!p.done;p=y.next()){var l=p.value;l(),this.stopListeners.delete(l)}}catch(k){i={error:k}}finally{try{p&&!p.done&&(r=y.return)&&r.call(y)}finally{if(i)throw i.error}}try{for(var _=E(this.contextListeners),g=_.next();!g.done;g=_.next()){var l=g.value;this.contextListeners.delete(l)}}catch(k){o={error:k}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}try{for(var m=E(this.doneListeners),x=m.next();!x.done;x=m.next()){var l=x.value;this.doneListeners.delete(l)}}catch(k){s={error:k}}finally{try{x&&!x.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=C.Stopped,this._initialState=void 0;try{for(var b=E(Object.keys(this.delayedEventsMap)),A=b.next();!A.done;A=b.next()){var L=A.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(k){u={error:k}}finally{try{A&&!A.done&&(f=b.return)&&f.call(b)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new ie({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var i=R({type:"xstate.stop"}),r=et(t,function(){var o=D(V([],O(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return G(f.onExit,t.machine.options.actions)})),a=O(At(t.machine,t.state,t.state.context,i,[{type:"exit",actions:o}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new F({value:t.state.value,context:c,_event:i,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!Ut(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(r,i),t._stopChildren(),st.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===C.NotStarted&&this.options.deferEvents)&&this.status!==C.Running)throw new Error("".concat(t.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(t.length){var i=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var r,o,a=n.state,s=!1,c=[],u=function(l){var y=R(l);n.forward(y),a=et(n,function(){return n.machine.transition(a,y,void 0,i||void 0)}),c.push.apply(c,V([],O(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(p){return fn(p,a)})),!1)),s=s||!!a.changed};try{for(var f=E(t),d=f.next();!d.done;d=f.next()){var h=d.value;u(h)}}catch(l){r={error:l}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}a.changed=s,a.actions=c,n.update(a,R(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var i=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var r=R(t);if(r.name.indexOf(Yt)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Yt)===0}))throw r.data.data;var o=et(this,function(){return i.machine.transition(i.state,r,void 0,n||void 0)});return o},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,i;try{for(var r=E(this.forwardTo),o=r.next();!o.done;o=r.next()){var a=o.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,i=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=i)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,i){i===void 0&&(i=this.machine.options.actions),this._exec(t,n.context,n._event,i)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),T(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,i){if(this.status!==C.Running)return ye(t,n);if(te(t))return this.spawnPromise(Promise.resolve(t),n);if(T(t))return this.spawnCallback(t,n);if(on(t))return this.spawnActor(t,n);if(Je(t))return this.spawnObservable(t,n);if(rt(t))return this.spawnMachine(t,v(v({},i),{id:n}));if(Re(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var i=this;n===void 0&&(n={});var r=new e(t,v(v({},this.options),{parent:this,id:n.id||t.id})),o=v(v({},gn),n);o.sync&&r.onTransition(function(s){i.send(se,{state:s,id:r.id})});var a=r;return this.children.set(r.id,a),o.autoForward&&this.forwardTo.add(r.id),r.onDone(function(s){i.removeChild(r.id),i.send(R(s,{origin:r.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var i=yn(t,{id:n,parent:this});return this.children.set(n,i),i},e.prototype.spawnPromise=function(t,n){var i,r=this,o=!1,a;t.then(function(c){o||(a=c,r.removeChild(n),r.send(R(Et(n,c),{origin:n})))},function(c){if(!o){r.removeChild(n);var u=ut(n,c);try{r.send(R(u,{origin:n}))}catch{r.devTools&&r.devTools.send(u,r.state),r.machine.strict&&r.stop()}}});var s=(i={id:n,send:function(){},subscribe:function(c,u,f){var d=wt(c,u,f),h=!1;return t.then(function(l){h||(d.next(l),!h&&d.complete())},function(l){h||d.error(l)}),{unsubscribe:function(){return h=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},i[Q]=function(){return this},i);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var i,r=this,o=!1,a=new Set,s=new Set,c,u=function(h){c=h,s.forEach(function(l){return l(h)}),!o&&r.send(R(h,{origin:n}))},f;try{f=t(u,function(h){a.add(h)})}catch(h){this.send(ut(n,h))}if(te(f))return this.spawnPromise(f,n);var d=(i={id:n,send:function(h){return a.forEach(function(l){return l(h)})},subscribe:function(h){var l=wt(h);return s.add(l.next),{unsubscribe:function(){s.delete(l.next)}}},stop:function(){o=!0,T(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},i[Q]=function(){return this},i);return this.children.set(n,d),d},e.prototype.spawnObservable=function(t,n){var i,r=this,o,a=t.subscribe(function(c){o=c,r.send(R(c,{origin:n}))},function(c){r.removeChild(n),r.send(R(ut(n,c),{origin:n}))},function(){r.removeChild(n),r.send(R(Et(n),{origin:n}))}),s=(i={id:n,send:function(){},subscribe:function(c,u,f){return t.subscribe(c,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},i[Q]=function(){return this},i);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(n){var i=n(this.state.context,t);this.spawnEffect(t.id,i)}},e.prototype.spawnEffect=function(t,n){var i;this.children.set(t,(i={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},i[Q]=function(){return this},i))},e.prototype.attachDev=function(){var t=Gt();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(v(v({name:this.id,autoPause:!0,stateSanitizer:function(i){return{value:i.value,context:i.context,actions:i.actions}}},n),{features:v({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}pn(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Q]=function(){return this},e.prototype.getSnapshot=function(){return this.status===C.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Se,e}();function Se(e,t){var n=new mn(e,t);return n}function xn(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function _t(e){return v(v({type:Ct},e),{toJSON:function(){e.onDone,e.onError;var t=qt(e,["onDone","onError"]);return v(v({},t),{type:Ct,src:xn(e.src)})}})}var St="",$t="#",Dt="*",K={},tt=function(e){return e[0]===$t},_n=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Sn=function(){function e(t,n,i,r){i===void 0&&(i="context"in t?t.context:void 0);var o=this,a;this.config=t,this._context=i,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(_n(),n),this.parent=r==null?void 0:r.parent,this.key=this.config.key||(r==null?void 0:r.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:ce),this.id=this.config.id||V([this.machine.key],O(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:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?ct(this.config.states,function(u,f){var d,h=new e(u,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,v((d={},d[h.id]=h,d),h.idMap)),h}):K;var s=0;function c(u){var f,d;u.order=s++;try{for(var h=E(ge(u)),l=h.next();!l.done;l=h.next()){var y=l.value;c(y)}}catch(p){f={error:p}}finally{try{l&&!l.done&&(d=h.return)&&d.call(h)}finally{if(f)throw f.error}}}c(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(u){var f=u.event;return f===St}):St in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=$(this.config.entry||this.config.onEntry).map(function(u){return vt(u)}),this.onExit=$(this.config.exit||this.config.onExit).map(function(u){return vt(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=$(this.config.invoke).map(function(u,f){var d,h;if(rt(u)){var l=mt(o.id,f);return o.machine.options.services=v((d={},d[l]=u,d),o.machine.options.services),_t({src:l,id:l})}else if(j(u.src)){var l=u.id||mt(o.id,f);return _t(v(v({},u),{id:l,src:u.src}))}else if(rt(u.src)||T(u.src)){var l=u.id||mt(o.id,f);return o.machine.options.services=v((h={},h[l]=u.src,h),o.machine.options.services),_t(v(v({id:l},u),{src:l}))}else{var y=u.src;return _t(v(v({id:mt(o.id,f)},u),{src:y}))}}),this.activities=$(this.config.activities).concat(this.invoke).map(function(u){return Qt(u)}),this.transition=this.transition.bind(this),this.tags=$(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||me(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var i=this.options,r=i.actions,o=i.activities,a=i.guards,s=i.services,c=i.delays;return new e(this.config,{actions:v(v({},r),t.actions),activities:v(v({},o),t.activities),guards:v(v({},a),t.guards),services:v(v({},s),t.services),delays:v(v({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return T(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.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:ct(this.states,function(t){return t.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}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,i){return n[i.eventType]=n[i.eventType]||[],n[i.eventType].push(i),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===St,i=this.transitions.filter(function(r){var o=r.eventType===t;return n?o:o||r.eventType===Dt});return this.__cache.candidates[t]=i,i},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var i=function(o,a){var s=T(o)?"".concat(t.id,":delay[").concat(a,"]"):o,c=tn(s,t.id);return t.onEntry.push(Qe(c,{delay:o})),t.onExit.push(He(c)),c},r=ot(n)?n.map(function(o,a){var s=i(o.delay,a);return v(v({},o),{event:s})}):D(Object.keys(n).map(function(o,a){var s=n[o],c=j(s)?{target:s}:s,u=isNaN(+o)?o:+o,f=i(u,a);return $(c).map(function(d){return v(v({},d),{event:f,delay:u})})}));return r.map(function(o){var a=o.delay;return v(v({},t.formatTransition(o)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,i=this;if(!t)return[];var r=t instanceof F?t.value:dt(t,this.delimiter);if(j(r)){var o=this.getStateNode(r).initial;return o!==void 0?this.getStateNodes((n={},n[r]=o,n)):[this,this.states[r]]}var a=Object.keys(r),s=[this];return s.push.apply(s,V([],O(D(a.map(function(c){return i.getStateNode(c).getStateNodes(r[c])}))),!1)),s},e.prototype.handles=function(t){var n=ue(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof F?t:F.create(t),i=Array.from(ht([],this.getStateNodes(n.value)));return new F(v(v({},n),{value:this.resolve(n.value),configuration:i,done:Ot(i,this),tags:ne(i),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,i){var r=this.getStateNode(t),o=r.next(n,i);return!o||!o.transitions.length?this.next(n,i):o},e.prototype.transitionCompoundNode=function(t,n,i){var r=Object.keys(t),o=this.getStateNode(r[0]),a=o._transition(t[r[0]],n,i);return!a||!a.transitions.length?this.next(n,i):a},e.prototype.transitionParallelNode=function(t,n,i){var r,o,a={};try{for(var s=E(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,f=t[u];if(f){var d=this.getStateNode(u),h=d._transition(f,n,i);h&&(a[u]=h)}}}catch(g){r={error:g}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var l=Object.keys(a).map(function(g){return a[g]}),y=D(l.map(function(g){return g.transitions})),p=l.some(function(g){return g.transitions.length>0});if(!p)return this.next(n,i);var _=D(Object.keys(a).map(function(g){return a[g].configuration}));return{transitions:y,exitSet:D(l.map(function(g){return g.exitSet})),configuration:_,source:n,actions:D(Object.keys(a).map(function(g){return a[g].actions}))}},e.prototype._transition=function(t,n,i){return j(t)?this.transitionLeafNode(t,n,i):Object.keys(t).length===1?this.transitionCompoundNode(t,n,i):this.transitionParallelNode(t,n,i)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,R(n))},e.prototype.next=function(t,n){var i,r,o=this,a=n.name,s=[],c=[],u;try{for(var f=E(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var h=d.value,l=h.cond,y=h.in,p=t.context,_=y?j(y)&&tt(y)?t.matches(dt(this.getStateNodeById(y).path,this.delimiter)):Xt(dt(y,this.delimiter),De(this.path.slice(0,-2))(t.value)):!0,g=!1;try{g=!l||de(this.machine,l,p,n,t)}catch(b){throw new Error("Unable to evaluate guard '".concat(l.name||l.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`': `).concat(b.message))}if(g&&_){h.target!==void 0&&(c=h.target),s.push.apply(s,V([],O(h.actions),!1)),u=h;break}}}catch(b){i={error:b}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var m=D(c.map(function(b){return o.getRelativeStateNodes(b,t.historyValue)})),x=!!u.internal;return{transitions:[u],exitSet:x?[]:D(c.map(function(b){return o.getPotentiallyReenteringNodes(b)})),configuration:m,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order0,l=h?t.configuration:n?n.configuration:[],y=Ot(l,this),p=h?sn(this.machine,d):void 0,_=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,g=this.getActions(new Set(l),y,t,i,o,n,r),m=n?v({},n.activities):{};try{for(var x=E(g),b=x.next();!b.done;b=x.next()){var A=b.value;try{for(var L=(c=void 0,E(A.actions)),k=L.next();!k.done;k=L.next()){var I=k.value;I.type===Mt?m[I.activity.id||I.activity.type]=I:I.type===Ft&&(m[I.activity.id||I.activity.type]=!1)}}catch(J){c={error:J}}finally{try{k&&!k.done&&(u=L.return)&&u.call(L)}finally{if(c)throw c.error}}}}catch(J){a={error:J}}finally{try{b&&!b.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}var w=O(At(this,n,i,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=w[0],S=w[1],P=O(Be(M,Ut),2),B=P[0],U=P[1],at=M.filter(function(J){var Y;return J.type===Mt&&((Y=J.activity)===null||Y===void 0?void 0:Y.type)===Ct}),gt=at.reduce(function(J,Y){return J[Y.activity.id]=nn(Y.activity,f.machine,S,o),J},n?v({},n.children):{}),q=new F({value:p||n.value,context:S,_event:o,_sessionid:n?n._sessionid:null,historyValue:p?_?Ue(_,p):void 0:n?n.historyValue:void 0,history:!p||t.source?n:void 0,actions:p?U:[],activities:p?m:n?n.activities:{},events:[],configuration:l,transitions:t.transitions,children:gt,done:y,tags:ne(l),machine:this}),W=i!==S;q.changed=o.name===se||W;var H=q.history;H&&delete H.history;var Wt=!y&&(this._transient||d.some(function(J){return J._transient}));if(!h&&(!Wt||o.name===St))return q;var z=q;if(!y)for(Wt&&(z=this.resolveRaisedTransition(z,{type:Ae},o,r));B.length;){var be=B.shift();z=this.resolveRaisedTransition(z,be._event,o,r)}var we=z.changed||(H?!!z.actions.length||W||typeof H.value!=typeof z.value||!_e(z.value,H.value):void 0);return z.changed=we,z.history=H,z},e.prototype.getStateNode=function(t){if(tt(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=tt(t)?t.slice($t.length):t;if(n===this.id)return this;var i=this.machine.idMap[n];if(!i)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return i},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&tt(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=Bt(t,this.delimiter).slice(),i=this;n.length;){var r=n.shift();if(!r.length)break;i=i.getStateNode(r)}return i},e.prototype.resolve=function(t){var n,i=this;if(!t)return this.initialStateValue||K;switch(this.type){case"parallel":return ct(this.initialStateValue,function(o,a){return o?i.getStateNode(a).resolve(t[a]||o):K});case"compound":if(j(t)){var r=this.getStateNode(t);return r.type==="parallel"||r.type==="compound"?(n={},n[t]=r.initialStateValue,n):t}return Object.keys(t).length?ct(t,function(o,a){return o?i.getStateNode(a).resolve(o):K}):this.initialStateValue||{};default:return t||K}},e.prototype.getResolvedPath=function(t){if(tt(t)){var n=this.machine.idMap[t.slice($t.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Bt(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Kt(this.states,function(i){return i.initialStateValue||K},function(i){return i.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,"'"));n=Pt(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var i=this.getStateNodes(t);return this.resolveTransition({configuration:i,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;j(n.target)?t=tt(n.target)?kt(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,i){return i===void 0&&(i=!0),i?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Pt(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=bt(this.initialStateValue);return D(n.map(function(i){return t.getFromRelativePath(i)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=O(t),i=n[0],r=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(i,"' from node with no states"));var o=this.getStateNode(i);if(o.type==="history")return o.resolveHistory();if(!this.states[i])throw new Error("Child state '".concat(i,"' does not exist on '").concat(this.id,"'"));return this.states[i].getFromRelativePath(r)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Kt(this.states,function(n,i){if(!t)return n.historyValue();var r=j(t)?void 0:t[i];return n.historyValue(r||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var i=this.parent;if(!t){var r=this.target;return r?D(bt(r).map(function(a){return i.getFromRelativePath(a)})):i.initialStateNodes}var o=Me(i.path,"states")(t).current;return j(o)?[i.getStateNode(o)]:D(bt(o).map(function(a){return n.history==="deep"?i.getFromRelativePath(a):[i.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=D(Object.keys(this.states).map(function(i){return t.states[i].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,i,r;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var s=E(Object.keys(o)),c=s.next();!c.done;c=s.next()){var u=c.value,f=o[u];if(f.states)try{for(var d=(i=void 0,E(f.events)),h=d.next();!h.done;h=d.next()){var l=h.value;a.add("".concat(l))}}catch(y){i={error:y}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}}}catch(y){t={error:y}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(i){if(!j(i))return i;var r=i[0]===n.delimiter;if(r&&!n.parent)return n.getStateNodeByPath(i.slice(1));var o=r?n.key+i:i;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`': `).concat(s.message))}else return n.getStateNodeByPath(o)})},e.prototype.formatTransition=function(t){var n=this,i=qe(t.target),r="internal"in t?t.internal:i?i.some(function(c){return j(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(i),s=v(v({},t),{actions:G($(t.actions)),cond:le(t.cond,o),target:a,source:this,internal:r,eventType:t.event,toJSON:function(){return v(v({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,i=this,r;if(!this.config.on)r=[];else if(Array.isArray(this.config.on))r=this.config.on;else{var o=this.config.on,a=Dt,s=o[a],c=s===void 0?[]:s,u=qt(o,[typeof a=="symbol"?a:a+""]);r=D(Object.keys(u).map(function(m){var x=Z(m,u[m]);return x}).concat(Z(Dt,c)))}var f=this.config.always?Z("",this.config.always):[],d=this.config.onDone?Z(String(xt(this.id)),this.config.onDone):[],h=D(this.invoke.map(function(m){var x=[];return m.onDone&&x.push.apply(x,V([],O(Z(String(Et(m.id)),m.onDone)),!1)),m.onError&&x.push.apply(x,V([],O(Z(String(ut(m.id)),m.onError)),!1)),x})),l=this.after,y=D(V(V(V(V([],O(d),!1),O(h),!1),O(r),!1),O(f),!1).map(function(m){return $(m).map(function(x){return i.formatTransition(x)})}));try{for(var p=E(l),_=p.next();!_.done;_=p.next()){var g=_.value;y.push(g)}}catch(m){t={error:m}}finally{try{_&&!_.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return y},e}();function bn(e,t){return new Sn(e,t)}var lt={click:"onClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",complete:"onComplete",after:"onAfter",enter:"onEnter",show:"onShow"},wn=Object.keys(lt),kn=class{constructor(e,t){X(this,"activeStateId","");X(this,"_service");X(this,"_domListeners",new Map);X(this,"_domElement");X(this,"_playerListeners",new Map);X(this,"_player");X(this,"_machineSchemas",new Map);X(this,"_onShowPrevValue",0);this._player=t,this._machineSchemas=this._transformToXStateSchema(e),this._domElement=t.container}start(e){this.stop();let t=this._machineSchemas.get(e);if(typeof t>"u")throw It(`invalid state machine id ${e}`);this._service=Se(bn(t)),this._addEventListeners(),this._service.start()}stop(){var e;this._removeEventListeners(),(e=this._service)==null||e.stop(),this._player.stop()}_removeEventListeners(){var e;this._requiresDomElement();for(let[t,n]of this._domListeners)t==="visibilityChange"&&this._player.stopPlayOnShow(),(e=this._domElement)==null||e.removeEventListener(t,n),this._domListeners.delete(t);for(let[t,n]of this._playerListeners)this._player.removeEventListener(t,n),this._playerListeners.delete(t)}_addEventListeners(){this._requiresDomElement();let e=n=>{this._service.send({type:n})},t=n=>{function i(){e(n)}return i};this._service.subscribe(n=>{var i;if(typeof n.changed>"u"||n.changed){this._removeEventListeners();for(let r of n.nextEvents)if(wn.filter(o=>o!=="complete"&&o!=="show").includes(r)){let o=t(r);this._domListeners.set(r,o),(i=this._domElement)==null||i.addEventListener(r,o,{once:!0})}else if(r==="complete"){let o=t(r);this._player.addEventListener(r,o),this._playerListeners.set(r,o)}else if(r==="show"){let o=t(r);this._player.addIntersectionObserver({callbackOnIntersect:a=>{a>0&&(a!==100&&this._onShowPrevValue!==a&&o(),this._onShowPrevValue=a)},threshold:[]}),this._domListeners.set("visibilityChange",o)}}})}subscribe(e){throw It(e.toString())}_transformToXStateSchema(e){let t=new Map;for(let n of e){let i={},r={};if(r.id=n.descriptor.id,typeof n.descriptor.initial<"u"&&(r.initial=n.descriptor.initial),typeof n<"u"){let o=n.states;for(let a in o)if(typeof o[a]<"u"&&o[a]){let s=o[a],c=s.playbackSettings,u=Object.keys(s).filter(h=>h.startsWith("on")),f={},d={};for(let h of u)if(typeof s[h]<"u"){let l=s[h];if(h===lt.after){let y=l;d[y.ms]={target:(l==null?void 0:l.state)??""}}else h===lt.enter?f[Ht(lt,h)]={target:(l==null?void 0:l.state)??""}:f[Ht(lt,h)]={target:(l==null?void 0:l.state)??""}}i[a]={entry:()=>{!this._player.getAnimationInstance()||s.animationId&&s.animationId!==this._player.currentAnimationId?this._player.play(s.animationId,()=>({...ke,...c})).then(()=>{this._updatePlaybackSettings(c)}).catch(h=>{Te(`State machine error: ${h.message}`)}):this._updatePlaybackSettings(c)},exit:()=>{typeof c.segments<"u"&&this._player.resetSegments(!1),typeof c.playOnScroll<"u"&&this._player.stopPlayOnScroll()},on:f,after:d,meta:c}}}r.states=i,t.set(r.id,r)}return t}_handlePlaySegments(e){if(typeof e.segments=="string")this._player.goToAndPlay(e.segments,!0);else{let[t,n]=e.segments,i=t;t!==0&&t===n&&(i=t-1),t===0&&t===n?this._player.goToAndPlay(t,!0):this._player.playSegments([i,n],!0)}}_handlePlayOnScroll(e){let t=e.playOnScroll;if(e.segments&&typeof e.segments!="string"){let n=e.segments;this._player.playOnScroll({threshold:t,segments:n})}else this._player.playOnScroll({threshold:t})}_updatePlaybackSettings(e){if(!this._player.getAnimationInstance())throw new Error("Unable to update playbackSettings. Animations is not rendered yet.");typeof e.autoplay<"u"&&(this._player.setAutoplay(e.autoplay),e.autoplay?this._player.play():this._player.pause()),typeof e.direction<"u"&&this._player.setDirection(e.direction),typeof e.intermission<"u"&&this._player.setIntermission(e.intermission),typeof e.loop<"u"&&this._player.setLoop(e.loop),typeof e.playMode<"u"&&this._player.setMode(e.playMode),typeof e.speed<"u"&&this._player.setSpeed(e.speed),typeof e.defaultTheme<"u"&&this._player.setDefaultTheme(e.defaultTheme),typeof e.playOnScroll<"u"&&this._handlePlayOnScroll(e),e.segments&&this._handlePlaySegments(e),e.autoplay||this._player.pause()}_requiresDomElement(){if(!this._domElement)throw It("Requires a DOM element to attach events.")}};/*! Bundled license information: diff --git a/assets/index-252c9f2d.js b/assets/index-d6de182a.js similarity index 99% rename from assets/index-252c9f2d.js rename to assets/index-d6de182a.js index 622f4971..826bce72 100644 --- a/assets/index-252c9f2d.js +++ b/assets/index-d6de182a.js @@ -87,4 +87,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E2(e){return W6(e)||q6(e)||b2(e)||K6()}function G6(e){if(e.sheet)return e.sheet;for(var t=0;t0?Je(to,--Et):0,Wi--,Ne===10&&(Wi=1,Iu--),Ne}function Mt(){return Ne=Et2||da(Ne)>3?"":" "}function s5(e,t){for(;--t&&Mt()&&!(Ne<48||Ne>102||Ne>57&&Ne<65||Ne>70&&Ne<97););return Oa(e,Ls()+(t<6&&In()==32&&Mt()==32))}function vd(e){for(;Mt();)switch(Ne){case e:return Et;case 34:case 39:e!==34&&e!==39&&vd(Ne);break;case 40:e===41&&vd(e);break;case 92:Mt();break}return Et}function l5(e,t){for(;Mt()&&e+Ne!==47+10;)if(e+Ne===42+42&&In()===47)break;return"/*"+Oa(t,Et-1)+"*"+Pu(e===47?e:Mt())}function u5(e){for(;!da(In());)Mt();return Oa(e,Et)}function c5(e){return A2(Ds("",null,null,null,[""],e=k2(e),0,[0],e))}function Ds(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,d=0,h=0,y=0,v=1,w=1,p=1,m=0,g="",S=i,E=o,_=r,x=g;w;)switch(y=m,m=Mt()){case 40:if(y!=108&&Je(x,f-1)==58){md(x+=le(Ts(m),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:x+=Ts(m);break;case 9:case 10:case 13:case 32:x+=a5(y);break;case 92:x+=s5(Ls()-1,7);continue;case 47:switch(In()){case 42:case 47:as(f5(l5(Mt(),Ls()),t,n),l);break;default:x+="/"}break;case 123*v:s[u++]=Sn(x)*p;case 125*v:case 59:case 0:switch(m){case 0:case 125:w=0;case 59+c:p==-1&&(x=le(x,/\f/g,"")),h>0&&Sn(x)-f&&as(h>32?$v(x+";",r,n,f-1):$v(le(x," ","")+";",r,n,f-2),l);break;case 59:x+=";";default:if(as(_=Dv(x,t,n,u,c,i,s,g,S=[],E=[],f),o),m===123)if(c===0)Ds(x,t,_,_,S,o,f,s,E);else switch(d===99&&Je(x,3)===110?100:d){case 100:case 108:case 109:case 115:Ds(e,_,_,r&&as(Dv(e,_,_,0,0,i,s,g,i,S=[],f),E),i,E,f,s,r?S:E);break;default:Ds(x,_,_,_,[""],E,0,s,E)}}u=c=h=0,v=p=1,g=x="",f=a;break;case 58:f=1+Sn(x),h=y;default:if(v<1){if(m==123)--v;else if(m==125&&v++==0&&o5()==125)continue}switch(x+=Pu(m),m*v){case 38:p=c>0?1:(x+="\f",-1);break;case 44:s[u++]=(Sn(x)-1)*p,p=1;break;case 64:In()===45&&(x+=Ts(Mt())),d=In(),c=f=Sn(g=x+=u5(Ls())),m++;break;case 45:y===45&&Sn(x)==2&&(v=0)}}return o}function Dv(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,d=i===0?o:[""],h=Qp(d),y=0,v=0,w=0;y0?d[p]+" "+m:le(m,/&\f/g,d[p])))&&(l[w++]=g);return Mu(e,t,n,i===0?Kp:s,l,u,c)}function f5(e,t,n){return Mu(e,t,n,_2,Pu(i5()),fa(e,2,-2),0)}function $v(e,t,n,r){return Mu(e,t,n,Gp,fa(e,0,r),fa(e,r+1,-1),r)}function Mi(e,t){for(var n="",r=Qp(e),i=0;i6)switch(Je(e,t+1)){case 109:if(Je(e,t+4)!==45)break;case 102:return le(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Al+(Je(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~md(e,"stretch")?P2(le(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Je(e,t+1)!==115)break;case 6444:switch(Je(e,Sn(e)-3-(~md(e,"!important")&&10))){case 107:return le(e,":",":"+ae)+e;case 101:return le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Je(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+it+"$2box$3")+e}break;case 5936:switch(Je(e,t+11)){case 114:return ae+e+it+le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+it+le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+it+le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ae+e+it+e+e}return e}var b5=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Gp:t.return=P2(t.value,t.length);break;case x2:return Mi([po(t,{value:le(t.value,"@","@"+ae)})],i);case Kp:if(t.length)return r5(t.props,function(o){switch(n5(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mi([po(t,{props:[le(o,/:(read-\w+)/,":"+Al+"$1")]})],i);case"::placeholder":return Mi([po(t,{props:[le(o,/:(plac\w+)/,":"+ae+"input-$1")]}),po(t,{props:[le(o,/:(plac\w+)/,":"+Al+"$1")]}),po(t,{props:[le(o,/:(plac\w+)/,it+"input-$1")]})],i)}return""})}},E5=[b5],_5=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var w=v.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||E5,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var w=v.getAttribute("data-emotion").split(" "),p=1;p=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var A5={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},P5=/[A-Z]|^ms/g,I5=/_EMO_([^_]+?)_([^]*?)_EMO_/g,M2=function(t){return t.charCodeAt(1)===45},Fv=function(t){return t!=null&&typeof t!="boolean"},Rc=m5(function(e){return M2(e)?e:e.replace(P5,"-$&").toLowerCase()}),Rv=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(I5,function(r,i,o){return bn={name:i,styles:o,next:bn},i})}return A5[t]!==1&&!M2(t)&&typeof n=="number"&&n!==0?n+"px":n};function pa(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return bn={name:n.name,styles:n.styles,next:bn},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)bn={name:r.name,styles:r.styles,next:bn},r=r.next;var i=n.styles+";";return i}return M5(e,t,n)}case"function":{if(e!==void 0){var o=bn,a=n(e);return bn=o,pa(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function M5(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i({x:e,y:e});function W5(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function D2(e){return j2(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $2(e){var t;return(t=(j2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function j2(e){return e instanceof Node||e instanceof fn(e).Node}function yd(e){return e instanceof Element||e instanceof fn(e).Element}function Xp(e){return e instanceof HTMLElement||e instanceof fn(e).HTMLElement}function zv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function F2(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Zp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function q5(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function K5(e){return["html","body","#document"].includes(D2(e))}function Zp(e){return fn(e).getComputedStyle(e)}function G5(e){if(D2(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zv(e)&&e.host||$2(e);return zv(t)?t.host:t}function R2(e){const t=G5(e);return K5(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xp(t)&&F2(t)?t:R2(t)}function wd(e,t){var n;t===void 0&&(t=[]);const r=R2(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=fn(r);return i?t.concat(o,o.visualViewport||[],F2(r)?r:[]):t.concat(r,wd(r))}function Q5(e){const t=Zp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Xp(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Pl(n)!==o||Pl(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function eh(e){return yd(e)?e:e.contextElement}function Nc(e){const t=eh(e);if(!Xp(t))return Il(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Q5(t);let a=(o?Pl(n.width):n.width)/r,s=(o?Pl(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Y5=Il(0);function J5(e){const t=fn(e);return!q5()||!t.visualViewport?Y5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Vv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=eh(e);let a=Il(1);t&&(r?yd(r)&&(a=Nc(r)):a=Nc(e));const s=X5(o,n,r)?J5(o):Il(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const d=fn(o),h=r&&yd(r)?fn(r):r;let y=d.frameElement;for(;y&&r&&h!==d;){const v=Nc(y),w=y.getBoundingClientRect(),p=Zp(y),m=w.left+(y.clientLeft+parseFloat(p.paddingLeft))*v.x,g=w.top+(y.clientTop+parseFloat(p.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,f*=v.y,l+=m,u+=g,y=fn(y).frameElement}}return W5({width:c,height:f,x:l,y:u})}function Z5(e,t){let n=null,r;const i=$2(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const h=ss(c),y=ss(i.clientWidth-(u+f)),v=ss(i.clientHeight-(c+d)),w=ss(u),m={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:H5(0,U5(1,l))||1};let g=!0;function S(E){const _=E[0].intersectionRatio;if(_!==l){if(!g)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},100)}g=!1}try{n=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,m)}n.observe(e)}return a(!0),o}function eO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=eh(e),c=i||o?[...u?wd(u):[],...wd(t)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const f=u&&s?Z5(u,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(p=>{let[m]=p;m&&m.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,v=l?Vv(e):null;l&&w();function w(){const p=Vv(e);v&&(p.x!==v.x||p.y!==v.y||p.width!==v.width||p.height!==v.height)&&n(),v=p,y=requestAnimationFrame(w)}return n(),()=>{c.forEach(p=>{i&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}var Sd=b.useLayoutEffect,tO=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ml=function(){};function nO(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function rO(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i-1}function iO(e){return Lu(e)?window.innerHeight:e.clientHeight}function z2(e){return Lu(e)?window.pageYOffset:e.scrollTop}function Ll(e,t){if(Lu(e)){window.scrollTo(0,t);return}e.scrollTop=t}function oO(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function aO(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ls(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ml,i=z2(e),o=t-i,a=10,s=0;function l(){s+=a;var u=aO(s,i,o,n);Ll(e,u),sn.bottom?Ll(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i1?n-1:0),i=1;i=y)return{placement:"bottom",maxHeight:t};if(k>=y&&!a)return o&&ls(l,A,j),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&x>=r){o&&ls(l,A,j);var B=a?x-S:k-S;return{placement:"bottom",maxHeight:B}}if(i==="auto"||a){var D=t,I=a?_:C;return I>=r&&(D=Math.min(I-S-s,t)),{placement:"top",maxHeight:D}}if(i==="bottom")return o&&Ll(l,A),{placement:"bottom",maxHeight:t};break;case"top":if(_>=y)return{placement:"top",maxHeight:t};if(C>=y&&!a)return o&&ls(l,T,j),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&_>=r){var $=t;return(!a&&C>=r||a&&_>=r)&&($=a?_-E:C-E),o&&ls(l,T,j),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function gO(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var B2=function(t){return t==="auto"?"bottom":t},yO=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,l=o.colors;return Q((r={label:"menu"},xo(r,gO(i),"100%"),xo(r,"position","absolute"),xo(r,"width","100%"),xo(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},U2=b.createContext(null),wO=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,u=b.useContext(U2)||{},c=u.setPortalPlacement,f=b.useRef(null),d=b.useState(i),h=zn(d,2),y=h[0],v=h[1],w=b.useState(null),p=zn(w,2),m=p[0],g=p[1],S=l.spacing.controlHeight;return Sd(function(){var E=f.current;if(E){var _=a==="fixed",x=s&&!_,C=vO({maxHeight:i,menuEl:E,minHeight:r,placement:o,shouldScroll:x,isFixedPosition:_,controlHeight:S});v(C.maxHeight),g(C.placement),c==null||c(C.placement)}},[i,o,a,s,r,c,S]),n({ref:f,placerProps:Q(Q({},t),{},{placement:m||B2(o),maxHeight:y})})},SO=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Y("div",J({},Pe(t,"menu",{menu:!0}),{ref:r},i),n)},bO=SO,EO=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Q({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},_O=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Y("div",J({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},H2=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Q({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},xO=H2,CO=H2,OO=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Gn(t,hO);return Y("div",J({},Pe(Q(Q({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},kO=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Gn(t,mO);return Y("div",J({},Pe(Q(Q({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},AO=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},PO=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,l=b.useRef(null),u=b.useRef(null),c=b.useState(B2(a)),f=zn(c,2),d=f[0],h=f[1],y=b.useMemo(function(){return{setPortalPlacement:h}},[]),v=b.useState(null),w=zn(v,2),p=w[0],m=w[1],g=b.useCallback(function(){if(i){var x=sO(i),C=s==="fixed"?0:window.pageYOffset,k=x[d]+C;(k!==(p==null?void 0:p.offset)||x.left!==(p==null?void 0:p.rect.left)||x.width!==(p==null?void 0:p.rect.width))&&m({offset:k,rect:x})}},[i,s,d,p==null?void 0:p.offset,p==null?void 0:p.rect.left,p==null?void 0:p.rect.width]);Sd(function(){g()},[g]);var S=b.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=eO(i,l.current,g,{elementResize:"ResizeObserver"in window}))},[i,g]);Sd(function(){S()},[S]);var E=b.useCallback(function(x){l.current=x,S()},[S]);if(!n&&s!=="fixed"||!p)return null;var _=Y("div",J({ref:E},Pe(Q(Q({},t),{},{offset:p.offset,position:s,rect:p.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Y(U2.Provider,{value:y},n?Ep.createPortal(_,n):_)},IO=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},MO=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Y("div",J({},Pe(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},LO=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return Q({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},TO=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Y("div",J({},Pe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},DO=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$O=function(t){var n=t.children,r=t.innerProps;return Y("div",J({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},Wv,jO=["size"],FO=["innerProps","isRtl","size"],RO={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},W2=function(t){var n=t.size,r=Gn(t,jO);return Y("svg",J({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:RO},r))},th=function(t){return Y(W2,J({size:20},t),Y("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},q2=function(t){return Y(W2,J({size:20},t),Y("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},K2=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Q({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},NO=K2,zO=function(t){var n=t.children,r=t.innerProps;return Y("div",J({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Y(q2,null))},VO=K2,BO=function(t){var n=t.children,r=t.innerProps;return Y("div",J({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Y(th,null))},UO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Q({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},HO=function(t){var n=t.innerProps;return Y("span",J({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},WO=V5(Wv||(Wv=B5([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } -`]))),qO=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return Q({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},zc=function(t){var n=t.delay,r=t.offset;return Y("span",{css:Jp({animation:"".concat(WO," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KO=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Gn(t,FO);return Y("div",J({},Pe(Q(Q({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Y(zc,{delay:0,offset:r}),Y(zc,{delay:160,offset:!0}),Y(zc,{delay:320,offset:!r}))},GO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return Q({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},QO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return Y("div",J({ref:o},Pe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a),n)},YO=QO,JO=["data"],XO=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ZO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,f=t.selectProps;return Y("div",J({},Pe(t,"group",{group:!0}),l),Y(a,J({},s,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),Y("div",null,n))},e8=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Q({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},t8=function(t){var n=N2(t);n.data;var r=Gn(n,JO);return Y("div",J({},Pe(t,"groupHeading",{"group-heading":!0}),r))},n8=ZO,r8=["innerRef","isDisabled","isHidden","inputClassName"],i8=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return Q(Q({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},o8),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},G2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},o8={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Q({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},G2)},a8=function(t){return Q({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},G2)},s8=function(t){var n=t.cx,r=t.value,i=N2(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Gn(i,r8);return Y("div",J({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),Y("input",J({className:n({input:!0},l),ref:o,style:a8(s),disabled:a},u)))},l8=s8,u8=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return Q({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},c8=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return Q({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},f8=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return Q({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Q2=function(t){var n=t.children,r=t.innerProps;return Y("div",r,n)},d8=Q2,p8=Q2;function h8(e){var t=e.children,n=e.innerProps;return Y("div",J({role:"button"},n),t||Y(th,{size:14}))}var m8=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,f=r.Remove;return Y(u,{data:i,innerProps:Q(Q({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},Y(c,{data:i,innerProps:Q({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Y(f,{data:i,innerProps:Q(Q({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},v8=m8,g8=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return Q({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},y8=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return Y("div",J({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},w8=y8,S8=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Q({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},b8=function(t){var n=t.children,r=t.innerProps;return Y("div",J({},Pe(t,"placeholder",{placeholder:!0}),r),n)},E8=b8,_8=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return Q({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},x8=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Y("div",J({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},C8=x8,O8={ClearIndicator:BO,Control:YO,DropdownIndicator:zO,DownChevron:q2,CrossIcon:th,Group:n8,GroupHeading:t8,IndicatorsContainer:$O,IndicatorSeparator:HO,Input:l8,LoadingIndicator:KO,Menu:bO,MenuList:_O,MenuPortal:PO,LoadingMessage:kO,NoOptionsMessage:OO,MultiValue:v8,MultiValueContainer:d8,MultiValueLabel:p8,MultiValueRemove:h8,Option:w8,Placeholder:E8,SelectContainer:MO,SingleValue:C8,ValueContainer:TO},k8=function(t){return Q(Q({},O8),t.components)},qv=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function A8(e,t){return!!(e===t||qv(e)&&qv(t))}function P8(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=function(y,v){return y&&y.length?"".concat(y.indexOf(v)+1," of ").concat(y.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if(n==="menu"){var f=l?" disabled":"",d="".concat(u?"selected":"focused").concat(f);return"option ".concat(a," ").concat(d,", ").concat(c(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},D8=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=l.ariaLiveMessages,f=l.getOptionLabel,d=l.inputValue,h=l.isMulti,y=l.isOptionDisabled,v=l.isSearchable,w=l.menuIsOpen,p=l.options,m=l.screenReaderStatus,g=l.tabSelectsValue,S=l["aria-label"],E=l["aria-live"],_=b.useMemo(function(){return Q(Q({},T8),c||{})},[c]),x=b.useMemo(function(){var D="";if(n&&_.onChange){var I=n.option,$=n.options,N=n.removedValue,P=n.removedValues,M=n.value,z=function(Z){return Array.isArray(Z)?null:Z},F=N||I||z(M),V=F?f(F):"",L=$||P||void 0,R=L?L.map(f):[],H=Q({isDisabled:F&&y(F,s),label:V,labels:R},n);D=_.onChange(H)}return D},[n,_,y,s,f]),C=b.useMemo(function(){var D="",I=r||i,$=!!(r&&s&&s.includes(r));if(I&&_.onFocus){var N={focused:I,label:f(I),isDisabled:y(I,s),isSelected:$,options:o,context:I===r?"menu":"value",selectValue:s};D=_.onFocus(N)}return D},[r,i,f,y,_,o,s]),k=b.useMemo(function(){var D="";if(w&&p.length&&_.onFilter){var I=m({count:o.length});D=_.onFilter({inputValue:d,resultsMessage:I})}return D},[o,d,w,_,p,m]),A=b.useMemo(function(){var D="";if(_.guidance){var I=i?"value":w?"menu":"input";D=_.guidance({"aria-label":S,context:I,isDisabled:r&&y(r,s),isMulti:h,isSearchable:v,tabSelectsValue:g})}return D},[S,r,i,h,y,v,w,_,s,g]),T="".concat(C," ").concat(k," ").concat(A),j=Y(b.Fragment,null,Y("span",{id:"aria-selection"},x),Y("span",{id:"aria-context"},T)),B=(n==null?void 0:n.action)==="initial-input-focus";return Y(b.Fragment,null,Y(Kv,{id:u},B&&j),Y(Kv,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text"},a&&!B&&j))},$8=D8,bd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],j8=new RegExp("["+bd.map(function(e){return e.letters}).join("")+"]","g"),Y2={};for(var Vc=0;Vc-1}},z8=["innerRef"];function V8(e){var t=e.innerRef,n=Gn(e,z8),r=pO(n,"onExited","in","enter","exit","appear");return Y("input",J({ref:t},r,{css:Jp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var B8=function(t){t.preventDefault(),t.stopPropagation()};function U8(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=b.useRef(!1),s=b.useRef(!1),l=b.useRef(0),u=b.useRef(null),c=b.useCallback(function(w,p){if(u.current!==null){var m=u.current,g=m.scrollTop,S=m.scrollHeight,E=m.clientHeight,_=u.current,x=p>0,C=S-E-g,k=!1;C>p&&a.current&&(r&&r(w),a.current=!1),x&&s.current&&(o&&o(w),s.current=!1),x&&p>C?(n&&!a.current&&n(w),_.scrollTop=S,k=!0,a.current=!0):!x&&-p>g&&(i&&!s.current&&i(w),_.scrollTop=0,k=!0,s.current=!0),k&&B8(w)}},[n,r,i,o]),f=b.useCallback(function(w){c(w,w.deltaY)},[c]),d=b.useCallback(function(w){l.current=w.changedTouches[0].clientY},[]),h=b.useCallback(function(w){var p=l.current-w.changedTouches[0].clientY;c(w,p)},[c]),y=b.useCallback(function(w){if(w){var p=cO?{passive:!1}:!1;w.addEventListener("wheel",f,p),w.addEventListener("touchstart",d,p),w.addEventListener("touchmove",h,p)}},[h,d,f]),v=b.useCallback(function(w){w&&(w.removeEventListener("wheel",f,!1),w.removeEventListener("touchstart",d,!1),w.removeEventListener("touchmove",h,!1))},[h,d,f]);return b.useEffect(function(){if(t){var w=u.current;return y(w),function(){v(w)}}},[t,y,v]),function(w){u.current=w}}var Qv=["boxSizing","height","overflow","paddingRight","position"],Yv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jv(e){e.preventDefault()}function Xv(e){e.stopPropagation()}function Zv(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function e0(){return"ontouchstart"in window||navigator.maxTouchPoints}var t0=!!(typeof window<"u"&&window.document&&window.document.createElement),ho=0,ii={capture:!1,passive:!1};function H8(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=b.useRef({}),o=b.useRef(null),a=b.useCallback(function(l){if(t0){var u=document.body,c=u&&u.style;if(r&&Qv.forEach(function(y){var v=c&&c[y];i.current[y]=v}),r&&ho<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Yv).forEach(function(y){var v=Yv[y];c&&(c[y]=v)}),c&&(c.paddingRight="".concat(h,"px"))}u&&e0()&&(u.addEventListener("touchmove",Jv,ii),l&&(l.addEventListener("touchstart",Zv,ii),l.addEventListener("touchmove",Xv,ii))),ho+=1}},[r]),s=b.useCallback(function(l){if(t0){var u=document.body,c=u&&u.style;ho=Math.max(ho-1,0),r&&ho<1&&Qv.forEach(function(f){var d=i.current[f];c&&(c[f]=d)}),u&&e0()&&(u.removeEventListener("touchmove",Jv,ii),l&&(l.removeEventListener("touchstart",Zv,ii),l.removeEventListener("touchmove",Xv,ii)))}},[r]);return b.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var W8=function(){return document.activeElement&&document.activeElement.blur()},q8={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function K8(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=U8({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),c=H8({isEnabled:n}),f=function(h){u(h),c(h)};return Y(b.Fragment,null,n&&Y("div",{onClick:W8,css:q8}),t(f))}var G8={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Q8=function(t){var n=t.name,r=t.onFocus;return Y("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:G8,value:"",onChange:function(){}})},Y8=Q8,J8=function(t){return t.label},X8=function(t){return t.label},Z8=function(t){return t.value},ek=function(t){return!!t.isDisabled},tk={clearIndicator:VO,container:IO,control:GO,dropdownIndicator:NO,group:XO,groupHeading:e8,indicatorsContainer:DO,indicatorSeparator:UO,input:i8,loadingIndicator:qO,loadingMessage:CO,menu:yO,menuList:EO,menuPortal:AO,multiValue:u8,multiValueLabel:c8,multiValueRemove:f8,noOptionsMessage:xO,option:g8,placeholder:S8,singleValue:_8,valueContainer:LO},nk={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},rk=4,X2=4,ik=38,ok=X2*2,ak={baseUnit:X2,controlHeight:ik,menuGutter:ok},Hc={borderRadius:rk,colors:nk,spacing:ak},sk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Hv(),captureMenuScroll:!Hv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:N8(),formatGroupLabel:J8,getOptionLabel:X8,getOptionValue:Z8,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ek,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!lO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function n0(e,t,n,r){var i=nw(e,t,n),o=rw(e,t,n),a=tw(e,t),s=Tl(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function Z2(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return n0(e,a,t,s)}).filter(function(a){return r0(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=n0(e,n,t,r);return r0(e,o)?o:void 0}).filter(fO)}function ew(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,E2(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function lk(e,t){return ew(Z2(e,t))}function r0(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!ow(e)||!o)&&iw(e,{label:a,value:s,data:i},r)}function uk(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i-1?n:t[0]}var tw=function(t,n){return t.getOptionLabel(n)},Tl=function(t,n){return t.getOptionValue(n)};function nw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function rw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Tl(e,t);return n.some(function(i){return Tl(e,i)===r})}function iw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var ow=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},fk=1,aw=function(e){z6(n,e);var t=H6(n);function n(r){var i;if(R6(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,l){var u=i.props,c=u.onChange,f=u.name;l.name=f,i.ariaOnChange(s,l),c(s,l)},i.setValue=function(s,l,u){var c=i.props,f=c.closeMenuOnSelect,d=c.isMulti,h=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),f&&(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:l,option:u})},i.selectOption=function(s){var l=i.props,u=l.blurInputOnSelect,c=l.isMulti,f=l.name,d=i.state.selectValue,h=c&&i.isOptionSelected(s,d),y=i.isOptionDisabled(s,d);if(h){var v=i.getOptionValue(s);i.setValue(d.filter(function(w){return i.getOptionValue(w)!==v}),"deselect-option",s)}else if(!y)c?i.setValue([].concat(E2(d),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:f});return}u&&i.blurInput()},i.removeValue=function(s){var l=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(s),f=u.filter(function(h){return i.getOptionValue(h)!==c}),d=cs(l,f,f[0]||null);i.onChange(d,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(cs(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,l=i.state.selectValue,u=l[l.length-1],c=l.slice(0,l.length-1),f=cs(s,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,l=new Array(s),u=0;ud||f>d}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var l=i.props.inputValue,u=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:l}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var l=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:l}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){i.blockOptionHover||i.state.focusedOption===s||i.setState({focusedOption:s})},i.shouldHideSelectedOptions=function(){return ow(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var l=i.props,u=l.isMulti,c=l.backspaceRemovesValue,f=l.escapeClearsValue,d=l.inputValue,h=l.isClearable,y=l.isDisabled,v=l.menuIsOpen,w=l.onKeyDown,p=l.tabSelectsValue,m=l.openMenuOnFocus,g=i.state,S=g.focusedOption,E=g.focusedValue,_=g.selectValue;if(!y&&!(typeof w=="function"&&(w(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!u||d)return;i.focusValue("previous");break;case"ArrowRight":if(!u||d)return;i.focusValue("next");break;case"Delete":case"Backspace":if(d)return;if(E)i.removeValue(E);else{if(!c)return;u?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!p||!S||m&&i.isOptionSelected(S,_))return;i.selectOption(S);break;case"Enter":if(s.keyCode===229)break;if(v){if(!S||i.isComposing)return;i.selectOption(S);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:d}),i.onMenuClose()):h&&f&&i.clearValue();break;case" ":if(d)return;if(!v){i.openMenu("first");break}if(!S)return;i.selectOption(S);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++fk),i.state.selectValue=Bv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[a]}return i}return N6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,c=-1;if(a.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Hc):Q(Q({},Hc),this.props.theme):Hc}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,y=f.options,v=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:v,isMulti:d,isRtl:h,options:y,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return nw(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return rw(this.props,i,o)}},{key:"filterOption",value:function(i,o){return iw(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),y=h.Input,v=this.state,w=v.inputIsHidden,p=v.ariaSelection,m=this.commonProps,g=s||this.getElementId("input"),S=Q(Q(Q({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?b.createElement(y,J({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:o,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},S)):b.createElement(V8,J({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ml,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,y=h.controlShouldRenderValue,v=h.isDisabled,w=h.isMulti,p=h.inputValue,m=h.placeholder,g=this.state,S=g.selectValue,E=g.focusedValue,_=g.isFocused;if(!this.hasValue()||!y)return p?null:b.createElement(f,J({},d,{key:"placeholder",isDisabled:v,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),m);if(w)return S.map(function(C,k){var A=C===E,T="".concat(i.getOptionLabel(C),"-").concat(i.getOptionValue(C));return b.createElement(a,J({},d,{components:{Container:s,Label:l,Remove:u},isFocused:A,isDisabled:v,key:T,index:k,removeProps:{onClick:function(){return i.removeValue(C)},onTouchEnd:function(){return i.removeValue(C)},onMouseDown:function(B){B.preventDefault()}},data:C}),i.formatOptionLabel(C,"value"))});if(p)return null;var x=S[0];return b.createElement(c,J({},d,{data:x,isDisabled:v}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:f,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return b.createElement(a,J({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,y=this.commonProps,v=this.state.focusedOption,w=this.props,p=w.captureMenuScroll,m=w.inputValue,g=w.isLoading,S=w.loadingMessage,E=w.minMenuHeight,_=w.maxMenuHeight,x=w.menuIsOpen,C=w.menuPlacement,k=w.menuPosition,A=w.menuPortalTarget,T=w.menuShouldBlockScroll,j=w.menuShouldScrollIntoView,B=w.noOptionsMessage,D=w.onMenuScrollToTop,I=w.onMenuScrollToBottom;if(!x)return null;var $=function(L,R){var H=L.type,W=L.data,Z=L.isDisabled,oe=L.isSelected,Te=L.label,De=L.value,Ie=v===W,$e=Z?void 0:function(){return i.onOptionHover(W)},Zt=Z?void 0:function(){return i.selectOption(W)},xt="".concat(i.getElementId("option"),"-").concat(R),Ma={id:xt,onClick:Zt,onMouseMove:$e,onMouseOver:$e,tabIndex:-1};return b.createElement(h,J({},y,{innerProps:Ma,data:W,isDisabled:Z,isSelected:oe,key:xt,label:Te,type:H,value:De,isFocused:Ie,innerRef:Ie?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(L.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var L=V.data,R=V.options,H=V.index,W="".concat(i.getElementId("group"),"-").concat(H),Z="".concat(W,"-heading");return b.createElement(a,J({},y,{key:W,data:L,options:R,Heading:s,headingProps:{id:Z,data:V.data},label:i.formatGroupLabel(V.data)}),V.options.map(function(oe){return $(oe,"".concat(H,"-").concat(oe.index))}))}else if(V.type==="option")return $(V,"".concat(V.index))});else if(g){var P=S({inputValue:m});if(P===null)return null;N=b.createElement(f,y,P)}else{var M=B({inputValue:m});if(M===null)return null;N=b.createElement(d,y,M)}var z={minMenuHeight:E,maxMenuHeight:_,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:j},F=b.createElement(wO,J({},y,z),function(V){var L=V.ref,R=V.placerProps,H=R.placement,W=R.maxHeight;return b.createElement(l,J({},y,z,{innerRef:L,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:g,placement:H}),b.createElement(K8,{captureEnabled:p,onTopArrive:D,onBottomArrive:I,lockEnabled:T},function(Z){return b.createElement(u,J({},y,{innerRef:function(Te){i.getMenuListRef(Te),Z(Te)},isLoading:g,maxHeight:W,focusedOption:v}),N)}))});return A||k==="fixed"?b.createElement(c,J({},y,{appendTo:A,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),F):F}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!s)return b.createElement(Y8,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var d=f.map(function(v){return i.getOptionValue(v)}).join(a);return b.createElement("input",{name:u,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(v,w){return b.createElement("input",{key:"i-".concat(w),name:u,type:"hidden",value:i.getOptionValue(v)})}):b.createElement("input",{name:u,type:"hidden",value:""});return b.createElement("div",null,h)}else{var y=f[0]?this.getOptionValue(f[0]):"";return b.createElement("input",{name:u,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return b.createElement($8,J({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,f=u.id,d=u.isDisabled,h=u.menuIsOpen,y=this.state.isFocused,v=this.commonProps=this.getCommonProps();return b.createElement(s,J({},v,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:y}),this.renderLiveRegion(),b.createElement(o,J({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:y,menuIsOpen:h}),b.createElement(l,J({},v,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(a,J({},v,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,d=i.options,h=i.value,y=i.menuIsOpen,v=i.inputValue,w=i.isMulti,p=Bv(h),m={};if(a&&(h!==a.value||d!==a.options||y!==a.menuIsOpen||v!==a.inputValue)){var g=y?lk(i,p):[],S=s?uk(o,p):null,E=ck(o,g);m={selectValue:p,focusedOption:E,focusedValue:S,clearFocusValueOnUpdate:!1}}var _=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},x=u,C=c&&f;return c&&!C&&(x={value:cs(w,p,p[0]||null),options:p,action:"initial-input-focus"},C=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(x=null),Q(Q(Q({},m),_),{},{prevProps:i,ariaSelection:x,prevWasFocused:C})}}]),n}(b.Component);aw.defaultProps=sk;var dk=b.forwardRef(function(e,t){var n=F6(e);return b.createElement(aw,J({ref:t},n))}),pk=dk;function hk(e){return O.jsx(pk,{classNames:{container:()=>"text-lg bg-white rounded text-gray-400",valueContainer:()=>"text-lg !text-gray-600 !py-1",singleValue:()=>"text-lg !text-gray-600 py-1",multiValue:()=>"text-lg !text-gray-600",menuList:()=>"text-lg !text-gray-600"},...e})}const fs=({label:e,multiple:t,onChange:n,options:r,value:i})=>{const o=b.useMemo(()=>{if(!i)return t?[]:void 0;const s=i.split(",");return t?r.filter(l=>s.includes(l.value)):r.find(l=>l.value===i)},[i,r,t]),a=b.useCallback(s=>{if(Array.isArray(s))n==null||n(s.map(l=>l.value).join(","));else{const l=s;n==null||n((l==null?void 0:l.value)||"")}},[n]);return O.jsxs("div",{className:"flex flex-col text-gray-400 w-full max-w-xs hover:text-white",children:[O.jsx("span",{className:"flex-1 text-lg text-left",children:e}),O.jsx(hk,{value:o,isMulti:t,name:e,options:r,onChange:a})]})},mk=({onUpdate:e})=>{const{dotLottie:t,setAnimationOptions:n}=qp(),r=Au(),i=Fe(d=>d.editor.animationOptions),o=Fe(d=>d.editor.animationId),a=Fe(d=>d.editor.updated),s=Fe(d=>d.themes.list),l=b.useMemo(()=>s.map(({name:d})=>({label:d,value:d})),[s]),u=b.useMemo(()=>{var h;const d=[{label:"None",value:""}];return typeof i.assignedThemes<"u"&&Array.isArray(i.assignedThemes)?d:d.concat(((h=i.assignedThemes)==null?void 0:h.split(",").map(y=>({label:y,value:y})))||[])},[i,o]);b.useEffect(()=>{if(o)return(async()=>{const d=await t.getAnimation(o);d&&r(Ov({direction:d.direction,speed:d.speed,playMode:d.playMode,loop:d.loop,autoplay:d.autoplay,hover:d.hover,intermission:d.intermission,defaultTheme:d.defaultTheme,assignedThemes:d.themes.map(h=>h.id).join(",")||void 0,defaultActiveAnimation:d.defaultActiveAnimation}))})(),()=>{r(Ov({}))}},[r,t,o]);const c=b.useCallback(d=>h=>{d==="assignedThemes"&&!String(h).split(",").includes(i.defaultTheme||"")&&r(Pv({defaultTheme:""})),r(Pv({[d]:h})),r(Cl(!0))},[r,i]),f=b.useCallback(()=>{o&&(n(o,i),r(Cl(!1)),e())},[o,i,n,r,e]);return O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[O.jsxs("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:["Animation: ",o]}),O.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:f,disabled:!a,children:O.jsx(wy,{size:33})})]}),O.jsxs("div",{className:"p-8 flex-1 max-h-[calc(100vh-5.5rem)] overflow-y-auto custom-scrollbar",children:[O.jsx("div",{className:"text-white",children:"Playback options"}),O.jsx("ul",{children:Object.keys(i).map(d=>["loop","autoplay","hover"].includes(d)?O.jsx("li",{children:O.jsx(Lv,{label:d,value:i[d],onToggle:c(d)})},d):["playMode"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:d,value:i[d],options:[{label:"Normal",value:"normal"},{label:"Bounce",value:"bounce"}]})},d):["direction"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:d,value:String(i[d]),options:[{label:"Normal",value:"1"},{label:"Inverted",value:"-1"}]})},d):["speed","intermission"].includes(d)?O.jsx("li",{children:O.jsx(L6,{label:d,value:i[d],onChange:c(d)})},d):["defaultTheme"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:"defaultTheme",options:u||[],value:i[d]||""})},d):void 0)}),O.jsx("div",{className:"text-white mt-8",children:"Other options"}),O.jsxs("div",{children:[O.jsx(fs,{multiple:!0,onChange:c("assignedThemes"),label:"Assign Themes",value:i.assignedThemes,options:l}),O.jsx(Lv,{label:"Default ActiveAnimation",value:i.defaultActiveAnimation,onToggle:c("defaultActiveAnimation")})]})]})]})},vk="modulepreload",gk=function(e){return"/player-component/"+e},i0={},$n=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=gk(o),o in i0)return;i0[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":vk,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function se(e,t="dotLottie-common"){return new Error(`[${t}]: ${e}`)}function oi(e,t="dotLottie-common",...n){console.error(`[${t}]:`,e,...n)}function Me(e,t="dotLottie-common",...n){console.warn(`[${t}]:`,e,...n)}function yk(e=""){let t=e.trim(),n=t.lastIndexOf("/"),r=t.substring(n+1),i=r.indexOf(".");return i!==-1?r.substring(0,i):r}function Dl(e){return["v","ip","op","layers","fr","w","h"].every(t=>Object.prototype.hasOwnProperty.call(e,t))}function wk(e){try{let t=JSON.parse(e);return Dl(t)}catch{return!1}}function k7(e,t){let n=Object.keys(e).find(r=>e[r]===t);if(n===void 0)throw new Error("Value not found in the object.");return n}var o0={},Sk=function(e,t,n,r,i){var o=new Worker(o0[t]||(o0[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var s=a.data,l=s.$e$;if(l){var u=new Error(l[0]);u.code=l[1],u.stack=l[2],i(u,null)}else i(null,s)},o.postMessage(n,r),o},ct=Uint8Array,ar=Uint16Array,nh=Uint32Array,rh=new ct([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ih=new ct([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),sw=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lw=function(e,t){for(var n=new ar(31),r=0;r<31;++r)n[r]=t+=1<>>1|(ue&21845)<<1,Mn=(Mn&52428)>>>2|(Mn&13107)<<2,Mn=(Mn&61680)>>>4|(Mn&3855)<<4,$l[ue]=((Mn&65280)>>>8|(Mn&255)<<8)>>>1;var Mn,ue,Li=function(e,t,n){for(var r=e.length,i=0,o=new ar(t);i>>l]=u}else for(s=new ar(r),i=0;i>>15-e[i]);return s},ka=new ct(288);for(ue=0;ue<144;++ue)ka[ue]=8;var ue;for(ue=144;ue<256;++ue)ka[ue]=9;var ue;for(ue=256;ue<280;++ue)ka[ue]=7;var ue;for(ue=280;ue<288;++ue)ka[ue]=8;var ue,fw=new ct(32);for(ue=0;ue<32;++ue)fw[ue]=5;var ue,dw=Li(ka,9,1),pw=Li(fw,5,1),$s=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},zt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},js=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},hw=function(e){return(e+7)/8|0},Tu=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?ar:e.BYTES_PER_ELEMENT==4?nh:ct)(n-t);return r.set(e.subarray(t,n)),r},mw=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],mt=function(e,t,n){var r=new Error(t||mw[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,mt),!n)throw r;return r},vw=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ct(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ct(r*3));var a=function(W){var Z=t.length;if(W>Z){var oe=new ct(Math.max(Z*2,W));oe.set(t),t=oe}},s=n.f||0,l=n.p||0,u=n.b||0,c=n.l,f=n.d,d=n.m,h=n.n,y=r*8;do{if(!c){s=zt(e,l,1);var v=zt(e,l+1,3);if(l+=3,v)if(v==1)c=dw,f=pw,d=9,h=5;else if(v==2){var w=zt(e,l,31)+257,p=zt(e,l+10,15)+4,m=w+zt(e,l+5,31)+1;l+=14;for(var g=new ct(m),S=new ct(19),E=0;E>>4;if(A<16)g[E++]=A;else{var T=0,j=0;for(A==16?(j=3+zt(e,l,3),l+=2,T=g[E-1]):A==17?(j=3+zt(e,l,7),l+=3):A==18&&(j=11+zt(e,l,127),l+=7);j--;)g[E++]=T}}var B=g.subarray(0,w),D=g.subarray(w);d=$s(B),h=$s(D),c=Li(B,d,1),f=Li(D,h,1)}else mt(1);else{var A=hw(l)+4,I=e[A-4]|e[A-3]<<8,$=A+I;if($>r){o&&mt(0);break}i&&a(u+I),t.set(e.subarray(A,$),u),n.b=u+=I,n.p=l=$*8,n.f=s;continue}if(l>y){o&&mt(0);break}}i&&a(u+131072);for(var N=(1<>>4;if(l+=T&15,l>y){o&&mt(0);break}if(T||mt(2),z<256)t[u++]=z;else if(z==256){M=l,c=null;break}else{var F=z-254;if(z>264){var E=z-257,V=rh[E];F=zt(e,l,(1<>>4;L||mt(3),l+=L&15;var D=cw[R];if(R>3){var V=ih[R];D+=js(e,l)&(1<y){o&&mt(0);break}i&&a(u+131072);for(var H=u+F;u>>0},Wc=function(e,t){return an(e,t)+an(e,t+4)*4294967296};function Pk(e,t,n){return n||(n=t,t={}),typeof n!="function"&&mt(7),Ak(e,t,[kk],function(r){return gw(ah(r.data[0],yw(r.data[1])))},1,n)}function ah(e,t){return vw(e,t)}var Ed=typeof TextDecoder<"u"&&new TextDecoder,Ik=0;try{Ed.decode(_k,{stream:!0}),Ik=1}catch{}var Mk=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Tu(e,n-1)];i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function no(e,t){if(t){for(var n="",r=0;r65558)return a(mt(13,0,1),null),i;var l=xn(e,s+8);if(l){var u=l,c=an(e,s+16),f=c==4294967295||u==65535;if(f){var d=an(e,s-12);f=an(e,d)==101075792,f&&(u=l=an(e,d+32),c=an(e,d+48))}for(var h=t&&t.filter,y=function(w){var p=Tk(e,c,f),m=p[0],g=p[1],S=p[2],E=p[3],_=p[4],x=p[5],C=Lk(e,x);c=_;var k=function(T,j){T?(i(),a(T,null)):(j&&(o[E]=j),--l||a(null,o))};if(!h||h({name:E,size:g,originalSize:S,compression:m}))if(!m)k(null,Tu(e,C,C+g));else if(m==8){var A=e.subarray(C,C+g);if(g<32e4)try{k(null,ah(A,new ct(S)))}catch(T){k(T,null)}else r.push(Pk(A,{size:S},k))}else k(mt(14,"unknown compression type "+m,1),null);else k(null,null)},v=0;v{if(n.path){let r=n.path.map(({key:i})=>i).join(".");t.nested[r]=[...t.nested[r]||[],n.message]}else t.root=[...t.root||[],n.message];return t},{nested:{}})}var tt=class extends Error{constructor(n){super(n[0].message);te(this,"issues");this.name="ValiError",this.issues=n}};function Or(e,t,n){let r=e,i=[];if(t.forEach(o=>{try{r=o(r,n)}catch(a){if(n.abortEarly||n.abortPipeEarly)throw a;i.push(...a.issues)}}),i.length)throw new tt(i);return r}function ha(e,t){return[...(e==null?void 0:e.path)||[],t]}function hn(e,t){let[n,r=[]]=!e||typeof e=="string"?[e,t]:[void 0,e];return{error:n,pipe:r}}function Fk(e=[]){return{schema:"any",async:!1,parse(t,n){return Or(t,e,{...n,reason:"any"})}}}function Ro(e,t,n){let{error:r,pipe:i}=hn(t,n);return{schema:"array",array:{item:e},async:!1,parse(o,a){if(!Array.isArray(o))throw new tt([{reason:"type",validation:"array",origin:"value",message:r||"Invalid type",input:o,...a}]);let s=[],l=[];if(o.forEach((u,c)=>{try{s.push(e.parse(u,{...a,path:ha(a,{schema:"array",input:o,key:c,value:u})}))}catch(f){if(a!=null&&a.abortEarly)throw f;l.push(...f.issues)}}),l.length)throw new tt(l);return Or(s,i,{...a,reason:"array"})}}}function qc(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"boolean",async:!1,parse(i,o){if(typeof i!="boolean")throw new tt([{reason:"type",validation:"boolean",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"boolean"})}}}function l0(e,t){return{schema:"literal",literal:e,async:!1,parse(n,r){if(n!==e)throw new tt([{reason:"type",validation:"literal",origin:"value",message:t||"Invalid type",input:n,...r}]);return n}}}function Rk(e,t){return{schema:"native_enum",nativeEnum:e,async:!1,parse(n,r){if(!Object.values(e).includes(n))throw new tt([{reason:"type",validation:"native_enum",origin:"value",message:t||"Invalid type",input:n,...r}]);return n}}}function ln(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"number",async:!1,parse(i,o){if(typeof i!="number")throw new tt([{reason:"type",validation:"number",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"number"})}}}function Xt(e,t,n){let{error:r,pipe:i}=hn(t,n);return{schema:"object",object:e,async:!1,parse(o,a){if(!o||typeof o!="object"||o.toString()!=="[object Object]")throw new tt([{reason:"type",validation:"object",origin:"value",message:r||"Invalid type",input:o,...a}]);let s={},l=[];if(Object.entries(e).forEach(([u,c])=>{try{let f=o[u];s[u]=c.parse(f,{...a,path:ha(a,{schema:"object",input:o,key:u,value:f})})}catch(f){if(a!=null&&a.abortEarly)throw f;l.push(...f.issues)}}),l.length)throw new tt(l);return Or(s,i,{...a,reason:"object"})}}}function ce(e){return{schema:"optional",wrapped:e,async:!1,parse(t,n){return t===void 0?t:e.parse(t,n)}}}function Ye(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"string",async:!1,parse(i,o){if(typeof i!="string")throw new tt([{reason:"type",validation:"string",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"string"})}}}function Nk(e,t,n,r){let{key:i,value:o,error:a,pipe:s}=typeof t=="object"&&!Array.isArray(t)?{key:e,value:t,...hn(n,r)}:{key:Ye(),value:e,...hn(t,n)};return{schema:"record",record:{key:i,value:o},async:!1,parse(l,u){if(!l||typeof l!="object"||l.toString()!=="[object Object]")throw new tt([{reason:"type",validation:"record",origin:"value",message:a||"Invalid type",input:l,...u}]);let c={},f=[];if(Object.entries(l).forEach(([d,h])=>{let y=ha(u,{schema:"record",input:l,key:d,value:h}),v;try{v=i.parse(d,{...u,origin:"key",path:y})}catch(p){if(u!=null&&u.abortEarly)throw p;f.push(...p.issues)}let w;try{w=[o.parse(h,{...u,path:y})]}catch(p){if(u!=null&&u.abortEarly)throw p;f.push(...p.issues)}v&&w&&(c[v]=w[0])}),f.length)throw new tt(f);return Or(c,s,{...u,reason:"record"})}}}function u0(e,t,n,r){let{rest:i,error:o,pipe:a}=typeof t=="object"&&!Array.isArray(t)?{rest:t,...hn(n,r)}:hn(t,n);return{schema:"tuple",tuple:{items:e,rest:i},async:!1,parse(s,l){if(!Array.isArray(s)||!i&&e.length!==s.length||i&&e.length>s.length)throw new tt([{reason:"type",validation:"tuple",origin:"value",message:o||"Invalid type",input:s,...l}]);let u=[],c=[];if(e.forEach((f,d)=>{try{let h=s[d];u[d]=f.parse(h,{...l,path:ha(l,{schema:"tuple",input:s,key:d,value:h})})}catch(h){if(l!=null&&l.abortEarly)throw h;c.push(...h.issues)}}),i&&s.slice(e.length).forEach((f,d)=>{try{let h=e.length+d;u[h]=i.parse(f,{...l,path:ha(l,{schema:"tuple",input:s,key:h,value:f})})}catch(h){if(l!=null&&l.abortEarly)throw h;c.push(...h.issues)}}),c.length)throw new tt(c);return Or(u,a,{...l,reason:"tuple"})}}}function _d(e,t){return{schema:"union",union:e,async:!1,parse(n,r){let i,o=[];for(let a of e)try{i=[a.parse(n,r)];break}catch(s){o.push(...s.issues)}if(!i)throw new tt([{reason:"type",validation:"union",origin:"value",message:t||"Invalid type",input:n,issues:o,...r}]);return i[0]}}}function Aa(e,t,n){let{error:r,pipe:i}=hn(t,n);return Xt(e.reduce((o,a)=>({...o,...a.object}),{}),r,i)}function zk(e,t,n,r){let{error:i,pipe:o}=hn(n,r);return Xt(Object.entries(e.object).reduce((a,[s,l])=>t.includes(s)?a:{...a,[s]:l},{}),i,o)}function Vk(e,t,n){try{return{success:!0,data:e.parse(t,n)}}catch(r){return{success:!1,error:r}}}function xd(e,t){return(n,r)=>{if(n>e)throw new tt([{validation:"max_value",origin:"value",message:t||"Invalid value",input:n,...r}]);return n}}function Cd(e,t){return(n,r)=>{if(nt in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pa=(e,t)=>function(){return t||(0,e[ww(e)[0]])((t={exports:{}}).exports,t),t.exports},Kk=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ww(t))!Wk.call(e,i)&&i!==n&&sh(e,i,{get:()=>t[i],enumerable:!(r=Uk(t,i))||r.enumerable});return e},Gk=(e,t,n)=>(n=e!=null?Bk(Hk(e)):{},Kk(t||!e||!e.__esModule?sh(n,"default",{value:e,enumerable:!0}):n,e)),Qk=(e,t,n)=>(qk(e,typeof t!="symbol"?t+"":t,n),n),Yk=Pa({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.copy=void 0;var t=(n,r,i=0,o=0,a=n.width-i,s=n.height-o,l=0,u=0)=>{if(i=i|0,o=o|0,a=a|0,s=s|0,l=l|0,u=u|0,a<=0||s<=0)return;let c=new Uint32Array(n.data.buffer),f=new Uint32Array(r.data.buffer);for(let d=0;d=n.height)continue;let y=u+d;if(!(y<0||y>=r.height))for(let v=0;v=n.width)continue;let p=l+v;if(p<0||p>=r.width)continue;let m=h*n.width+w,g=y*r.width+p;f[g]=c[m]}}};e.copy=t}}),Jk=Pa({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreateImageFactory=(t=[0,0,0,0],n=4)=>{if(n=Math.floor(n),isNaN(n)||n<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in t)||t.lengthi===0);return(i,o,a)=>{if(i===void 0||o===void 0)throw TypeError("Not enough arguments");if(i=Math.floor(i),o=Math.floor(o),isNaN(i)||i<1||isNaN(o)||o<1)throw TypeError("Index or size is negative or greater than the allowed amount");let s=i*o*n;if(a===void 0&&(a=new Uint8ClampedArray(s)),a instanceof Uint8ClampedArray){if(a.length!==s)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let l=0;l{if(o<=-a||o>=a||o==0)return 0;let s=o*Math.PI;return Math.sin(s)/s*Math.sin(s/a)/(s/a)},r=o=>Math.round(o*((1<{let c=u?2:3,f=1/s,d=Math.min(1,s),h=c/d,y=Math.floor((h+1)*2),v=new Int16Array((y+2)*a),w=0;for(let p=0;p>1]+=r(1-A);let T=0;for(;T0&&x[j]===0;)j--;let B=g+T,D=j-T+1;v[w++]=B,v[w++]=D,v.set(x.subarray(T,j+1),w),w+=D}return v};e.filters=i}}),Zk=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convolve=void 0;var t=14,n=(r,i,o,a,s,l)=>{let u=0,c=0;for(let f=0;f0;S--){let E=l[d++];w=w+E*r[v]|0,p=p+E*r[v+1]|0,m=m+E*r[v+2]|0,g=g+E*r[v+3]|0,v=v+4|0}i[c]=w+8192>>t,i[c+1]=p+8192>>t,i[c+2]=m+8192>>t,i[c+3]=g+8192>>t,c=c+a*4|0}c=(f+1)*4|0,u=(f+1)*o*4|0}};e.convolve=n}}),eA=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lanczos2=e.lanczos=void 0;var t=Yk(),n=Jk(),r=Xk(),i=Zk(),o=(l,u,c=!1)=>{let f=u.width/l.width,d=u.height/l.height,h=r.filters(l.width,u.width,f,0,c),y=r.filters(l.height,u.height,d,0,c),v=new Uint8ClampedArray(u.width*l.height*4);i.convolve(l.data,v,l.width,l.height,u.width,h),i.convolve(v,u.data,l.height,u.width,u.height,y)},a=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,v=0,w=u.width-y,p=u.height-v)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,v=v|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&v===0&&w===u.width&&p===u.height){o(l,u);return}let m=n.createImage(d,h),g=n.createImage(w,p);t.copy(l,m,c,f),o(m,g),t.copy(g,u,0,0,g.width,g.height,y,v)};e.lanczos=a;var s=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,v=0,w=u.width-y,p=u.height-v)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,v=v|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&v===0&&w===u.width&&p===u.height){o(l,u,!0);return}let m=n.createImage(d,h),g=n.createImage(w,p);t.copy(l,m,c,f),o(m,g,!0),t.copy(g,u,0,0,g.width,g.height,y,v)};e.lanczos2=s}}),Sw=(e=>(e.Bounce="bounce",e.Normal="normal",e))(Sw||{}),tA=Rk(Sw),bw=Xt({autoplay:ce(qc()),defaultTheme:ce(Ye()),direction:ce(_d([l0(1),l0(-1)])),hover:ce(qc()),id:Ye(),intermission:ce(ln()),loop:ce(_d([qc(),ln()])),playMode:ce(tA),speed:ce(ln()),themeColor:ce(Ye())}),nA=Xt({animations:Ro(Ye()),id:Ye()}),rA=Xt({activeAnimationId:ce(Ye()),animations:Ro(bw),author:ce(Ye()),custom:ce(Nk(Ye(),Fk())),description:ce(Ye()),generator:ce(Ye()),keywords:ce(Ye()),revision:ce(ln()),themes:ce(Ro(nA)),states:ce(Ro(Ye())),version:ce(Ye())}),Ew=zk(bw,["id"]),Xr=Xt({state:Ye()}),iA=Xr,oA=Aa([Xr,Xt({ms:ln()})]),aA=Aa([Xr,Xt({count:ln()})]),sA=Xr,lA=Xr,uA=Xr,cA=Aa([Xr,Xt({threshold:ce(Ro(ln([Cd(0),xd(1)])))})]),fA=Xt({onAfter:ce(oA),onClick:ce(iA),onComplete:ce(uA),onEnter:ce(aA),onMouseEnter:ce(sA),onMouseLeave:ce(lA),onShow:ce(cA)}),dA=Aa([Ew,Xt({playOnScroll:ce(u0([ln([Cd(0),xd(1)]),ln([Cd(0),xd(1)])])),segments:ce(_d([u0([ln(),ln()]),Ye()]))})]);Aa([fA,Xt({animationId:ce(Ye()),playbackSettings:dA})]);var pA={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp"},c0={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120]},hA=e=>{let t=null,n=[];if(!e)return null;let r=e.substring(e.indexOf(",")+1);typeof window>"u"?t=Buffer.from(r,"base64").toString("binary"):t=atob(r);let i=new Uint8Array(t.length);for(let o=0;os===a[l]))return pA[o]}return null},lh=class extends Error{constructor(e,t){super(e),Qk(this,"code"),this.name="[dotlottie-js]",this.code=t}};function mA(e){let t;if(typeof window>"u")t=Buffer.from(e).toString("base64");else{let n=Array.prototype.map.call(e,r=>String.fromCharCode(r)).join("");t=window.btoa(n)}return`data:${hA(t)};base64,${t}`}function f0(e){return"w"in e&&"h"in e&&!("xt"in e)&&"p"in e}async function Du(e,t=()=>!0){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((n,r)=>{$k(e,{filter:t},(i,o)=>{i&&r(i),n(o)})})}async function uh(e,t,n){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return(await Du(e,r=>r.name===t&&(!n||n(r))))[t]}async function Od(e){let t="manifest.json",n=(await Du(e,r=>r.name===t))[t];if(!(typeof n>"u"))return JSON.parse(no(n,!1))}async function vA(e){if(!(e instanceof Uint8Array))return{success:!1,error:"DotLottie not found"};let t=await Od(e);if(typeof t>"u")return{success:!1,error:"Invalid .lottie file, manifest.json is missing"};let n=Vk(rA,t);return n.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(jk(n.error).nested,null,2)}`}}async function d0(e){let t=new Uint8Array(e),n=await vA(t);if(n.error)throw new lh(n.error,"INVALID_DOTLOTTIE");return t}async function gA(e,t){let n=await Du(e,i=>{let o=i.name.replace("images/","");return i.name.startsWith("images/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("images/","");r[a]=mA(o)}}return r}async function yA(e,t){var i;let n=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(f0(s)){let l=s.p;n.has(l)||n.set(l,new Set),(i=n.get(l))==null||i.add(o)}let r=await gA(e,o=>n.has(o.name));for(let[o,a]of n){let s=r[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])f0(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function wA(e,t,{inlineAssets:n}={},r){let i=`animations/${t}.json`,o=await uh(e,i,r);if(typeof o>"u")return;let a=JSON.parse(no(o,!1));if(!n)return a;let s={[t]:a};return await yA(e,s),a}async function SA(e,t,n){let r=`themes/${t}.lss`,i=await uh(e,r,n);if(!(typeof i>"u"))return no(i,!1)}async function bA(e,t){let n={},r=await Du(e,i=>{let o=i.name.replace("states/","").replace(".json","");return i.name.startsWith("states/")&&(!t||t({...i,name:o}))});for(let i in r){let o=r[i];if(o instanceof Uint8Array){let a=i.replace("states/","").replace(".json","");n[a]=no(o,!1)}}return n}async function EA(e,t,n){let r=`states/${t}.json`,i=await uh(e,r,n);return typeof i>"u"?void 0:JSON.parse(no(i,!1))}Gk(eA());var _A=class{constructor(){te(this,"_dotLottie");te(this,"_animationsMap",new Map);te(this,"_themeMap",new Map);te(this,"_stateMachinesMap",new Map);te(this,"_manifest")}get dotLottie(){return this._dotLottie}get animationsMap(){return this._animationsMap}get themeMap(){return this._themeMap}get stateMachinesMap(){return this._stateMachinesMap}get manifest(){return this._manifest}async loadFromUrl(t){var r;let n=await fetch(t,{method:"GET",mode:"cors"});if(!n.ok)throw new Error(`Failed to load dotLottie from ${t} with status ${n.status}`);if((r=n.headers.get("content-type"))!=null&&r.includes("application/json")){let i=await n.json();if(!Dl(i))throw new Error(`Invalid lottie JSON at ${t}`);let o=yk(t);this._animationsMap.set(o,i);let a={activeAnimationId:o,animations:[{id:o}]};this._manifest=a}else{this._dotLottie=await d0(await n.arrayBuffer());let i=await Od(this._dotLottie);if(!i)throw new Error("Manifest not found");this._manifest=i}}loadFromLottieJSON(t){if(!Dl(t))throw new Error("Invalid lottie JSON");let n="my-animation";this._animationsMap.set(n,t);let r={activeAnimationId:n,animations:[{id:n}]};this._manifest=r}async loadFromArrayBuffer(t){this._dotLottie=await d0(t);let n=await Od(this._dotLottie);if(!n)throw new Error("Manifest not found");this._manifest=n}async getAnimation(t){if(this._animationsMap.get(t))return this._animationsMap.get(t);if(!this._dotLottie)return;let n=await wA(this._dotLottie,t,{inlineAssets:!0});return n&&this._animationsMap.set(t,n),n}async getTheme(t){if(this._themeMap.get(t))return this._themeMap.get(t);if(!this._dotLottie)return;let n=await SA(this._dotLottie,t);return n&&this._themeMap.set(t,n),n}async getStateMachines(){if(!this._dotLottie)return;let t=await bA(this._dotLottie);for(let n in t)if(n){let r=t[n];if(r){let i=JSON.parse(r);if(i){let o=i.descriptor.id;this._stateMachinesMap.get(o)||this._stateMachinesMap.set(o,i)}}}return Array.from(this._stateMachinesMap.values())}async getStateMachine(t){if(this._stateMachinesMap.get(t))return this._stateMachinesMap.get(t);if(!this._dotLottie)return;let n=await EA(this._dotLottie,t);return n&&this._stateMachinesMap.set(n.descriptor.id,n),n}};async function xA(e,t){let[{relottie:n},{default:r}]=await Promise.all([$n(()=>import("./dist-AIQGIF54-AIRDCTYW-3493aa73.js"),["assets/dist-AIQGIF54-AIRDCTYW-3493aa73.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]),$n(()=>import("./dist-4JHQ5UB4-UQC3DUUT-48854257.js"),["assets/dist-4JHQ5UB4-UQC3DUUT-48854257.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"])]),i=await n().use(r,{lss:t}).process(JSON.stringify(e));return JSON.parse(i.value)}function $u(){throw new Error("Cycle detected")}function ch(){if(Ti>1)Ti--;else{for(var e,t=!1;No!==void 0;){var n=No;for(No=void 0,kd++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&xw(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(kd=0,Ti--,t)throw e}}var ke=void 0,No=void 0,Ti=0,kd=0,jl=0;function _w(e){if(ke!==void 0){var t=e.n;if(t===void 0||t.t!==ke)return t={i:0,S:e,p:ke.s,n:void 0,t:ke,e:void 0,x:void 0,r:t},ke.s!==void 0&&(ke.s.n=t),ke.s=t,e.n=t,32&ke.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ke.s,t.n=void 0,ke.s.n=t,ke.s=t),t}}function _t(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}_t.prototype.h=function(){return!0};_t.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};_t.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};_t.prototype.subscribe=function(e){var t=this;return kA(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})};_t.prototype.valueOf=function(){return this.value};_t.prototype.toString=function(){return this.value+""};_t.prototype.toJSON=function(){return this.value};_t.prototype.peek=function(){return this.v};Object.defineProperty(_t.prototype,"value",{get:function(){var e=_w(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ke instanceof Zr&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){kd>100&&$u(),this.v=e,this.i++,jl++,Ti++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ch()}}}});function CA(e){return new _t(e)}function xw(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Cw(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ow(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Zr(e){_t.call(this,void 0),this.x=e,this.s=void 0,this.g=jl-1,this.f=4}(Zr.prototype=new _t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===jl))return!0;if(this.g=jl,this.f|=1,this.i>0&&!xw(this))return this.f&=-2,!0;var e=ke;try{Cw(this),ke=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ke=e,Ow(this),this.f&=-2,!0};Zr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}_t.prototype.S.call(this,e)};Zr.prototype.U=function(e){if(this.t!==void 0&&(_t.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Zr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Zr.prototype.peek=function(){if(this.h()||$u(),16&this.f)throw this.v;return this.v};Object.defineProperty(Zr.prototype,"value",{get:function(){1&this.f&&$u();var e=_w(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function kw(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ti++;var n=ke;ke=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,fh(e),r}finally{ke=n,ch()}}}function fh(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,kw(e)}function OA(e){if(ke!==this)throw new Error("Out-of-order effect");Ow(this),ke=e,this.f&=-2,8&this.f&&fh(this),ch()}function Ia(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ia.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ia.prototype.S=function(){1&this.f&&$u(),this.f|=1,this.f&=-9,kw(this),Cw(this),Ti++;var e=ke;return ke=this,OA.bind(this,e)};Ia.prototype.N=function(){2&this.f||(this.f|=2,this.o=No,No=this)};Ia.prototype.d=function(){this.f|=8,1&this.f||fh(this)};function kA(e){var t=new Ia(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var AA=class{constructor(e){te(this,"_state");te(this,"_prevState");this._prevState=e,this._state=CA(e)}setState(e){this._prevState=this._state.value,this._state.value=e}subscribe(e){return this._state.subscribe(t=>e(t,this._prevState))}};async function PA(e,t){let[{DotLottieStateMachineManager:n}]=await Promise.all([$n(()=>import("./dotlottie-state-machine-manager-ZRIRTQK3-CAKXEFIF-791a2fc5.js"),[])]);if(!e.length)throw se("No state machines available inside this .lottie!");return new n(e,t)}var IA={name:"@dotlottie/common",version:"0.5.3",type:"module",description:"",author:"Afsal , Sam Osborne ",license:"MIT",private:!0,engines:{node:">18.0.0"},module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:[],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint .","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"0.5.2","@lottiefiles/relottie":"1.0.0","@lottiefiles/relottie-style":"0.4.1","@preact/signals-core":"^1.2.3","lottie-web":"^5.12.2",xstate:"^4.38.1"},devDependencies:{"@lottiefiles/lottie-types":"^1.2.0",tsup:"^6.1.3",typescript:"^4.7.4"},publishConfig:{access:"restricted"}},ht=(e=>(e.Complete="complete",e.DataFail="data_fail",e.DataReady="data_ready",e.Error="error",e.Frame="frame",e.Freeze="freeze",e.LoopComplete="loopComplete",e.Pause="pause",e.Play="play",e.Ready="ready",e.Stop="stop",e.VisibilityChange="visibilityChange",e))(ht||{}),Tn=(e=>(e.Completed="completed",e.Error="error",e.Fetching="fetching",e.Frozen="frozen",e.Initial="initial",e.Loading="loading",e.Paused="paused",e.Playing="playing",e.Ready="ready",e.Stopped="stopped",e))(Tn||{}),MA=(e=>(e.Bounce="bounce",e.Normal="normal",e))(MA||{}),Ft={autoplay:!1,direction:1,hover:!1,intermission:0,loop:!1,playMode:"normal",speed:1,defaultTheme:""},dh={activeStateId:"",autoplay:!1,currentState:"initial",frame:0,seeker:0,direction:1,hover:!1,loop:!1,playMode:"normal",speed:1,background:"transparent",intermission:0,currentAnimationId:void 0,visibilityPercentage:0},Fs=class{constructor(e,t,n){te(this,"_lottie");te(this,"_src");te(this,"_animationConfig");te(this,"_prevUserPlaybackOptions",{});te(this,"_userPlaybackOptions");te(this,"_hover",!1);te(this,"_loop",!1);te(this,"_counter",0);te(this,"_intermission",0);te(this,"_counterInterval",null);te(this,"_container",null);te(this,"_name");te(this,"_mode","normal");te(this,"_background","transparent");te(this,"_animation");te(this,"_defaultTheme");te(this,"_activeAnimationId");te(this,"_currentAnimationId");te(this,"_testId");te(this,"_listeners",new Map);te(this,"_currentState","initial");te(this,"_stateBeforeFreeze","initial");te(this,"state",new AA(dh));te(this,"_light",!1);te(this,"_dotLottieLoader",new _A);te(this,"_activeStateId");te(this,"_inInteractiveMode",!1);te(this,"_scrollTicking",!1);te(this,"_scrollCallback");te(this,"_onShowIntersectionObserver");te(this,"_visibilityPercentage",0);te(this,"_stateMachineManager");this._src=structuredClone(e),n!=null&&n.testId&&(this._testId=n.testId),this._defaultTheme=(n==null?void 0:n.defaultTheme)||"",this._userPlaybackOptions=this._validatePlaybackOptions(n||{}),typeof(n==null?void 0:n.activeAnimationId)=="string"&&(this._activeAnimationId=n.activeAnimationId),this._container=t||null,typeof(n==null?void 0:n.background)=="string"&&this.setBackground(n.background),typeof(n==null?void 0:n.activeStateId)<"u"&&(this._activeStateId=n.activeStateId),this._animationConfig={loop:!1,autoplay:!1,renderer:"svg",rendererSettings:{clearCanvas:!0,progressiveLoad:!0,hideOnTransparent:!0},...n||{}},n!=null&&n.light&&(this._light=n.light),this._listenToHover(),this._listenToVisibilityChange()}_listenToHover(){var n,r,i,o;let e=()=>{this._hover&&this.currentState!=="playing"&&this.play()},t=()=>{this._hover&&this.currentState==="playing"&&this.stop()};(n=this._container)==null||n.removeEventListener("mouseenter",e),(r=this._container)==null||r.removeEventListener("mouseleave",t),(i=this._container)==null||i.addEventListener("mouseleave",t),(o=this._container)==null||o.addEventListener("mouseenter",e)}_onVisibilityChange(){!this._lottie||typeof document>"u"||(document.hidden&&this.currentState==="playing"?this.freeze():this.currentState==="frozen"&&this.unfreeze())}_listenToVisibilityChange(){typeof document<"u"&&typeof document.hidden<"u"&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange())}_getOption(e){var n;if(typeof this._userPlaybackOptions[e]<"u")return this._userPlaybackOptions[e];let t=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(r=>r.id===this._currentAnimationId);return t&&typeof t[e]<"u"?t[e]:Ft[e]}_getPlaybackOptions(){let e={};for(let t in Ft)typeof Ft[t]<"u"&&(e[t]=this._getOption(t));return e}_setPlayerState(e){var n,r,i;let t=e(this._getPlaybackOptions());try{Ew.parse(t)}catch{Me(`Invalid PlaybackOptions, ${JSON.stringify(t,null,2)}`);return}typeof t.defaultTheme<"u"&&(this._defaultTheme=t.defaultTheme),typeof t.playMode<"u"&&(this._mode=t.playMode),typeof t.intermission<"u"&&(this._intermission=t.intermission),typeof t.hover<"u"&&(this._hover=t.hover),typeof t.loop<"u"&&(this.clearCountTimer(),this._loop=t.loop,this._counter=0,(n=this._lottie)==null||n.setLoop(typeof t.loop=="number"?!0:t.loop)),typeof t.speed<"u"&&((r=this._lottie)==null||r.setSpeed(t.speed)),typeof t.autoplay<"u"&&this._lottie&&(this._lottie.autoplay=t.autoplay),typeof t.direction<"u"&&((i=this._lottie)==null||i.setDirection(t.direction))}_getOptionsFromAnimation(e){let{id:t,...n}=e;return{...Ft,...n}}_updateTestData(){!this._testId||!this._lottie||(window.dotLottiePlayer||(window.dotLottiePlayer={[this._testId]:{}}),window.dotLottiePlayer[this._testId]={direction:this._lottie.playDirection,currentState:this._currentState,loop:this.loop,mode:this._mode,speed:this._lottie.playSpeed})}get currentState(){return this._currentState}clearCountTimer(){this._counterInterval&&clearInterval(this._counterInterval)}setCurrentState(e){this._currentState=e,this._notify(),this._updateTestData()}static isPathJSON(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())==="json"}get src(){return this._src}updateSrc(e){this._src!==e&&(this._src=structuredClone(e),this._activeAnimationId=void 0,this._currentAnimationId=void 0,this.load())}get intermission(){return this._intermission}get hover(){return this._hover}setHover(e){typeof e=="boolean"&&(this._hover=e,this._userPlaybackOptions.hover=e,this._notify())}setIntermission(e){this._intermission=e,this._userPlaybackOptions.intermission=e,this._notify()}get mode(){return this._mode}get animations(){return this._dotLottieLoader.animationsMap}get themes(){return this._dotLottieLoader.themeMap}setMode(e){typeof e=="string"&&(this._mode=e,this._userPlaybackOptions.playMode=e,this._setPlayerState(()=>({playMode:e})),this._notify(),this._updateTestData())}get container(){if(this._container)return this._container}goToAndPlay(e,t,n){if(!this._lottie||["loading"].includes(this._currentState)){Me("goToAndPlay() Can't use whilst loading.");return}this._lottie.goToAndPlay(e,t,n),this.setCurrentState("playing")}goToAndStop(e,t,n){if(!this._lottie||["loading"].includes(this._currentState)){Me("goToAndStop() Can't use whilst loading.");return}this._lottie.goToAndStop(e,t,n),this.setCurrentState("stopped")}seek(e){if(!this._lottie||["loading"].includes(this._currentState)){Me("seek() Can't use whilst loading.");return}let t=e;typeof t=="number"&&(t=Math.round(t));let n=/^(\d+)(%?)$/u.exec(t.toString());if(!n)return;let r=n[2]==="%"?this.totalFrames*Number(n[1])/100:n[1];r!==void 0&&(this._lottie.goToAndPlay(r,!0),this.currentState==="playing"?this.play():this.currentState==="frozen"?this.freeze():this.pause())}_areNumbersInRange(e,t){return e>=0&&e<=1&&t>=0&&t<=1}_updatePosition(e,t,n){let[r,i]=e??[0,this.totalFrames-1],[o,a]=t??[0,1];if(!this._areNumbersInRange(o,a)){oi("threshold values must be between 0 and 1");return}if(this.container){let{height:s,top:l}=this.container.getBoundingClientRect(),u=window.innerHeight-l,c=window.innerHeight+s,f=u/c,d=r+Math.round((f-o)/(a-o)*(i-r));n&&n(f),this.goToAndStop(d,!0),(d>=i||f>=a)&&this._handleAnimationComplete()}this._scrollTicking=!1}_requestTick(e,t,n){this._scrollTicking||(requestAnimationFrame(()=>this._updatePosition(e,t,n)),this._scrollTicking=!0)}playOnScroll(e){this.stop(),this._scrollCallback&&this.stopPlayOnScroll(),this._scrollCallback=()=>this._requestTick(e==null?void 0:e.segments,e==null?void 0:e.threshold,e==null?void 0:e.positionCallback),window.addEventListener("scroll",this._scrollCallback)}stopPlayOnScroll(){this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback),this._scrollCallback=void 0)}stopPlayOnShow(){this._onShowIntersectionObserver&&(this._onShowIntersectionObserver.disconnect(),this._onShowIntersectionObserver=void 0)}addIntersectionObserver(e){if(!this.container)throw se("Can't play on show, player container element not available.");let t={root:null,rootMargin:"0px",threshold:e!=null&&e.threshold?e.threshold:[0,1]},n=r=>{r.forEach(i=>{var o,a;this._visibilityPercentage=i.intersectionRatio*100,i.isIntersecting?(e!=null&&e.callbackOnIntersect&&e.callbackOnIntersect(this._visibilityPercentage),(o=this._container)==null||o.dispatchEvent(new Event("visibilityChange"))):e!=null&&e.callbackOnIntersect&&(e.callbackOnIntersect(0),(a=this._container)==null||a.dispatchEvent(new Event("visibilityChange")))})};this._onShowIntersectionObserver=new IntersectionObserver(n,t),this._onShowIntersectionObserver.observe(this.container)}playOnShow(e){if(this.stop(),!this.container)throw se("Can't play on show, player container element not available.");this._onShowIntersectionObserver&&this.stopPlayOnShow(),this.addIntersectionObserver({threshold:(e==null?void 0:e.threshold)??[],callbackOnIntersect:t=>{t===0?this.pause():this.play()}})}_validatePlaybackOptions(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e))switch(n){case"autoplay":typeof r=="boolean"&&(t.autoplay=r);break;case"direction":typeof r=="number"&&[1,-1].includes(r)&&(t.direction=r);break;case"loop":(typeof r=="boolean"||typeof r=="number")&&(t.loop=r);break;case"playMode":typeof r=="string"&&["normal","bounce"].includes(r)&&(t.playMode=r);break;case"speed":typeof r=="number"&&(t.speed=r);break;case"themeColor":typeof r=="string"&&(t.themeColor=r);break;case"hover":typeof r=="boolean"&&(t.hover=r);break;case"intermission":typeof r=="number"&&(t.intermission=r);break;case"defaultTheme":typeof r=="string"&&(t.defaultTheme=r);break}return this._requireValidPlaybackOptions(t),t}_requireAnimationsInTheManifest(){var e;if(!((e=this._dotLottieLoader.manifest)!=null&&e.animations.length))throw se("No animations found in manifest.")}_requireAnimationsToBeLoaded(){if(this._dotLottieLoader.animationsMap.size===0)throw se("No animations have been loaded.")}async play(e,t){var n,r;if(["initial","loading"].includes(this._currentState)){Me("Player unable to play whilst loading.");return}if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),this._lottie&&!e){this._lottie.playDirection===-1&&this._lottie.currentFrame===0?this._lottie.goToAndPlay(this._lottie.totalFrames,!0):this._lottie.play(),this.setCurrentState("playing");return}if(typeof e=="number"){let i=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations[e];if(!i)throw se("animation not found.");typeof t=="function"?await this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):await this.render({id:i.id})}if(typeof e=="string"){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations.find(o=>o.id===e);if(!i)throw se("animation not found.");typeof t=="function"?await this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):await this.render({id:i.id})}}playSegments(e,t){if(!this._lottie||["loading"].includes(this._currentState)){Me("playSegments() Can't use whilst loading.");return}this._lottie.playSegments(e,t),this.setCurrentState("playing")}resetSegments(e){if(!this._lottie||["loading"].includes(this._currentState)){Me("resetSegments() Can't use whilst loading.");return}this._lottie.resetSegments(e)}togglePlay(){this.currentState==="playing"?this.pause():this.play()}_getAnimationByIdOrIndex(e){var t,n;if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),typeof e=="number"){let r=(t=this._dotLottieLoader.manifest)==null?void 0:t.animations[e];if(!r)throw se("animation not found.");return r}if(typeof e=="string"){let r=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(i=>i.id===e);if(!r)throw se("animation not found.");return r}throw se("first param must be a number or string")}get activeAnimationId(){return this._getActiveAnimationId()}get currentAnimationId(){return this._currentAnimationId}get activeStateId(){return this._activeStateId}async _startInteractivity(e){if(!this._inInteractiveMode){oi("Can't start interactivity. Not in interactive mode. Call enterInteractiveMode(stateId: string) to start.");return}if(this._dotLottieLoader.stateMachinesMap.size===0&&await this._dotLottieLoader.getStateMachines(),this._dotLottieLoader.stateMachinesMap.size===0)throw se("No interactivity states are available.");if(e==="undefined")throw se("stateId is not specified.");this._stateMachineManager||(this._stateMachineManager=await PA(Array.from(this._dotLottieLoader.stateMachinesMap.values()),this)),this._stateMachineManager.start(e)}enterInteractiveMode(e){var t;if(e)this._inInteractiveMode||(this._prevUserPlaybackOptions={...this._userPlaybackOptions}),this._inInteractiveMode&&((t=this._stateMachineManager)==null||t.stop()),this._activeStateId=e,this._inInteractiveMode=!0,this._startInteractivity(e);else throw se("stateId must be a non-empty string.")}exitInteractiveMode(){var e;this._inInteractiveMode&&(this._inInteractiveMode=!1,this._activeStateId="",(e=this._stateMachineManager)==null||e.stop(),this._userPlaybackOptions={},this._userPlaybackOptions={...this._prevUserPlaybackOptions},this._prevUserPlaybackOptions={},this.reset())}reset(){var n;let e=this._getActiveAnimationId(),t=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(r=>r.id===e);if(this._inInteractiveMode&&this.exitInteractiveMode(),!t)throw se("animation not found.");this.play(e)}previous(e){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw se("manifest not found.");if(this._inInteractiveMode){Me("previous() is not supported in interactive mode.");return}let t=this._dotLottieLoader.manifest.animations.findIndex(r=>r.id===this._currentAnimationId);if(t===-1)throw se("animation not found.");let n=this._dotLottieLoader.manifest.animations[(t-1+this._dotLottieLoader.manifest.animations.length)%this._dotLottieLoader.manifest.animations.length];if(!n||!n.id)throw se("animation not found.");typeof e=="function"?this.render({id:n.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(n))}):this.render({id:n.id})}next(e){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw se("manifest not found.");if(this._inInteractiveMode){Me("next() is not supported in interactive mode.");return}let t=this._dotLottieLoader.manifest.animations.findIndex(r=>r.id===this._currentAnimationId);if(t===-1)throw se("animation not found.");let n=this._dotLottieLoader.manifest.animations[(t+1)%this._dotLottieLoader.manifest.animations.length];if(!n||!n.id)throw se("animation not found.");typeof e=="function"?this.render({id:n.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(n))}):this.render({id:n.id})}getManifest(){return this._dotLottieLoader.manifest}resize(){if(!this._lottie||["loading"].includes(this._currentState)){Me("resize() Can't use whilst loading.");return}this._lottie.resize()}stop(){if(!this._lottie||["loading"].includes(this._currentState)){Me("stop() Can't use whilst loading.");return}this.clearCountTimer(),this._counter=0,this._setPlayerState(()=>({direction:this._getOption("direction")})),this._lottie.stop(),this.setCurrentState("stopped")}pause(){if(!this._lottie||["loading"].includes(this._currentState)){Me("pause() Can't use whilst loading.");return}this.clearCountTimer(),this._lottie.pause(),this.setCurrentState("paused")}freeze(){if(!this._lottie||["loading"].includes(this._currentState)){Me("freeze() Can't use whilst loading.");return}this.currentState!=="frozen"&&(this._stateBeforeFreeze=this.currentState),this._lottie.pause(),this.setCurrentState("frozen")}unfreeze(){if(!this._lottie||["loading"].includes(this._currentState)){Me("unfreeze() Can't use whilst loading.");return}this._stateBeforeFreeze==="playing"?this.play():this.pause()}destroy(){var e,t;(e=this._container)!=null&&e.__lottie&&(this._container.__lottie.destroy(),this._container.__lottie=null),this.clearCountTimer(),typeof document<"u"&&document.removeEventListener("visibilitychange",()=>this._onVisibilityChange()),this._counter=0,(t=this._lottie)==null||t.destroy()}getAnimationInstance(){return this._lottie}static getLottieWebVersion(){return`${IA.dependencies["lottie-web"]}`}addEventListener(e,t){var n,r,i;this._listeners.has(e)||this._listeners.set(e,new Set),(n=this._listeners.get(e))==null||n.add(t);try{e==="complete"?(r=this._container)==null||r.addEventListener(e,t):(i=this._lottie)==null||i.addEventListener(e,t)}catch(o){oi(`addEventListener ${o}`)}}getState(){var e,t,n;return{autoplay:((e=this._lottie)==null?void 0:e.autoplay)??!1,currentState:this._currentState,frame:this._frame,visibilityPercentage:this._visibilityPercentage,seeker:this._seeker,direction:((t=this._lottie)==null?void 0:t.playDirection)??1,hover:this._hover,loop:this._loop||!1,playMode:this._mode,speed:((n=this._lottie)==null?void 0:n.playSpeed)??1,background:this._background,intermission:this._intermission,defaultTheme:this._defaultTheme,currentAnimationId:this._currentAnimationId,activeStateId:this._activeStateId??""}}_notify(){this.state.setState(this.getState())}get totalFrames(){var e;return((e=this._lottie)==null?void 0:e.totalFrames)||0}get direction(){return this._lottie?this._lottie.playDirection:1}setDirection(e){this._requireValidDirection(e),this._setPlayerState(()=>({direction:e})),this._userPlaybackOptions.direction=e}get speed(){var e;return((e=this._lottie)==null?void 0:e.playSpeed)||1}setSpeed(e){this._requireValidSpeed(e),this._setPlayerState(()=>({speed:e})),this._userPlaybackOptions.speed=e}get autoplay(){var e;return((e=this._lottie)==null?void 0:e.autoplay)??!1}setAutoplay(e){if(this._requireValidAutoplay(e),!this._lottie||["loading"].includes(this._currentState)){Me("setAutoplay() Can't use whilst loading.");return}this._setPlayerState(()=>({autoplay:e})),this._userPlaybackOptions.autoplay=e}toggleAutoplay(){if(!this._lottie||["loading"].includes(this._currentState)){Me("toggleAutoplay() Can't use whilst loading.");return}this.setAutoplay(!this._lottie.autoplay)}get defaultTheme(){return this._defaultTheme}setDefaultTheme(e){this._setPlayerState(()=>({defaultTheme:e})),this._userPlaybackOptions.defaultTheme=e,this._animation&&this.render()}get loop(){return this._loop}setLoop(e){this._requireValidLoop(e),this._setPlayerState(()=>({loop:e})),this._userPlaybackOptions.loop=e}toggleLoop(){if(!this._lottie||["loading"].includes(this._currentState)){Me("toggleLoop() Can't use whilst loading.");return}this.setLoop(!this._loop)}get background(){return this._background}setBackground(e){this._requireValidBackground(e),this._container&&(this._background=e,this._container.style.backgroundColor=e)}get _frame(){return this._lottie?this.currentState==="completed"?this.direction===-1?0:this._lottie.totalFrames:this._lottie.currentFrame:0}get _seeker(){return this._lottie?this._frame/this._lottie.totalFrames*100:0}async revertToManifestValues(e){var r;let t;!Array.isArray(e)||e.length===0?t=["autoplay","defaultTheme","direction","hover","intermission","loop","playMode","speed","activeAnimationId"]:t=e;let n=!1;if(t.includes("activeAnimationId")){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.activeAnimationId,o=this._getAnimationByIdOrIndex(i||0);this._activeAnimationId=i,await this._setCurrentAnimation(o.id),n=!0}t.forEach(i=>{switch(i){case"autoplay":delete this._userPlaybackOptions.autoplay,this.setAutoplay(this._getOption("autoplay"));break;case"defaultTheme":delete this._userPlaybackOptions.defaultTheme,this.setDefaultTheme(this._getOption("defaultTheme"));break;case"direction":delete this._userPlaybackOptions.direction,this.setDirection(this._getOption("direction"));break;case"hover":delete this._userPlaybackOptions.hover,this.setHover(this._getOption("hover"));break;case"intermission":delete this._userPlaybackOptions.intermission,this.setIntermission(this._getOption("intermission"));break;case"loop":delete this._userPlaybackOptions.loop,this.setLoop(this._getOption("loop"));break;case"playMode":delete this._userPlaybackOptions.playMode,this.setMode(this._getOption("playMode")),this.setDirection(this._getOption("direction"));break;case"speed":delete this._userPlaybackOptions.speed,this.setSpeed(this._getOption("speed"));break}}),n&&this.render()}removeEventListener(e,t){var n,r,i;try{e==="complete"?(n=this._container)==null||n.removeEventListener(e,t):(r=this._lottie)==null||r.removeEventListener(e,t),(i=this._listeners.get(e))==null||i.delete(t)}catch(o){oi("removeEventListener",o)}}_handleAnimationComplete(){var t;typeof this._loop=="number"&&this.stop();let e=this.direction===-1?0:this.totalFrames;this.goToAndStop(e,!0),this._counter=0,this.clearCountTimer(),this.setCurrentState("completed"),(t=this._container)==null||t.dispatchEvent(new Event("complete"))}addEventListeners(){var e;if(!this._lottie||["loading"].includes(this._currentState)){Me("addEventListeners() Can't use whilst loading.");return}this._lottie.addEventListener("enterFrame",()=>{var t;if(!this._lottie){Me("enterFrame event : Lottie is undefined.");return}Math.floor(this._lottie.currentFrame)===0&&this.direction===-1&&((t=this._container)==null||t.dispatchEvent(new Event("complete")),this.loop||this.setCurrentState("completed")),this._notify()}),this._lottie.addEventListener("loopComplete",()=>{var r;if(!this._lottie){Me("loopComplete event : Lottie is undefined.");return}(r=this._container)==null||r.dispatchEvent(new Event("loopComplete")),this.intermission>0&&this.pause();let t=this._lottie.playDirection;if(typeof this._loop=="number"&&this._loop>0&&(this._counter+=this._mode==="bounce"?.5:1,this._counter>=this._loop)){this._handleAnimationComplete();return}this._mode==="bounce"&&typeof t=="number"&&(t=Number(t)*-1);let n=t===-1?this._lottie.totalFrames-1:0;this.intermission?(this.goToAndPlay(n,!0),this.pause(),this._counterInterval=window.setTimeout(()=>{this._lottie&&(this._setPlayerState(()=>({direction:t})),this.goToAndPlay(n,!0))},this._intermission)):(this._setPlayerState(()=>({direction:t})),this.goToAndPlay(t===-1?this.totalFrames-1:0,!0))}),this._lottie.addEventListener("complete",()=>{if(this._lottie&&this._loop===!1&&this._mode==="bounce"){if(this._counter+=.5,this._counter>=1){this._handleAnimationComplete();return}this._counterInterval=window.setTimeout(()=>{if(!this._lottie)return;let t=this._lottie.playDirection;this._mode==="bounce"&&typeof t=="number"&&(t=Number(t)*-1);let n=t===-1?this.totalFrames-1:0;this._setPlayerState(()=>({direction:t})),this.goToAndPlay(n,!0)},this._intermission)}else this._handleAnimationComplete()});for(let[t,n]of this._listeners)if(t==="complete")for(let r of n)(e=this._container)==null||e.addEventListener(t,r);else for(let r of n)this._lottie.addEventListener(t,r)}async _setCurrentAnimation(e){this._currentState="loading";let t=await this._dotLottieLoader.getAnimation(e);this._currentAnimationId=e,this._animation=t,this._currentState="ready"}async render(e){if(e!=null&&e.id)await this._setCurrentAnimation(e.id);else if(!this._animation)throw se("no animation selected");let t=Ft.loop,n=Ft.autoplay,r=Ft.playMode,i=Ft.intermission,o=Ft.hover,a=Ft.direction,s=Ft.speed,l=Ft.defaultTheme;t=(e==null?void 0:e.loop)??this._getOption("loop"),n=(e==null?void 0:e.autoplay)??this._getOption("autoplay"),r=(e==null?void 0:e.playMode)??this._getOption("playMode"),i=(e==null?void 0:e.intermission)??this._getOption("intermission"),o=(e==null?void 0:e.hover)??this._getOption("hover"),a=(e==null?void 0:e.direction)??this._getOption("direction"),s=(e==null?void 0:e.speed)??this._getOption("speed"),l=(e==null?void 0:e.defaultTheme)??this._getOption("defaultTheme");let u={...this._animationConfig,autoplay:o?!1:n,loop:typeof t=="number"?!0:t},c=await this._dotLottieLoader.getTheme(l);c&&this._animation?this._animation=await xA(this._animation,c):this._animation=await this._dotLottieLoader.getAnimation(this._currentAnimationId??"");let f=await this._getLottiePlayerInstance();if(this._activeStateId&&!this._inInteractiveMode){this.enterInteractiveMode(this._activeStateId);return}this.destroy(),this._setPlayerState(()=>({defaultTheme:l,playMode:r,intermission:i,hover:o,loop:t})),this._lottie=f.loadAnimation({...u,container:this._container,animationData:this._animation}),this.addEventListeners(),this._container&&(this._container.__lottie=this._lottie),this._setPlayerState(()=>({direction:a,speed:s})),n&&!o&&this.play(),this._updateTestData()}async _getLottiePlayerInstance(){let e=this._animationConfig.renderer??"svg",t;switch(e){case"svg":{this._light?t=await $n(()=>import("./lottie_light-IOYK46WR-C42PZIWW-842cd67b.js"),["assets/lottie_light-IOYK46WR-C42PZIWW-842cd67b.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_svg-NPHRPZVQ-SN5HKEBW-b354eb1e.js"),["assets/lottie_svg-NPHRPZVQ-SN5HKEBW-b354eb1e.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}case"canvas":{this._light?t=await $n(()=>import("./lottie_light_canvas-JOJMVDMY-Y3JQKMNA-129b1fdc.js"),["assets/lottie_light_canvas-JOJMVDMY-Y3JQKMNA-129b1fdc.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_canvas-MBHU2YSW-VFQ5A67K-34d36756.js"),["assets/lottie_canvas-MBHU2YSW-VFQ5A67K-34d36756.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}case"html":{this._light?t=await $n(()=>import("./lottie_light_html-QXO6XUZK-N4R277UW-62a905c2.js"),["assets/lottie_light_html-QXO6XUZK-N4R277UW-62a905c2.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_html-DEQZ7JWN-7UJDZM6D-84fdb830.js"),["assets/lottie_html-DEQZ7JWN-7UJDZM6D-84fdb830.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}default:throw new Error(`Invalid renderer: ${e}`)}return t.default}_getActiveAnimationId(){var t;let e=this._dotLottieLoader.manifest;return this._activeAnimationId??(e==null?void 0:e.activeAnimationId)??((t=e==null?void 0:e.animations[0])==null?void 0:t.id)??void 0}async load(e){if(this._currentState==="loading"){Me("Loading in progress..");return}try{if(this.setCurrentState("loading"),typeof this._src=="string")if(wk(this._src)){let n=JSON.parse(this._src);this._dotLottieLoader.loadFromLottieJSON(n)}else{let n=new URL(this._src,window.location.href);await this._dotLottieLoader.loadFromUrl(n.toString())}else if(typeof this._src=="object"&&Dl(this._src))this._dotLottieLoader.loadFromLottieJSON(this._src);else throw se("Invalid src provided");if(!this._dotLottieLoader.manifest)throw se("No manifest found");let t=this._getActiveAnimationId();if(!t)throw se("No active animation found");await this._setCurrentAnimation(t),await this.render(e)}catch(t){this.setCurrentState("error"),t instanceof Error&&oi(`Error loading animation: ${t.message}`)}}setErrorState(e){this.setCurrentState("error"),oi(e)}_requireValidDirection(e){if(e!==-1&&e!==1)throw se("Direction can only be -1 (backwards) or 1 (forwards)")}_requireValidIntermission(e){if(e<0||!Number.isInteger(e))throw se("intermission must be a positive number")}_requireValidLoop(e){if(typeof e=="number"&&(!Number.isInteger(e)||e<0))throw se("loop must be a positive number or boolean")}_requireValidSpeed(e){if(typeof e!="number")throw se("speed must be a number")}_requireValidBackground(e){if(typeof e!="string")throw se("background must be a string")}_requireValidAutoplay(e){if(typeof e!="boolean")throw se("autoplay must be a boolean")}_requireValidPlaybackOptions(e){e.direction&&this._requireValidDirection(e.direction),e.intermission&&this._requireValidIntermission(e.intermission),e.loop&&this._requireValidLoop(e.loop),e.speed&&this._requireValidSpeed(e.speed)}};function LA(){var e=b.useRef(!0);return e.current?(e.current=!1,!0):e.current}var TA=function(e,t){var n=LA();b.useEffect(function(){if(!n)return e()},t)},Rt=TA,DA=function(){};function Aw(e){for(var t=[],n=1;n{let e=b.useContext(Iw);if(typeof e>"u")throw se("useDotLottieContext must be used within a DotLottieProvider");return e},Lw=(e,t,n)=>{let[r,i]=b.useState(()=>n());return b.useEffect(()=>{let o=e(()=>{let a=t();i(a)});return()=>{o()}},[e]),r};function ai(e){let t=Mw(),n=b.useCallback(()=>e(t.getState()),[e,t]),r=b.useCallback(i=>t.state.subscribe(i),[t]);return Lw(r,n,()=>e(dh))}var qA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M8.33325 11.6667C7.78097 11.6667 7.33325 12.1144 7.33325 12.6667C7.33325 13.2189 7.78097 13.6667 8.33325 13.6667C8.88554 13.6667 9.33325 13.2189 9.33325 12.6667C9.33325 12.1144 8.88554 11.6667 8.33325 11.6667Z",fill:"currentColor"}),O.jsx("path",{d:"M7.33325 8C7.33325 7.44771 7.78097 7 8.33325 7C8.88554 7 9.33325 7.44771 9.33325 8C9.33325 8.55228 8.88554 9 8.33325 9C7.78097 9 7.33325 8.55228 7.33325 8Z",fill:"currentColor"}),O.jsx("path",{d:"M7.33325 3.33333C7.33325 2.78105 7.78097 2.33333 8.33325 2.33333C8.88554 2.33333 9.33325 2.78105 9.33325 3.33333C9.33325 3.88562 8.88554 4.33333 8.33325 4.33333C7.78097 4.33333 7.33325 3.88562 7.33325 3.33333Z",fill:"currentColor"})]}),KA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M10.8654 2.31311C11.0607 2.11785 11.3772 2.11785 11.5725 2.31311L13.4581 4.19873C13.6534 4.39399 13.6534 4.71058 13.4581 4.90584L11.5725 6.79146C11.3772 6.98672 11.0607 6.98672 10.8654 6.79146C10.6701 6.5962 10.6701 6.27961 10.8654 6.08435L11.6162 5.33354H4V6.66687C4 7.03506 3.70152 7.33354 3.33333 7.33354C2.96514 7.33354 2.66666 7.03506 2.66666 6.66687L2.66666 4.66687C2.66666 4.29868 2.96514 4.0002 3.33333 4.0002H11.8454L10.8654 3.02022C10.6701 2.82496 10.6701 2.50838 10.8654 2.31311Z",fill:"currentColor"}),O.jsx("path",{d:"M12.4375 11.9998C12.8057 11.9998 13.1042 11.7013 13.1042 11.3331V9.33313C13.1042 8.96494 12.8057 8.66647 12.4375 8.66647C12.0693 8.66647 11.7708 8.96494 11.7708 9.33313V10.6665H4.15462L4.90543 9.91565C5.10069 9.72039 5.10069 9.40381 4.90543 9.20854C4.71017 9.01328 4.39359 9.01328 4.19832 9.20854L2.31271 11.0942C2.11744 11.2894 2.11744 11.606 2.31271 11.8013L4.19832 13.6869C4.39359 13.8821 4.71017 13.8821 4.90543 13.6869C5.10069 13.4916 5.10069 13.175 4.90543 12.9798L3.92545 11.9998H12.4375Z",fill:"currentColor"})]}),GA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3336 2.5C14.3336 2.22386 14.1097 2 13.8336 2C13.5574 2 13.3336 2.22386 13.3336 2.5V13.5C13.3336 13.7761 13.5574 14 13.8336 14C14.1097 14 14.3336 13.7761 14.3336 13.5V2.5ZM3.50618 2.21722C2.83954 1.82595 2 2.30667 2 3.07965V12.9201C2 13.6931 2.83954 14.1738 3.50618 13.7825L11.8893 8.86231C12.5477 8.47586 12.5477 7.52389 11.8893 7.13745L3.50618 2.21722Z",fill:"currentColor"})}),QA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M3.99996 2C3.26358 2 2.66663 2.59695 2.66663 3.33333V12.6667C2.66663 13.403 3.26358 14 3.99996 14H5.33329C6.06967 14 6.66663 13.403 6.66663 12.6667V3.33333C6.66663 2.59695 6.06967 2 5.33329 2H3.99996Z",fill:"currentColor"}),O.jsx("path",{d:"M10.6666 2C9.93025 2 9.33329 2.59695 9.33329 3.33333V12.6667C9.33329 13.403 9.93025 14 10.6666 14H12C12.7363 14 13.3333 13.403 13.3333 12.6667V3.33333C13.3333 2.59695 12.7363 2 12 2H10.6666Z",fill:"currentColor"})]}),YA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{d:"M3.33337 3.46787C3.33337 2.52312 4.35948 1.93558 5.17426 2.41379L12.8961 6.94592C13.7009 7.41824 13.7009 8.58176 12.8961 9.05408L5.17426 13.5862C4.35948 14.0644 3.33337 13.4769 3.33337 12.5321V3.46787Z",fill:"currentColor"})}),JA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.69214 13.5C1.69214 13.7761 1.916 14 2.19214 14C2.46828 14 2.69214 13.7761 2.69214 13.5L2.69214 2.5C2.69214 2.22386 2.46828 2 2.19214 2C1.916 2 1.69214 2.22386 1.69214 2.5V13.5ZM12.5192 13.7828C13.1859 14.174 14.0254 13.6933 14.0254 12.9204L14.0254 3.0799C14.0254 2.30692 13.1859 1.8262 12.5192 2.21747L4.13612 7.13769C3.47769 7.52414 3.47769 8.4761 4.13612 8.86255L12.5192 13.7828Z",fill:"currentColor"})}),XA=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5303 6.46967C13.8232 6.76256 13.8232 7.23744 13.5303 7.53033L9.06066 12L13.5303 16.4697C13.8232 16.7626 13.8232 17.2374 13.5303 17.5303C13.2374 17.8232 12.7626 17.8232 12.4697 17.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L12.4697 6.46967C12.7626 6.17678 13.2374 6.17678 13.5303 6.46967Z",fill:"currentColor"})}),ZA=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4697 17.5303C10.1768 17.2374 10.1768 16.7626 10.4697 16.4697L14.9393 12L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L11.5303 17.5303C11.2374 17.8232 10.7626 17.8232 10.4697 17.5303Z",fill:"currentColor"})}),e7=({children:e,enableReset:t,expand:n=!1,onBack:r,onExpand:i,onReset:o,title:a})=>{let s=b.useCallback(()=>{r()},[r]),l=b.useCallback(()=>{i()},[i]),u=b.useCallback(()=>{o()},[o]);return O.jsxs(O.Fragment,{children:[!n&&O.jsxs("button",{className:"popover-item","aria-label":`Go to ${a}`,onClick:l,children:[O.jsx("span",{style:{flex:1},children:a}),O.jsx("span",{children:O.jsx(ZA,{})})]}),n&&O.jsxs("div",{className:"popover-submenu",children:[O.jsxs("div",{className:"popover-header",children:[O.jsx("button",{onClick:s,children:O.jsx(XA,{})}),O.jsxs("div",{className:"popover-header-title",style:{flex:1},children:[O.jsx("span",{children:a}),t&&O.jsx("button",{className:"reset-theme",onClick:u,"aria-label":`Reset ${a}`,children:"Reset"})]})]}),e]})]})},t7=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5283 5.9372C20.8211 6.23009 20.8211 6.70497 20.5283 6.99786L9.4631 18.063C9.32181 18.2043 9.12997 18.2833 8.93016 18.2826C8.73035 18.2819 8.53907 18.2015 8.39877 18.0593L3.46807 13.0596C3.17722 12.7647 3.18052 12.2898 3.47544 11.999C3.77036 11.7081 4.24522 11.7114 4.53608 12.0063L8.93646 16.4683L19.4676 5.9372C19.7605 5.64431 20.2354 5.64431 20.5283 5.9372Z",fill:"currentColor"})}),n7=({onSelectItem:e,selected:t=!1,value:n,...r})=>{let i=b.useCallback(()=>{e==null||e(n)},[e,n]);return O.jsxs("button",{"aria-label":`Select ${n}`,className:`popover-item ${t?"selected":""}`,onClick:i,...r,children:[O.jsx("span",{style:{visibility:t?"visible":"hidden"},children:O.jsx(t7,{})}),O.jsx("span",{style:{flex:1},children:n})]})},r7=({items:e=[],onSelectItem:t,onDismiss:n,...r})=>{let[i,o]=b.useState(""),a=b.useRef(null);RA(a,()=>{o(""),n()}),HA("Escape",()=>{o(""),n()});let s=b.useCallback(()=>{o("")},[o]),l=b.useCallback(c=>()=>o(c),[o]),u=b.useCallback((c,f)=>()=>t(c,f),[t]);return O.jsx("dialog",{ref:a,style:{padding:i?"0px":"8px"},className:"popover","aria-label":"Popover Menu",...r,children:O.jsx("ul",{"aria-label":"Popover content",className:"popover-content",children:e.map(c=>O.jsx("li",{style:{width:"100%"},children:(i===c.title||!i)&&O.jsx(e7,{expand:i===c.title,title:c.title,onExpand:l(c.title),onBack:s,enableReset:c.enableReset,onReset:u(c.title,""),children:O.jsx("ul",{className:"popover-items","aria-label":`List of ${c.title}`,children:c.items.map(f=>O.jsx("li",{children:O.jsx(n7,{value:f.value,selected:f.selected,onSelectItem:u(c.title,f.value)})},f.value))})})},c.title))})})},i7=["play","stop","loop","next","previous","animations","themes"],o7=({buttons:e=i7,...t})=>{let n=Mw(),r=ai(B=>B.loop),i=ai(B=>B.currentState),o=ai(B=>B.seeker),a=ai(B=>B.currentAnimationId),s=ai(B=>B.defaultTheme),l=ai(B=>B.direction),u=b.useMemo(()=>i===Tn.Playing,[i]),[c,f]=b.useState(!1),[d,h]=b.useState([]),[y,v]=b.useState([]),w=b.useMemo(()=>{let B=[],D=d.map($=>({value:$.id,selected:a===$.id})),I=y.filter($=>$.animations.includes(a||"")).map($=>({value:$.id,selected:s===$.id}));return Array.isArray(D)&&D.length!==0&&B.push({title:"Animations",items:D,enableReset:!1}),Array.isArray(I)&&I.length!==0&&B.push({title:"Themes",items:I,enableReset:!!s}),B},[d,y,a,s]),p=b.useMemo(()=>e.includes("themes")&&Array.isArray(y)&&y.length?!0:e.includes("animations")&&Array.isArray(d)&&d.length>1,[w]),m=b.useCallback(()=>{f(!c)},[f]),g=b.useCallback(()=>{f(!1)},[f]),S=b.useCallback(()=>{n.toggleLoop()},[n]),E=b.useCallback(()=>{n.freeze()},[n]),_=b.useCallback(()=>{n.unfreeze()},[n]),x=b.useCallback(()=>{n.next()},[n]),C=b.useCallback(()=>{n.previous()},[n]),k=b.useCallback(()=>{n.togglePlay()},[n]),A=b.useCallback((B,D)=>{B==="Animations"&&n.play(D),B==="Themes"&&n.setDefaultTheme(D)},[n]),T=b.useCallback(B=>{n.seek(String(B.currentTarget.value).concat("%"))},[n]);function j(){var I,$;let B=(I=n.getManifest())==null?void 0:I.animations,D=($=n.getManifest())==null?void 0:$.themes;B&&h(B),D&&v(D)}return b.useEffect(()=>{if(!(typeof n>"u"))return n.addEventListener("DOMLoaded",j),()=>{n.removeEventListener("DOMLoaded",j)}},[n]),O.jsxs("div",{"aria-label":"lottie-animation-controls",className:"toolbar",...t,children:[e.includes("previous")&&d.length>1&&O.jsx("button",{onClick:C,"aria-label":"play-previous",children:O.jsx(JA,{})}),e.includes("play")&&O.jsx("button",{onClick:k,"aria-label":"play-pause",children:u?O.jsx(QA,{}):O.jsx(YA,{})}),e.includes("next")&&d.length>1&&O.jsx("button",{onClick:x,"aria-label":"play-next",children:O.jsx(GA,{})}),O.jsx("input",{style:{width:"100%","--seeker":o},className:`seeker ${l===1?"":"to-left"}`,type:"range",min:0,step:0,max:100,value:o||0,onInput:T,onMouseDown:E,onMouseUp:_,"aria-valuemin":1,"aria-valuemax":100,role:"slider","aria-valuenow":o,"aria-label":"lottie-seek-input"}),e.includes("loop")&&O.jsx("button",{onClick:S,className:r?"active":"","aria-label":"loop-toggle",children:O.jsx(KA,{})}),p&&O.jsxs("div",{style:{position:"relative"},children:[O.jsx(r7,{items:w,open:c,onDismiss:g,onSelectItem:A}),O.jsx("button",{className:`${c?"popover-active":""}`,"aria-label":"open-popover",onClick:m,children:O.jsx(qA,{})})]})]})},a7={name:"@dotlottie/react-player",version:"1.4.5",type:"module",description:"dotlottie animation player react component.",repository:"https://github.com/dotlottie/player-component.git",homepage:"https://dotlottie.com/players",bugs:"https://github.com/dotlottie/player-component/issues",author:"Afsal ",license:"MIT",module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:["dotlottie","animation","react","component","player"],scripts:{build:"tsup","cypress:open":"cypress open --component",dev:"tsup --watch",lint:"eslint .",test:"cypress run --component","type-check":"tsc --noEmit"},peerDependencies:{react:"^16.8.0 || ^17.0.0 || ^18.0.0"},devDependencies:{"@dotlottie/common":"workspace:^","@lottiefiles/lottie-types":"^1.2.0","@types/react":"^16.8.0","@types/react-dom":"^16.8.0","@vitejs/plugin-react":"^3.1.0",autoprefixer:"^10.4.14","axe-core":"^4.7.2",cypress:"^12.11.0","cypress-axe":"^1.4.0",postcss:"^8.4.24",react:"^16.8.0","react-dom":"^16.8.0","react-use":"^17.4.0",tsup:"^6.1.3",typescript:"^4.7.4",vite:"^4.2.1"}},s7=e=>{let t=b.useRef(!1);b.useEffect(()=>{let n;return t.current||(t.current=!0,n=e()),()=>{typeof n=="function"&&n()}},[])},l7=(e,t,n)=>{let[r,i]=b.useState(()=>new Fs(e,t.current,n)),o=b.useCallback(()=>{let s=new Fs(e,t.current,n);return s.load(),s},[t,e,n]),a=b.useCallback(()=>{i(o())},[o]);return n!=null&&n.lottieRef&&b.useImperativeHandle(n.lottieRef,()=>({play:(s,l)=>{r.play(s,l)},previous:s=>{r.previous(s)},next:s=>{r.next(s)},reset:()=>{r.reset()},getManifest:()=>r.getManifest(),getState:()=>r.getState(),getCurrentAnimationId:()=>r.currentAnimationId,getLottie:()=>r.getAnimationInstance(),getVersions:()=>({lottieWebVersion:Fs.getLottieWebVersion(),dotLottieReactVersion:`${a7.version}`}),setDefaultTheme:s=>{r.setDefaultTheme(s)},setBackground:s=>{r.setBackground(s)},setAutoplay:s=>{r.setAutoplay(s)},setDirection:s=>{r.setDirection(s)},setHover:s=>{r.setHover(s)},setIntermission:s=>{r.setIntermission(s)},setLoop:s=>{r.setLoop(s)},setPlayMode:s=>{r.setMode(s)},setSpeed:s=>{r.setSpeed(s)},revertToManifestValues:s=>{r.revertToManifestValues(s)},pause:()=>{r.pause()},seek:s=>{r.seek(s)},getContainer:()=>r.container,goToAndPlay:(s,l,u)=>{r.goToAndPlay(s,l,u)},goToAndStop:(s,l,u)=>{r.goToAndStop(s,l,u)},stop:()=>{r.stop()},togglePlay:()=>{r.togglePlay()},resize:()=>{r.resize()},enterInteractiveMode:s=>{r.enterInteractiveMode(s)},playOnShow:s=>{r.playOnShow(s)},stopPlayOnShow:()=>{r.stopPlayOnShow()},playOnScroll:s=>{r.playOnScroll(s)},stopPlayOnScroll:()=>{r.stopPlayOnScroll()},exitInteractiveMode:()=>{r.exitInteractiveMode()}}),[n.lottieRef.current,r]),s7(()=>(a(),()=>{r.destroy()})),{dotLottiePlayer:r,initDotLottiePlayer:a}};function ps(e,t){let n=b.useCallback(()=>t(e.getState()),[t,e]),r=b.useCallback(i=>e.state.subscribe(i),[e]);return Lw(r,n,()=>t(dh))}var u7=({onEvent:e,activeAnimationId:t,autoplay:n,background:r="transparent",direction:i,intermission:o,loop:a,playMode:s,hover:l,speed:u,renderer:c="svg",rendererSettings:f={},lottieRef:d,src:h,className:y="",testId:v,children:w,defaultTheme:p,light:m=!1,activeStateId:g,...S})=>{let E=b.useRef(null),{dotLottiePlayer:_,initDotLottiePlayer:x}=l7(h,E,{lottieRef:d,renderer:c,activeAnimationId:t,rendererSettings:{clearCanvas:!0,progressiveLoad:!1,hideOnTransparent:!0,...f},hover:l,loop:a,direction:i,speed:u,intermission:o,background:r,playMode:s,autoplay:l?!1:n,testId:v,defaultTheme:p,light:m,activeStateId:g}),C=ps(_,j=>j.currentState),k=ps(_,j=>j.frame),A=ps(_,j=>j.seeker),T=ps(_,j=>j.currentAnimationId);return Rt(()=>{typeof a>"u"?_.revertToManifestValues(["loop"]):_.setLoop(a)},[a]),Rt(()=>{typeof n>"u"?_.revertToManifestValues(["autoplay"]):_.setAutoplay(n)},[n]),Rt(()=>{typeof i>"u"?_.revertToManifestValues(["direction"]):_.setDirection(i)},[i]),Rt(()=>{typeof u>"u"?_.revertToManifestValues(["speed"]):_.setSpeed(u)},[u]),Rt(()=>{typeof s>"u"?_.revertToManifestValues(["playMode"]):_.setMode(s)},[s]),Rt(()=>{typeof l>"u"?_.revertToManifestValues(["hover"]):_.setHover(l)},[l]),Rt(()=>{typeof r>"u"?_.setBackground("transparent"):_.setBackground(r)},[r]),Rt(()=>{typeof o>"u"?_.revertToManifestValues(["intermission"]):_.setIntermission(o)},[o]),Rt(()=>{typeof p>"u"||!p?_.revertToManifestValues(["defaultTheme"]):_.setDefaultTheme(p)},[p]),Rt(()=>{t&&_.play(t)},[t]),Rt(()=>(typeof g<"u"&&_.enterInteractiveMode(g),()=>{_.exitInteractiveMode()}),[g]),Rt(()=>{typeof h<"u"&&x()},[h]),b.useEffect(()=>(_.addEventListener("DOMLoaded",()=>{e==null||e(ht.Ready)}),_.addEventListener("data_ready",()=>{e==null||e(ht.DataReady)}),_.addEventListener("data_failed",()=>{e==null||e(ht.DataFail)}),_.addEventListener("complete",()=>{_.currentState!==Tn.Playing&&(e==null||e(ht.Complete))}),_.addEventListener("loopComplete",()=>{e==null||e(ht.LoopComplete)}),()=>{_.destroy()}),[_]),b.useEffect(()=>{switch(C){case Tn.Stopped:e==null||e(ht.Stop);break;case Tn.Paused:e==null||e(ht.Pause);break;case Tn.Playing:e==null||e(ht.Play);break;case Tn.Frozen:e==null||e(ht.Freeze);break;case Tn.Error:e==null||e(ht.Error);break}},[C]),b.useEffect(()=>{e==null||e(ht.Frame,{frame:k,seeker:A})},[k]),O.jsx(WA,{value:_,children:O.jsxs("div",{className:`dotlottie-container main ${w?"controls":""} ${y}`,lang:"en",...v&&{"data-testid":v},...S,children:[O.jsx("div",{ref:E,"data-name":`${T}`,role:"figure",className:`animation ${w?"controls":""}`,style:{position:"relative"},...v&&{"data-testid":"animation"},children:C===Tn.Error&&O.jsx("div",{...v&&{"data-testid":"error"},className:"error",children:"⚠️"})}),w]})})};const c7=({activeAnimationId:e})=>{const t=b.useRef(),n=Fe(d=>d.playground.playerUrl),[r,i]=b.useState([]),[o,a]=b.useState(""),[s,l]=b.useState(0),u=b.useCallback((d,h)=>{var v,w,p;if(d===ht.Ready){const m=(w=(v=t.current)==null?void 0:v.getManifest())==null?void 0:w.states;i(m||[])}if(d===ht.Frame){const{frame:m}=h;l(Math.floor(m))}const y=(p=t.current)==null?void 0:p.getState();y&&a(y.activeStateId||"")},[t]),c=b.useCallback(()=>()=>{t.current&&t.current.exitInteractiveMode()},[t]),f=b.useCallback(d=>()=>{t.current&&t.current.enterInteractiveMode(d)},[t]);if(n)return O.jsx("div",{children:O.jsxs(O.Fragment,{children:[O.jsx(u7,{activeAnimationId:e||void 0,background:"white",onEvent:u,lottieRef:t,src:n,children:O.jsxs("div",{className:"bg-white",children:[O.jsx(o7,{}),O.jsx("div",{className:"px-3 pb-1",children:O.jsxs("span",{className:"bg-gray-300 rounded px-2",children:["# ",O.jsx("span",{children:s})]})})]})}),O.jsx("div",{className:"flex flex-wrap gap-2 p-2 text-white",children:O.jsxs("div",{className:"text-white",children:[O.jsxs("div",{className:"mb-2 flex gap-2",children:[O.jsx("span",{children:"Interactivity states:"}),O.jsx(Ol,{disabled:!o,color:"red",onClick:c(),children:"Exit Interactivity"})]}),O.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(d=>O.jsx(Ol,{color:o===d?"green":"blue",onClick:f(d),children:d},d))})]})})]})})};const f7=({file:e,fileName:t})=>{const n=Au(),r=b.useRef(),i=Fe(L=>L.animations.list),o=Fe(L=>L.themes.list),a=Fe(L=>L.states.list),{addDotLottieAnimation:s,addDotLottieStateMachine:l,addDotLottieTheme:u,buildAndUpdateUrl:c,dotLottie:f,downloadDotLottie:d,fetchAndUpdateDotLottie:h,removeDotLottieAnimation:y,removeDotLottieState:v,removeDotLottieTheme:w,setDotLottie:p}=qp(),m=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.content}),g=Fe(L=>{var R;return((R=L.editor.file)==null?void 0:R.type)||"json"}),S=Fe(L=>L.editor.animationId),E=Fe(L=>L.playground.workingFileName),_=b.useCallback(async(L,R)=>{let H,W="";if(L instanceof File?(H=await L.arrayBuffer(),W=L.name):(H=L,W=R||"new_awesome"),typeof H<"u")try{const Z=await f.fromArrayBuffer(H);n(Ms()),n(os(W)),p(Z)}catch(Z){me(Z.message,{type:"error"})}},[os,p]),x=b.useCallback(L=>{const R=L[0];typeof R>"u"||_(R)},[_]);b.useEffect(()=>{_(e,t)},[_]);const C=Fe(L=>L.editor.validationStatus),k=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.name}),A=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.path}),T=b.useCallback(L=>{C&&L&&n(Cl(L))},[C,n]),j=Fe(L=>L.editor.updated),B=b.useCallback(()=>{var H;if(!C||!k)return;const L=(H=r.current)==null?void 0:H.getValue();let R;if(L){switch(A){case"States":if(R=JSON.parse(L),L&&k){const W=R.descriptor.id;l(R,k),n(kv({name:W}))}break;case"Themes":k&&u(L,k);break}n(Cl(!1))}},[C,k,n,A]);function D(L){r.current=L}b.useEffect(()=>{f.animations.length&&(h(),c())},[f,c,h]);const I=b.useCallback(async(L,R)=>{var Z,oe;n(Ms());let H,W=!1;switch(L){case"States":H=(Z=f.getStateMachine(R))==null?void 0:Z.toString();break;case"Themes":H=await((oe=f.getTheme(R))==null?void 0:oe.toString()),W=!0;break}H&&n(kv({name:R,type:W?"css":"json",path:L,content:W?H:a6(H)}))},[f,n]),$=b.useCallback(L=>{if(L.some(H=>H.severity===8)){n(Av(!1));return}n(Av(!0))},[n]),N=b.useCallback((L,R)=>{switch(L){case"States":v(R);break;case"Animations":y(R);break;case"Themes":w(R);break}(k===R||S===R)&&n(Ms())},[f,n,k,S]),P=b.useCallback(async(L,R)=>{const H=dd(R.name).replace(/(.json|.lss)/gu,"");let W;switch(L){case"States":W=JSON.parse(await R.text()),l(W);break;case"Animations":W=JSON.parse(await R.text()),s(W,H);break;case"Themes":W=await R.text(),u(W,R.name);break}},[f]),M=b.useCallback(()=>{h(),c()},[h,c]),z=b.useCallback(async(L,R)=>{const H=dd(R).replace(/(.json|.lss)/gu,"");let W;switch(L){case"States":W=s6(),W.descriptor.id=H,l(W);break;case"Themes":u("/* Make your animations colorful */",H);break}},[f]),F=b.useCallback((L,R)=>{n(c6(R.replace(/.json/gu,"")))},[n]),V=b.useCallback(L=>{n(os(L))},[os,n]);return O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"w-full bg-dark p-2 flex gap-2 justify-end",children:[O.jsx(ia,{onDrop:x,accept:"lottie",children:L=>O.jsxs(Ol,{...L.getRootProps(),children:[O.jsx("input",{...L.getInputProps()}),"Start Over"]})}),O.jsx("div",{className:"flex-1 flex justify-center items-center text-gray-400 text-sm",children:O.jsx(d6,{title:E,onChange:V})}),O.jsx(Ol,{onClick:d,children:"Download"})]}),O.jsx("div",{className:"flex grow border-t border-gray-600 flex-1 max-h-[calc(100vh-2.9rem)]",children:O.jsxs(Ty,{autoSaveId:"dotlottie-playground",direction:"horizontal",className:"h-full",children:[O.jsx(ks,{defaultSize:10,maxSize:40,className:"bg-dark",children:O.jsxs("section",{className:"flex flex-col h-full",children:[O.jsx(Fc,{className:"flex-1 h-1/3",title:"Animations",files:i,onClick:F,onRemove:N,onUpload:P}),O.jsx(Fc,{className:"flex-1 h-1/3",title:"States",files:a,onClick:I,onRemove:N,onUpload:P,onAddNew:z}),O.jsx(Fc,{className:"flex-1 h-1/3",title:"Themes",files:o,onClick:I,onRemove:N,onUpload:P,onAddNew:z})]})}),O.jsx(Yf,{className:"bg-gray-500 w-1"}),O.jsx(ks,{children:O.jsx(ia,{onDrop:x,accept:"lottie",noClick:!0,children:L=>O.jsxs("div",{className:"flex flex-col w-full h-full relative",...L.getRootProps(),children:[O.jsx("input",{...L.getInputProps()}),L.isDragActive&&O.jsx("div",{className:"absolute z-10 inset-0 bg-gray-500 opacity-80 flex justify-center items-center text-white text-3xl",children:"Drop your .lottie here"}),S&&O.jsx(mk,{onUpdate:M}),m&&O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[O.jsx("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:k}),O.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:B,disabled:!j,children:O.jsx(wy,{size:33})})]}),O.jsx(g_,{className:"flex-1 max-h-[calc(100vh-5.5rem)]",language:g,width:"100%",theme:"vs-dark",options:{fontSize:15,formatOnPaste:!0,formatOnType:!0,minimap:{enabled:!1}},loading:"Loading...",value:m,onChange:T,onMount:D,onValidate:$})]})]})})}),O.jsx(Yf,{className:"bg-gray-500 w-1"}),O.jsx(ks,{defaultSize:25,children:O.jsx(c7,{activeAnimationId:S})})]})})]})},d7=[{name:"toggle.lottie",path:"/player-component/toggle.lottie"},{name:"interactivity_example.lottie",path:"/player-component/interactivity_example.lottie"},{name:"aniki_hamster.lottie",path:"/player-component/aniki_hamster.lottie"}],p7=({onStart:e})=>{const t=b.useCallback(async(o,a)=>{let s,l="";o instanceof File?(s=await o.arrayBuffer(),l=o.name):(s=o,l=a||"new_awesome"),typeof s<"u"&&e(s,l)},[e]),n=b.useCallback(o=>{const a=o[0];a&&t(a)},[e]),r=b.useCallback(async(o,a)=>{const l=await(await fetch(o)).arrayBuffer();t(l,a)},[]),i=b.useCallback(o=>()=>{r(o.path,o.name)},[e]);return O.jsx(ia,{onDrop:n,accept:"lottie",noClick:!0,children:o=>O.jsxs("div",{...o.getRootProps(),className:"h-full bg-dark text-white flex justify-center items-center",children:[O.jsx("input",{...o.getInputProps()}),o.isDragActive?O.jsx("h1",{className:"text-5xl mb-4",children:"Drop it!!!! Almost there :)"}):O.jsxs("div",{className:"p-10 rounded text-gray-400 max-w-2xl",children:[O.jsx("h1",{className:"text-5xl mb-4",children:"DotLottie Playground :)"}),O.jsxs("p",{className:"text-2xl mb-6",children:["To start drop a ",O.jsx("span",{className:"text-red-600",children:".lottie"}),". You could also select a sample file below."]}),O.jsx("h2",{className:"text-lg mb-2",children:"Sample files"}),O.jsx("ul",{className:"text-sm",children:d7.map(a=>O.jsx("li",{children:O.jsxs("button",{className:"flex gap-2 items-center hover:text-white mb-1",onClick:i(a),children:[O.jsx(oE,{className:"fill-yellow-500"}),a.name]})},a.name))})]})]})})},h7=()=>{const[e,t]=b.useState({}),n=b.useCallback((r,i)=>{t({name:i,arrayBuffer:r})},[t]);return O.jsxs("div",{className:"h-screen bg-dark",children:[e.arrayBuffer?O.jsx(f7,{file:e.arrayBuffer,fileName:e.name||"unammed.lottie"}):O.jsx(p7,{onStart:n}),O.jsx(Vf,{})]})},m7=$C({reducer:{animations:KC,themes:t6,states:XC,editor:f6,playground:QC}});Kc.createRoot(document.getElementById("root")).render(O.jsx(ne.StrictMode,{children:O.jsx(Zb,{store:m7,children:O.jsx(l6,{children:O.jsx(h7,{})})})}));export{k7 as B,oi as G,Ft as U,se as y}; +`]))),qO=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return Q({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},zc=function(t){var n=t.delay,r=t.offset;return Y("span",{css:Jp({animation:"".concat(WO," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KO=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Gn(t,FO);return Y("div",J({},Pe(Q(Q({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Y(zc,{delay:0,offset:r}),Y(zc,{delay:160,offset:!0}),Y(zc,{delay:320,offset:!r}))},GO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return Q({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},QO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return Y("div",J({ref:o},Pe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a),n)},YO=QO,JO=["data"],XO=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ZO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,f=t.selectProps;return Y("div",J({},Pe(t,"group",{group:!0}),l),Y(a,J({},s,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),Y("div",null,n))},e8=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Q({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},t8=function(t){var n=N2(t);n.data;var r=Gn(n,JO);return Y("div",J({},Pe(t,"groupHeading",{"group-heading":!0}),r))},n8=ZO,r8=["innerRef","isDisabled","isHidden","inputClassName"],i8=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return Q(Q({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},o8),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},G2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},o8={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Q({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},G2)},a8=function(t){return Q({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},G2)},s8=function(t){var n=t.cx,r=t.value,i=N2(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Gn(i,r8);return Y("div",J({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),Y("input",J({className:n({input:!0},l),ref:o,style:a8(s),disabled:a},u)))},l8=s8,u8=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return Q({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},c8=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return Q({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},f8=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return Q({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Q2=function(t){var n=t.children,r=t.innerProps;return Y("div",r,n)},d8=Q2,p8=Q2;function h8(e){var t=e.children,n=e.innerProps;return Y("div",J({role:"button"},n),t||Y(th,{size:14}))}var m8=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,f=r.Remove;return Y(u,{data:i,innerProps:Q(Q({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},Y(c,{data:i,innerProps:Q({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Y(f,{data:i,innerProps:Q(Q({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},v8=m8,g8=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return Q({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},y8=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return Y("div",J({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},w8=y8,S8=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Q({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},b8=function(t){var n=t.children,r=t.innerProps;return Y("div",J({},Pe(t,"placeholder",{placeholder:!0}),r),n)},E8=b8,_8=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return Q({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},x8=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Y("div",J({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},C8=x8,O8={ClearIndicator:BO,Control:YO,DropdownIndicator:zO,DownChevron:q2,CrossIcon:th,Group:n8,GroupHeading:t8,IndicatorsContainer:$O,IndicatorSeparator:HO,Input:l8,LoadingIndicator:KO,Menu:bO,MenuList:_O,MenuPortal:PO,LoadingMessage:kO,NoOptionsMessage:OO,MultiValue:v8,MultiValueContainer:d8,MultiValueLabel:p8,MultiValueRemove:h8,Option:w8,Placeholder:E8,SelectContainer:MO,SingleValue:C8,ValueContainer:TO},k8=function(t){return Q(Q({},O8),t.components)},qv=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function A8(e,t){return!!(e===t||qv(e)&&qv(t))}function P8(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=function(y,v){return y&&y.length?"".concat(y.indexOf(v)+1," of ").concat(y.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if(n==="menu"){var f=l?" disabled":"",d="".concat(u?"selected":"focused").concat(f);return"option ".concat(a," ").concat(d,", ").concat(c(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},D8=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=l.ariaLiveMessages,f=l.getOptionLabel,d=l.inputValue,h=l.isMulti,y=l.isOptionDisabled,v=l.isSearchable,w=l.menuIsOpen,p=l.options,m=l.screenReaderStatus,g=l.tabSelectsValue,S=l["aria-label"],E=l["aria-live"],_=b.useMemo(function(){return Q(Q({},T8),c||{})},[c]),x=b.useMemo(function(){var D="";if(n&&_.onChange){var I=n.option,$=n.options,N=n.removedValue,P=n.removedValues,M=n.value,z=function(Z){return Array.isArray(Z)?null:Z},F=N||I||z(M),V=F?f(F):"",L=$||P||void 0,R=L?L.map(f):[],H=Q({isDisabled:F&&y(F,s),label:V,labels:R},n);D=_.onChange(H)}return D},[n,_,y,s,f]),C=b.useMemo(function(){var D="",I=r||i,$=!!(r&&s&&s.includes(r));if(I&&_.onFocus){var N={focused:I,label:f(I),isDisabled:y(I,s),isSelected:$,options:o,context:I===r?"menu":"value",selectValue:s};D=_.onFocus(N)}return D},[r,i,f,y,_,o,s]),k=b.useMemo(function(){var D="";if(w&&p.length&&_.onFilter){var I=m({count:o.length});D=_.onFilter({inputValue:d,resultsMessage:I})}return D},[o,d,w,_,p,m]),A=b.useMemo(function(){var D="";if(_.guidance){var I=i?"value":w?"menu":"input";D=_.guidance({"aria-label":S,context:I,isDisabled:r&&y(r,s),isMulti:h,isSearchable:v,tabSelectsValue:g})}return D},[S,r,i,h,y,v,w,_,s,g]),T="".concat(C," ").concat(k," ").concat(A),j=Y(b.Fragment,null,Y("span",{id:"aria-selection"},x),Y("span",{id:"aria-context"},T)),B=(n==null?void 0:n.action)==="initial-input-focus";return Y(b.Fragment,null,Y(Kv,{id:u},B&&j),Y(Kv,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text"},a&&!B&&j))},$8=D8,bd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],j8=new RegExp("["+bd.map(function(e){return e.letters}).join("")+"]","g"),Y2={};for(var Vc=0;Vc-1}},z8=["innerRef"];function V8(e){var t=e.innerRef,n=Gn(e,z8),r=pO(n,"onExited","in","enter","exit","appear");return Y("input",J({ref:t},r,{css:Jp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var B8=function(t){t.preventDefault(),t.stopPropagation()};function U8(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=b.useRef(!1),s=b.useRef(!1),l=b.useRef(0),u=b.useRef(null),c=b.useCallback(function(w,p){if(u.current!==null){var m=u.current,g=m.scrollTop,S=m.scrollHeight,E=m.clientHeight,_=u.current,x=p>0,C=S-E-g,k=!1;C>p&&a.current&&(r&&r(w),a.current=!1),x&&s.current&&(o&&o(w),s.current=!1),x&&p>C?(n&&!a.current&&n(w),_.scrollTop=S,k=!0,a.current=!0):!x&&-p>g&&(i&&!s.current&&i(w),_.scrollTop=0,k=!0,s.current=!0),k&&B8(w)}},[n,r,i,o]),f=b.useCallback(function(w){c(w,w.deltaY)},[c]),d=b.useCallback(function(w){l.current=w.changedTouches[0].clientY},[]),h=b.useCallback(function(w){var p=l.current-w.changedTouches[0].clientY;c(w,p)},[c]),y=b.useCallback(function(w){if(w){var p=cO?{passive:!1}:!1;w.addEventListener("wheel",f,p),w.addEventListener("touchstart",d,p),w.addEventListener("touchmove",h,p)}},[h,d,f]),v=b.useCallback(function(w){w&&(w.removeEventListener("wheel",f,!1),w.removeEventListener("touchstart",d,!1),w.removeEventListener("touchmove",h,!1))},[h,d,f]);return b.useEffect(function(){if(t){var w=u.current;return y(w),function(){v(w)}}},[t,y,v]),function(w){u.current=w}}var Qv=["boxSizing","height","overflow","paddingRight","position"],Yv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jv(e){e.preventDefault()}function Xv(e){e.stopPropagation()}function Zv(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function e0(){return"ontouchstart"in window||navigator.maxTouchPoints}var t0=!!(typeof window<"u"&&window.document&&window.document.createElement),ho=0,ii={capture:!1,passive:!1};function H8(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=b.useRef({}),o=b.useRef(null),a=b.useCallback(function(l){if(t0){var u=document.body,c=u&&u.style;if(r&&Qv.forEach(function(y){var v=c&&c[y];i.current[y]=v}),r&&ho<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Yv).forEach(function(y){var v=Yv[y];c&&(c[y]=v)}),c&&(c.paddingRight="".concat(h,"px"))}u&&e0()&&(u.addEventListener("touchmove",Jv,ii),l&&(l.addEventListener("touchstart",Zv,ii),l.addEventListener("touchmove",Xv,ii))),ho+=1}},[r]),s=b.useCallback(function(l){if(t0){var u=document.body,c=u&&u.style;ho=Math.max(ho-1,0),r&&ho<1&&Qv.forEach(function(f){var d=i.current[f];c&&(c[f]=d)}),u&&e0()&&(u.removeEventListener("touchmove",Jv,ii),l&&(l.removeEventListener("touchstart",Zv,ii),l.removeEventListener("touchmove",Xv,ii)))}},[r]);return b.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var W8=function(){return document.activeElement&&document.activeElement.blur()},q8={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function K8(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=U8({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),c=H8({isEnabled:n}),f=function(h){u(h),c(h)};return Y(b.Fragment,null,n&&Y("div",{onClick:W8,css:q8}),t(f))}var G8={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Q8=function(t){var n=t.name,r=t.onFocus;return Y("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:G8,value:"",onChange:function(){}})},Y8=Q8,J8=function(t){return t.label},X8=function(t){return t.label},Z8=function(t){return t.value},ek=function(t){return!!t.isDisabled},tk={clearIndicator:VO,container:IO,control:GO,dropdownIndicator:NO,group:XO,groupHeading:e8,indicatorsContainer:DO,indicatorSeparator:UO,input:i8,loadingIndicator:qO,loadingMessage:CO,menu:yO,menuList:EO,menuPortal:AO,multiValue:u8,multiValueLabel:c8,multiValueRemove:f8,noOptionsMessage:xO,option:g8,placeholder:S8,singleValue:_8,valueContainer:LO},nk={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},rk=4,X2=4,ik=38,ok=X2*2,ak={baseUnit:X2,controlHeight:ik,menuGutter:ok},Hc={borderRadius:rk,colors:nk,spacing:ak},sk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Hv(),captureMenuScroll:!Hv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:N8(),formatGroupLabel:J8,getOptionLabel:X8,getOptionValue:Z8,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ek,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!lO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function n0(e,t,n,r){var i=nw(e,t,n),o=rw(e,t,n),a=tw(e,t),s=Tl(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function Z2(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return n0(e,a,t,s)}).filter(function(a){return r0(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=n0(e,n,t,r);return r0(e,o)?o:void 0}).filter(fO)}function ew(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,E2(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function lk(e,t){return ew(Z2(e,t))}function r0(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!ow(e)||!o)&&iw(e,{label:a,value:s,data:i},r)}function uk(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i-1?n:t[0]}var tw=function(t,n){return t.getOptionLabel(n)},Tl=function(t,n){return t.getOptionValue(n)};function nw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function rw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Tl(e,t);return n.some(function(i){return Tl(e,i)===r})}function iw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var ow=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},fk=1,aw=function(e){z6(n,e);var t=H6(n);function n(r){var i;if(R6(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,l){var u=i.props,c=u.onChange,f=u.name;l.name=f,i.ariaOnChange(s,l),c(s,l)},i.setValue=function(s,l,u){var c=i.props,f=c.closeMenuOnSelect,d=c.isMulti,h=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),f&&(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:l,option:u})},i.selectOption=function(s){var l=i.props,u=l.blurInputOnSelect,c=l.isMulti,f=l.name,d=i.state.selectValue,h=c&&i.isOptionSelected(s,d),y=i.isOptionDisabled(s,d);if(h){var v=i.getOptionValue(s);i.setValue(d.filter(function(w){return i.getOptionValue(w)!==v}),"deselect-option",s)}else if(!y)c?i.setValue([].concat(E2(d),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:f});return}u&&i.blurInput()},i.removeValue=function(s){var l=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(s),f=u.filter(function(h){return i.getOptionValue(h)!==c}),d=cs(l,f,f[0]||null);i.onChange(d,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(cs(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,l=i.state.selectValue,u=l[l.length-1],c=l.slice(0,l.length-1),f=cs(s,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,l=new Array(s),u=0;ud||f>d}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var l=i.props.inputValue,u=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:l}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var l=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:l}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){i.blockOptionHover||i.state.focusedOption===s||i.setState({focusedOption:s})},i.shouldHideSelectedOptions=function(){return ow(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var l=i.props,u=l.isMulti,c=l.backspaceRemovesValue,f=l.escapeClearsValue,d=l.inputValue,h=l.isClearable,y=l.isDisabled,v=l.menuIsOpen,w=l.onKeyDown,p=l.tabSelectsValue,m=l.openMenuOnFocus,g=i.state,S=g.focusedOption,E=g.focusedValue,_=g.selectValue;if(!y&&!(typeof w=="function"&&(w(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!u||d)return;i.focusValue("previous");break;case"ArrowRight":if(!u||d)return;i.focusValue("next");break;case"Delete":case"Backspace":if(d)return;if(E)i.removeValue(E);else{if(!c)return;u?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!p||!S||m&&i.isOptionSelected(S,_))return;i.selectOption(S);break;case"Enter":if(s.keyCode===229)break;if(v){if(!S||i.isComposing)return;i.selectOption(S);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:d}),i.onMenuClose()):h&&f&&i.clearValue();break;case" ":if(d)return;if(!v){i.openMenu("first");break}if(!S)return;i.selectOption(S);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++fk),i.state.selectValue=Bv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[a]}return i}return N6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,c=-1;if(a.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Hc):Q(Q({},Hc),this.props.theme):Hc}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,y=f.options,v=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:v,isMulti:d,isRtl:h,options:y,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return nw(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return rw(this.props,i,o)}},{key:"filterOption",value:function(i,o){return iw(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),y=h.Input,v=this.state,w=v.inputIsHidden,p=v.ariaSelection,m=this.commonProps,g=s||this.getElementId("input"),S=Q(Q(Q({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?b.createElement(y,J({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:o,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},S)):b.createElement(V8,J({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ml,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,y=h.controlShouldRenderValue,v=h.isDisabled,w=h.isMulti,p=h.inputValue,m=h.placeholder,g=this.state,S=g.selectValue,E=g.focusedValue,_=g.isFocused;if(!this.hasValue()||!y)return p?null:b.createElement(f,J({},d,{key:"placeholder",isDisabled:v,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),m);if(w)return S.map(function(C,k){var A=C===E,T="".concat(i.getOptionLabel(C),"-").concat(i.getOptionValue(C));return b.createElement(a,J({},d,{components:{Container:s,Label:l,Remove:u},isFocused:A,isDisabled:v,key:T,index:k,removeProps:{onClick:function(){return i.removeValue(C)},onTouchEnd:function(){return i.removeValue(C)},onMouseDown:function(B){B.preventDefault()}},data:C}),i.formatOptionLabel(C,"value"))});if(p)return null;var x=S[0];return b.createElement(c,J({},d,{data:x,isDisabled:v}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:f,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return b.createElement(a,J({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(o,J({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,y=this.commonProps,v=this.state.focusedOption,w=this.props,p=w.captureMenuScroll,m=w.inputValue,g=w.isLoading,S=w.loadingMessage,E=w.minMenuHeight,_=w.maxMenuHeight,x=w.menuIsOpen,C=w.menuPlacement,k=w.menuPosition,A=w.menuPortalTarget,T=w.menuShouldBlockScroll,j=w.menuShouldScrollIntoView,B=w.noOptionsMessage,D=w.onMenuScrollToTop,I=w.onMenuScrollToBottom;if(!x)return null;var $=function(L,R){var H=L.type,W=L.data,Z=L.isDisabled,oe=L.isSelected,Te=L.label,De=L.value,Ie=v===W,$e=Z?void 0:function(){return i.onOptionHover(W)},Zt=Z?void 0:function(){return i.selectOption(W)},xt="".concat(i.getElementId("option"),"-").concat(R),Ma={id:xt,onClick:Zt,onMouseMove:$e,onMouseOver:$e,tabIndex:-1};return b.createElement(h,J({},y,{innerProps:Ma,data:W,isDisabled:Z,isSelected:oe,key:xt,label:Te,type:H,value:De,isFocused:Ie,innerRef:Ie?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(L.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var L=V.data,R=V.options,H=V.index,W="".concat(i.getElementId("group"),"-").concat(H),Z="".concat(W,"-heading");return b.createElement(a,J({},y,{key:W,data:L,options:R,Heading:s,headingProps:{id:Z,data:V.data},label:i.formatGroupLabel(V.data)}),V.options.map(function(oe){return $(oe,"".concat(H,"-").concat(oe.index))}))}else if(V.type==="option")return $(V,"".concat(V.index))});else if(g){var P=S({inputValue:m});if(P===null)return null;N=b.createElement(f,y,P)}else{var M=B({inputValue:m});if(M===null)return null;N=b.createElement(d,y,M)}var z={minMenuHeight:E,maxMenuHeight:_,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:j},F=b.createElement(wO,J({},y,z),function(V){var L=V.ref,R=V.placerProps,H=R.placement,W=R.maxHeight;return b.createElement(l,J({},y,z,{innerRef:L,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:g,placement:H}),b.createElement(K8,{captureEnabled:p,onTopArrive:D,onBottomArrive:I,lockEnabled:T},function(Z){return b.createElement(u,J({},y,{innerRef:function(Te){i.getMenuListRef(Te),Z(Te)},isLoading:g,maxHeight:W,focusedOption:v}),N)}))});return A||k==="fixed"?b.createElement(c,J({},y,{appendTo:A,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),F):F}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!s)return b.createElement(Y8,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var d=f.map(function(v){return i.getOptionValue(v)}).join(a);return b.createElement("input",{name:u,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(v,w){return b.createElement("input",{key:"i-".concat(w),name:u,type:"hidden",value:i.getOptionValue(v)})}):b.createElement("input",{name:u,type:"hidden",value:""});return b.createElement("div",null,h)}else{var y=f[0]?this.getOptionValue(f[0]):"";return b.createElement("input",{name:u,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return b.createElement($8,J({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,f=u.id,d=u.isDisabled,h=u.menuIsOpen,y=this.state.isFocused,v=this.commonProps=this.getCommonProps();return b.createElement(s,J({},v,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:y}),this.renderLiveRegion(),b.createElement(o,J({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:y,menuIsOpen:h}),b.createElement(l,J({},v,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(a,J({},v,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,d=i.options,h=i.value,y=i.menuIsOpen,v=i.inputValue,w=i.isMulti,p=Bv(h),m={};if(a&&(h!==a.value||d!==a.options||y!==a.menuIsOpen||v!==a.inputValue)){var g=y?lk(i,p):[],S=s?uk(o,p):null,E=ck(o,g);m={selectValue:p,focusedOption:E,focusedValue:S,clearFocusValueOnUpdate:!1}}var _=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},x=u,C=c&&f;return c&&!C&&(x={value:cs(w,p,p[0]||null),options:p,action:"initial-input-focus"},C=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(x=null),Q(Q(Q({},m),_),{},{prevProps:i,ariaSelection:x,prevWasFocused:C})}}]),n}(b.Component);aw.defaultProps=sk;var dk=b.forwardRef(function(e,t){var n=F6(e);return b.createElement(aw,J({ref:t},n))}),pk=dk;function hk(e){return O.jsx(pk,{classNames:{container:()=>"text-lg bg-white rounded text-gray-400",valueContainer:()=>"text-lg !text-gray-600 !py-1",singleValue:()=>"text-lg !text-gray-600 py-1",multiValue:()=>"text-lg !text-gray-600",menuList:()=>"text-lg !text-gray-600"},...e})}const fs=({label:e,multiple:t,onChange:n,options:r,value:i})=>{const o=b.useMemo(()=>{if(!i)return t?[]:void 0;const s=i.split(",");return t?r.filter(l=>s.includes(l.value)):r.find(l=>l.value===i)},[i,r,t]),a=b.useCallback(s=>{if(Array.isArray(s))n==null||n(s.map(l=>l.value).join(","));else{const l=s;n==null||n((l==null?void 0:l.value)||"")}},[n]);return O.jsxs("div",{className:"flex flex-col text-gray-400 w-full max-w-xs hover:text-white",children:[O.jsx("span",{className:"flex-1 text-lg text-left",children:e}),O.jsx(hk,{value:o,isMulti:t,name:e,options:r,onChange:a})]})},mk=({onUpdate:e})=>{const{dotLottie:t,setAnimationOptions:n}=qp(),r=Au(),i=Fe(d=>d.editor.animationOptions),o=Fe(d=>d.editor.animationId),a=Fe(d=>d.editor.updated),s=Fe(d=>d.themes.list),l=b.useMemo(()=>s.map(({name:d})=>({label:d,value:d})),[s]),u=b.useMemo(()=>{var h;const d=[{label:"None",value:""}];return typeof i.assignedThemes<"u"&&Array.isArray(i.assignedThemes)?d:d.concat(((h=i.assignedThemes)==null?void 0:h.split(",").map(y=>({label:y,value:y})))||[])},[i,o]);b.useEffect(()=>{if(o)return(async()=>{const d=await t.getAnimation(o);d&&r(Ov({direction:d.direction,speed:d.speed,playMode:d.playMode,loop:d.loop,autoplay:d.autoplay,hover:d.hover,intermission:d.intermission,defaultTheme:d.defaultTheme,assignedThemes:d.themes.map(h=>h.id).join(",")||void 0,defaultActiveAnimation:d.defaultActiveAnimation}))})(),()=>{r(Ov({}))}},[r,t,o]);const c=b.useCallback(d=>h=>{d==="assignedThemes"&&!String(h).split(",").includes(i.defaultTheme||"")&&r(Pv({defaultTheme:""})),r(Pv({[d]:h})),r(Cl(!0))},[r,i]),f=b.useCallback(()=>{o&&(n(o,i),r(Cl(!1)),e())},[o,i,n,r,e]);return O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[O.jsxs("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:["Animation: ",o]}),O.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:f,disabled:!a,children:O.jsx(wy,{size:33})})]}),O.jsxs("div",{className:"p-8 flex-1 max-h-[calc(100vh-5.5rem)] overflow-y-auto custom-scrollbar",children:[O.jsx("div",{className:"text-white",children:"Playback options"}),O.jsx("ul",{children:Object.keys(i).map(d=>["loop","autoplay","hover"].includes(d)?O.jsx("li",{children:O.jsx(Lv,{label:d,value:i[d],onToggle:c(d)})},d):["playMode"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:d,value:i[d],options:[{label:"Normal",value:"normal"},{label:"Bounce",value:"bounce"}]})},d):["direction"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:d,value:String(i[d]),options:[{label:"Normal",value:"1"},{label:"Inverted",value:"-1"}]})},d):["speed","intermission"].includes(d)?O.jsx("li",{children:O.jsx(L6,{label:d,value:i[d],onChange:c(d)})},d):["defaultTheme"].includes(d)?O.jsx("li",{children:O.jsx(fs,{onChange:c(d),label:"defaultTheme",options:u||[],value:i[d]||""})},d):void 0)}),O.jsx("div",{className:"text-white mt-8",children:"Other options"}),O.jsxs("div",{children:[O.jsx(fs,{multiple:!0,onChange:c("assignedThemes"),label:"Assign Themes",value:i.assignedThemes,options:l}),O.jsx(Lv,{label:"Default ActiveAnimation",value:i.defaultActiveAnimation,onToggle:c("defaultActiveAnimation")})]})]})]})},vk="modulepreload",gk=function(e){return"/player-component/"+e},i0={},$n=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=gk(o),o in i0)return;i0[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":vk,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function se(e,t="dotLottie-common"){return new Error(`[${t}]: ${e}`)}function oi(e,t="dotLottie-common",...n){console.error(`[${t}]:`,e,...n)}function Me(e,t="dotLottie-common",...n){console.warn(`[${t}]:`,e,...n)}function yk(e=""){let t=e.trim(),n=t.lastIndexOf("/"),r=t.substring(n+1),i=r.indexOf(".");return i!==-1?r.substring(0,i):r}function Dl(e){return["v","ip","op","layers","fr","w","h"].every(t=>Object.prototype.hasOwnProperty.call(e,t))}function wk(e){try{let t=JSON.parse(e);return Dl(t)}catch{return!1}}function k7(e,t){let n=Object.keys(e).find(r=>e[r]===t);if(n===void 0)throw new Error("Value not found in the object.");return n}var o0={},Sk=function(e,t,n,r,i){var o=new Worker(o0[t]||(o0[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var s=a.data,l=s.$e$;if(l){var u=new Error(l[0]);u.code=l[1],u.stack=l[2],i(u,null)}else i(null,s)},o.postMessage(n,r),o},ct=Uint8Array,ar=Uint16Array,nh=Uint32Array,rh=new ct([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ih=new ct([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),sw=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lw=function(e,t){for(var n=new ar(31),r=0;r<31;++r)n[r]=t+=1<>>1|(ue&21845)<<1,Mn=(Mn&52428)>>>2|(Mn&13107)<<2,Mn=(Mn&61680)>>>4|(Mn&3855)<<4,$l[ue]=((Mn&65280)>>>8|(Mn&255)<<8)>>>1;var Mn,ue,Li=function(e,t,n){for(var r=e.length,i=0,o=new ar(t);i>>l]=u}else for(s=new ar(r),i=0;i>>15-e[i]);return s},ka=new ct(288);for(ue=0;ue<144;++ue)ka[ue]=8;var ue;for(ue=144;ue<256;++ue)ka[ue]=9;var ue;for(ue=256;ue<280;++ue)ka[ue]=7;var ue;for(ue=280;ue<288;++ue)ka[ue]=8;var ue,fw=new ct(32);for(ue=0;ue<32;++ue)fw[ue]=5;var ue,dw=Li(ka,9,1),pw=Li(fw,5,1),$s=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},zt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},js=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},hw=function(e){return(e+7)/8|0},Tu=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?ar:e.BYTES_PER_ELEMENT==4?nh:ct)(n-t);return r.set(e.subarray(t,n)),r},mw=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],mt=function(e,t,n){var r=new Error(t||mw[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,mt),!n)throw r;return r},vw=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ct(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ct(r*3));var a=function(W){var Z=t.length;if(W>Z){var oe=new ct(Math.max(Z*2,W));oe.set(t),t=oe}},s=n.f||0,l=n.p||0,u=n.b||0,c=n.l,f=n.d,d=n.m,h=n.n,y=r*8;do{if(!c){s=zt(e,l,1);var v=zt(e,l+1,3);if(l+=3,v)if(v==1)c=dw,f=pw,d=9,h=5;else if(v==2){var w=zt(e,l,31)+257,p=zt(e,l+10,15)+4,m=w+zt(e,l+5,31)+1;l+=14;for(var g=new ct(m),S=new ct(19),E=0;E>>4;if(A<16)g[E++]=A;else{var T=0,j=0;for(A==16?(j=3+zt(e,l,3),l+=2,T=g[E-1]):A==17?(j=3+zt(e,l,7),l+=3):A==18&&(j=11+zt(e,l,127),l+=7);j--;)g[E++]=T}}var B=g.subarray(0,w),D=g.subarray(w);d=$s(B),h=$s(D),c=Li(B,d,1),f=Li(D,h,1)}else mt(1);else{var A=hw(l)+4,I=e[A-4]|e[A-3]<<8,$=A+I;if($>r){o&&mt(0);break}i&&a(u+I),t.set(e.subarray(A,$),u),n.b=u+=I,n.p=l=$*8,n.f=s;continue}if(l>y){o&&mt(0);break}}i&&a(u+131072);for(var N=(1<>>4;if(l+=T&15,l>y){o&&mt(0);break}if(T||mt(2),z<256)t[u++]=z;else if(z==256){M=l,c=null;break}else{var F=z-254;if(z>264){var E=z-257,V=rh[E];F=zt(e,l,(1<>>4;L||mt(3),l+=L&15;var D=cw[R];if(R>3){var V=ih[R];D+=js(e,l)&(1<y){o&&mt(0);break}i&&a(u+131072);for(var H=u+F;u>>0},Wc=function(e,t){return an(e,t)+an(e,t+4)*4294967296};function Pk(e,t,n){return n||(n=t,t={}),typeof n!="function"&&mt(7),Ak(e,t,[kk],function(r){return gw(ah(r.data[0],yw(r.data[1])))},1,n)}function ah(e,t){return vw(e,t)}var Ed=typeof TextDecoder<"u"&&new TextDecoder,Ik=0;try{Ed.decode(_k,{stream:!0}),Ik=1}catch{}var Mk=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Tu(e,n-1)];i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function no(e,t){if(t){for(var n="",r=0;r65558)return a(mt(13,0,1),null),i;var l=xn(e,s+8);if(l){var u=l,c=an(e,s+16),f=c==4294967295||u==65535;if(f){var d=an(e,s-12);f=an(e,d)==101075792,f&&(u=l=an(e,d+32),c=an(e,d+48))}for(var h=t&&t.filter,y=function(w){var p=Tk(e,c,f),m=p[0],g=p[1],S=p[2],E=p[3],_=p[4],x=p[5],C=Lk(e,x);c=_;var k=function(T,j){T?(i(),a(T,null)):(j&&(o[E]=j),--l||a(null,o))};if(!h||h({name:E,size:g,originalSize:S,compression:m}))if(!m)k(null,Tu(e,C,C+g));else if(m==8){var A=e.subarray(C,C+g);if(g<32e4)try{k(null,ah(A,new ct(S)))}catch(T){k(T,null)}else r.push(Pk(A,{size:S},k))}else k(mt(14,"unknown compression type "+m,1),null);else k(null,null)},v=0;v{if(n.path){let r=n.path.map(({key:i})=>i).join(".");t.nested[r]=[...t.nested[r]||[],n.message]}else t.root=[...t.root||[],n.message];return t},{nested:{}})}var tt=class extends Error{constructor(n){super(n[0].message);te(this,"issues");this.name="ValiError",this.issues=n}};function Or(e,t,n){let r=e,i=[];if(t.forEach(o=>{try{r=o(r,n)}catch(a){if(n.abortEarly||n.abortPipeEarly)throw a;i.push(...a.issues)}}),i.length)throw new tt(i);return r}function ha(e,t){return[...(e==null?void 0:e.path)||[],t]}function hn(e,t){let[n,r=[]]=!e||typeof e=="string"?[e,t]:[void 0,e];return{error:n,pipe:r}}function Fk(e=[]){return{schema:"any",async:!1,parse(t,n){return Or(t,e,{...n,reason:"any"})}}}function Ro(e,t,n){let{error:r,pipe:i}=hn(t,n);return{schema:"array",array:{item:e},async:!1,parse(o,a){if(!Array.isArray(o))throw new tt([{reason:"type",validation:"array",origin:"value",message:r||"Invalid type",input:o,...a}]);let s=[],l=[];if(o.forEach((u,c)=>{try{s.push(e.parse(u,{...a,path:ha(a,{schema:"array",input:o,key:c,value:u})}))}catch(f){if(a!=null&&a.abortEarly)throw f;l.push(...f.issues)}}),l.length)throw new tt(l);return Or(s,i,{...a,reason:"array"})}}}function qc(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"boolean",async:!1,parse(i,o){if(typeof i!="boolean")throw new tt([{reason:"type",validation:"boolean",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"boolean"})}}}function l0(e,t){return{schema:"literal",literal:e,async:!1,parse(n,r){if(n!==e)throw new tt([{reason:"type",validation:"literal",origin:"value",message:t||"Invalid type",input:n,...r}]);return n}}}function Rk(e,t){return{schema:"native_enum",nativeEnum:e,async:!1,parse(n,r){if(!Object.values(e).includes(n))throw new tt([{reason:"type",validation:"native_enum",origin:"value",message:t||"Invalid type",input:n,...r}]);return n}}}function ln(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"number",async:!1,parse(i,o){if(typeof i!="number")throw new tt([{reason:"type",validation:"number",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"number"})}}}function Xt(e,t,n){let{error:r,pipe:i}=hn(t,n);return{schema:"object",object:e,async:!1,parse(o,a){if(!o||typeof o!="object"||o.toString()!=="[object Object]")throw new tt([{reason:"type",validation:"object",origin:"value",message:r||"Invalid type",input:o,...a}]);let s={},l=[];if(Object.entries(e).forEach(([u,c])=>{try{let f=o[u];s[u]=c.parse(f,{...a,path:ha(a,{schema:"object",input:o,key:u,value:f})})}catch(f){if(a!=null&&a.abortEarly)throw f;l.push(...f.issues)}}),l.length)throw new tt(l);return Or(s,i,{...a,reason:"object"})}}}function ce(e){return{schema:"optional",wrapped:e,async:!1,parse(t,n){return t===void 0?t:e.parse(t,n)}}}function Ye(e,t){let{error:n,pipe:r}=hn(e,t);return{schema:"string",async:!1,parse(i,o){if(typeof i!="string")throw new tt([{reason:"type",validation:"string",origin:"value",message:n||"Invalid type",input:i,...o}]);return Or(i,r,{...o,reason:"string"})}}}function Nk(e,t,n,r){let{key:i,value:o,error:a,pipe:s}=typeof t=="object"&&!Array.isArray(t)?{key:e,value:t,...hn(n,r)}:{key:Ye(),value:e,...hn(t,n)};return{schema:"record",record:{key:i,value:o},async:!1,parse(l,u){if(!l||typeof l!="object"||l.toString()!=="[object Object]")throw new tt([{reason:"type",validation:"record",origin:"value",message:a||"Invalid type",input:l,...u}]);let c={},f=[];if(Object.entries(l).forEach(([d,h])=>{let y=ha(u,{schema:"record",input:l,key:d,value:h}),v;try{v=i.parse(d,{...u,origin:"key",path:y})}catch(p){if(u!=null&&u.abortEarly)throw p;f.push(...p.issues)}let w;try{w=[o.parse(h,{...u,path:y})]}catch(p){if(u!=null&&u.abortEarly)throw p;f.push(...p.issues)}v&&w&&(c[v]=w[0])}),f.length)throw new tt(f);return Or(c,s,{...u,reason:"record"})}}}function u0(e,t,n,r){let{rest:i,error:o,pipe:a}=typeof t=="object"&&!Array.isArray(t)?{rest:t,...hn(n,r)}:hn(t,n);return{schema:"tuple",tuple:{items:e,rest:i},async:!1,parse(s,l){if(!Array.isArray(s)||!i&&e.length!==s.length||i&&e.length>s.length)throw new tt([{reason:"type",validation:"tuple",origin:"value",message:o||"Invalid type",input:s,...l}]);let u=[],c=[];if(e.forEach((f,d)=>{try{let h=s[d];u[d]=f.parse(h,{...l,path:ha(l,{schema:"tuple",input:s,key:d,value:h})})}catch(h){if(l!=null&&l.abortEarly)throw h;c.push(...h.issues)}}),i&&s.slice(e.length).forEach((f,d)=>{try{let h=e.length+d;u[h]=i.parse(f,{...l,path:ha(l,{schema:"tuple",input:s,key:h,value:f})})}catch(h){if(l!=null&&l.abortEarly)throw h;c.push(...h.issues)}}),c.length)throw new tt(c);return Or(u,a,{...l,reason:"tuple"})}}}function _d(e,t){return{schema:"union",union:e,async:!1,parse(n,r){let i,o=[];for(let a of e)try{i=[a.parse(n,r)];break}catch(s){o.push(...s.issues)}if(!i)throw new tt([{reason:"type",validation:"union",origin:"value",message:t||"Invalid type",input:n,issues:o,...r}]);return i[0]}}}function Aa(e,t,n){let{error:r,pipe:i}=hn(t,n);return Xt(e.reduce((o,a)=>({...o,...a.object}),{}),r,i)}function zk(e,t,n,r){let{error:i,pipe:o}=hn(n,r);return Xt(Object.entries(e.object).reduce((a,[s,l])=>t.includes(s)?a:{...a,[s]:l},{}),i,o)}function Vk(e,t,n){try{return{success:!0,data:e.parse(t,n)}}catch(r){return{success:!1,error:r}}}function xd(e,t){return(n,r)=>{if(n>e)throw new tt([{validation:"max_value",origin:"value",message:t||"Invalid value",input:n,...r}]);return n}}function Cd(e,t){return(n,r)=>{if(nt in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pa=(e,t)=>function(){return t||(0,e[ww(e)[0]])((t={exports:{}}).exports,t),t.exports},Kk=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ww(t))!Wk.call(e,i)&&i!==n&&sh(e,i,{get:()=>t[i],enumerable:!(r=Uk(t,i))||r.enumerable});return e},Gk=(e,t,n)=>(n=e!=null?Bk(Hk(e)):{},Kk(t||!e||!e.__esModule?sh(n,"default",{value:e,enumerable:!0}):n,e)),Qk=(e,t,n)=>(qk(e,typeof t!="symbol"?t+"":t,n),n),Yk=Pa({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.copy=void 0;var t=(n,r,i=0,o=0,a=n.width-i,s=n.height-o,l=0,u=0)=>{if(i=i|0,o=o|0,a=a|0,s=s|0,l=l|0,u=u|0,a<=0||s<=0)return;let c=new Uint32Array(n.data.buffer),f=new Uint32Array(r.data.buffer);for(let d=0;d=n.height)continue;let y=u+d;if(!(y<0||y>=r.height))for(let v=0;v=n.width)continue;let p=l+v;if(p<0||p>=r.width)continue;let m=h*n.width+w,g=y*r.width+p;f[g]=c[m]}}};e.copy=t}}),Jk=Pa({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreateImageFactory=(t=[0,0,0,0],n=4)=>{if(n=Math.floor(n),isNaN(n)||n<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in t)||t.lengthi===0);return(i,o,a)=>{if(i===void 0||o===void 0)throw TypeError("Not enough arguments");if(i=Math.floor(i),o=Math.floor(o),isNaN(i)||i<1||isNaN(o)||o<1)throw TypeError("Index or size is negative or greater than the allowed amount");let s=i*o*n;if(a===void 0&&(a=new Uint8ClampedArray(s)),a instanceof Uint8ClampedArray){if(a.length!==s)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let l=0;l{if(o<=-a||o>=a||o==0)return 0;let s=o*Math.PI;return Math.sin(s)/s*Math.sin(s/a)/(s/a)},r=o=>Math.round(o*((1<{let c=u?2:3,f=1/s,d=Math.min(1,s),h=c/d,y=Math.floor((h+1)*2),v=new Int16Array((y+2)*a),w=0;for(let p=0;p>1]+=r(1-A);let T=0;for(;T0&&x[j]===0;)j--;let B=g+T,D=j-T+1;v[w++]=B,v[w++]=D,v.set(x.subarray(T,j+1),w),w+=D}return v};e.filters=i}}),Zk=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convolve=void 0;var t=14,n=(r,i,o,a,s,l)=>{let u=0,c=0;for(let f=0;f0;S--){let E=l[d++];w=w+E*r[v]|0,p=p+E*r[v+1]|0,m=m+E*r[v+2]|0,g=g+E*r[v+3]|0,v=v+4|0}i[c]=w+8192>>t,i[c+1]=p+8192>>t,i[c+2]=m+8192>>t,i[c+3]=g+8192>>t,c=c+a*4|0}c=(f+1)*4|0,u=(f+1)*o*4|0}};e.convolve=n}}),eA=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lanczos2=e.lanczos=void 0;var t=Yk(),n=Jk(),r=Xk(),i=Zk(),o=(l,u,c=!1)=>{let f=u.width/l.width,d=u.height/l.height,h=r.filters(l.width,u.width,f,0,c),y=r.filters(l.height,u.height,d,0,c),v=new Uint8ClampedArray(u.width*l.height*4);i.convolve(l.data,v,l.width,l.height,u.width,h),i.convolve(v,u.data,l.height,u.width,u.height,y)},a=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,v=0,w=u.width-y,p=u.height-v)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,v=v|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&v===0&&w===u.width&&p===u.height){o(l,u);return}let m=n.createImage(d,h),g=n.createImage(w,p);t.copy(l,m,c,f),o(m,g),t.copy(g,u,0,0,g.width,g.height,y,v)};e.lanczos=a;var s=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,v=0,w=u.width-y,p=u.height-v)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,v=v|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&v===0&&w===u.width&&p===u.height){o(l,u,!0);return}let m=n.createImage(d,h),g=n.createImage(w,p);t.copy(l,m,c,f),o(m,g,!0),t.copy(g,u,0,0,g.width,g.height,y,v)};e.lanczos2=s}}),Sw=(e=>(e.Bounce="bounce",e.Normal="normal",e))(Sw||{}),tA=Rk(Sw),bw=Xt({autoplay:ce(qc()),defaultTheme:ce(Ye()),direction:ce(_d([l0(1),l0(-1)])),hover:ce(qc()),id:Ye(),intermission:ce(ln()),loop:ce(_d([qc(),ln()])),playMode:ce(tA),speed:ce(ln()),themeColor:ce(Ye())}),nA=Xt({animations:Ro(Ye()),id:Ye()}),rA=Xt({activeAnimationId:ce(Ye()),animations:Ro(bw),author:ce(Ye()),custom:ce(Nk(Ye(),Fk())),description:ce(Ye()),generator:ce(Ye()),keywords:ce(Ye()),revision:ce(ln()),themes:ce(Ro(nA)),states:ce(Ro(Ye())),version:ce(Ye())}),Ew=zk(bw,["id"]),Xr=Xt({state:Ye()}),iA=Xr,oA=Aa([Xr,Xt({ms:ln()})]),aA=Aa([Xr,Xt({count:ln()})]),sA=Xr,lA=Xr,uA=Xr,cA=Aa([Xr,Xt({threshold:ce(Ro(ln([Cd(0),xd(1)])))})]),fA=Xt({onAfter:ce(oA),onClick:ce(iA),onComplete:ce(uA),onEnter:ce(aA),onMouseEnter:ce(sA),onMouseLeave:ce(lA),onShow:ce(cA)}),dA=Aa([Ew,Xt({playOnScroll:ce(u0([ln([Cd(0),xd(1)]),ln([Cd(0),xd(1)])])),segments:ce(_d([u0([ln(),ln()]),Ye()]))})]);Aa([fA,Xt({animationId:ce(Ye()),playbackSettings:dA})]);var pA={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp"},c0={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120]},hA=e=>{let t=null,n=[];if(!e)return null;let r=e.substring(e.indexOf(",")+1);typeof window>"u"?t=Buffer.from(r,"base64").toString("binary"):t=atob(r);let i=new Uint8Array(t.length);for(let o=0;os===a[l]))return pA[o]}return null},lh=class extends Error{constructor(e,t){super(e),Qk(this,"code"),this.name="[dotlottie-js]",this.code=t}};function mA(e){let t;if(typeof window>"u")t=Buffer.from(e).toString("base64");else{let n=Array.prototype.map.call(e,r=>String.fromCharCode(r)).join("");t=window.btoa(n)}return`data:${hA(t)};base64,${t}`}function f0(e){return"w"in e&&"h"in e&&!("xt"in e)&&"p"in e}async function Du(e,t=()=>!0){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((n,r)=>{$k(e,{filter:t},(i,o)=>{i&&r(i),n(o)})})}async function uh(e,t,n){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return(await Du(e,r=>r.name===t&&(!n||n(r))))[t]}async function Od(e){let t="manifest.json",n=(await Du(e,r=>r.name===t))[t];if(!(typeof n>"u"))return JSON.parse(no(n,!1))}async function vA(e){if(!(e instanceof Uint8Array))return{success:!1,error:"DotLottie not found"};let t=await Od(e);if(typeof t>"u")return{success:!1,error:"Invalid .lottie file, manifest.json is missing"};let n=Vk(rA,t);return n.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(jk(n.error).nested,null,2)}`}}async function d0(e){let t=new Uint8Array(e),n=await vA(t);if(n.error)throw new lh(n.error,"INVALID_DOTLOTTIE");return t}async function gA(e,t){let n=await Du(e,i=>{let o=i.name.replace("images/","");return i.name.startsWith("images/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("images/","");r[a]=mA(o)}}return r}async function yA(e,t){var i;let n=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(f0(s)){let l=s.p;n.has(l)||n.set(l,new Set),(i=n.get(l))==null||i.add(o)}let r=await gA(e,o=>n.has(o.name));for(let[o,a]of n){let s=r[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])f0(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function wA(e,t,{inlineAssets:n}={},r){let i=`animations/${t}.json`,o=await uh(e,i,r);if(typeof o>"u")return;let a=JSON.parse(no(o,!1));if(!n)return a;let s={[t]:a};return await yA(e,s),a}async function SA(e,t,n){let r=`themes/${t}.lss`,i=await uh(e,r,n);if(!(typeof i>"u"))return no(i,!1)}async function bA(e,t){let n={},r=await Du(e,i=>{let o=i.name.replace("states/","").replace(".json","");return i.name.startsWith("states/")&&(!t||t({...i,name:o}))});for(let i in r){let o=r[i];if(o instanceof Uint8Array){let a=i.replace("states/","").replace(".json","");n[a]=no(o,!1)}}return n}async function EA(e,t,n){let r=`states/${t}.json`,i=await uh(e,r,n);return typeof i>"u"?void 0:JSON.parse(no(i,!1))}Gk(eA());var _A=class{constructor(){te(this,"_dotLottie");te(this,"_animationsMap",new Map);te(this,"_themeMap",new Map);te(this,"_stateMachinesMap",new Map);te(this,"_manifest")}get dotLottie(){return this._dotLottie}get animationsMap(){return this._animationsMap}get themeMap(){return this._themeMap}get stateMachinesMap(){return this._stateMachinesMap}get manifest(){return this._manifest}async loadFromUrl(t){var r;let n=await fetch(t,{method:"GET",mode:"cors"});if(!n.ok)throw new Error(`Failed to load dotLottie from ${t} with status ${n.status}`);if((r=n.headers.get("content-type"))!=null&&r.includes("application/json")){let i=await n.json();if(!Dl(i))throw new Error(`Invalid lottie JSON at ${t}`);let o=yk(t);this._animationsMap.set(o,i);let a={activeAnimationId:o,animations:[{id:o}]};this._manifest=a}else{this._dotLottie=await d0(await n.arrayBuffer());let i=await Od(this._dotLottie);if(!i)throw new Error("Manifest not found");this._manifest=i}}loadFromLottieJSON(t){if(!Dl(t))throw new Error("Invalid lottie JSON");let n="my-animation";this._animationsMap.set(n,t);let r={activeAnimationId:n,animations:[{id:n}]};this._manifest=r}async loadFromArrayBuffer(t){this._dotLottie=await d0(t);let n=await Od(this._dotLottie);if(!n)throw new Error("Manifest not found");this._manifest=n}async getAnimation(t){if(this._animationsMap.get(t))return this._animationsMap.get(t);if(!this._dotLottie)return;let n=await wA(this._dotLottie,t,{inlineAssets:!0});return n&&this._animationsMap.set(t,n),n}async getTheme(t){if(this._themeMap.get(t))return this._themeMap.get(t);if(!this._dotLottie)return;let n=await SA(this._dotLottie,t);return n&&this._themeMap.set(t,n),n}async getStateMachines(){if(!this._dotLottie)return;let t=await bA(this._dotLottie);for(let n in t)if(n){let r=t[n];if(r){let i=JSON.parse(r);if(i){let o=i.descriptor.id;this._stateMachinesMap.get(o)||this._stateMachinesMap.set(o,i)}}}return Array.from(this._stateMachinesMap.values())}async getStateMachine(t){if(this._stateMachinesMap.get(t))return this._stateMachinesMap.get(t);if(!this._dotLottie)return;let n=await EA(this._dotLottie,t);return n&&this._stateMachinesMap.set(n.descriptor.id,n),n}};async function xA(e,t){let[{relottie:n},{default:r}]=await Promise.all([$n(()=>import("./dist-AIQGIF54-AIRDCTYW-3493aa73.js"),["assets/dist-AIQGIF54-AIRDCTYW-3493aa73.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]),$n(()=>import("./dist-4JHQ5UB4-UQC3DUUT-48854257.js"),["assets/dist-4JHQ5UB4-UQC3DUUT-48854257.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"])]),i=await n().use(r,{lss:t}).process(JSON.stringify(e));return JSON.parse(i.value)}function $u(){throw new Error("Cycle detected")}function ch(){if(Ti>1)Ti--;else{for(var e,t=!1;No!==void 0;){var n=No;for(No=void 0,kd++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&xw(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(kd=0,Ti--,t)throw e}}var ke=void 0,No=void 0,Ti=0,kd=0,jl=0;function _w(e){if(ke!==void 0){var t=e.n;if(t===void 0||t.t!==ke)return t={i:0,S:e,p:ke.s,n:void 0,t:ke,e:void 0,x:void 0,r:t},ke.s!==void 0&&(ke.s.n=t),ke.s=t,e.n=t,32&ke.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ke.s,t.n=void 0,ke.s.n=t,ke.s=t),t}}function _t(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}_t.prototype.h=function(){return!0};_t.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};_t.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};_t.prototype.subscribe=function(e){var t=this;return kA(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})};_t.prototype.valueOf=function(){return this.value};_t.prototype.toString=function(){return this.value+""};_t.prototype.toJSON=function(){return this.value};_t.prototype.peek=function(){return this.v};Object.defineProperty(_t.prototype,"value",{get:function(){var e=_w(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ke instanceof Zr&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){kd>100&&$u(),this.v=e,this.i++,jl++,Ti++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ch()}}}});function CA(e){return new _t(e)}function xw(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Cw(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ow(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Zr(e){_t.call(this,void 0),this.x=e,this.s=void 0,this.g=jl-1,this.f=4}(Zr.prototype=new _t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===jl))return!0;if(this.g=jl,this.f|=1,this.i>0&&!xw(this))return this.f&=-2,!0;var e=ke;try{Cw(this),ke=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ke=e,Ow(this),this.f&=-2,!0};Zr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}_t.prototype.S.call(this,e)};Zr.prototype.U=function(e){if(this.t!==void 0&&(_t.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Zr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Zr.prototype.peek=function(){if(this.h()||$u(),16&this.f)throw this.v;return this.v};Object.defineProperty(Zr.prototype,"value",{get:function(){1&this.f&&$u();var e=_w(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function kw(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ti++;var n=ke;ke=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,fh(e),r}finally{ke=n,ch()}}}function fh(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,kw(e)}function OA(e){if(ke!==this)throw new Error("Out-of-order effect");Ow(this),ke=e,this.f&=-2,8&this.f&&fh(this),ch()}function Ia(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ia.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ia.prototype.S=function(){1&this.f&&$u(),this.f|=1,this.f&=-9,kw(this),Cw(this),Ti++;var e=ke;return ke=this,OA.bind(this,e)};Ia.prototype.N=function(){2&this.f||(this.f|=2,this.o=No,No=this)};Ia.prototype.d=function(){this.f|=8,1&this.f||fh(this)};function kA(e){var t=new Ia(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var AA=class{constructor(e){te(this,"_state");te(this,"_prevState");this._prevState=e,this._state=CA(e)}setState(e){this._prevState=this._state.value,this._state.value=e}subscribe(e){return this._state.subscribe(t=>e(t,this._prevState))}};async function PA(e,t){let[{DotLottieStateMachineManager:n}]=await Promise.all([$n(()=>import("./dotlottie-state-machine-manager-3PVNKKVX-77OLGQNR-8f2aa087.js"),[])]);if(!e.length)throw se("No state machines available inside this .lottie!");return new n(e,t)}var IA={name:"@dotlottie/common",version:"0.5.4",type:"module",description:"",author:"Afsal , Sam Osborne ",license:"MIT",private:!0,engines:{node:">18.0.0"},module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:[],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint .","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"0.5.2","@lottiefiles/relottie":"1.0.0","@lottiefiles/relottie-style":"0.4.1","@preact/signals-core":"^1.2.3","lottie-web":"^5.12.2",xstate:"^4.38.1"},devDependencies:{"@lottiefiles/lottie-types":"^1.2.0",tsup:"^6.1.3",typescript:"^4.7.4"},publishConfig:{access:"restricted"}},ht=(e=>(e.Complete="complete",e.DataFail="data_fail",e.DataReady="data_ready",e.Error="error",e.Frame="frame",e.Freeze="freeze",e.LoopComplete="loopComplete",e.Pause="pause",e.Play="play",e.Ready="ready",e.Stop="stop",e.VisibilityChange="visibilityChange",e))(ht||{}),Tn=(e=>(e.Completed="completed",e.Error="error",e.Fetching="fetching",e.Frozen="frozen",e.Initial="initial",e.Loading="loading",e.Paused="paused",e.Playing="playing",e.Ready="ready",e.Stopped="stopped",e))(Tn||{}),MA=(e=>(e.Bounce="bounce",e.Normal="normal",e))(MA||{}),Ft={autoplay:!1,direction:1,hover:!1,intermission:0,loop:!1,playMode:"normal",speed:1,defaultTheme:""},dh={activeStateId:"",autoplay:!1,currentState:"initial",frame:0,seeker:0,direction:1,hover:!1,loop:!1,playMode:"normal",speed:1,background:"transparent",intermission:0,currentAnimationId:void 0,visibilityPercentage:0},Fs=class{constructor(e,t,n){te(this,"_lottie");te(this,"_src");te(this,"_animationConfig");te(this,"_prevUserPlaybackOptions",{});te(this,"_userPlaybackOptions");te(this,"_hover",!1);te(this,"_loop",!1);te(this,"_counter",0);te(this,"_intermission",0);te(this,"_counterInterval",null);te(this,"_container",null);te(this,"_name");te(this,"_mode","normal");te(this,"_background","transparent");te(this,"_animation");te(this,"_defaultTheme");te(this,"_activeAnimationId");te(this,"_currentAnimationId");te(this,"_testId");te(this,"_listeners",new Map);te(this,"_currentState","initial");te(this,"_stateBeforeFreeze","initial");te(this,"state",new AA(dh));te(this,"_light",!1);te(this,"_dotLottieLoader",new _A);te(this,"_activeStateId");te(this,"_inInteractiveMode",!1);te(this,"_scrollTicking",!1);te(this,"_scrollCallback");te(this,"_onShowIntersectionObserver");te(this,"_visibilityPercentage",0);te(this,"_stateMachineManager");this._src=structuredClone(e),n!=null&&n.testId&&(this._testId=n.testId),this._defaultTheme=(n==null?void 0:n.defaultTheme)||"",this._userPlaybackOptions=this._validatePlaybackOptions(n||{}),typeof(n==null?void 0:n.activeAnimationId)=="string"&&(this._activeAnimationId=n.activeAnimationId),this._container=t||null,typeof(n==null?void 0:n.background)=="string"&&this.setBackground(n.background),typeof(n==null?void 0:n.activeStateId)<"u"&&(this._activeStateId=n.activeStateId),this._animationConfig={loop:!1,autoplay:!1,renderer:"svg",rendererSettings:{clearCanvas:!0,progressiveLoad:!0,hideOnTransparent:!0},...n||{}},n!=null&&n.light&&(this._light=n.light),this._listenToHover(),this._listenToVisibilityChange()}_listenToHover(){var n,r,i,o;let e=()=>{this._hover&&this.currentState!=="playing"&&this.play()},t=()=>{this._hover&&this.currentState==="playing"&&this.stop()};(n=this._container)==null||n.removeEventListener("mouseenter",e),(r=this._container)==null||r.removeEventListener("mouseleave",t),(i=this._container)==null||i.addEventListener("mouseleave",t),(o=this._container)==null||o.addEventListener("mouseenter",e)}_onVisibilityChange(){!this._lottie||typeof document>"u"||(document.hidden&&this.currentState==="playing"?this.freeze():this.currentState==="frozen"&&this.unfreeze())}_listenToVisibilityChange(){typeof document<"u"&&typeof document.hidden<"u"&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange())}_getOption(e){var n;if(typeof this._userPlaybackOptions[e]<"u")return this._userPlaybackOptions[e];let t=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(r=>r.id===this._currentAnimationId);return t&&typeof t[e]<"u"?t[e]:Ft[e]}_getPlaybackOptions(){let e={};for(let t in Ft)typeof Ft[t]<"u"&&(e[t]=this._getOption(t));return e}_setPlayerState(e){var n,r,i;let t=e(this._getPlaybackOptions());try{Ew.parse(t)}catch{Me(`Invalid PlaybackOptions, ${JSON.stringify(t,null,2)}`);return}typeof t.defaultTheme<"u"&&(this._defaultTheme=t.defaultTheme),typeof t.playMode<"u"&&(this._mode=t.playMode),typeof t.intermission<"u"&&(this._intermission=t.intermission),typeof t.hover<"u"&&(this._hover=t.hover),typeof t.loop<"u"&&(this.clearCountTimer(),this._loop=t.loop,this._counter=0,(n=this._lottie)==null||n.setLoop(typeof t.loop=="number"?!0:t.loop)),typeof t.speed<"u"&&((r=this._lottie)==null||r.setSpeed(t.speed)),typeof t.autoplay<"u"&&this._lottie&&(this._lottie.autoplay=t.autoplay),typeof t.direction<"u"&&((i=this._lottie)==null||i.setDirection(t.direction))}_getOptionsFromAnimation(e){let{id:t,...n}=e;return{...Ft,...n}}_updateTestData(){!this._testId||!this._lottie||(window.dotLottiePlayer||(window.dotLottiePlayer={[this._testId]:{}}),window.dotLottiePlayer[this._testId]={direction:this._lottie.playDirection,currentState:this._currentState,loop:this.loop,mode:this._mode,speed:this._lottie.playSpeed})}get currentState(){return this._currentState}clearCountTimer(){this._counterInterval&&clearInterval(this._counterInterval)}setCurrentState(e){this._currentState=e,this._notify(),this._updateTestData()}static isPathJSON(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())==="json"}get src(){return this._src}updateSrc(e){this._src!==e&&(this._src=structuredClone(e),this._activeAnimationId=void 0,this._currentAnimationId=void 0,this.load())}get intermission(){return this._intermission}get hover(){return this._hover}setHover(e){typeof e=="boolean"&&(this._hover=e,this._userPlaybackOptions.hover=e,this._notify())}setIntermission(e){this._intermission=e,this._userPlaybackOptions.intermission=e,this._notify()}get mode(){return this._mode}get animations(){return this._dotLottieLoader.animationsMap}get themes(){return this._dotLottieLoader.themeMap}setMode(e){typeof e=="string"&&(this._mode=e,this._userPlaybackOptions.playMode=e,this._setPlayerState(()=>({playMode:e})),this._notify(),this._updateTestData())}get container(){if(this._container)return this._container}goToAndPlay(e,t,n){if(!this._lottie||["loading"].includes(this._currentState)){Me("goToAndPlay() Can't use whilst loading.");return}this._lottie.goToAndPlay(e,t,n),this.setCurrentState("playing")}goToAndStop(e,t,n){if(!this._lottie||["loading"].includes(this._currentState)){Me("goToAndStop() Can't use whilst loading.");return}this._lottie.goToAndStop(e,t,n),this.setCurrentState("stopped")}seek(e){if(!this._lottie||["loading"].includes(this._currentState)){Me("seek() Can't use whilst loading.");return}let t=e;typeof t=="number"&&(t=Math.round(t));let n=/^(\d+)(%?)$/u.exec(t.toString());if(!n)return;let r=n[2]==="%"?this.totalFrames*Number(n[1])/100:n[1];r!==void 0&&(this._lottie.goToAndPlay(r,!0),this.currentState==="playing"?this.play():this.currentState==="frozen"?this.freeze():this.pause())}_areNumbersInRange(e,t){return e>=0&&e<=1&&t>=0&&t<=1}_updatePosition(e,t,n){let[r,i]=e??[0,this.totalFrames-1],[o,a]=t??[0,1];if(!this._areNumbersInRange(o,a)){oi("threshold values must be between 0 and 1");return}if(this.container){let{height:s,top:l}=this.container.getBoundingClientRect(),u=window.innerHeight-l,c=window.innerHeight+s,f=u/c,d=r+Math.round((f-o)/(a-o)*(i-r));n&&n(f),this.goToAndStop(d,!0),(d>=i||f>=a)&&this._handleAnimationComplete()}this._scrollTicking=!1}_requestTick(e,t,n){this._scrollTicking||(requestAnimationFrame(()=>this._updatePosition(e,t,n)),this._scrollTicking=!0)}playOnScroll(e){this.stop(),this._scrollCallback&&this.stopPlayOnScroll(),this._scrollCallback=()=>this._requestTick(e==null?void 0:e.segments,e==null?void 0:e.threshold,e==null?void 0:e.positionCallback),window.addEventListener("scroll",this._scrollCallback)}stopPlayOnScroll(){this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback),this._scrollCallback=void 0)}stopPlayOnShow(){this._onShowIntersectionObserver&&(this._onShowIntersectionObserver.disconnect(),this._onShowIntersectionObserver=void 0)}addIntersectionObserver(e){if(!this.container)throw se("Can't play on show, player container element not available.");let t={root:null,rootMargin:"0px",threshold:e!=null&&e.threshold?e.threshold:[0,1]},n=r=>{r.forEach(i=>{var o,a;this._visibilityPercentage=i.intersectionRatio*100,i.isIntersecting?(e!=null&&e.callbackOnIntersect&&e.callbackOnIntersect(this._visibilityPercentage),(o=this._container)==null||o.dispatchEvent(new Event("visibilityChange"))):e!=null&&e.callbackOnIntersect&&(e.callbackOnIntersect(0),(a=this._container)==null||a.dispatchEvent(new Event("visibilityChange")))})};this._onShowIntersectionObserver=new IntersectionObserver(n,t),this._onShowIntersectionObserver.observe(this.container)}playOnShow(e){if(this.stop(),!this.container)throw se("Can't play on show, player container element not available.");this._onShowIntersectionObserver&&this.stopPlayOnShow(),this.addIntersectionObserver({threshold:(e==null?void 0:e.threshold)??[],callbackOnIntersect:t=>{t===0?this.pause():this.play()}})}_validatePlaybackOptions(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e))switch(n){case"autoplay":typeof r=="boolean"&&(t.autoplay=r);break;case"direction":typeof r=="number"&&[1,-1].includes(r)&&(t.direction=r);break;case"loop":(typeof r=="boolean"||typeof r=="number")&&(t.loop=r);break;case"playMode":typeof r=="string"&&["normal","bounce"].includes(r)&&(t.playMode=r);break;case"speed":typeof r=="number"&&(t.speed=r);break;case"themeColor":typeof r=="string"&&(t.themeColor=r);break;case"hover":typeof r=="boolean"&&(t.hover=r);break;case"intermission":typeof r=="number"&&(t.intermission=r);break;case"defaultTheme":typeof r=="string"&&(t.defaultTheme=r);break}return this._requireValidPlaybackOptions(t),t}_requireAnimationsInTheManifest(){var e;if(!((e=this._dotLottieLoader.manifest)!=null&&e.animations.length))throw se("No animations found in manifest.")}_requireAnimationsToBeLoaded(){if(this._dotLottieLoader.animationsMap.size===0)throw se("No animations have been loaded.")}async play(e,t){var n,r;if(["initial","loading"].includes(this._currentState)){Me("Player unable to play whilst loading.");return}if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),this._lottie&&!e){this._lottie.playDirection===-1&&this._lottie.currentFrame===0?this._lottie.goToAndPlay(this._lottie.totalFrames,!0):this._lottie.play(),this.setCurrentState("playing");return}if(typeof e=="number"){let i=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations[e];if(!i)throw se("animation not found.");typeof t=="function"?await this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):await this.render({id:i.id})}if(typeof e=="string"){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations.find(o=>o.id===e);if(!i)throw se("animation not found.");typeof t=="function"?await this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):await this.render({id:i.id})}}playSegments(e,t){if(!this._lottie||["loading"].includes(this._currentState)){Me("playSegments() Can't use whilst loading.");return}this._lottie.playSegments(e,t),this.setCurrentState("playing")}resetSegments(e){if(!this._lottie||["loading"].includes(this._currentState)){Me("resetSegments() Can't use whilst loading.");return}this._lottie.resetSegments(e)}togglePlay(){this.currentState==="playing"?this.pause():this.play()}_getAnimationByIdOrIndex(e){var t,n;if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),typeof e=="number"){let r=(t=this._dotLottieLoader.manifest)==null?void 0:t.animations[e];if(!r)throw se("animation not found.");return r}if(typeof e=="string"){let r=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(i=>i.id===e);if(!r)throw se("animation not found.");return r}throw se("first param must be a number or string")}get activeAnimationId(){return this._getActiveAnimationId()}get currentAnimationId(){return this._currentAnimationId}get activeStateId(){return this._activeStateId}async _startInteractivity(e){if(!this._inInteractiveMode){oi("Can't start interactivity. Not in interactive mode. Call enterInteractiveMode(stateId: string) to start.");return}if(this._dotLottieLoader.stateMachinesMap.size===0&&await this._dotLottieLoader.getStateMachines(),this._dotLottieLoader.stateMachinesMap.size===0)throw se("No interactivity states are available.");if(e==="undefined")throw se("stateId is not specified.");this._stateMachineManager||(this._stateMachineManager=await PA(Array.from(this._dotLottieLoader.stateMachinesMap.values()),this)),this._stateMachineManager.start(e)}enterInteractiveMode(e){var t;if(e)this._inInteractiveMode||(this._prevUserPlaybackOptions={...this._userPlaybackOptions}),this._inInteractiveMode&&((t=this._stateMachineManager)==null||t.stop()),this._activeStateId=e,this._inInteractiveMode=!0,this._startInteractivity(e);else throw se("stateId must be a non-empty string.")}exitInteractiveMode(){var e;this._inInteractiveMode&&(this._inInteractiveMode=!1,this._activeStateId="",(e=this._stateMachineManager)==null||e.stop(),this._userPlaybackOptions={},this._userPlaybackOptions={...this._prevUserPlaybackOptions},this._prevUserPlaybackOptions={},this.reset())}reset(){var n;let e=this._getActiveAnimationId(),t=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(r=>r.id===e);if(this._inInteractiveMode&&this.exitInteractiveMode(),!t)throw se("animation not found.");this.play(e)}previous(e){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw se("manifest not found.");if(this._inInteractiveMode){Me("previous() is not supported in interactive mode.");return}let t=this._dotLottieLoader.manifest.animations.findIndex(r=>r.id===this._currentAnimationId);if(t===-1)throw se("animation not found.");let n=this._dotLottieLoader.manifest.animations[(t-1+this._dotLottieLoader.manifest.animations.length)%this._dotLottieLoader.manifest.animations.length];if(!n||!n.id)throw se("animation not found.");typeof e=="function"?this.render({id:n.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(n))}):this.render({id:n.id})}next(e){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw se("manifest not found.");if(this._inInteractiveMode){Me("next() is not supported in interactive mode.");return}let t=this._dotLottieLoader.manifest.animations.findIndex(r=>r.id===this._currentAnimationId);if(t===-1)throw se("animation not found.");let n=this._dotLottieLoader.manifest.animations[(t+1)%this._dotLottieLoader.manifest.animations.length];if(!n||!n.id)throw se("animation not found.");typeof e=="function"?this.render({id:n.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(n))}):this.render({id:n.id})}getManifest(){return this._dotLottieLoader.manifest}resize(){if(!this._lottie||["loading"].includes(this._currentState)){Me("resize() Can't use whilst loading.");return}this._lottie.resize()}stop(){if(!this._lottie||["loading"].includes(this._currentState)){Me("stop() Can't use whilst loading.");return}this.clearCountTimer(),this._counter=0,this._setPlayerState(()=>({direction:this._getOption("direction")})),this._lottie.stop(),this.setCurrentState("stopped")}pause(){if(!this._lottie||["loading"].includes(this._currentState)){Me("pause() Can't use whilst loading.");return}this.clearCountTimer(),this._lottie.pause(),this.setCurrentState("paused")}freeze(){if(!this._lottie||["loading"].includes(this._currentState)){Me("freeze() Can't use whilst loading.");return}this.currentState!=="frozen"&&(this._stateBeforeFreeze=this.currentState),this._lottie.pause(),this.setCurrentState("frozen")}unfreeze(){if(!this._lottie||["loading"].includes(this._currentState)){Me("unfreeze() Can't use whilst loading.");return}this._stateBeforeFreeze==="playing"?this.play():this.pause()}destroy(){var e,t;(e=this._container)!=null&&e.__lottie&&(this._container.__lottie.destroy(),this._container.__lottie=null),this.clearCountTimer(),typeof document<"u"&&document.removeEventListener("visibilitychange",()=>this._onVisibilityChange()),this._counter=0,(t=this._lottie)==null||t.destroy()}getAnimationInstance(){return this._lottie}static getLottieWebVersion(){return`${IA.dependencies["lottie-web"]}`}addEventListener(e,t){var n,r,i;this._listeners.has(e)||this._listeners.set(e,new Set),(n=this._listeners.get(e))==null||n.add(t);try{e==="complete"?(r=this._container)==null||r.addEventListener(e,t):(i=this._lottie)==null||i.addEventListener(e,t)}catch(o){oi(`addEventListener ${o}`)}}getState(){var e,t,n;return{autoplay:((e=this._lottie)==null?void 0:e.autoplay)??!1,currentState:this._currentState,frame:this._frame,visibilityPercentage:this._visibilityPercentage,seeker:this._seeker,direction:((t=this._lottie)==null?void 0:t.playDirection)??1,hover:this._hover,loop:this._loop||!1,playMode:this._mode,speed:((n=this._lottie)==null?void 0:n.playSpeed)??1,background:this._background,intermission:this._intermission,defaultTheme:this._defaultTheme,currentAnimationId:this._currentAnimationId,activeStateId:this._activeStateId??""}}_notify(){this.state.setState(this.getState())}get totalFrames(){var e;return((e=this._lottie)==null?void 0:e.totalFrames)||0}get direction(){return this._lottie?this._lottie.playDirection:1}setDirection(e){this._requireValidDirection(e),this._setPlayerState(()=>({direction:e})),this._userPlaybackOptions.direction=e}get speed(){var e;return((e=this._lottie)==null?void 0:e.playSpeed)||1}setSpeed(e){this._requireValidSpeed(e),this._setPlayerState(()=>({speed:e})),this._userPlaybackOptions.speed=e}get autoplay(){var e;return((e=this._lottie)==null?void 0:e.autoplay)??!1}setAutoplay(e){if(this._requireValidAutoplay(e),!this._lottie||["loading"].includes(this._currentState)){Me("setAutoplay() Can't use whilst loading.");return}this._setPlayerState(()=>({autoplay:e})),this._userPlaybackOptions.autoplay=e}toggleAutoplay(){if(!this._lottie||["loading"].includes(this._currentState)){Me("toggleAutoplay() Can't use whilst loading.");return}this.setAutoplay(!this._lottie.autoplay)}get defaultTheme(){return this._defaultTheme}setDefaultTheme(e){this._setPlayerState(()=>({defaultTheme:e})),this._userPlaybackOptions.defaultTheme=e,this._animation&&this.render()}get loop(){return this._loop}setLoop(e){this._requireValidLoop(e),this._setPlayerState(()=>({loop:e})),this._userPlaybackOptions.loop=e}toggleLoop(){if(!this._lottie||["loading"].includes(this._currentState)){Me("toggleLoop() Can't use whilst loading.");return}this.setLoop(!this._loop)}get background(){return this._background}setBackground(e){this._requireValidBackground(e),this._container&&(this._background=e,this._container.style.backgroundColor=e)}get _frame(){return this._lottie?this.currentState==="completed"?this.direction===-1?0:this._lottie.totalFrames:this._lottie.currentFrame:0}get _seeker(){return this._lottie?this._frame/this._lottie.totalFrames*100:0}async revertToManifestValues(e){var r;let t;!Array.isArray(e)||e.length===0?t=["autoplay","defaultTheme","direction","hover","intermission","loop","playMode","speed","activeAnimationId"]:t=e;let n=!1;if(t.includes("activeAnimationId")){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.activeAnimationId,o=this._getAnimationByIdOrIndex(i||0);this._activeAnimationId=i,await this._setCurrentAnimation(o.id),n=!0}t.forEach(i=>{switch(i){case"autoplay":delete this._userPlaybackOptions.autoplay,this.setAutoplay(this._getOption("autoplay"));break;case"defaultTheme":delete this._userPlaybackOptions.defaultTheme,this.setDefaultTheme(this._getOption("defaultTheme"));break;case"direction":delete this._userPlaybackOptions.direction,this.setDirection(this._getOption("direction"));break;case"hover":delete this._userPlaybackOptions.hover,this.setHover(this._getOption("hover"));break;case"intermission":delete this._userPlaybackOptions.intermission,this.setIntermission(this._getOption("intermission"));break;case"loop":delete this._userPlaybackOptions.loop,this.setLoop(this._getOption("loop"));break;case"playMode":delete this._userPlaybackOptions.playMode,this.setMode(this._getOption("playMode")),this.setDirection(this._getOption("direction"));break;case"speed":delete this._userPlaybackOptions.speed,this.setSpeed(this._getOption("speed"));break}}),n&&this.render()}removeEventListener(e,t){var n,r,i;try{e==="complete"?(n=this._container)==null||n.removeEventListener(e,t):(r=this._lottie)==null||r.removeEventListener(e,t),(i=this._listeners.get(e))==null||i.delete(t)}catch(o){oi("removeEventListener",o)}}_handleAnimationComplete(){var t;typeof this._loop=="number"&&this.stop();let e=this.direction===-1?0:this.totalFrames;this.goToAndStop(e,!0),this._counter=0,this.clearCountTimer(),this.setCurrentState("completed"),(t=this._container)==null||t.dispatchEvent(new Event("complete"))}addEventListeners(){var e;if(!this._lottie||["loading"].includes(this._currentState)){Me("addEventListeners() Can't use whilst loading.");return}this._lottie.addEventListener("enterFrame",()=>{var t;if(!this._lottie){Me("enterFrame event : Lottie is undefined.");return}Math.floor(this._lottie.currentFrame)===0&&this.direction===-1&&((t=this._container)==null||t.dispatchEvent(new Event("complete")),this.loop||this.setCurrentState("completed")),this._notify()}),this._lottie.addEventListener("loopComplete",()=>{var r;if(!this._lottie){Me("loopComplete event : Lottie is undefined.");return}(r=this._container)==null||r.dispatchEvent(new Event("loopComplete")),this.intermission>0&&this.pause();let t=this._lottie.playDirection;if(typeof this._loop=="number"&&this._loop>0&&(this._counter+=this._mode==="bounce"?.5:1,this._counter>=this._loop)){this._handleAnimationComplete();return}this._mode==="bounce"&&typeof t=="number"&&(t=Number(t)*-1);let n=t===-1?this._lottie.totalFrames-1:0;this.intermission?(this.goToAndPlay(n,!0),this.pause(),this._counterInterval=window.setTimeout(()=>{this._lottie&&(this._setPlayerState(()=>({direction:t})),this.goToAndPlay(n,!0))},this._intermission)):(this._setPlayerState(()=>({direction:t})),this.goToAndPlay(t===-1?this.totalFrames-1:0,!0))}),this._lottie.addEventListener("complete",()=>{if(this._lottie&&this._loop===!1&&this._mode==="bounce"){if(this._counter+=.5,this._counter>=1){this._handleAnimationComplete();return}this._counterInterval=window.setTimeout(()=>{if(!this._lottie)return;let t=this._lottie.playDirection;this._mode==="bounce"&&typeof t=="number"&&(t=Number(t)*-1);let n=t===-1?this.totalFrames-1:0;this._setPlayerState(()=>({direction:t})),this.goToAndPlay(n,!0)},this._intermission)}else this._handleAnimationComplete()});for(let[t,n]of this._listeners)if(t==="complete")for(let r of n)(e=this._container)==null||e.addEventListener(t,r);else for(let r of n)this._lottie.addEventListener(t,r)}async _setCurrentAnimation(e){this._currentState="loading";let t=await this._dotLottieLoader.getAnimation(e);this._currentAnimationId=e,this._animation=t,this._currentState="ready"}async render(e){if(e!=null&&e.id)await this._setCurrentAnimation(e.id);else if(!this._animation)throw se("no animation selected");let t=Ft.loop,n=Ft.autoplay,r=Ft.playMode,i=Ft.intermission,o=Ft.hover,a=Ft.direction,s=Ft.speed,l=Ft.defaultTheme;t=(e==null?void 0:e.loop)??this._getOption("loop"),n=(e==null?void 0:e.autoplay)??this._getOption("autoplay"),r=(e==null?void 0:e.playMode)??this._getOption("playMode"),i=(e==null?void 0:e.intermission)??this._getOption("intermission"),o=(e==null?void 0:e.hover)??this._getOption("hover"),a=(e==null?void 0:e.direction)??this._getOption("direction"),s=(e==null?void 0:e.speed)??this._getOption("speed"),l=(e==null?void 0:e.defaultTheme)??this._getOption("defaultTheme");let u={...this._animationConfig,autoplay:o?!1:n,loop:typeof t=="number"?!0:t},c=await this._dotLottieLoader.getTheme(l);c&&this._animation?this._animation=await xA(this._animation,c):this._animation=await this._dotLottieLoader.getAnimation(this._currentAnimationId??"");let f=await this._getLottiePlayerInstance();if(this._activeStateId&&!this._inInteractiveMode){this.enterInteractiveMode(this._activeStateId);return}this.destroy(),this._setPlayerState(()=>({defaultTheme:l,playMode:r,intermission:i,hover:o,loop:t})),this._lottie=f.loadAnimation({...u,container:this._container,animationData:this._animation}),this.addEventListeners(),this._container&&(this._container.__lottie=this._lottie),this._setPlayerState(()=>({direction:a,speed:s})),n&&!o&&this.play(),this._updateTestData()}async _getLottiePlayerInstance(){let e=this._animationConfig.renderer??"svg",t;switch(e){case"svg":{this._light?t=await $n(()=>import("./lottie_light-IOYK46WR-C42PZIWW-842cd67b.js"),["assets/lottie_light-IOYK46WR-C42PZIWW-842cd67b.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_svg-NPHRPZVQ-SN5HKEBW-b354eb1e.js"),["assets/lottie_svg-NPHRPZVQ-SN5HKEBW-b354eb1e.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}case"canvas":{this._light?t=await $n(()=>import("./lottie_light_canvas-JOJMVDMY-Y3JQKMNA-129b1fdc.js"),["assets/lottie_light_canvas-JOJMVDMY-Y3JQKMNA-129b1fdc.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_canvas-MBHU2YSW-VFQ5A67K-34d36756.js"),["assets/lottie_canvas-MBHU2YSW-VFQ5A67K-34d36756.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}case"html":{this._light?t=await $n(()=>import("./lottie_light_html-QXO6XUZK-N4R277UW-62a905c2.js"),["assets/lottie_light_html-QXO6XUZK-N4R277UW-62a905c2.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]):t=await $n(()=>import("./lottie_html-DEQZ7JWN-7UJDZM6D-84fdb830.js"),["assets/lottie_html-DEQZ7JWN-7UJDZM6D-84fdb830.js","assets/chunk-M2BEWT7H-2d4e7f2d.js"]);break}default:throw new Error(`Invalid renderer: ${e}`)}return t.default}_getActiveAnimationId(){var t;let e=this._dotLottieLoader.manifest;return this._activeAnimationId??(e==null?void 0:e.activeAnimationId)??((t=e==null?void 0:e.animations[0])==null?void 0:t.id)??void 0}async load(e){if(this._currentState==="loading"){Me("Loading in progress..");return}try{if(this.setCurrentState("loading"),typeof this._src=="string")if(wk(this._src)){let n=JSON.parse(this._src);this._dotLottieLoader.loadFromLottieJSON(n)}else{let n=new URL(this._src,window.location.href);await this._dotLottieLoader.loadFromUrl(n.toString())}else if(typeof this._src=="object"&&Dl(this._src))this._dotLottieLoader.loadFromLottieJSON(this._src);else throw se("Invalid src provided");if(!this._dotLottieLoader.manifest)throw se("No manifest found");let t=this._getActiveAnimationId();if(!t)throw se("No active animation found");await this._setCurrentAnimation(t),await this.render(e)}catch(t){this.setCurrentState("error"),t instanceof Error&&oi(`Error loading animation: ${t.message}`)}}setErrorState(e){this.setCurrentState("error"),oi(e)}_requireValidDirection(e){if(e!==-1&&e!==1)throw se("Direction can only be -1 (backwards) or 1 (forwards)")}_requireValidIntermission(e){if(e<0||!Number.isInteger(e))throw se("intermission must be a positive number")}_requireValidLoop(e){if(typeof e=="number"&&(!Number.isInteger(e)||e<0))throw se("loop must be a positive number or boolean")}_requireValidSpeed(e){if(typeof e!="number")throw se("speed must be a number")}_requireValidBackground(e){if(typeof e!="string")throw se("background must be a string")}_requireValidAutoplay(e){if(typeof e!="boolean")throw se("autoplay must be a boolean")}_requireValidPlaybackOptions(e){e.direction&&this._requireValidDirection(e.direction),e.intermission&&this._requireValidIntermission(e.intermission),e.loop&&this._requireValidLoop(e.loop),e.speed&&this._requireValidSpeed(e.speed)}};function LA(){var e=b.useRef(!0);return e.current?(e.current=!1,!0):e.current}var TA=function(e,t){var n=LA();b.useEffect(function(){if(!n)return e()},t)},Rt=TA,DA=function(){};function Aw(e){for(var t=[],n=1;n{let e=b.useContext(Iw);if(typeof e>"u")throw se("useDotLottieContext must be used within a DotLottieProvider");return e},Lw=(e,t,n)=>{let[r,i]=b.useState(()=>n());return b.useEffect(()=>{let o=e(()=>{let a=t();i(a)});return()=>{o()}},[e]),r};function ai(e){let t=Mw(),n=b.useCallback(()=>e(t.getState()),[e,t]),r=b.useCallback(i=>t.state.subscribe(i),[t]);return Lw(r,n,()=>e(dh))}var qA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M8.33325 11.6667C7.78097 11.6667 7.33325 12.1144 7.33325 12.6667C7.33325 13.2189 7.78097 13.6667 8.33325 13.6667C8.88554 13.6667 9.33325 13.2189 9.33325 12.6667C9.33325 12.1144 8.88554 11.6667 8.33325 11.6667Z",fill:"currentColor"}),O.jsx("path",{d:"M7.33325 8C7.33325 7.44771 7.78097 7 8.33325 7C8.88554 7 9.33325 7.44771 9.33325 8C9.33325 8.55228 8.88554 9 8.33325 9C7.78097 9 7.33325 8.55228 7.33325 8Z",fill:"currentColor"}),O.jsx("path",{d:"M7.33325 3.33333C7.33325 2.78105 7.78097 2.33333 8.33325 2.33333C8.88554 2.33333 9.33325 2.78105 9.33325 3.33333C9.33325 3.88562 8.88554 4.33333 8.33325 4.33333C7.78097 4.33333 7.33325 3.88562 7.33325 3.33333Z",fill:"currentColor"})]}),KA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M10.8654 2.31311C11.0607 2.11785 11.3772 2.11785 11.5725 2.31311L13.4581 4.19873C13.6534 4.39399 13.6534 4.71058 13.4581 4.90584L11.5725 6.79146C11.3772 6.98672 11.0607 6.98672 10.8654 6.79146C10.6701 6.5962 10.6701 6.27961 10.8654 6.08435L11.6162 5.33354H4V6.66687C4 7.03506 3.70152 7.33354 3.33333 7.33354C2.96514 7.33354 2.66666 7.03506 2.66666 6.66687L2.66666 4.66687C2.66666 4.29868 2.96514 4.0002 3.33333 4.0002H11.8454L10.8654 3.02022C10.6701 2.82496 10.6701 2.50838 10.8654 2.31311Z",fill:"currentColor"}),O.jsx("path",{d:"M12.4375 11.9998C12.8057 11.9998 13.1042 11.7013 13.1042 11.3331V9.33313C13.1042 8.96494 12.8057 8.66647 12.4375 8.66647C12.0693 8.66647 11.7708 8.96494 11.7708 9.33313V10.6665H4.15462L4.90543 9.91565C5.10069 9.72039 5.10069 9.40381 4.90543 9.20854C4.71017 9.01328 4.39359 9.01328 4.19832 9.20854L2.31271 11.0942C2.11744 11.2894 2.11744 11.606 2.31271 11.8013L4.19832 13.6869C4.39359 13.8821 4.71017 13.8821 4.90543 13.6869C5.10069 13.4916 5.10069 13.175 4.90543 12.9798L3.92545 11.9998H12.4375Z",fill:"currentColor"})]}),GA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3336 2.5C14.3336 2.22386 14.1097 2 13.8336 2C13.5574 2 13.3336 2.22386 13.3336 2.5V13.5C13.3336 13.7761 13.5574 14 13.8336 14C14.1097 14 14.3336 13.7761 14.3336 13.5V2.5ZM3.50618 2.21722C2.83954 1.82595 2 2.30667 2 3.07965V12.9201C2 13.6931 2.83954 14.1738 3.50618 13.7825L11.8893 8.86231C12.5477 8.47586 12.5477 7.52389 11.8893 7.13745L3.50618 2.21722Z",fill:"currentColor"})}),QA=e=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:[O.jsx("path",{d:"M3.99996 2C3.26358 2 2.66663 2.59695 2.66663 3.33333V12.6667C2.66663 13.403 3.26358 14 3.99996 14H5.33329C6.06967 14 6.66663 13.403 6.66663 12.6667V3.33333C6.66663 2.59695 6.06967 2 5.33329 2H3.99996Z",fill:"currentColor"}),O.jsx("path",{d:"M10.6666 2C9.93025 2 9.33329 2.59695 9.33329 3.33333V12.6667C9.33329 13.403 9.93025 14 10.6666 14H12C12.7363 14 13.3333 13.403 13.3333 12.6667V3.33333C13.3333 2.59695 12.7363 2 12 2H10.6666Z",fill:"currentColor"})]}),YA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{d:"M3.33337 3.46787C3.33337 2.52312 4.35948 1.93558 5.17426 2.41379L12.8961 6.94592C13.7009 7.41824 13.7009 8.58176 12.8961 9.05408L5.17426 13.5862C4.35948 14.0644 3.33337 13.4769 3.33337 12.5321V3.46787Z",fill:"currentColor"})}),JA=e=>O.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.69214 13.5C1.69214 13.7761 1.916 14 2.19214 14C2.46828 14 2.69214 13.7761 2.69214 13.5L2.69214 2.5C2.69214 2.22386 2.46828 2 2.19214 2C1.916 2 1.69214 2.22386 1.69214 2.5V13.5ZM12.5192 13.7828C13.1859 14.174 14.0254 13.6933 14.0254 12.9204L14.0254 3.0799C14.0254 2.30692 13.1859 1.8262 12.5192 2.21747L4.13612 7.13769C3.47769 7.52414 3.47769 8.4761 4.13612 8.86255L12.5192 13.7828Z",fill:"currentColor"})}),XA=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5303 6.46967C13.8232 6.76256 13.8232 7.23744 13.5303 7.53033L9.06066 12L13.5303 16.4697C13.8232 16.7626 13.8232 17.2374 13.5303 17.5303C13.2374 17.8232 12.7626 17.8232 12.4697 17.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L12.4697 6.46967C12.7626 6.17678 13.2374 6.17678 13.5303 6.46967Z",fill:"currentColor"})}),ZA=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4697 17.5303C10.1768 17.2374 10.1768 16.7626 10.4697 16.4697L14.9393 12L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L11.5303 17.5303C11.2374 17.8232 10.7626 17.8232 10.4697 17.5303Z",fill:"currentColor"})}),e7=({children:e,enableReset:t,expand:n=!1,onBack:r,onExpand:i,onReset:o,title:a})=>{let s=b.useCallback(()=>{r()},[r]),l=b.useCallback(()=>{i()},[i]),u=b.useCallback(()=>{o()},[o]);return O.jsxs(O.Fragment,{children:[!n&&O.jsxs("button",{className:"popover-item","aria-label":`Go to ${a}`,onClick:l,children:[O.jsx("span",{style:{flex:1},children:a}),O.jsx("span",{children:O.jsx(ZA,{})})]}),n&&O.jsxs("div",{className:"popover-submenu",children:[O.jsxs("div",{className:"popover-header",children:[O.jsx("button",{onClick:s,children:O.jsx(XA,{})}),O.jsxs("div",{className:"popover-header-title",style:{flex:1},children:[O.jsx("span",{children:a}),t&&O.jsx("button",{className:"reset-theme",onClick:u,"aria-label":`Reset ${a}`,children:"Reset"})]})]}),e]})]})},t7=e=>O.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5283 5.9372C20.8211 6.23009 20.8211 6.70497 20.5283 6.99786L9.4631 18.063C9.32181 18.2043 9.12997 18.2833 8.93016 18.2826C8.73035 18.2819 8.53907 18.2015 8.39877 18.0593L3.46807 13.0596C3.17722 12.7647 3.18052 12.2898 3.47544 11.999C3.77036 11.7081 4.24522 11.7114 4.53608 12.0063L8.93646 16.4683L19.4676 5.9372C19.7605 5.64431 20.2354 5.64431 20.5283 5.9372Z",fill:"currentColor"})}),n7=({onSelectItem:e,selected:t=!1,value:n,...r})=>{let i=b.useCallback(()=>{e==null||e(n)},[e,n]);return O.jsxs("button",{"aria-label":`Select ${n}`,className:`popover-item ${t?"selected":""}`,onClick:i,...r,children:[O.jsx("span",{style:{visibility:t?"visible":"hidden"},children:O.jsx(t7,{})}),O.jsx("span",{style:{flex:1},children:n})]})},r7=({items:e=[],onSelectItem:t,onDismiss:n,...r})=>{let[i,o]=b.useState(""),a=b.useRef(null);RA(a,()=>{o(""),n()}),HA("Escape",()=>{o(""),n()});let s=b.useCallback(()=>{o("")},[o]),l=b.useCallback(c=>()=>o(c),[o]),u=b.useCallback((c,f)=>()=>t(c,f),[t]);return O.jsx("dialog",{ref:a,style:{padding:i?"0px":"8px"},className:"popover","aria-label":"Popover Menu",...r,children:O.jsx("ul",{"aria-label":"Popover content",className:"popover-content",children:e.map(c=>O.jsx("li",{style:{width:"100%"},children:(i===c.title||!i)&&O.jsx(e7,{expand:i===c.title,title:c.title,onExpand:l(c.title),onBack:s,enableReset:c.enableReset,onReset:u(c.title,""),children:O.jsx("ul",{className:"popover-items","aria-label":`List of ${c.title}`,children:c.items.map(f=>O.jsx("li",{children:O.jsx(n7,{value:f.value,selected:f.selected,onSelectItem:u(c.title,f.value)})},f.value))})})},c.title))})})},i7=["play","stop","loop","next","previous","animations","themes"],o7=({buttons:e=i7,...t})=>{let n=Mw(),r=ai(B=>B.loop),i=ai(B=>B.currentState),o=ai(B=>B.seeker),a=ai(B=>B.currentAnimationId),s=ai(B=>B.defaultTheme),l=ai(B=>B.direction),u=b.useMemo(()=>i===Tn.Playing,[i]),[c,f]=b.useState(!1),[d,h]=b.useState([]),[y,v]=b.useState([]),w=b.useMemo(()=>{let B=[],D=d.map($=>({value:$.id,selected:a===$.id})),I=y.filter($=>$.animations.includes(a||"")).map($=>({value:$.id,selected:s===$.id}));return Array.isArray(D)&&D.length!==0&&B.push({title:"Animations",items:D,enableReset:!1}),Array.isArray(I)&&I.length!==0&&B.push({title:"Themes",items:I,enableReset:!!s}),B},[d,y,a,s]),p=b.useMemo(()=>e.includes("themes")&&Array.isArray(y)&&y.length?!0:e.includes("animations")&&Array.isArray(d)&&d.length>1,[w]),m=b.useCallback(()=>{f(!c)},[f]),g=b.useCallback(()=>{f(!1)},[f]),S=b.useCallback(()=>{n.toggleLoop()},[n]),E=b.useCallback(()=>{n.freeze()},[n]),_=b.useCallback(()=>{n.unfreeze()},[n]),x=b.useCallback(()=>{n.next()},[n]),C=b.useCallback(()=>{n.previous()},[n]),k=b.useCallback(()=>{n.togglePlay()},[n]),A=b.useCallback((B,D)=>{B==="Animations"&&n.play(D),B==="Themes"&&n.setDefaultTheme(D)},[n]),T=b.useCallback(B=>{n.seek(String(B.currentTarget.value).concat("%"))},[n]);function j(){var I,$;let B=(I=n.getManifest())==null?void 0:I.animations,D=($=n.getManifest())==null?void 0:$.themes;B&&h(B),D&&v(D)}return b.useEffect(()=>{if(!(typeof n>"u"))return n.addEventListener("DOMLoaded",j),()=>{n.removeEventListener("DOMLoaded",j)}},[n]),O.jsxs("div",{"aria-label":"lottie-animation-controls",className:"toolbar",...t,children:[e.includes("previous")&&d.length>1&&O.jsx("button",{onClick:C,"aria-label":"play-previous",children:O.jsx(JA,{})}),e.includes("play")&&O.jsx("button",{onClick:k,"aria-label":"play-pause",children:u?O.jsx(QA,{}):O.jsx(YA,{})}),e.includes("next")&&d.length>1&&O.jsx("button",{onClick:x,"aria-label":"play-next",children:O.jsx(GA,{})}),O.jsx("input",{style:{width:"100%","--seeker":o},className:`seeker ${l===1?"":"to-left"}`,type:"range",min:0,step:0,max:100,value:o||0,onInput:T,onMouseDown:E,onMouseUp:_,"aria-valuemin":1,"aria-valuemax":100,role:"slider","aria-valuenow":o,"aria-label":"lottie-seek-input"}),e.includes("loop")&&O.jsx("button",{onClick:S,className:r?"active":"","aria-label":"loop-toggle",children:O.jsx(KA,{})}),p&&O.jsxs("div",{style:{position:"relative"},children:[O.jsx(r7,{items:w,open:c,onDismiss:g,onSelectItem:A}),O.jsx("button",{className:`${c?"popover-active":""}`,"aria-label":"open-popover",onClick:m,children:O.jsx(qA,{})})]})]})},a7={name:"@dotlottie/react-player",version:"1.4.6",type:"module",description:"dotlottie animation player react component.",repository:"https://github.com/dotlottie/player-component.git",homepage:"https://dotlottie.com/players",bugs:"https://github.com/dotlottie/player-component/issues",author:"Afsal ",license:"MIT",module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:["dotlottie","animation","react","component","player"],scripts:{build:"tsup","cypress:open":"cypress open --component",dev:"tsup --watch",lint:"eslint .",test:"cypress run --component","type-check":"tsc --noEmit"},peerDependencies:{react:"^16.8.0 || ^17.0.0 || ^18.0.0"},devDependencies:{"@dotlottie/common":"workspace:^","@lottiefiles/lottie-types":"^1.2.0","@types/react":"^16.8.0","@types/react-dom":"^16.8.0","@vitejs/plugin-react":"^3.1.0",autoprefixer:"^10.4.14","axe-core":"^4.7.2",cypress:"^12.11.0","cypress-axe":"^1.4.0",postcss:"^8.4.24",react:"^16.8.0","react-dom":"^16.8.0","react-use":"^17.4.0",tsup:"^6.1.3",typescript:"^4.7.4",vite:"^4.2.1"}},s7=e=>{let t=b.useRef(!1);b.useEffect(()=>{let n;return t.current||(t.current=!0,n=e()),()=>{typeof n=="function"&&n()}},[])},l7=(e,t,n)=>{let[r,i]=b.useState(()=>new Fs(e,t.current,n)),o=b.useCallback(()=>{let s=new Fs(e,t.current,n);return s.load(),s},[t,e,n]),a=b.useCallback(()=>{i(o())},[o]);return n!=null&&n.lottieRef&&b.useImperativeHandle(n.lottieRef,()=>({play:(s,l)=>{r.play(s,l)},previous:s=>{r.previous(s)},next:s=>{r.next(s)},reset:()=>{r.reset()},getManifest:()=>r.getManifest(),getState:()=>r.getState(),getCurrentAnimationId:()=>r.currentAnimationId,getLottie:()=>r.getAnimationInstance(),getVersions:()=>({lottieWebVersion:Fs.getLottieWebVersion(),dotLottieReactVersion:`${a7.version}`}),setDefaultTheme:s=>{r.setDefaultTheme(s)},setBackground:s=>{r.setBackground(s)},setAutoplay:s=>{r.setAutoplay(s)},setDirection:s=>{r.setDirection(s)},setHover:s=>{r.setHover(s)},setIntermission:s=>{r.setIntermission(s)},setLoop:s=>{r.setLoop(s)},setPlayMode:s=>{r.setMode(s)},setSpeed:s=>{r.setSpeed(s)},revertToManifestValues:s=>{r.revertToManifestValues(s)},pause:()=>{r.pause()},seek:s=>{r.seek(s)},getContainer:()=>r.container,goToAndPlay:(s,l,u)=>{r.goToAndPlay(s,l,u)},goToAndStop:(s,l,u)=>{r.goToAndStop(s,l,u)},stop:()=>{r.stop()},togglePlay:()=>{r.togglePlay()},resize:()=>{r.resize()},enterInteractiveMode:s=>{r.enterInteractiveMode(s)},playOnShow:s=>{r.playOnShow(s)},stopPlayOnShow:()=>{r.stopPlayOnShow()},playOnScroll:s=>{r.playOnScroll(s)},stopPlayOnScroll:()=>{r.stopPlayOnScroll()},exitInteractiveMode:()=>{r.exitInteractiveMode()}}),[n.lottieRef.current,r]),s7(()=>(a(),()=>{r.destroy()})),{dotLottiePlayer:r,initDotLottiePlayer:a}};function ps(e,t){let n=b.useCallback(()=>t(e.getState()),[t,e]),r=b.useCallback(i=>e.state.subscribe(i),[e]);return Lw(r,n,()=>t(dh))}var u7=({onEvent:e,activeAnimationId:t,autoplay:n,background:r="transparent",direction:i,intermission:o,loop:a,playMode:s,hover:l,speed:u,renderer:c="svg",rendererSettings:f={},lottieRef:d,src:h,className:y="",testId:v,children:w,defaultTheme:p,light:m=!1,activeStateId:g,...S})=>{let E=b.useRef(null),{dotLottiePlayer:_,initDotLottiePlayer:x}=l7(h,E,{lottieRef:d,renderer:c,activeAnimationId:t,rendererSettings:{clearCanvas:!0,progressiveLoad:!1,hideOnTransparent:!0,...f},hover:l,loop:a,direction:i,speed:u,intermission:o,background:r,playMode:s,autoplay:l?!1:n,testId:v,defaultTheme:p,light:m,activeStateId:g}),C=ps(_,j=>j.currentState),k=ps(_,j=>j.frame),A=ps(_,j=>j.seeker),T=ps(_,j=>j.currentAnimationId);return Rt(()=>{typeof a>"u"?_.revertToManifestValues(["loop"]):_.setLoop(a)},[a]),Rt(()=>{typeof n>"u"?_.revertToManifestValues(["autoplay"]):_.setAutoplay(n)},[n]),Rt(()=>{typeof i>"u"?_.revertToManifestValues(["direction"]):_.setDirection(i)},[i]),Rt(()=>{typeof u>"u"?_.revertToManifestValues(["speed"]):_.setSpeed(u)},[u]),Rt(()=>{typeof s>"u"?_.revertToManifestValues(["playMode"]):_.setMode(s)},[s]),Rt(()=>{typeof l>"u"?_.revertToManifestValues(["hover"]):_.setHover(l)},[l]),Rt(()=>{typeof r>"u"?_.setBackground("transparent"):_.setBackground(r)},[r]),Rt(()=>{typeof o>"u"?_.revertToManifestValues(["intermission"]):_.setIntermission(o)},[o]),Rt(()=>{typeof p>"u"||!p?_.revertToManifestValues(["defaultTheme"]):_.setDefaultTheme(p)},[p]),Rt(()=>{t&&_.play(t)},[t]),Rt(()=>(typeof g<"u"&&_.enterInteractiveMode(g),()=>{_.exitInteractiveMode()}),[g]),Rt(()=>{typeof h<"u"&&x()},[h]),b.useEffect(()=>(_.addEventListener("DOMLoaded",()=>{e==null||e(ht.Ready)}),_.addEventListener("data_ready",()=>{e==null||e(ht.DataReady)}),_.addEventListener("data_failed",()=>{e==null||e(ht.DataFail)}),_.addEventListener("complete",()=>{_.currentState!==Tn.Playing&&(e==null||e(ht.Complete))}),_.addEventListener("loopComplete",()=>{e==null||e(ht.LoopComplete)}),()=>{_.destroy()}),[_]),b.useEffect(()=>{switch(C){case Tn.Stopped:e==null||e(ht.Stop);break;case Tn.Paused:e==null||e(ht.Pause);break;case Tn.Playing:e==null||e(ht.Play);break;case Tn.Frozen:e==null||e(ht.Freeze);break;case Tn.Error:e==null||e(ht.Error);break}},[C]),b.useEffect(()=>{e==null||e(ht.Frame,{frame:k,seeker:A})},[k]),O.jsx(WA,{value:_,children:O.jsxs("div",{className:`dotlottie-container main ${w?"controls":""} ${y}`,lang:"en",...v&&{"data-testid":v},...S,children:[O.jsx("div",{ref:E,"data-name":`${T}`,role:"figure",className:`animation ${w?"controls":""}`,style:{position:"relative"},...v&&{"data-testid":"animation"},children:C===Tn.Error&&O.jsx("div",{...v&&{"data-testid":"error"},className:"error",children:"⚠️"})}),w]})})};const c7=({activeAnimationId:e})=>{const t=b.useRef(),n=Fe(d=>d.playground.playerUrl),[r,i]=b.useState([]),[o,a]=b.useState(""),[s,l]=b.useState(0),u=b.useCallback((d,h)=>{var v,w,p;if(d===ht.Ready){const m=(w=(v=t.current)==null?void 0:v.getManifest())==null?void 0:w.states;i(m||[])}if(d===ht.Frame){const{frame:m}=h;l(Math.floor(m))}const y=(p=t.current)==null?void 0:p.getState();y&&a(y.activeStateId||"")},[t]),c=b.useCallback(()=>()=>{t.current&&t.current.exitInteractiveMode()},[t]),f=b.useCallback(d=>()=>{t.current&&t.current.enterInteractiveMode(d)},[t]);if(n)return O.jsx("div",{children:O.jsxs(O.Fragment,{children:[O.jsx(u7,{activeAnimationId:e||void 0,background:"white",onEvent:u,lottieRef:t,src:n,children:O.jsxs("div",{className:"bg-white",children:[O.jsx(o7,{}),O.jsx("div",{className:"px-3 pb-1",children:O.jsxs("span",{className:"bg-gray-300 rounded px-2",children:["# ",O.jsx("span",{children:s})]})})]})}),O.jsx("div",{className:"flex flex-wrap gap-2 p-2 text-white",children:O.jsxs("div",{className:"text-white",children:[O.jsxs("div",{className:"mb-2 flex gap-2",children:[O.jsx("span",{children:"Interactivity states:"}),O.jsx(Ol,{disabled:!o,color:"red",onClick:c(),children:"Exit Interactivity"})]}),O.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(d=>O.jsx(Ol,{color:o===d?"green":"blue",onClick:f(d),children:d},d))})]})})]})})};const f7=({file:e,fileName:t})=>{const n=Au(),r=b.useRef(),i=Fe(L=>L.animations.list),o=Fe(L=>L.themes.list),a=Fe(L=>L.states.list),{addDotLottieAnimation:s,addDotLottieStateMachine:l,addDotLottieTheme:u,buildAndUpdateUrl:c,dotLottie:f,downloadDotLottie:d,fetchAndUpdateDotLottie:h,removeDotLottieAnimation:y,removeDotLottieState:v,removeDotLottieTheme:w,setDotLottie:p}=qp(),m=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.content}),g=Fe(L=>{var R;return((R=L.editor.file)==null?void 0:R.type)||"json"}),S=Fe(L=>L.editor.animationId),E=Fe(L=>L.playground.workingFileName),_=b.useCallback(async(L,R)=>{let H,W="";if(L instanceof File?(H=await L.arrayBuffer(),W=L.name):(H=L,W=R||"new_awesome"),typeof H<"u")try{const Z=await f.fromArrayBuffer(H);n(Ms()),n(os(W)),p(Z)}catch(Z){me(Z.message,{type:"error"})}},[os,p]),x=b.useCallback(L=>{const R=L[0];typeof R>"u"||_(R)},[_]);b.useEffect(()=>{_(e,t)},[_]);const C=Fe(L=>L.editor.validationStatus),k=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.name}),A=Fe(L=>{var R;return(R=L.editor.file)==null?void 0:R.path}),T=b.useCallback(L=>{C&&L&&n(Cl(L))},[C,n]),j=Fe(L=>L.editor.updated),B=b.useCallback(()=>{var H;if(!C||!k)return;const L=(H=r.current)==null?void 0:H.getValue();let R;if(L){switch(A){case"States":if(R=JSON.parse(L),L&&k){const W=R.descriptor.id;l(R,k),n(kv({name:W}))}break;case"Themes":k&&u(L,k);break}n(Cl(!1))}},[C,k,n,A]);function D(L){r.current=L}b.useEffect(()=>{f.animations.length&&(h(),c())},[f,c,h]);const I=b.useCallback(async(L,R)=>{var Z,oe;n(Ms());let H,W=!1;switch(L){case"States":H=(Z=f.getStateMachine(R))==null?void 0:Z.toString();break;case"Themes":H=await((oe=f.getTheme(R))==null?void 0:oe.toString()),W=!0;break}H&&n(kv({name:R,type:W?"css":"json",path:L,content:W?H:a6(H)}))},[f,n]),$=b.useCallback(L=>{if(L.some(H=>H.severity===8)){n(Av(!1));return}n(Av(!0))},[n]),N=b.useCallback((L,R)=>{switch(L){case"States":v(R);break;case"Animations":y(R);break;case"Themes":w(R);break}(k===R||S===R)&&n(Ms())},[f,n,k,S]),P=b.useCallback(async(L,R)=>{const H=dd(R.name).replace(/(.json|.lss)/gu,"");let W;switch(L){case"States":W=JSON.parse(await R.text()),l(W);break;case"Animations":W=JSON.parse(await R.text()),s(W,H);break;case"Themes":W=await R.text(),u(W,R.name);break}},[f]),M=b.useCallback(()=>{h(),c()},[h,c]),z=b.useCallback(async(L,R)=>{const H=dd(R).replace(/(.json|.lss)/gu,"");let W;switch(L){case"States":W=s6(),W.descriptor.id=H,l(W);break;case"Themes":u("/* Make your animations colorful */",H);break}},[f]),F=b.useCallback((L,R)=>{n(c6(R.replace(/.json/gu,"")))},[n]),V=b.useCallback(L=>{n(os(L))},[os,n]);return O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"w-full bg-dark p-2 flex gap-2 justify-end",children:[O.jsx(ia,{onDrop:x,accept:"lottie",children:L=>O.jsxs(Ol,{...L.getRootProps(),children:[O.jsx("input",{...L.getInputProps()}),"Start Over"]})}),O.jsx("div",{className:"flex-1 flex justify-center items-center text-gray-400 text-sm",children:O.jsx(d6,{title:E,onChange:V})}),O.jsx(Ol,{onClick:d,children:"Download"})]}),O.jsx("div",{className:"flex grow border-t border-gray-600 flex-1 max-h-[calc(100vh-2.9rem)]",children:O.jsxs(Ty,{autoSaveId:"dotlottie-playground",direction:"horizontal",className:"h-full",children:[O.jsx(ks,{defaultSize:10,maxSize:40,className:"bg-dark",children:O.jsxs("section",{className:"flex flex-col h-full",children:[O.jsx(Fc,{className:"flex-1 h-1/3",title:"Animations",files:i,onClick:F,onRemove:N,onUpload:P}),O.jsx(Fc,{className:"flex-1 h-1/3",title:"States",files:a,onClick:I,onRemove:N,onUpload:P,onAddNew:z}),O.jsx(Fc,{className:"flex-1 h-1/3",title:"Themes",files:o,onClick:I,onRemove:N,onUpload:P,onAddNew:z})]})}),O.jsx(Yf,{className:"bg-gray-500 w-1"}),O.jsx(ks,{children:O.jsx(ia,{onDrop:x,accept:"lottie",noClick:!0,children:L=>O.jsxs("div",{className:"flex flex-col w-full h-full relative",...L.getRootProps(),children:[O.jsx("input",{...L.getInputProps()}),L.isDragActive&&O.jsx("div",{className:"absolute z-10 inset-0 bg-gray-500 opacity-80 flex justify-center items-center text-white text-3xl",children:"Drop your .lottie here"}),S&&O.jsx(mk,{onUpdate:M}),m&&O.jsxs("div",{className:"h-full flex flex-col",children:[O.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[O.jsx("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:k}),O.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:B,disabled:!j,children:O.jsx(wy,{size:33})})]}),O.jsx(g_,{className:"flex-1 max-h-[calc(100vh-5.5rem)]",language:g,width:"100%",theme:"vs-dark",options:{fontSize:15,formatOnPaste:!0,formatOnType:!0,minimap:{enabled:!1}},loading:"Loading...",value:m,onChange:T,onMount:D,onValidate:$})]})]})})}),O.jsx(Yf,{className:"bg-gray-500 w-1"}),O.jsx(ks,{defaultSize:25,children:O.jsx(c7,{activeAnimationId:S})})]})})]})},d7=[{name:"toggle.lottie",path:"/player-component/toggle.lottie"},{name:"interactivity_example.lottie",path:"/player-component/interactivity_example.lottie"},{name:"aniki_hamster.lottie",path:"/player-component/aniki_hamster.lottie"}],p7=({onStart:e})=>{const t=b.useCallback(async(o,a)=>{let s,l="";o instanceof File?(s=await o.arrayBuffer(),l=o.name):(s=o,l=a||"new_awesome"),typeof s<"u"&&e(s,l)},[e]),n=b.useCallback(o=>{const a=o[0];a&&t(a)},[e]),r=b.useCallback(async(o,a)=>{const l=await(await fetch(o)).arrayBuffer();t(l,a)},[]),i=b.useCallback(o=>()=>{r(o.path,o.name)},[e]);return O.jsx(ia,{onDrop:n,accept:"lottie",noClick:!0,children:o=>O.jsxs("div",{...o.getRootProps(),className:"h-full bg-dark text-white flex justify-center items-center",children:[O.jsx("input",{...o.getInputProps()}),o.isDragActive?O.jsx("h1",{className:"text-5xl mb-4",children:"Drop it!!!! Almost there :)"}):O.jsxs("div",{className:"p-10 rounded text-gray-400 max-w-2xl",children:[O.jsx("h1",{className:"text-5xl mb-4",children:"DotLottie Playground :)"}),O.jsxs("p",{className:"text-2xl mb-6",children:["To start drop a ",O.jsx("span",{className:"text-red-600",children:".lottie"}),". You could also select a sample file below."]}),O.jsx("h2",{className:"text-lg mb-2",children:"Sample files"}),O.jsx("ul",{className:"text-sm",children:d7.map(a=>O.jsx("li",{children:O.jsxs("button",{className:"flex gap-2 items-center hover:text-white mb-1",onClick:i(a),children:[O.jsx(oE,{className:"fill-yellow-500"}),a.name]})},a.name))})]})]})})},h7=()=>{const[e,t]=b.useState({}),n=b.useCallback((r,i)=>{t({name:i,arrayBuffer:r})},[t]);return O.jsxs("div",{className:"h-screen bg-dark",children:[e.arrayBuffer?O.jsx(f7,{file:e.arrayBuffer,fileName:e.name||"unammed.lottie"}):O.jsx(p7,{onStart:n}),O.jsx(Vf,{})]})},m7=$C({reducer:{animations:KC,themes:t6,states:XC,editor:f6,playground:QC}});Kc.createRoot(document.getElementById("root")).render(O.jsx(ne.StrictMode,{children:O.jsx(Zb,{store:m7,children:O.jsx(l6,{children:O.jsx(h7,{})})})}));export{k7 as B,oi as G,Ft as U,se as y}; diff --git a/index.html b/index.html index 9683266a..2ed06016 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ DotLottie Playground - +