| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/pojo-accessibility/assets/build/ |
Upload File : |
"use strict";(globalThis.webpackChunkpojo_accessibility=globalThis.webpackChunkpojo_accessibility||[]).push([[5652],{78309(t,e,s){s.d(e,{Es:()=>i.Es,RV:()=>i.RV,pn:()=>ft,to:()=>bt,zh:()=>pt});var i=s(42089),n=s(51609),o=s(59157);function r(t,...e){return i.is.fun(t)?t(...e):t}var a=(t,e)=>!0===t||!!(e&&t&&(i.is.fun(t)?t(e):(0,i.$r)(t).includes(e))),u=(t,e)=>i.is.obj(t)?e&&t[e]:t,c=(t,e)=>!0===t.default?t[e]:t.default?t.default[e]:void 0,h=t=>t,d=(t,e=h)=>{let s=l;t.default&&!0!==t.default&&(t=t.default,s=Object.keys(t));const n={};for(const o of s){const s=e(t[o],o);i.is.und(s)||(n[o]=s)}return n},l=["config","onProps","onStart","onChange","onPause","onResume","onRest"],p={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function f(t){const e=function(t){const e={};let s=0;if((0,i.FI)(t,(t,i)=>{p[i]||(e[i]=t,s++)}),s)return e}(t);if(e){const s={to:e};return(0,i.FI)(t,(t,i)=>i in e||(s[i]=t)),s}return{...t}}function m(t){return t=(0,i.oq)(t),i.is.arr(t)?t.map(m):(0,i.$7)(t)?i.RV.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function _(t){for(const e in t)return!0;return!1}function g(t){return i.is.fun(t)||i.is.arr(t)&&i.is.obj(t[0])}function y(t,e){t.ref?.delete(t),e?.delete(t)}function v(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}var b={tension:170,friction:26,mass:1,damping:1,easing:i.le.linear,clamp:!1},w=class{constructor(){this.velocity=0,Object.assign(this,b)}};function P(t,e){if(i.is.und(e.decay)){const s=!i.is.und(e.tension)||!i.is.und(e.friction);!s&&i.is.und(e.frequency)&&i.is.und(e.damping)&&i.is.und(e.mass)||(t.duration=void 0,t.decay=void 0),s&&(t.frequency=void 0)}else t.duration=void 0}var I=[],R=class{constructor(){this.changed=!1,this.values=I,this.toValues=null,this.fromValues=I,this.config=new w,this.immediate=!1}};function k(t,{key:e,props:s,defaultProps:n,state:o,actions:u}){return new Promise((c,h)=>{let d,l,p=a(s.cancel??n?.cancel,e);if(p)_();else{i.is.und(s.pause)||(o.paused=a(s.pause,e));let t=n?.pause;!0!==t&&(t=o.paused||a(t,e)),d=r(s.delay||0,e),t?(o.resumeQueue.add(m),u.pause()):(u.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(l),l.cancel(),d=l.time-i.er.now()}function m(){d>0&&!i.RV.skipAnimation?(o.delayed=!0,l=i.er.setTimeout(_,d),o.pauseQueue.add(f),o.timeouts.add(l)):_()}function _(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(l),t<=(o.cancelId||0)&&(p=!0);try{u.start({...s,callId:t,cancel:p},c)}catch(t){h(t)}}})}var C=(t,e)=>1==e.length?e[0]:e.some(t=>t.cancelled)?x(t.get()):e.every(t=>t.noop)?S(t.get()):V(t.get(),e.every(t=>t.finished)),S=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),V=(t,e,s=!1)=>({value:t,finished:e,cancelled:s}),x=t=>({value:t,cancelled:!0,finished:!1});function q(t,e,s,n){const{callId:o,parentId:r,onRest:a}=e,{asyncTo:u,promise:c}=s;return r||t!==u||e.reset?s.promise=(async()=>{s.asyncId=o,s.asyncTo=t;const h=d(e,(t,e)=>"onRest"===e?void 0:t);let l,p;const f=new Promise((t,e)=>(l=t,p=e)),m=t=>{const e=o<=(s.cancelId||0)&&x(n)||o!==s.asyncId&&V(n,!1);if(e)throw t.result=e,p(t),t},_=(t,e)=>{const r=new A,a=new j;return(async()=>{if(i.RV.skipAnimation)throw M(s),a.result=V(n,!1),p(a),a;m(r);const u=i.is.obj(t)?{...t}:{...e,to:t};u.parentId=o,(0,i.FI)(h,(t,e)=>{i.is.und(u[e])&&(u[e]=t)});const c=await n.start(u);return m(r),s.paused&&await new Promise(t=>{s.resumeQueue.add(t)}),c})()};let g;if(i.RV.skipAnimation)return M(s),V(n,!1);try{let e;e=i.is.arr(t)?(async t=>{for(const e of t)await _(e)})(t):Promise.resolve(t(_,n.stop.bind(n))),await Promise.all([e.then(l),f]),g=V(n.get(),!0,!1)}catch(t){if(t instanceof A)g=t.result;else{if(!(t instanceof j))throw t;g=t.result}}finally{o==s.asyncId&&(s.asyncId=r,s.asyncTo=r?u:void 0,s.promise=r?c:void 0)}return i.is.fun(a)&&i.er.batchedUpdates(()=>{a(g,n,n.item)}),g})():c}function M(t,e){(0,i.bX)(t.timeouts,t=>t.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var A=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},j=class extends Error{constructor(){super("SkipAnimationSignal")}},Q=t=>t instanceof T,E=1,T=class extends i.aq{constructor(){super(...arguments),this.id=E++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=(0,o.Ao)(this);return t&&t.getValue()}to(...t){return i.RV.to(this,t)}interpolate(...t){return(0,i.ZJ)(),i.RV.to(this,t)}toJSON(){return this.get()}observerAdded(t){1==t&&this._attach()}observerRemoved(t){0==t&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){(0,i.MI)(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||i.WU.sort(this),(0,i.MI)(this,{type:"priority",parent:this,priority:t})}},$=Symbol.for("SpringPhase"),O=t=>(1&t[$])>0,z=t=>(2&t[$])>0,F=t=>(4&t[$])>0,N=(t,e)=>e?t[$]|=3:t[$]&=-3,U=(t,e)=>e?t[$]|=4:t[$]&=-5,D=class extends T{constructor(t,e){if(super(),this.animation=new R,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!i.is.und(t)||!i.is.und(e)){const s=i.is.obj(t)?{...t}:{...e,from:t};i.is.und(s.default)&&(s.default=!0),this.start(s)}}get idle(){return!(z(this)||this._state.asyncTo)||F(this)}get goal(){return(0,i.oq)(this.animation.to)}get velocity(){const t=(0,o.Ao)(this);return t instanceof o.rf?t.lastVelocity||0:t.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return O(this)}get isAnimating(){return z(this)}get isPaused(){return F(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,s=!1;const n=this.animation;let{toValues:r}=n;const{config:a}=n,u=(0,o.nm)(n.to);!u&&(0,i.at)(n.to)&&(r=(0,i.$r)((0,i.oq)(n.to))),n.values.forEach((c,h)=>{if(c.done)return;const d=c.constructor==o.pS?1:u?u[h].lastPosition:r[h];let l=n.immediate,p=d;if(!l){if(p=c.lastPosition,a.tension<=0)return void(c.done=!0);let e=c.elapsedTime+=t;const s=n.fromValues[h],o=null!=c.v0?c.v0:c.v0=i.is.arr(a.velocity)?a.velocity[h]:a.velocity;let r;const u=a.precision||(s==d?.005:Math.min(1,.001*Math.abs(d-s)));if(i.is.und(a.duration))if(a.decay){const t=!0===a.decay?.998:a.decay,i=Math.exp(-(1-t)*e);p=s+o/(1-t)*(1-i),l=Math.abs(c.lastPosition-p)<=u,r=o*i}else{r=null==c.lastVelocity?o:c.lastVelocity;const e=a.restVelocity||u/10,n=a.clamp?0:a.bounce,h=!i.is.und(n),f=s==d?c.v0>0:s<d;let m,_=!1;const g=1,y=Math.ceil(t/g);for(let t=0;t<y&&(m=Math.abs(r)>e,m||(l=Math.abs(d-p)<=u,!l));++t)h&&(_=p==d||p>d==f,_&&(r=-r*n,p=d)),r+=(1e-6*-a.tension*(p-d)+.001*-a.friction*r)/a.mass*g,p+=r*g}else{let i=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,c.durationProgress>0&&(c.elapsedTime=a.duration*c.durationProgress,e=c.elapsedTime+=t)),i=(a.progress||0)+e/this._memoizedDuration,i=i>1?1:i<0?0:i,c.durationProgress=i),p=s+a.easing(i)*(d-s),r=(p-c.lastPosition)/t,l=1==i}c.lastVelocity=r,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),l=!0)}u&&!u[h].done&&(l=!1),l?c.done=!0:e=!1,c.setValue(p,a.round)&&(s=!0)});const c=(0,o.Ao)(this),h=c.getValue();if(e){const t=(0,i.oq)(n.to);h===t&&!s||a.decay?s&&a.decay&&this._onChange(h):(c.setValue(t),this._onChange(t)),this._stop()}else s&&this._onChange(h)}set(t){return i.er.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(z(this)){const{to:t,config:e}=this.animation;i.er.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let s;return i.is.und(t)?(s=this.queue||[],this.queue=[]):s=[i.is.obj(t)?t:{...e,to:t}],Promise.all(s.map(t=>this._update(t))).then(t=>C(this,t))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),M(this._state,t&&this._lastCallId),i.er.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){"change"==t.type?this._start():"priority"==t.type&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:s,from:n}=t;s=i.is.obj(s)?s[e]:s,(null==s||g(s))&&(s=void 0),n=i.is.obj(n)?n[e]:n,null==n&&(n=void 0);const r={to:s,from:n};return O(this)||(t.reverse&&([s,n]=[n,s]),n=(0,i.oq)(n),i.is.und(n)?(0,o.Ao)(this)||this._set(s):this._set(n)),r}_update({...t},e){const{key:s,defaultProps:n}=this;t.default&&Object.assign(n,d(t,(t,e)=>/^on/.test(e)?u(t,s):t)),Y(this,t,"onProps"),Z(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const r=this._state;return k(++this._lastCallId,{key:s,props:t,defaultProps:n,state:r,actions:{pause:()=>{F(this)||(U(this,!0),(0,i.Wd)(r.pauseQueue),Z(this,"onPause",V(this,W(this,this.animation.to)),this))},resume:()=>{F(this)&&(U(this,!1),z(this)&&this._resume(),(0,i.Wd)(r.resumeQueue),Z(this,"onResume",V(this,W(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(t.loop&&s.finished&&(!e||!s.noop)){const e=X(t);if(e)return this._update(e,!0)}return s})}_merge(t,e,s){if(e.cancel)return this.stop(!0),s(x(this));const n=!i.is.und(t.to),u=!i.is.und(t.from);if(n||u){if(!(e.callId>this._lastToId))return s(x(this));this._lastToId=e.callId}const{key:c,defaultProps:h,animation:d}=this,{to:l,from:p}=d;let{to:f=l,from:_=p}=t;!u||n||e.default&&!i.is.und(f)||(f=_),e.reverse&&([f,_]=[_,f]);const y=!(0,i.n4)(_,p);y&&(d.from=_),_=(0,i.oq)(_);const v=!(0,i.n4)(f,l);v&&this._focus(f);const w=g(e.to),{config:I}=d,{decay:R,velocity:k}=I;(n||u)&&(I.velocity=0),e.config&&!w&&function(t,e,s){s&&(P(s={...s},e),e={...s,...e}),P(t,e),Object.assign(t,e);for(const e in b)null==t[e]&&(t[e]=b[e]);let{frequency:n,damping:o}=t;const{mass:r}=t;i.is.und(n)||(n<.01&&(n=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/n,2)*r,t.friction=4*Math.PI*o*r/n)}(I,r(e.config,c),e.config!==h.config?r(h.config,c):void 0);let C=(0,o.Ao)(this);if(!C||i.is.und(f))return s(V(this,!0));const M=i.is.und(e.reset)?u&&!e.default:!i.is.und(_)&&a(e.reset,c),A=M?_:this.get(),j=m(f),Q=i.is.num(j)||i.is.arr(j)||(0,i.$7)(j),E=!w&&(!Q||a(h.immediate||e.immediate,c));if(v){const t=(0,o.SJ)(f);if(t!==C.constructor){if(!E)throw Error(`Cannot animate between ${C.constructor.name} and ${t.name}, as the "to" prop suggests`);C=this._set(j)}}const T=C.constructor;let $=(0,i.at)(f),F=!1;if(!$){const t=M||!O(this)&&y;(v||t)&&(F=(0,i.n4)(m(A),j),$=!F),((0,i.n4)(d.immediate,E)||E)&&(0,i.n4)(I.decay,R)&&(0,i.n4)(I.velocity,k)||($=!0)}if(F&&z(this)&&(d.changed&&!M?$=!0:$||this._stop(l)),!w&&(($||(0,i.at)(l))&&(d.values=C.getPayload(),d.toValues=(0,i.at)(f)?null:T==o.pS?[1]:(0,i.$r)(j)),d.immediate!=E&&(d.immediate=E,E||M||this._set(l)),$)){const{onRest:t}=d;(0,i.__)(G,t=>Y(this,e,t));const n=V(this,W(this,l));(0,i.Wd)(this._pendingCalls,n),this._pendingCalls.add(s),d.changed&&i.er.batchedUpdates(()=>{d.changed=!M,t?.(n,this),M?r(h.onRest,n):d.onStart?.(n,this)})}M&&this._set(A),w?s(q(e.to,e,this._state,this)):$?this._start():z(this)&&!v?this._pendingCalls.add(s):s(S(A))}_focus(t){const e=this.animation;t!==e.to&&((0,i.Wg)(this)&&this._detach(),e.to=t,(0,i.Wg)(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;(0,i.at)(e)&&((0,i.Ec)(e,this),Q(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;(0,i.at)(t)&&(0,i.DV)(t,this)}_set(t,e=!0){const s=(0,i.oq)(t);if(!i.is.und(s)){const t=(0,o.Ao)(this);if(!t||!(0,i.n4)(s,t.getValue())){const n=(0,o.SJ)(s);t&&t.constructor==n?t.setValue(s):(0,o.uX)(this,n.create(s)),t&&i.er.batchedUpdates(()=>{this._onChange(s,e)})}}return(0,o.Ao)(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,Z(this,"onStart",V(this,W(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),r(this.animation.onChange,t,this)),r(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;(0,o.Ao)(this).reset((0,i.oq)(t.to)),t.immediate||(t.fromValues=t.values.map(t=>t.lastPosition)),z(this)||(N(this,!0),F(this)||this._resume())}_resume(){i.RV.skipAnimation?this.finish():i.WU.start(this)}_stop(t,e){if(z(this)){N(this,!1);const s=this.animation;(0,i.__)(s.values,t=>{t.done=!0}),s.toValues&&(s.onChange=s.onPause=s.onResume=void 0),(0,i.MI)(this,{type:"idle",parent:this});const n=e?x(this.get()):V(this.get(),W(this,t??s.to));(0,i.Wd)(this._pendingCalls,n),s.changed&&(s.changed=!1,Z(this,"onRest",n,this))}}};function W(t,e){const s=m(e),n=m(t.get());return(0,i.n4)(n,s)}function X(t,e=t.loop,s=t.to){const i=r(e);if(i){const n=!0!==i&&f(i),o=(n||t).reverse,r=!n||n.reset;return H({...t,loop:e,default:!1,pause:void 0,to:!o||g(s)?s:void 0,from:r?t.from:void 0,reset:r,...n})}}function H(t){const{to:e,from:s}=t=f(t),n=new Set;return i.is.obj(e)&&B(e,n),i.is.obj(s)&&B(s,n),t.keys=n.size?Array.from(n):null,t}function J(t){const e=H(t);return i.is.und(e.default)&&(e.default=d(e)),e}function B(t,e){(0,i.FI)(t,(t,s)=>null!=t&&e.add(s))}var G=["onStart","onRest","onChange","onPause","onResume"];function Y(t,e,s){t.animation[s]=e[s]!==c(e,s)?u(e[s],t.key):void 0}function Z(t,e,...s){t.animation[e]?.(...s),t.defaultProps[e]?.(...s)}var K=["onStart","onChange","onRest"],L=1,tt=class{constructor(t,e){this.id=L++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,s)=>t[s]=e.get()),t}set(t){for(const e in t){const s=t[e];i.is.und(s)||this.springs[e].set(s)}}update(t){return t&&this.queue.push(H(t)),this}start(t){let{queue:e}=this;return t?e=(0,i.$r)(t).map(H):this.queue=[],this._flush?this._flush(this,e):(at(this,e),et(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const s=this.springs;(0,i.__)((0,i.$r)(e),e=>s[e].stop(!!t))}else M(this._state,this._lastAsyncId),this.each(e=>e.stop(!!t));return this}pause(t){if(i.is.und(t))this.start({pause:!0});else{const e=this.springs;(0,i.__)((0,i.$r)(t),t=>e[t].pause())}return this}resume(t){if(i.is.und(t))this.start({pause:!1});else{const e=this.springs;(0,i.__)((0,i.$r)(t),t=>e[t].resume())}return this}each(t){(0,i.FI)(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:s}=this._events,n=this._active.size>0,o=this._changed.size>0;(n&&!this._started||o&&!this._started)&&(this._started=!0,(0,i.bX)(t,([t,e])=>{e.value=this.get(),t(e,this,this._item)}));const r=!n&&this._started,a=o||r&&s.size?this.get():null;o&&e.size&&(0,i.bX)(e,([t,e])=>{e.value=a,t(e,this,this._item)}),r&&(this._started=!1,(0,i.bX)(s,([t,e])=>{e.value=a,t(e,this,this._item)}))}eventObserved(t){if("change"==t.type)this._changed.add(t.parent),t.idle||this._active.add(t.parent);else{if("idle"!=t.type)return;this._active.delete(t.parent)}i.er.onFrame(this._onFrame)}};function et(t,e){return Promise.all(e.map(e=>st(t,e))).then(e=>C(t,e))}async function st(t,e,s){const{keys:n,to:o,from:r,loop:a,onRest:u,onResolve:h}=e,d=i.is.obj(e.default)&&e.default;a&&(e.loop=!1),!1===o&&(e.to=null),!1===r&&(e.from=null);const l=i.is.arr(o)||i.is.fun(o)?o:void 0;l?(e.to=void 0,e.onRest=void 0,d&&(d.onRest=void 0)):(0,i.__)(K,s=>{const n=e[s];if(i.is.fun(n)){const i=t._events[s];e[s]=({finished:t,cancelled:e})=>{const s=i.get(n);s?(t||(s.finished=!1),e&&(s.cancelled=!0)):i.set(n,{value:null,finished:t||!1,cancelled:e||!1})},d&&(d[s]=e[s])}});const p=t._state;e.pause===!p.paused?(p.paused=e.pause,(0,i.Wd)(e.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(e.pause=!0);const f=(n||Object.keys(t.springs)).map(s=>t.springs[s].start(e)),m=!0===e.cancel||!0===c(e,"cancel");(l||m&&p.asyncId)&&f.push(k(++t._lastAsyncId,{props:e,state:p,actions:{pause:i.lQ,resume:i.lQ,start(e,s){m?(M(p,t._lastAsyncId),s(x(t))):(e.onRest=u,s(q(l,e,p,t)))}}})),p.paused&&await new Promise(t=>{p.resumeQueue.add(t)});const _=C(t,await Promise.all(f));if(a&&_.finished&&(!s||!_.noop)){const s=X(e,a,o);if(s)return at(t,[s]),st(t,s,!0)}return h&&i.er.batchedUpdates(()=>h(_,t,t.item)),_}function it(t,e){const s={...t.springs};return e&&(0,i.__)((0,i.$r)(e),t=>{i.is.und(t.keys)&&(t=H(t)),i.is.obj(t.to)||(t={...t,to:void 0}),rt(s,t,t=>ot(t))}),nt(t,s),s}function nt(t,e){(0,i.FI)(e,(e,s)=>{t.springs[s]||(t.springs[s]=e,(0,i.Ec)(e,t))})}function ot(t,e){const s=new D;return s.key=t,e&&(0,i.Ec)(s,e),s}function rt(t,e,s){e.keys&&(0,i.__)(e.keys,i=>{(t[i]||(t[i]=s(i)))._prepareNode(e)})}function at(t,e){(0,i.__)(e,e=>{rt(t.springs,e,e=>ot(e,t))})}var ut,ct,ht=({children:t,...e})=>{const s=(0,n.useContext)(dt),o=e.pause||!!s.pause,r=e.immediate||!!s.immediate;e=(0,i.MA)(()=>({pause:o,immediate:r}),[o,r]);const{Provider:a}=dt;return n.createElement(a,{value:e},t)},dt=(ut=ht,ct={},Object.assign(ut,n.createContext(ct)),ut.Provider._context=ut,ut.Consumer._context=ut,ut);ht.Provider=dt.Provider,ht.Consumer=dt.Consumer;var lt=()=>{const t=[],e=function(e){(0,i.HX)();const n=[];return(0,i.__)(t,(t,o)=>{if(i.is.und(e))n.push(t.start());else{const i=s(e,t,o);i&&n.push(t.start(i))}}),n};e.current=t,e.add=function(e){t.includes(e)||t.push(e)},e.delete=function(e){const s=t.indexOf(e);~s&&t.splice(s,1)},e.pause=function(){return(0,i.__)(t,t=>t.pause(...arguments)),this},e.resume=function(){return(0,i.__)(t,t=>t.resume(...arguments)),this},e.set=function(e){(0,i.__)(t,(t,s)=>{const n=i.is.fun(e)?e(s,t):e;n&&t.set(n)})},e.start=function(e){const s=[];return(0,i.__)(t,(t,n)=>{if(i.is.und(e))s.push(t.start());else{const i=this._getProps(e,t,n);i&&s.push(t.start(i))}}),s},e.stop=function(){return(0,i.__)(t,t=>t.stop(...arguments)),this},e.update=function(e){return(0,i.__)(t,(t,s)=>t.update(this._getProps(e,t,s))),this};const s=function(t,e,s){return i.is.fun(t)?t(s,e):t};return e._getProps=s,e};function pt(t,e){const s=i.is.fun(t),[[o],r]=function(t,e,s){const o=i.is.fun(e)&&e;o&&!s&&(s=[]);const r=(0,n.useMemo)(()=>o||3==arguments.length?lt():void 0,[]),a=(0,n.useRef)(0),u=(0,i.CH)(),c=(0,n.useMemo)(()=>({ctrls:[],queue:[],flush(t,e){const s=it(t,e);return a.current>0&&!c.queue.length&&!Object.keys(s).some(e=>!t.springs[e])?et(t,e):new Promise(i=>{nt(t,s),c.queue.push(()=>{i(et(t,e))}),u()})}}),[]),h=(0,n.useRef)([...c.ctrls]),d=[],l=(0,i.NQ)(t)||0;function p(t,s){for(let i=t;i<s;i++){const t=h.current[i]||(h.current[i]=new tt(null,c.flush)),s=o?o(i,t):e[i];s&&(d[i]=J(s))}}(0,n.useMemo)(()=>{(0,i.__)(h.current.slice(t,l),t=>{y(t,r),t.stop(!0)}),h.current.length=t,p(l,t)},[t]),(0,n.useMemo)(()=>{p(0,Math.min(l,t))},s);const f=h.current.map((t,e)=>it(t,d[e])),m=(0,n.useContext)(ht),g=(0,i.NQ)(m),b=m!==g&&_(m);(0,i.Es)(()=>{a.current++,c.ctrls=h.current;const{queue:t}=c;t.length&&(c.queue=[],(0,i.__)(t,t=>t())),(0,i.__)(h.current,(t,e)=>{r?.add(t),b&&t.start({default:m});const s=d[e];s&&(v(t,s.ref),t.ref?t.queue.push(s):t.start(s))})}),(0,i.H5)(()=>()=>{(0,i.__)(c.ctrls,t=>t.stop(!0))});const w=f.map(t=>({...t}));return r?[w,r]:w}(1,s?t:[t],s?e||[]:e);return s||2==arguments.length?[o,r]:o}function ft(t,e,s){const o=i.is.fun(e)&&e,{reset:a,sort:u,trail:c=0,expires:h=!0,exitBeforeEnter:l=!1,onDestroyed:p,ref:m,config:g}=o?o():e,b=(0,n.useMemo)(()=>o||3==arguments.length?lt():void 0,[]),w=(0,i.$r)(t),P=[],I=(0,n.useRef)(null),R=a?null:I.current;(0,i.Es)(()=>{I.current=P}),(0,i.H5)(()=>((0,i.__)(P,t=>{b?.add(t.ctrl),t.ctrl.ref=b}),()=>{(0,i.__)(I.current,t=>{t.expired&&clearTimeout(t.expirationId),y(t.ctrl,b),t.ctrl.stop(!0)})}));const k=function(t,{key:e,keys:s=e},n){if(null===s){const e=new Set;return t.map(t=>{const s=n&&n.find(s=>s.item===t&&"leave"!==s.phase&&!e.has(s));return s?(e.add(s),s.key):mt++})}return i.is.und(s)?t:i.is.fun(s)?t.map(s):(0,i.$r)(s)}(w,o?o():e,R),C=a&&I.current||[];(0,i.Es)(()=>(0,i.__)(C,({ctrl:t,item:e,key:s})=>{y(t,b),r(p,e,s)}));const S=[];if(R&&(0,i.__)(R,(t,e)=>{t.expired?(clearTimeout(t.expirationId),C.push(t)):~(e=S[e]=k.indexOf(t.key))&&(P[e]=t)}),(0,i.__)(w,(t,e)=>{P[e]||(P[e]={key:k[e],item:t,phase:"mount",ctrl:new tt},P[e].ctrl.item=t)}),S.length){let t=-1;const{leave:s}=o?o():e;(0,i.__)(S,(e,i)=>{const n=R[i];~e?(t=P.indexOf(n),P[t]={...n,item:w[e]}):s&&P.splice(++t,0,n)})}i.is.fun(u)&&P.sort((t,e)=>u(t.item,e.item));let V=-c;const x=(0,i.CH)(),q=d(e),M=new Map,A=(0,n.useRef)(new Map),j=(0,n.useRef)(!1);(0,i.__)(P,(t,s)=>{const n=t.key,a=t.phase,u=o?o():e;let d,p;const _=r(u.delay||0,n);if("mount"==a)d=u.enter,p="enter";else{const t=k.indexOf(n)<0;if("leave"!=a)if(t)d=u.leave,p="leave";else{if(!(d=u.update))return;p="update"}else{if(t)return;d=u.enter,p="enter"}}if(d=r(d,t.item,s),d=i.is.obj(d)?f(d):{to:d},!d.config){const e=g||q.config;d.config=r(e,t.item,s,p)}V+=c;const y={...q,delay:_+V,ref:m,immediate:u.immediate,reset:!1,...d};if("enter"==p&&i.is.und(y.from)){const n=o?o():e,a=i.is.und(n.initial)||R?n.from:n.initial;y.from=r(a,t.item,s)}const{onResolve:v}=y;y.onResolve=t=>{r(v,t);const e=I.current,s=e.find(t=>t.key===n);if(s&&(!t.cancelled||"update"==s.phase)&&s.ctrl.idle){const t=e.every(t=>t.ctrl.idle);if("leave"==s.phase){const e=r(h,s.item);if(!1!==e){const i=!0===e?0:e;if(s.expired=!0,!t&&i>0)return void(i<=2147483647&&(s.expirationId=setTimeout(x,i)))}}t&&e.some(t=>t.expired)&&(A.current.delete(s),l&&(j.current=!0),x())}};const b=it(t.ctrl,y);"leave"===p&&l?A.current.set(t,{phase:p,springs:b,payload:y}):M.set(t,{phase:p,springs:b,payload:y})});const Q=(0,n.useContext)(ht),E=(0,i.NQ)(Q),T=Q!==E&&_(Q);(0,i.Es)(()=>{T&&(0,i.__)(P,t=>{t.ctrl.start({default:Q})})},[Q]),(0,i.__)(M,(t,e)=>{if(A.current.size){const t=P.findIndex(t=>t.key===e.key);P.splice(t,1)}}),(0,i.Es)(()=>{(0,i.__)(A.current.size?A.current:M,({phase:t,payload:e},s)=>{const{ctrl:i}=s;s.phase=t,b?.add(i),T&&"enter"==t&&i.start({default:Q}),e&&(v(i,e.ref),!i.ref&&!b||j.current?(i.start(e),j.current&&(j.current=!1)):i.update(e))})},a?void 0:s);const $=t=>n.createElement(n.Fragment,null,P.map((e,s)=>{const{springs:o}=M.get(e)||e.ctrl,r=t({...o},e.item,e,s);return r&&r.type?n.createElement(r.type,{...r.props,key:i.is.str(e.key)||i.is.num(e.key)?e.key:e.ctrl.id,ref:r.ref}):r}));return b?[$,b]:$}var mt=1,_t=class extends T{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=(0,i.kx)(...e);const s=this._get(),n=(0,o.SJ)(s);(0,o.uX)(this,n.create(s))}advance(t){const e=this._get(),s=this.get();(0,i.n4)(e,s)||((0,o.Ao)(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&yt(this._active)&&vt(this)}_get(){const t=i.is.arr(this.source)?this.source.map(i.oq):(0,i.$r)((0,i.oq)(this.source));return this.calc(...t)}_start(){this.idle&&!yt(this._active)&&(this.idle=!1,(0,i.__)((0,o.nm)(this),t=>{t.done=!1}),i.RV.skipAnimation?(i.er.batchedUpdates(()=>this.advance()),vt(this)):i.WU.start(this))}_attach(){let t=1;(0,i.__)((0,i.$r)(this.source),e=>{(0,i.at)(e)&&(0,i.Ec)(e,this),Q(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){(0,i.__)((0,i.$r)(this.source),t=>{(0,i.at)(t)&&(0,i.DV)(t,this)}),this._active.clear(),vt(this)}eventObserved(t){"change"==t.type?t.idle?this.advance():(this._active.add(t.parent),this._start()):"idle"==t.type?this._active.delete(t.parent):"priority"==t.type&&(this.priority=(0,i.$r)(this.source).reduce((t,e)=>Math.max(t,(Q(e)?e.priority:0)+1),0))}};function gt(t){return!1!==t.idle}function yt(t){return!t.size||Array.from(t).every(gt)}function vt(t){t.idle||(t.idle=!0,(0,i.__)((0,o.nm)(t),t=>{t.done=!0}),(0,i.MI)(t,{type:"idle",parent:t}))}var bt=(t,...e)=>new _t(t,e);i.RV.assign({createStringInterpolator:i.Rs,to:(t,e)=>new _t(t,e)}),i.WU.advance}}]);