(()=>{"use strict";const t=2e4;function n(n){let e=0,s=n.next(e);for(;!s.done&&e<t;)e+=50,s=n.next(e);return e>=t?1/0:e}const e=t=>1e3*t,s=t=>t/1e3,a={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};let o=()=>{};const r=(t,n,e)=>e>n?n:e<t?t:e,i=.001;const u=12;function l(t,n){return t*Math.sqrt(1-n*n)}const c=["duration","bounce"],m=["stiffness","damping","mass"];function f(t,n){return n.some((n=>void 0!==t[n]))}function d(d=a.visualDuration,h=a.bounce){const p="object"!=typeof d?{visualDuration:d,keyframes:[0,1],bounce:h}:d;let{restSpeed:M,restDelta:g}=p;const v=p.keyframes[0],D=p.keyframes[p.keyframes.length-1],x={done:!1,value:v},{stiffness:y,damping:b,mass:S,duration:k,velocity:q,isResolvedFromDuration:w}=function(t){let n={velocity:a.velocity,stiffness:a.stiffness,damping:a.damping,mass:a.mass,isResolvedFromDuration:!1,...t};if(!f(t,m)&&f(t,c))if(t.visualDuration){const e=t.visualDuration,s=2*Math.PI/(1.2*e),o=s*s,i=2*r(.05,1,1-(t.bounce||0))*Math.sqrt(o);n={...n,mass:a.mass,stiffness:o,damping:i}}else{const c=function({duration:t=a.duration,bounce:n=a.bounce,velocity:c=a.velocity,mass:m=a.mass}){let f,d;o(t<=e(a.maxDuration),"Spring duration must be 10 seconds or less");let h=1-n;h=r(a.minDamping,a.maxDamping,h),t=r(a.minDuration,a.maxDuration,s(t)),h<1?(f=n=>{const e=n*h,s=e*t,a=e-c,o=l(n,h),r=Math.exp(-s);return i-a/o*r},d=n=>{const e=n*h*t,s=e*c+c,a=Math.pow(h,2)*Math.pow(n,2)*t,o=Math.exp(-e),r=l(Math.pow(n,2),h);return(-f(n)+i>0?-1:1)*((s-a)*o)/r}):(f=n=>Math.exp(-n*t)*((n-c)*t+1)-i,d=n=>Math.exp(-n*t)*(t*t*(c-n)));const p=function(t,n,e){let s=e;for(let e=1;e<u;e++)s-=t(s)/n(s);return s}(f,d,5/t);if(t=e(t),isNaN(p))return{stiffness:a.stiffness,damping:a.damping,duration:t};{const n=Math.pow(p,2)*m;return{stiffness:n,damping:2*h*Math.sqrt(m*n),duration:t}}}(t);n={...n,...c,mass:a.mass},n.isResolvedFromDuration=!0}return n}({...p,velocity:-s(p.velocity||0)}),F=q||0,R=b/(2*Math.sqrt(y*S)),N=D-v,P=s(Math.sqrt(y/S)),T=Math.abs(N)<5;let j;if(M||(M=T?a.restSpeed.granular:a.restSpeed.default),g||(g=T?a.restDelta.granular:a.restDelta.default),R<1){const t=l(P,R);j=n=>{const e=Math.exp(-R*P*n);return D-e*((F+R*P*N)/t*Math.sin(t*n)+N*Math.cos(t*n))}}else if(1===R)j=t=>D-Math.exp(-P*t)*(N+(F+P*N)*t);else{const t=P*Math.sqrt(R*R-1);j=n=>{const e=Math.exp(-R*P*n),s=Math.min(t*n,300);return D-e*((F+R*P*N)*Math.sinh(s)+t*N*Math.cosh(s))/t}}const B={calculatedDuration:w&&k||null,next:t=>{const n=j(t);if(w)x.done=t>=k;else{let s=0===t?F:0;R<1&&(s=0===t?e(F):function(t,n,e){const s=Math.max(n-5,0);return a=e-t(s),(o=n-s)?a*(1e3/o):0;var a,o}(j,t,n));const a=Math.abs(s)<=M,o=Math.abs(D-n)<=g;x.done=a&&o}return x.value=x.done?D:n,x},toString:()=>{const e=Math.min(n(B),t),s=((t,n,e=10)=>{let s="";const a=Math.max(Math.round(n/e),2);for(let n=0;n<a;n++)s+=Math.round(1e4*t(n/(a-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`})((t=>B.next(e*t).value),e,30);return e+"ms "+s},toTransition:()=>{}};return B}d.applyToOptions=a=>{const o=function(e,a=100,o){const r=o({...e,keyframes:[0,a]}),i=Math.min(n(r),t);return{type:"keyframes",ease:t=>r.next(i*t).value/a,duration:s(i)}}(a,100,d);return a.ease=o.ease,a.duration=e(o.duration),a.type="keyframes",a},window.GSPBMotionSpring=d})();