animejs 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/anime.esm.js +12 -8
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +12 -8
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +1 -1
- package/dist/modules/animatable/animatable.js +1 -1
- package/dist/modules/animatable/index.cjs +1 -1
- package/dist/modules/animatable/index.js +1 -1
- package/dist/modules/animation/additive.cjs +1 -1
- package/dist/modules/animation/additive.js +1 -1
- package/dist/modules/animation/animation.cjs +1 -1
- package/dist/modules/animation/animation.js +1 -1
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +1 -1
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +1 -1
- package/dist/modules/core/clock.js +1 -1
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +1 -1
- package/dist/modules/core/consts.js +1 -1
- package/dist/modules/core/globals.cjs +2 -2
- package/dist/modules/core/globals.js +2 -2
- package/dist/modules/core/helpers.cjs +1 -1
- package/dist/modules/core/helpers.js +1 -1
- package/dist/modules/core/render.cjs +1 -1
- package/dist/modules/core/render.js +1 -1
- package/dist/modules/core/styles.cjs +1 -1
- package/dist/modules/core/styles.js +1 -1
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +1 -1
- package/dist/modules/core/transforms.js +1 -1
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +1 -1
- package/dist/modules/core/values.js +1 -1
- package/dist/modules/draggable/draggable.cjs +1 -1
- package/dist/modules/draggable/draggable.js +1 -1
- package/dist/modules/draggable/index.cjs +1 -1
- package/dist/modules/draggable/index.js +1 -1
- package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
- package/dist/modules/easings/cubic-bezier/index.js +1 -1
- package/dist/modules/easings/eases/index.cjs +1 -1
- package/dist/modules/easings/eases/index.js +1 -1
- package/dist/modules/easings/eases/parser.cjs +1 -1
- package/dist/modules/easings/eases/parser.js +1 -1
- package/dist/modules/easings/index.cjs +1 -1
- package/dist/modules/easings/index.js +1 -1
- package/dist/modules/easings/irregular/index.cjs +1 -1
- package/dist/modules/easings/irregular/index.js +1 -1
- package/dist/modules/easings/linear/index.cjs +1 -1
- package/dist/modules/easings/linear/index.js +1 -1
- package/dist/modules/easings/none.cjs +1 -1
- package/dist/modules/easings/none.js +1 -1
- package/dist/modules/easings/spring/index.cjs +1 -1
- package/dist/modules/easings/spring/index.js +1 -1
- package/dist/modules/easings/steps/index.cjs +1 -1
- package/dist/modules/easings/steps/index.js +1 -1
- package/dist/modules/engine/engine.cjs +1 -1
- package/dist/modules/engine/engine.js +1 -1
- package/dist/modules/engine/index.cjs +1 -1
- package/dist/modules/engine/index.js +1 -1
- package/dist/modules/events/index.cjs +1 -1
- package/dist/modules/events/index.js +1 -1
- package/dist/modules/events/scroll.cjs +1 -1
- package/dist/modules/events/scroll.js +1 -1
- package/dist/modules/index.cjs +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/scope/index.cjs +1 -1
- package/dist/modules/scope/index.js +1 -1
- package/dist/modules/scope/scope.cjs +1 -1
- package/dist/modules/scope/scope.js +1 -1
- package/dist/modules/svg/drawable.cjs +1 -1
- package/dist/modules/svg/drawable.js +1 -1
- package/dist/modules/svg/helpers.cjs +1 -1
- package/dist/modules/svg/helpers.js +1 -1
- package/dist/modules/svg/index.cjs +1 -1
- package/dist/modules/svg/index.js +1 -1
- package/dist/modules/svg/morphto.cjs +1 -1
- package/dist/modules/svg/morphto.js +1 -1
- package/dist/modules/svg/motionpath.cjs +11 -7
- package/dist/modules/svg/motionpath.js +11 -7
- package/dist/modules/text/index.cjs +1 -1
- package/dist/modules/text/index.js +1 -1
- package/dist/modules/text/split.cjs +1 -1
- package/dist/modules/text/split.js +1 -1
- package/dist/modules/timeline/index.cjs +1 -1
- package/dist/modules/timeline/index.js +1 -1
- package/dist/modules/timeline/position.cjs +1 -1
- package/dist/modules/timeline/position.js +1 -1
- package/dist/modules/timeline/timeline.cjs +1 -1
- package/dist/modules/timeline/timeline.js +1 -1
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +1 -1
- package/dist/modules/timer/timer.js +1 -1
- package/dist/modules/utils/chainable.cjs +1 -1
- package/dist/modules/utils/chainable.js +1 -1
- package/dist/modules/utils/index.cjs +1 -1
- package/dist/modules/utils/index.js +1 -1
- package/dist/modules/utils/number.cjs +1 -1
- package/dist/modules/utils/number.js +1 -1
- package/dist/modules/utils/random.cjs +1 -1
- package/dist/modules/utils/random.js +1 -1
- package/dist/modules/utils/stagger.cjs +1 -1
- package/dist/modules/utils/stagger.js +1 -1
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +1 -1
- package/dist/modules/utils/time.js +1 -1
- package/dist/modules/waapi/composition.cjs +1 -1
- package/dist/modules/waapi/composition.js +1 -1
- package/dist/modules/waapi/index.cjs +1 -1
- package/dist/modules/waapi/index.js +1 -1
- package/dist/modules/waapi/waapi.cjs +1 -1
- package/dist/modules/waapi/waapi.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM bundle
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -796,7 +796,7 @@ const globals = {
|
|
|
796
796
|
tickThreshold: 200,
|
|
797
797
|
};
|
|
798
798
|
|
|
799
|
-
const globalVersions = { version: '4.2.
|
|
799
|
+
const globalVersions = { version: '4.2.2', engine: null };
|
|
800
800
|
|
|
801
801
|
if (isBrowser) {
|
|
802
802
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
@@ -7655,12 +7655,15 @@ const getPath = path => {
|
|
|
7655
7655
|
* @param {SVGGeometryElement} $path
|
|
7656
7656
|
* @param {Number} totalLength
|
|
7657
7657
|
* @param {Number} progress
|
|
7658
|
-
* @param {Number}lookup
|
|
7658
|
+
* @param {Number} lookup
|
|
7659
|
+
* @param {Boolean} shouldClamp
|
|
7659
7660
|
* @return {DOMPoint}
|
|
7660
7661
|
*/
|
|
7661
|
-
const getPathPoint = ($path, totalLength, progress, lookup
|
|
7662
|
+
const getPathPoint = ($path, totalLength, progress, lookup, shouldClamp) => {
|
|
7662
7663
|
const point = progress + lookup;
|
|
7663
|
-
const pointOnPath =
|
|
7664
|
+
const pointOnPath = shouldClamp
|
|
7665
|
+
? Math.max(0, Math.min(point, totalLength)) // Clamp between 0 and totalLength
|
|
7666
|
+
: (point % totalLength + totalLength) % totalLength; // Wrap around
|
|
7664
7667
|
return $path.getPointAtLength(pointOnPath);
|
|
7665
7668
|
};
|
|
7666
7669
|
|
|
@@ -7675,6 +7678,7 @@ const getPathProgess = ($path, pathProperty, offset = 0) => {
|
|
|
7675
7678
|
const totalLength = +($path.getTotalLength());
|
|
7676
7679
|
const inSvg = $el[isSvgSymbol];
|
|
7677
7680
|
const ctm = $path.getCTM();
|
|
7681
|
+
const shouldClamp = offset === 0;
|
|
7678
7682
|
/** @type {TweenObjectValue} */
|
|
7679
7683
|
return {
|
|
7680
7684
|
from: 0,
|
|
@@ -7684,11 +7688,11 @@ const getPathProgess = ($path, pathProperty, offset = 0) => {
|
|
|
7684
7688
|
const offsetLength = offset * totalLength;
|
|
7685
7689
|
const newProgress = progress + offsetLength;
|
|
7686
7690
|
if (pathProperty === 'a') {
|
|
7687
|
-
const p0 = getPathPoint($path, totalLength, newProgress, -1);
|
|
7688
|
-
const p1 = getPathPoint($path, totalLength, newProgress, 1);
|
|
7691
|
+
const p0 = getPathPoint($path, totalLength, newProgress, -1, shouldClamp);
|
|
7692
|
+
const p1 = getPathPoint($path, totalLength, newProgress, 1, shouldClamp);
|
|
7689
7693
|
return atan2(p1.y - p0.y, p1.x - p0.x) * 180 / PI;
|
|
7690
7694
|
} else {
|
|
7691
|
-
const p = getPathPoint($path, totalLength, newProgress, 0);
|
|
7695
|
+
const p = getPathPoint($path, totalLength, newProgress, 0, shouldClamp);
|
|
7692
7696
|
return pathProperty === 'x' ?
|
|
7693
7697
|
inSvg || !ctm ? p.x : p.x * ctm.a + p.y * ctm.c + ctm.e :
|
|
7694
7698
|
inSvg || !ctm ? p.y : p.x * ctm.b + p.y * ctm.d + ctm.f
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM minified bundle
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
7
|
-
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),h=Symbol(),l=Symbol(),c=Symbol(),d=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=120,_="",y="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),S=()=>{},w=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,x=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,C=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,E=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,k=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,B=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,O=/([a-z])([A-Z])/g,N=/(\w+)(\([^)]+\)+)/g,R=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,L={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:S,onBeforeUpdate:S,onUpdate:S,onLoop:S,onPause:S,onComplete:S,onRender:S},A={current:null,root:s},F={defaults:L,precision:4,timeScale:1,tickThreshold:200},M={version:"4.2.1",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(M));const P=t=>t.replace(O,"$1-$2").toLowerCase(),I=(t,e)=>0===t.indexOf(e),z=Date.now,U=Array.isArray,X=t=>t&&t.constructor===Object,Y=t=>"number"==typeof t&&!isNaN(t),V=t=>"string"==typeof t,W=t=>"function"==typeof t,H=t=>void 0===t,q=t=>H(t)||null===t,j=e=>t&&e instanceof SVGElement,G=t=>w.test(t),Q=t=>I(t,"rgb"),J=t=>I(t,"hsl"),Z=t=>G(t)||Q(t)||J(t),K=t=>!F.defaults.hasOwnProperty(t),tt=["opacity","rotate","overflow","color"],et=(t,e)=>{if(tt.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}},st=t=>V(t)?parseFloat(t):t,it=Math.pow,rt=Math.sqrt,nt=Math.sin,ot=Math.cos,at=Math.abs,ht=Math.exp,lt=Math.ceil,ct=Math.floor,dt=Math.asin,ut=Math.max,pt=Math.atan2,mt=Math.PI,ft=Math.round,gt=(t,e,s)=>t<e?e:t>s?s:t,_t={},yt=(t,e)=>{if(e<0)return t;if(!e)return ft(t);let s=_t[e];return s||(s=_t[e]=10**e),ft(t*s)/s},vt=(t,e)=>U(e)?e.reduce((e,s)=>at(s-t)<at(e-t)?s:e):e?ft(t/e)*e:t,bt=(t,e,s)=>t+(e-t)*s,Tt=t=>t===1/0?m:t===-1/0?-m:t,St=t=>t<=p?p:Tt(yt(t,11)),wt=t=>U(t)?[...t]:t,xt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=H(r)?e[i]:r}return s},Ct=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},Et=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},kt=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},$t=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[c];let o;for(;o=N.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!H(r)?r:I(e,"scale")?"1":I(e,"rotate")||I(e,"skew")?"0deg":"0px"},Bt=t=>{const e=x.exec(t)||C.exec(t),s=H(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},Ot=t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]},Nt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),Rt=t=>{const e=E.exec(t)||k.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=H(e[4])?1:+e[4];let o,a,h;if(0===i)o=a=h=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=yt(255*Nt(e,t,s+1/3),0),a=yt(255*Nt(e,t,s),0),h=yt(255*Nt(e,t,s-1/3),0)}return[o,a,h,n]},Dt=t=>Q(t)?Bt(t):G(t)?Ot(t):J(t)?Rt(t):[0,0,0,1],Lt=(t,e)=>H(t)?e:t,At=(t,e,s,i,r)=>{let n;if(W(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!V(t)||!I(t,y))return t;n=()=>{const s=t.match(D),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==_||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Ft=(t,e)=>t[h]?t[l]&&et(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:I(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Mt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Pt=(t,e,s,r)=>{const n=H(s)?Ft(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?$t(t,e,r):n===i.CSS_VAR?Mt(t,e,r).trimStart():Mt(t,e,r)},It=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,zt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ut=(t,e)=>{if(e.t=r.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const i=!s.includes(" ")&&B.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(Z(s))return e.t=r.COLOR,e.d=Dt(s),e;{const t=s.match($);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split($)||[],e}}return e.n=s,e},Xt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=wt(t._toNumbers),e.s=wt(t._strings),e),Yt=zt(),Vt=(t,e,s,a,h)=>{const l=t.parent,d=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,y=t._loopDelay,v=t._reversed,b=t._alternate,S=t._hasChildren,w=t._delay,x=t._currentTime,C=w+m,E=e-w,k=gt(x,-w,d),$=gt(E,-w,d),B=E-x,O=$>0,N=$>=d,R=d<=p,D=h===n.FORCE;let L=0,A=E,M=0;if(f>1){const e=~~($/(m+(N?0:y)));t._currentIteration=gt(e,0,f),N&&t._currentIteration--,L=t._currentIteration%2,A=$%(m+y)||0}const P=v^(b&&L),I=t._ease;let z=N?P?0:d:P?m-A:A;I&&(z=m*I(z/m)||0);const U=(l?l.backwards:E<x)?!P:!!P;if(t._currentTime=E,t._iterationTime=z,t.backwards=U,O&&!t.began?(t.began=!0,s||l&&(U||!l.began)||t.onBegin(t)):E<=0&&(t.began=!1),s||S||!O||t._currentIteration===g||t.onLoop(t),D||h===n.AUTO&&(e>=w&&e<=C||e<=w&&k>w||e>=C&&k!==d)||z>=C&&k!==d||z<=w&&k>0||e<=k&&k===d&&u||N&&!u&&R){if(O&&(t.computeDeltaTime(k),s||t.onBeforeUpdate(t)),!S){const e=D||(U?-1*B:B)>=F.tickThreshold,n=t._offset+(l?l._offset:0)+w+z;let h,d,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,l=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,y=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==l||n<=g+(y?y._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!y||y._isOverridden||n<=y._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=gt(z-m._startTime,0,l),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,_=m._tweenType,y=_===i.OBJECT,v=g===r.NUMBER,T=v&&y||0===s||1===s?-1:F.precision;let S,w;if(v)S=w=n(yt(bt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)w=n(yt(bt(m._fromNumber,m._toNumber,s),T)),S=`${w}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=yt(gt(n(bt(t[0],e[0],s)),0,255),0),r=yt(gt(n(bt(t[1],e[1],s)),0,255),0),o=yt(gt(n(bt(t[2],e[2],s)),0,255),0),a=gt(n(yt(bt(t[3],e[3],s),T)),0,1);if(S=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){S=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(yt(bt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];S+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=w),a||t===o.blend)m._value=S;else{const t=m.property;h=m.target,y?h[t]=S:_===i.ATTRIBUTE?h.setAttribute(t,S):(d=h.style,_===i.TRANSFORM?(h!==u&&(u=h,p=h[c]),p[t]=S,f=1):_===i.CSS?d[t]=S:_===i.CSS_VAR&&d.setProperty(t,S)),O&&(M=1)}}if(f&&m._renderTransforms){let t=_;for(let e in p)t+=`${T[e]}${p[e]}) `;d.transform=t,f=0}m=m._next}!s&&M&&t.onRender(t)}!s&&O&&t.onUpdate(t)}return l&&R?!s&&(l.began&&!U&&E>0&&!u||U&&E<=p&&u)&&(t.onComplete(t),t.completed=!U):O&&N?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||S||(t.completed=!0,s||l&&(U||!l.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,M},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Vt(t,e,s,i,r),t._hasChildren){const a=t,h=a.backwards,l=i?e:a._iterationTime,c=z();let d=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;Ct(a,e=>{if(h){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Vt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}Ct(a,t=>{const e=yt((l-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(c):r;d+=Vt(t,e,s,i,n),!t.completed&&u&&(u=!1)},h),!s&&d&&a.onRender(a),(u||h)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},Ht={},qt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&j(e)&&t in e.style){const e=Ht[t];if(e)return e;{const e=t?P(t):t;return Ht[t]=e,e}}return t},jt=t=>{if(t._hasChildren)Ct(t,jt,!0);else{const e=t;e.pause(),Ct(e,t=>{const s=t.property,r=t.target;if(r[h]){const n=r.style,o=t._inlineValue,a=q(o)||o===_;if(t._tweenType===i.TRANSFORM){const e=r[c];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=_;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(P(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===_&&t.removeAttribute("style")})}})}return t};class Gt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=yt(f/g,0),this._fps=g,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<p?p:s,r=yt(f/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return n.NONE;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Qt={animation:null,update:S},Jt=t=>{let e=Qt.animation;return e||(e={duration:p,computeDeltaTime:S,_offset:0,_delay:0,_head:null,_tail:null},Qt.animation=e,Qt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?wt(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Vt(e,1,1,0,n.FORCE)}),e},Zt=(()=>t?requestAnimationFrame:setImmediate)(),Kt=(()=>t?cancelAnimationFrame:clearImmediate)();class te extends Gt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=L,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=z();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(Et(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Wt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Qt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Zt(se)),this}pause(){if(this.reqId)return this.paused=!0,ie()}resume(){if(this.paused)return this.paused=!1,Ct(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===F.timeScale?1:f)}set speed(t){this._speed=t*F.timeScale,Ct(this,t=>t.speed=t._speed)}get timeUnit(){return 1===F.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(F.timeScale!==s){F.timeScale=s,F.tickThreshold=200*s;const t=e?.001:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return F.precision}set precision(t){F.precision=t}}const ee=(()=>{const e=new te(z());return t&&(M.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),se=()=>{ee._head?(ee.reqId=Zt(se),ee.update()):ee.reqId=0},ie=()=>(Kt(ee.reqId),ee.reqId=0,ee),re={_rep:new WeakMap,_add:new Map},ne=(t,e,s="_rep")=>{const i=re[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},oe=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,ae=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},he=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;kt(e,t,oe,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){ae(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)ae(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=yt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&ae(i)}let o=!0;if(Ct(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Ct(t,t=>{t!==e&&Ct(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=ne(t.target,t.property,"_add"),s=Jt(re._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=wt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,kt(e,i),kt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=wt(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=wt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}kt(e,t,null,"_prevAdd","_nextAdd")}return t},le=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=re._rep.get(s)[i];if(Et(r,t,"_prevRep","_nextRep"),e===o.blend){const e=re._add,r=e.get(s);if(!r)return;const n=r[i],o=Qt.animation;Et(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Et(n,a,"_prevAdd","_nextAdd"),Et(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ce=(t,e,s)=>{let r=!1;return Ct(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,h=qt(s,o,a);(!h||h&&h===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Et(e,n),le(n),r=!0)}},!0),r},de=(t,e,s)=>{const i=e||ee;let r;if(i._hasChildren){let e=0;Ct(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Et(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?de(t,n,s):n._hasChildren=!1},!0),H(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},ue=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),pe=t=>t._cancelled?(t._hasChildren?Ct(t,pe):Ct(t,t=>{t._composition!==o.none&&he(t,ne(t.target,t.property))}),t._cancelled=0,t):t;let me=0;class fe extends Gt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:c,frameRate:d,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:_,onBeforeUpdate:y,onUpdate:v}=t;A.current&&A.current.register(this);const b=e?0:ee._elapsedTime,T=e?e.defaults:F.defaults,w=W(r)||H(r)?T.delay:+r,x=W(n)||H(n)?1/0:+n,C=Lt(h,T.loop),E=Lt(l,T.loopDelay),k=!0===C||C===1/0||C<0?1/0:C+1;let $=0;e?$=s:(ee.reqId||ee.requestTick(z()),$=(ee._elapsedTime-ee._startTime)*F.timeScale),this.id=H(i)?++me:i,this.parent=e,this.duration=Tt((x+E)*k-E)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||T.onBegin,this.onBeforeUpdate=y||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=x,this.iterationCount=k,this._autoplay=!e&&Lt(c,T.autoplay),this._offset=$,this._delay=w,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=S,this._running=!1,this._reversed=+Lt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Lt(a,T.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Lt(d,T.frameRate),this._speed=Lt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return gt(yt(this._currentTime,F.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return yt(this._iterationTime,F.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return gt(yt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return gt(yt(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*gt(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return pe(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),ue(this),this._hasChildren&&Ct(this,ue),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Wt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!H(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*ee._speed);return this._startTime=z()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=p&&!this._hasChildren?Wt(this,p,0,0,n.FORCE):(this._running||(kt(ee,this),ee._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,ee.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){pe(this),this.completed=!1;const i=this.paused;return this.paused=!0,Wt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ct(m/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Ct(this,t=>t.cancel(),!0):Ct(this,le),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=St(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:St(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Wt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=S){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=S};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ge=t=>new fe(t,null,0).init();function _e(t){const e=V(t)?A.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ye(e){if(q(e))return[];if(!t)return U(e)&&e.flat(1/0)||[e];if(U(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!q(i)){const t=_e(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!q(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=_e(e);return s?Array.from(s):[e]}function ve(t){const e=ye(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=j(s);(s.nodeType||t)&&(s[h]=!0,s[l]=t,s[c]={})}}return e}const be={deg:1,rad:180/mt,turn:360},Te={},Se=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const h=a+o+i,l=Te[h];if(H(l)||n){let r;if(o in be)r=a*be[o]/be[i];else{const e=100,n=t.cloneNode(),h=t.parentNode,l=h&&h!==s?h:s.body;l.appendChild(n);const c=n.style;c.width=e+o;const d=n.offsetWidth||e;c.width=e+i;const u=d/(n.offsetWidth||e);l.removeChild(n),r=u*a}e.n=r,Te[h]=r}else e.n=l;return e.t,e.u=i,e},we=t=>t,xe=(t=1.68)=>e=>it(e,+t),Ce={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},Ee=mt/2,ke=2*mt,$e={[_]:xe,Quad:xe(2),Cubic:xe(3),Quart:xe(4),Quint:xe(5),Sine:t=>1-ot(t*Ee),Circ:t=>1-rt(1-t*t),Expo:t=>t?it(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=it(2,--s))-1)/11;);return 1/it(4,3-s)-7.5625*it((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=gt(+t,1,10),i=gt(+e,p,2),r=i/ke*dt(1/s),n=ke/i;return t=>0===t||1===t?t:-s*it(2,-10*(1-t))*nt((1-t-r)*n)}},Be=(()=>{const t={linear:we,none:we};for(let e in Ce)for(let s in $e){const i=$e[s],r=Ce[e];t[e+s]=s===_||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),Oe={linear:we,none:we},Ne=t=>{if(Oe[t])return Oe[t];if(t.indexOf("(")<=-1){const e=Ce[t]||t.includes("Back")||t.includes("Elastic")?Be[t]():Be[t];return e?Oe[t]=e:we}{const e=t.slice(0,-1).split("("),s=Be[e[0]];return s?Oe[t]=s(...e[1].split(",")):we}},Re=["steps(","irregular(","linear(","cubicBezier("],De=t=>{if(V(t))for(let e=0,s=Re.length;e<s;e++)if(I(t,Re[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),we;return W(t)?t:V(t)?Ne(t):we},Le=zt(),Ae=zt(),Fe={},Me={func:null},Pe=[null],Ie=[null,null],ze={to:null};let Ue,Xe,Ye=0;const Ve=(t,e)=>{const s={};if(U(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(K);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map(t=>{const e={};for(let s in t){const i=t[s];K(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Lt(e.duration,F.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(K(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let c=0;for(let t=0;t<a;t++)c+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?c:0),n.push(l)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s};class We extends fe{constructor(t,e,s,n,a=!1,h=0,l=0){super(e,s,n);const c=ve(t),d=c.length,u=e.keyframes,m=u?xt(Ve(u,e),e):e,{delay:g,duration:_,ease:y,playbackEase:v,modifier:b,composition:T,onRender:S}=m,w=s?s.defaults:F.defaults,x=Lt(v,w.playbackEase),C=x?De(x):null,E=!H(y)&&!H(y.ease),k=E?y.ease:Lt(y,C?"linear":w.ease),$=E?y.settlingDuration:Lt(_,w.duration),B=Lt(g,w.delay),O=b||w.modifier,N=H(T)&&d>=f?o.none:H(T)?w.composition:T,R=this._offset+(s?s._offset:0);E&&(y.parent=this);let D=NaN,L=NaN,A=0,M=0;for(let t=0;t<d;t++){const e=c[t],n=h||t,u=l||d;let f=NaN,g=NaN;for(let t in m)if(K(t)){const h=Ft(e,t),l=qt(t,e,h);let c=m[t];const d=U(c);if(a&&!d&&(Ie[0]=c,Ie[1]=c,c=Ie),d){const t=c.length,e=!X(c[0]);2===t&&e?(ze.to=c,Pe[0]=ze,Ue=Pe):t>2&&e?(Ue=[],c.forEach((t,e)=>{e?1===e?(Ie[1]=t,Ue.push(Ie)):Ue.push(t):Ie[0]=t})):Ue=c}else Pe[0]=c,Ue=Pe;let _=null,y=null,v=NaN,b=0,T=0;for(let t=Ue.length;T<t;T++){const i=Ue[T];X(i)?Xe=i:(ze.to=i,Xe=ze),Me.func=null;const a=At(Xe.to,e,n,u,Me);let c;X(a)&&!H(a.to)?(Xe=a,c=a.to):c=a;const d=At(Xe.from,e,n,u),m=Xe.ease,f=!H(m)&&!H(m.ease),g=f?m.ease:m||k,S=f?m.settlingDuration:At(Lt(Xe.duration,t>1?At($,e,n,u)/t:$),e,n,u),w=At(Lt(Xe.delay,T?0:B),e,n,u),x=At(Lt(Xe.composition,N),e,n,u),C=Y(x)?x:o[x],E=Xe.modifier||O,D=!H(d),L=!H(c),F=U(c),P=F||D&&L,I=y?b+w:w,z=yt(R+I,12);M||!D&&!F||(M=1);let V=y;if(C!==o.none){_||(_=ne(e,l));let t=_._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=z;)if(V=t,t=t._nextRep,t&&t._absoluteStartTime>=z)for(;t;)ae(t),t=t._nextRep}if(P?(Ut(F?At(c[0],e,n,u):d,Le),Ut(F?At(c[1],e,n,u,Me):c,Ae),Le.t===r.NUMBER&&(V?V._valueType===r.UNIT&&(Le.t=r.UNIT,Le.u=V._unit):(Ut(Pt(e,l,h,Fe),Yt),Yt.t===r.UNIT&&(Le.t=r.UNIT,Le.u=Yt.u)))):(L?Ut(c,Ae):y?Xt(y,Ae):Ut(s&&V&&V.parent.parent===s?V._value:Pt(e,l,h,Fe),Ae),D?Ut(d,Le):y?Xt(y,Le):Ut(s&&V&&V.parent.parent===s?V._value:Pt(e,l,h,Fe),Le)),Le.o&&(Le.n=It(V?V._toNumber:Ut(Pt(e,l,h,Fe),Yt).n,Le.n,Le.o)),Ae.o&&(Ae.n=It(Le.n,Ae.n,Ae.o)),Le.t!==Ae.t)if(Le.t===r.COMPLEX||Ae.t===r.COMPLEX){const t=Le.t===r.COMPLEX?Le:Ae,e=Le.t===r.COMPLEX?Ae:Le;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Le.t===r.UNIT||Ae.t===r.UNIT){const t=Le.t===r.UNIT?Le:Ae,e=Le.t===r.UNIT?Ae:Le;e.t=r.UNIT,e.u=t.u}else if(Le.t===r.COLOR||Ae.t===r.COLOR){const t=Le.t===r.COLOR?Le:Ae,e=Le.t===r.COLOR?Ae:Le;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Le.u!==Ae.u){let t=Ae.u?Le:Ae;t=Se(e,t,Ae.u?Ae.u:Le.u,!1)}if(Ae.d&&Le.d&&Ae.d.length!==Le.d.length){const t=Le.d.length>Ae.d.length?Le:Ae,e=t===Le?Ae:Le;e.d=t.d.map((t,s)=>H(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const W=yt(+S||p,12);let j=Fe[l];q(j)||(Fe[l]=null);const G={parent:this,id:Ye++,property:l,target:e,_value:null,_func:Me.func,_ease:De(g),_fromNumbers:wt(Le.d),_toNumbers:wt(Ae.d),_strings:wt(Ae.s),_fromNumber:Le.n,_toNumber:Ae.n,_numbers:wt(Le.d),_number:Le.n,_unit:Ae.u,_modifier:E,_currentTime:0,_startTime:I,_delay:+w,_updateDuration:W,_changeDuration:W,_absoluteStartTime:z,_tweenType:h,_valueType:Ae.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:j,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&he(G,_),isNaN(v)&&(v=G._startTime),b=yt(I+W,12),y=G,A++,kt(this,G)}(isNaN(L)||v<L)&&(L=v),(isNaN(D)||b>D)&&(D=b),h===i.TRANSFORM&&(f=A-T,g=A)}if(!isNaN(f)){let t=0;Ct(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&Ct(Qt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}d||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),L?(Ct(this,t=>{t._startTime-t._delay||(t._delay-=L),t._startTime-=L}),D-=L):L=0,D||(D=p,this.iterationCount=0),this.targets=c,this.duration=D===p?p:Tt((D+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=L,this.iterationDuration=D,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e;return Ct(this,t=>{t._updateDuration=St(t._updateDuration*s),t._changeDuration=St(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Ct(this,t=>{const e=t._func;if(e){const s=Pt(t.target,t.property,t._tweenType);Ut(s,Yt),Ut(e(),Ae),t._fromNumbers=wt(Yt.d),t._fromNumber=Yt.n,t._toNumbers=wt(Ae.d),t._strings=wt(Ae.s),t._toNumber=Ae.o?It(Yt.n,Ae.n,Ae.o):Ae.n}}),this.duration===p&&this.restart(),this}revert(){return super.revert(),jt(this)}then(t){return super.then(t)}}const He=(t,e)=>new We(t,e,null,0,!1).init(),qe={_head:null,_tail:null},je=(t,e,s)=>{let i,r=qe._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Et(qe,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ge=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),je(e,s),kt(qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{je(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Qe(t,e,s){const i=ve(t);if(!i.length)return;const[n]=i,o=Ft(n,e),a=qt(e,n,o);let h=Pt(n,a);if(H(s))return h;if(Ut(h,Yt),Yt.t===r.NUMBER||Yt.t===r.UNIT){if(!1===s)return Yt.n;{const t=Se(n,Yt,s,!1);return`${yt(t.n,F.precision)}${t.u}`}}}const Je=(t,e)=>{if(!H(e))return e.duration=p,e.composition=Lt(e.composition,o.none),new We(t,e,null,0,!0).resume()},Ze=(t,e,s)=>{const i=ye(t);for(let t=0,r=i.length;t<r;t++)je(i[t],s,e&&e.controlAnimation&&e);return de(i,e,s),i},Ke=(t,e)=>{if(I(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},ts=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),H(e))return s;if(Y(+e))return+e;const i=e,r=t?t.labels:null,n=!q(r),o=Ke(t,i),a=!H(o),h=R.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=a?o:n?l:s,d=+e[1];return It(c,d,t[0])}return a?o:n?H(r[i])?s:r[i]:s};function es(t){return Tt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function ss(t,e,s,i,r,o){const a=Y(t.duration)&&t.duration<=p?s-p:s;Wt(e,a,1,1,n.AUTO);const h=i?new We(i,t,e,a,!1,r,o):new fe(t,e,a);return h.init(!0),kt(e,h),Ct(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=es(e),e}class is extends fe{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=F.defaults;this.defaults=e?xt(e,s):s,this.onRender=t.onRender||s.onRender;const i=Lt(t.playbackEase,s.playbackEase);this._ease=i?De(i):null,this.iterationDuration=0}add(t,e,s){const i=X(e),r=X(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=ye(t),n=this.duration,o=this.iterationDuration,a=i.id;let h=0;const l=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,H(a)||(s.id=a+"-"+h),ss(s,this,ts(this,e(t,h,l,this)),t,h,l),h++})}else ss(i,this,ts(this,s),t)}else ss(t,this,ts(this,e));return this.init(!0)}}sync(t,e){if(H(t)||t&&H(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return H(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return H(t)||t&&!W(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return H(t)||t&&!V(t)||(this.labels[t]=ts(this,e)),this}remove(t,e){return de(ye(t),this,e),this}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e,i=this.labels;Ct(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Ct(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Ct(this,t=>t.revert,!0),jt(this)}then(t){return super.then(t)}}const rs=t=>new is(t).init();class ns{constructor(t,e){A.current&&A.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!H(t)&&!H(e)){for(let t in e){const s=e[t];K(t)?n[t]=s:I(t,"on")?r[t]=s:i[t]=s}this.callbacks=new We({v:0},r);for(let e in n){const s=n[e],r=X(s);let a={},h="+=0";if(r){const t=s.unit;V(t)&&(h+=t)}else a.duration=s;a[e]=r?xt({to:h},s):h;const l=xt(i,a);l.composition=o.replace,l.autoplay=!1;const c=this.animations[e]=new We(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(H(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Ct(c,e=>{if(U(t))for(let s=0,i=t.length;s<i;s++)H(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;H(s)||(e._ease=De(s)),e._currentTime=0}),H(e)||c.stretch(e),c.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=S,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const os=(t,e)=>new ns(t,e),as=(t,e)=>(+t).toFixed(e),hs=(t,e,s)=>`${t}`.padStart(e,s),ls=(t,e,s)=>`${t}`.padEnd(e,s),cs=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,ds=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),us=t=>t*Math.PI/180,ps=t=>180*t/Math.PI,ms=(t,e,s,i)=>i?1===i?e:bt(t,e,1-Math.exp(-i*s*.1)):t;var fs=Object.freeze({__proto__:null,clamp:gt,damp:ms,degToRad:us,lerp:bt,mapRange:ds,padEnd:ls,padStart:hs,radToDeg:ps,round:yt,roundPad:as,snap:vt,wrap:cs});const gs=10*f;class _s{constructor(t={}){const e=!H(t.bounce)||!H(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=gt(Lt(t.bounce,.5),-1,1),this.pd=gt(Lt(t.duration,628),10*F.timeScale,gs*F.timeScale),this.m=gt(Lt(t.mass,1),1,gs),this.s=gt(Lt(t.stiffness,100),p,gs),this.d=gt(Lt(t.damping,10),p,gs),this.v=gt(Lt(t.velocity,0),-1e4,gs),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||S,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?ht(-n*e*s)*(1*ot(i*n)+r*nt(i*n)):1===e?(1+r*n)*ht(-n*s):((1+r)*ht((-e*s+i)*n)+(1-r)*ht((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===F.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=it(2*mt/t,2),this.bn>=0?this.d=4*(1-this.bn)*mt/t:this.d=4*mt/(t*(1+this.bn)),this.s=yt(gt(this.s,p,gs),3),this.d=yt(gt(this.d,p,300),3)}calculateBDFromSD(){const t=2*mt/rt(this.s);this.pd=t*(1===F.timeScale?f:1);const e=this.d/(2*rt(this.s));this.bn=e<=1?1-this.d*t/(4*mt):4*mt/(this.d*t)-1,this.bn=yt(gt(this.bn,-1,1),3),this.pd=yt(gt(this.pd,10*F.timeScale,gs*F.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=gt(rt(o/r),p,f),l=this.zeta=n/(2*rt(o*r));l<1?(this.wd=h*rt(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*rt(l*l-1),this.b=(l*h-a)/this.wd);let c=0,d=0,u=0;for(;d<=t&&u<=e;)at(1-this.solve(c))<s?d++:d=0,this.solverDuration=c,c+=i,u++;this.settlingDuration=yt(this.solverDuration*f,0)*F.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=gt(Lt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=gt(Lt(t,1),10*F.timeScale,gs*F.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=gt(Lt(t,100),p,gs),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=gt(Lt(t,10),p,gs),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=gt(Lt(t,1),1,gs),this.compute()}get velocity(){return this.v}set velocity(t){this.v=gt(Lt(t,0),-1e4,gs),this.compute()}}const ys=t=>new _s(t),vs=t=>(console.warn("createSpring() is deprecated use spring() instead"),new _s(t)),bs=t=>{t.cancelable&&t.preventDefault()};class Ts{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:S,remove:S}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class Ss{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const ws=(t,e)=>t&&W(t)?t(e):t;let xs=0;class Cs{constructor(t,i={}){if(!t)return;A.current&&A.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,h=i.releaseEase,l=h&&De(h),c=!H(h)&&!H(h.ease),d=X(r)&&!H(r.mapTo)?r.mapTo:"translateX",u=X(n)&&!H(n.mapTo)?n.mapTo:"translateY",p=ws(i.container,this);this.containerArray=U(p)?p:null,this.$container=p&&!this.containerArray?ye(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=X(t)?new Ts(t):ye(t)[0],this.$trigger=ye(o||t)[0],this.fixed="fixed"===Qe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:ys({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseYSpring=c?h:ys({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseEase=l||Be.outQuint,this.hasReleaseSpring=c,this.onGrab=i.onGrab||S,this.onDrag=i.onDrag||S,this.onRelease=i.onRelease||S,this.onUpdate=i.onUpdate||S,this.onSettle=i.onSettle||S,this.onSnap=i.onSnap||S,this.onResize=i.onResize||S,this.onAfterResize=i.onAfterResize||S,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),H(r)||!0===r)f[d]=0;else if(X(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[d]=e}else!1===r&&(f[d]=0,this.disabled[0]=1);if(H(n)||!0===n)f[u]=0;else if(X(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new ns(this.$target,f),this.xProp=d,this.yProp=u,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-m,m,m,-m],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=z(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Ss(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new fe({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new fe({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!H(p),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?d:u,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=pt(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new fe({autoplay:!1,duration:150*F.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),X(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=z(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,l=this.velocityStackIndex;n[l]=yt(gt(rt(t*t+e*e)/r*o,a,h),5);const c=ut(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=yt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=vt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=yt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=vt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return yt(this.animate[this.xProp](),F.precision)}set x(t){this.setX(t,!1)}get y(){return yt(this.animate[this.yProp](),F.precision)}set y(t){this.setY(t,!1)}get progressX(){return ds(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ds(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ds(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ds(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=yt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=yt(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=s-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=e.innerWidth,h=this.window[1]=e.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,_]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?gt(c,a,c):c,this.scrollView[1]=l?gt(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:T,right:S,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=yt(l?gt(y,a,a):y,0),this.dragArea[3]=yt(l?gt(v,h,h):v,0);const x=Qe(t,"overflow"),C="visible"===x,E="hidden"===x;if(this.canScroll=!u&&this.contained&&(t===s.body&&C||!E&&!C)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!U(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-y:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=yt(r.top+s-(l?0:T),0),this.targetBounds[1]=yt(r.right+e-(l?a:S),0),this.targetBounds[2]=yt(r.bottom+s-(l?h:w),0),this.targetBounds[3]=yt(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+_):(this.containerBounds[0]=-yt(r.top-(u?gt(T,0,h):T)+o-m,0),this.containerBounds[1]=-yt(r.right-(u?gt(S,0,a):S)-c+f,0),this.containerBounds[2]=-yt(r.bottom-(u?gt(w,0,h):w)-d+g,0),this.containerBounds[3]=-yt(r.left-(u?gt(b,0,a):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,h]=this.disabled,l=!a&&e<o||!a&&e>r,c=!h&&s<i||!h&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=ws(t.container,this),o=ws(t.containerPadding,this)||0,a=U(o)?o:[o,o,o,o],h=this.x,l=this.y,c=ws(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}const u=ws(t.dragThreshold,this),p={mouse:3,touch:7};if(Y(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;H(t)||(p.mouse=t),H(e)||(p.touch=e)}this.containerArray=U(n)?n:null,this.$container=n&&!this.containerArray?ye(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Lt(a,[0,0,0,0]),this.containerFriction=gt(Lt(ws(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=gt(Lt(ws(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ws(X(i)&&!H(i.snap)?i.snap:t.snap,this),this.snapY=ws(X(r)&&!H(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Lt(ws(t.scrollSpeed,this),1.5),this.scrollThreshold=Lt(ws(t.scrollThreshold,this),20),this.dragSpeed=Lt(ws(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Lt(ws(t.minVelocity,this),0),this.maxVelocity=Lt(ws(t.maxVelocity,this),50),this.velocityMultiplier=Lt(ws(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[m,f,g,_]=this.containerBounds;this.setX(gt(h,_,f),!0),this.setY(gt(l,m,g),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?gt(c,this.window[0],c):c,p=this.useWin?gt(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,_=this.scrollThreshold,[y,v]=this.coords,[b,T,S,w]=this.scrollBounds,x=yt(gt((v-b+t)/_,-1,0)*g,0),C=yt(gt((y-T-e)/_,0,1)*g,0),E=yt(gt((v-S-s)/_,0,1)*g,0),k=yt(gt((y-w+i)/_,-1,0)*g,0);if(x||E||k||C){const[t,e]=this.disabled;let s=h,i=l;t||(s=yt(gt(h+(k||C),0,r-o),0),this.coords[0]-=h-s),e||(i=yt(gt(l+(x||E),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-h,n-l),this.angle=pt(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return de([this],null,"x"),de([this],null,"y"),de([this],null,"progressX"),de([this],null,"progressY"),de([this.scroll]),de([this.overshootCoords]),this}scrollInView(t,e=0,s=Be.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,c,d]=o,u=yt(gt(r-h,-m,0),0),p=yt(gt(i-l,0,m),0),f=yt(gt(r-c,0,m),0),g=yt(gt(i-d,-m,0),0);new We(n,{x:yt(n.x+(g?g-e:p?p+e:0),0),y:yt(n.y+(u?u-e:f?f+e:0),0),duration:H(t)?350*F.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Je(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Be.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=gt(vt(i,this.snapX),u,c),a=gt(vt(r,this.snapY),l,d),h=H(t)?350*F.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,h,s),n||2!==p&&3!==p||this.animate[this.yProp](a,h,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[h,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Qe(this.$target,"zIndex",!1);xs=(f>xs?f:xs)+1,this.targetStyles=Je(this.$target,{zIndex:xs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Je(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Be.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let h=t.target,l=!1,c=!1,d=!1;for(;e&&h&&h!==this.$trigger;){const t=Qe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentElement}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(bs(t),this.triggerStyles||(this.triggerStyles=Je(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",bs,{passive:!1}),this.$trigger.addEventListener("touchmove",bs,{passive:!1}),this.$trigger.addEventListener("touchend",bs),(this.dragged||!this.disabled[0]&&at(o)>this.dragThreshold||!this.disabled[1]&&at(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[i,r,n,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,_=this.releaseYSpring,y=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,S=this.y,w=this.computeVelocity(i-h,r-l),x=this.angle=pt(r-a,i-n),C=150*w,E=(1-this.releaseContainerFriction)*this.dragSpeed,k=T+ot(x)*C,$=S+nt(x)*C,B=k>d?d+(k-d)*E:k<p?p+(k-p)*E:k,O=$>u?u+($-u)*E:$<c?c+($-c)*E:$,N=this.destX=gt(yt(vt(B,this.snapX),5),p,d),R=this.destY=gt(yt(vt(O,this.snapY),5),c,u),D=this.isOutOfBounds(this.containerBounds,k,$);let L=0,A=0,M=y,P=y,I=0;if(b.x=T,b.y=S,!t){const t=N===d?T>d?-1:1:T<p?-1:1,s=yt(T-N,0);g.velocity=e&&v?s?C*t/at(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;L=T===N?0:v?r:r-n*F.timeScale,v&&(M=i),L>I&&(I=L)}if(!e){const e=R===u?S>u?-1:1:S<c?-1:1,s=yt(S-R,0);_.velocity=t&&v?s?C*e/at(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=_;A=S===R?0:v?r:r-n*F.timeScale,v&&(P=i),A>I&&(I=A)}if(!v&&D&&E&&(L||A)){const t=o.blend;new We(b,{x:{to:B,duration:.65*L},y:{to:O,duration:.65*A},ease:y,composition:t}).init(),new We(b,{x:{to:N,duration:L},y:{to:R,duration:A},ease:y,composition:t}).init(),this.overshootTicker.stretch(ut(L,A)).restart()}else t||this.animate[this.xProp](N,L,M),e||this.animate[this.yProp](R,A,P);this.scrollInView(I,this.scrollThreshold,y);let z=!1;N!==m&&(this.snapped[0]=N,this.snapX&&(z=!0)),R!==f&&this.snapY&&(this.snapped[1]=R,this.snapY&&(z=!0)),z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",bs),this.$trigger.removeEventListener("touchmove",bs),this.$trigger.removeEventListener("touchend",bs),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Je(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":bs(t)}}}const Es=(t,e)=>new Cs(t,e),ks=(t=S)=>new fe({duration:1*F.timeScale,onComplete:t},null,0).resume(),$s=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!W(a)&&a.revert&&(e=a),H(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||S}};class Bs{constructor(t={}){A.current&&A.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||ye(i)[0]||s);const n=t.defaults,o=F.defaults,a=t.mediaQueries;if(this.defaults=n?xt(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=A.current,s=A.root,i=F.defaults;A.current=this,A.root=this.root,F.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return A.current=e,A.root=s,F.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);W(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,W(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);W(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,W(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);W(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(W(s))return s(this);const i=$s(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const Os=t=>new Bs(t),Ns=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Rs=(t,e)=>t&&W(t)?t(e):t,Ds=new Map;class Ls{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new fe({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Ct(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new fe({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=yt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new fe({autoplay:!1,duration:250*F.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new fe({autoplay:!1,duration:500*F.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=yt(t?e.scrollX:s.scrollLeft,0),this.scrollY=yt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Ns()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){Ct(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Ct(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Ds.delete(this.element)}}const As=t=>{const e=t&&ye(t)[0]||s.body;let i=Ds.get(e);return i||(i=new Ls(e),Ds.set(e,i)),i},Fs=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,a="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:h,u:l}=Ut(a,Yt);let c=h;return"%"===l?c=h/100*s:l&&(c=Se(t,Yt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Ms=(t,e,s,i,r)=>{let n;if(V(e)){const o=R.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=Fs(t,l[0],s,i,r),p=Fs(t,l[1],s,i,r);if(c){const e=It(Fs(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=It(Fs(t,"max",s),p,h);n=e>u?u:e}else n=It(u,p,h)}else n=Fs(t,e,s,i,r)}else n=e;return yt(n,0)},Ps=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[h]){e=i;break}}return e};let Is=0;const zs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Us{constructor(t={}){A.current&&A.current.register(this);const e=Lt(t.sync,"play pause"),i=e?De(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(Y(e)||!0===e||r),a=e&&V(e)&&!n&&!o,h=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,l=a&&h.length>2;this.index=Is++,this.id=H(t.id)?this.index:t.id,this.container=As(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!h,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:S,this.onSyncLeave=h&&!l&&h[1]?h[1]:S,this.onSyncEnterForward=h&&l&&h[0]?h[0]:S,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:S,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:S,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:S,this.onEnter=t.onEnter||S,this.onLeave=t.onLeave||S,this.onEnterForward=t.onEnterForward||S,this.onLeaveForward=t.onLeaveForward||S,this.onEnterBackward=t.onEnterBackward||S,this.onLeaveBackward=t.onLeaveBackward||S,this.onUpdate=t.onUpdate||S,this.onSyncComplete=t.onSyncComplete||S,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Lt(t.debug,!1),this._next=null,this._prev=null,kt(this.container,this),ks(()=>{if(!this.reverted){if(!this.target){const e=ye(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,H(t)||(t.persist=!0),!this._params.target)){let e;H(t.targets)?Ct(t,t=>{t.targets&&!e&&(e=Ps(t))}):e=Ps(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:yt(gt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Lt(Rs(t.repeat,this),!0),this.horizontal="x"===Lt(Rs(t.axis,this),"y"),this.enter=Lt(Rs(t.enter,this),"end start"),this.leave=Lt(Rs(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),a=zs[this.index%zs.length],h=t.useWin,l=h?t.winWidth:t.width,c=h?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,_=e?g:15,y=e?60:g,v=e?y:_,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",S=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,w=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${w("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${w("sticky",0,0,e?l:g,e?g:c)}`,i||(n.style.cssText+=`background:\n ${S("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${S("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${w("relative",0,0,e?d:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${S("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${S("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const x=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,h=(r?0:this.offset)+t,m=i%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),S=s.createElement("div"),C=e?b?"right":"left":b?"bottom":"top",E=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;S.innerHTML=`${this.id}${x[m]}${this.thresholds[i]}`,T.style.cssText=`${w("absolute",0,0,y,_)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${C}: 2px solid ${a};\n `,S.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${_};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,T.appendChild(S);let k=h-E+(e?1:0);T.style[e?"left":"top"]=`${k}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Qe(t.element,"position")&&(this.debugStyles=Je(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==i.element&&a!==s.body;){const e="sticky"===Qe(a,"position")&&Je(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=i.scale,c=(r?h.left+i.scrollX-i.left:h.top+i.scrollY-i.top)*l,d=(r?h.width:h.height)*l,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",_="end",y="end",v="start";if(V(m)){const t=m.split(" ");y=t[0],g=t.length>1?t[1]:g}else if(X(m)){const t=m;H(t.container)||(y=t.container),H(t.target)||(g=t.target)}else Y(m)&&(y=m);if(V(f)){const t=f.split(" ");v=t[0],_=t.length>1?t[1]:_}else if(X(f)){const t=f;H(t.container)||(v=t.container),H(t.target)||(_=t.target)}else Y(f)&&(v=f);const b=Ms(e,g,d),T=Ms(e,_,d),S=b+c-u,w=T+c-p,x=Ms(e,y,u,S,w),C=Ms(e,v,u,S,w),E=b+c-x,k=T+c-C,$=k-E;this.offset=c,this.offsetStart=E,this.offsetEnd=k,this.distance=$<=0?0:$,this.thresholds=[g,_,y,v],this.coords=[b,T,x,C],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&Y(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=yt(bt(e,g,bt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return Et(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Xs=(t={})=>new Us(t),Ys=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Vs=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=Ys(r,e,s)-t,i>0?o=r:n=r}while(at(i)>1e-7&&++a<100);return r},Ws=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:Ys(Vs(r,t,s),e,i),Hs=(t=10,e)=>{const s=e?lt:ct;return e=>s(gt(e,0,1)*t)*(1/t)},qs=(...t)=>{const e=t.length;if(!e)return we;const s=e-1,i=t[0],r=t[s],n=[0],o=[st(i)];for(let e=1;e<s;e++){const i=t[e],r=V(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(H(h)?e/s:st(h)/100),o.push(st(a))}return o.push(st(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},js=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(gt(o,r,1))}return s.push(1),qs(...s)};var Gs=Object.freeze({__proto__:null,Spring:_s,createSpring:vs,cubicBezier:Ws,eases:Be,irregular:js,linear:qs,spring:ys,steps:Hs});const Qs=fs,Js={},Zs=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Ks=t=>(...e)=>{const s=t(...e);return new Proxy(S,{apply:(t,e,[i])=>s(i),get:(t,e)=>Ks((...t)=>{const i=Js[e](...t);return t=>i(s(t))})})},ti=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Ks(Zs(e,s)):e)(...t);return Js[t]||(Js[t]=i),i},ei=ti("roundPad",Qs.roundPad),si=ti("padStart",Qs.padStart),ii=ti("padEnd",Qs.padEnd),ri=ti("wrap",Qs.wrap),ni=ti("mapRange",Qs.mapRange),oi=ti("degToRad",Qs.degToRad),ai=ti("radToDeg",Qs.radToDeg),hi=ti("snap",Qs.snap),li=ti("clamp",Qs.clamp),ci=ti("round",Qs.round),di=ti("lerp",Qs.lerp,1),ui=ti("damp",Qs.damp,1),pi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let mi=0;const fi=(t,e=0,s=1,i=0)=>{let r=void 0===t?mi++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},gi=t=>t[pi(0,t.length-1)],_i=t=>{let e,s,i=t.length;for(;i;)s=pi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},yi=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!H(o),h=a&&!H(o.ease)?o.ease:a?De(o):null,l=e.grid,c=e.axis,d=e.total,u=H(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=U(t),y=e.use,v=st(g?t[0]:t),b=g?st(t[1]):0,T=B.exec((g?t[1]:t)+_),S=e.start||0+(g?v:0);let w=u?0:Y(r)?r:0;return(t,r,o,a)=>{const[u]=ve(t),_=H(d)?o:d,x=!H(y)&&(W(y)?y(u,r,_):Pt(u,y)),C=Y(x)||V(x)&&Y(+x)?+x:r;if(p&&(w=(_-1)/2),m&&(w=_-1),!s.length){for(let t=0;t<_;t++){if(l){const e=p?(l[0]-1)/2:w%l[0],i=p?(l[1]-1)/2:ct(w/l[0]),r=e-t%l[0],n=i-ct(t/l[0]);let o=rt(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(at(w-t));i=ut(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>c?t<0?-1*t:-t:at(i-t))),f&&(s=_i(s))}const E=g?(b-v)/i:v;let k=(a?ts(a,H(e.start)?a.iterationDuration:S):S)+(E*yt(s[C],2)||0);return e.modifier&&(k=e.modifier(k)),T&&(k=`${k}${T[2]}`),k}};var vi=Object.freeze({__proto__:null,$:ve,clamp:li,cleanInlineStyles:jt,createSeededRandom:fi,damp:ui,degToRad:oi,get:Qe,keepTime:$s,lerp:di,mapRange:ni,padEnd:ii,padStart:si,radToDeg:ai,random:pi,randomPick:gi,remove:Ze,round:ci,roundPad:ei,set:Je,shuffle:_i,snap:hi,stagger:yi,sync:ks,wrap:ri});const bi=t=>{const e=ye(t)[0];return e&&j(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ti=(t,e,s,i=0)=>{const r=((s+i)%e+e)%e;return t.getPointAtLength(r)},Si=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[l],o=t.getCTM();return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=Ti(t,r,a,-1),s=Ti(t,r,a,1);return 180*pt(s.y-e.y,s.x-e.x)/mt}{const s=Ti(t,r,a,0);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},wi=(t,e=0)=>{const s=bi(t);if(s)return{translateX:Si(s,"x",e),translateY:Si(s,"y",e),rotate:Si(s,"a",e)}},xi=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(rt(s.a*s.a+s.b*s.b)+rt(s.c*s.c+s.d*s.d))/2)}return e},Ci=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=xi(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:W(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h},Ei=(t,e=0,s=0)=>ye(t).map(t=>Ci(t,e,s)),ki=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=bi(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[d];o&&s.setAttribute(r?"d":"points",o);let a="",h="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),l=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<l;e++){const c=e/(l-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+yt(d.x,3)+n+d.y+" ",h+=p+yt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[d]=h,[a,h]};var $i=Object.freeze({__proto__:null,createDrawable:Ei,createMotionPath:wi,morphTo:ki});const Bi="undefined"!=typeof Intl&&Intl.Segmenter,Oi=/\{value\}/g,Ni=/\{i\}/g,Ri=/(\s+)/,Di=/^\s+$/,Li="line",Ai="word",Fi="char",Mi="data-line";let Pi=null,Ii=null,zi=null;const Ui=t=>t.isWordLike||" "===t.segment||Y(+t.segment),Xi=t=>t.setAttribute("aria-hidden","true"),Yi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Vi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Wi=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Wi(e)}},Hi=(t,e,s)=>{const i=t.getAttribute(Mi);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)Hi(t.children[r],e,s);return s},qi=(t,e={})=>{let s="";const i=V(e.class)?` class="${e.class}"`:"",r=Lt(e.clone,!1),n=Lt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},ji=(t,e,s,i,r,n,o,a,h)=>{const l=r===Li,c=r===Fi,d=`_${r}_`,u=W(t)?t(s):t,p=l?"block":"inline-block";zi.innerHTML=u.replace(Oi,`<i class="${d}"></i>`).replace(Ni,`${c?h:l?o:a}`);const m=zi.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,_=m.querySelectorAll(`i.${d}`),y=_.length;if(y){f.style.display=p,g.style.display=p,g.setAttribute(Mi,`${o}`),l||(g.setAttribute("data-word",`${a}`),c&&g.setAttribute("data-char",`${h}`));let t=y;for(;t--;){const e=_[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${Vi[r]}`),f};class Gi{constructor(e,i={}){Pi||(Pi=Bi?new Bi([],{granularity:Ai}):{segment:t=>{const e=[],s=t.split(Ri);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Di.test(i)})}return e}}),Ii||(Ii=Bi?new Bi([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!zi&&t&&(zi=s.createElement("template")),A.current&&A.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=i,c=(e=U(e)?e[0]:e)&&e.nodeType?e:(_e(e)||[])[0],d=!0===o?{}:o,u=!0===r||H(r)?{}:r,p=!0===n?{}:n;this.debug=Lt(l,!1),this.includeSpaces=Lt(h,!1),this.accessible=Lt(a,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=X(d)?qi(Li,d):d,this.wordTemplate=X(u)||this.linesOnly?qi(Ai,u):u,this.charTemplate=X(p)?qi(Fi,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=$s(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>W(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,i=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,c=Pi.segment(o),d=s.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=Ui(t);if(!u||s&&u&&Ui(u))a.push(e);else{const t=a.length-1;a[t].includes(" ")||e.includes(" ")?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const c=a[t+1],u=r&&c&&!c.trim(),p=o,m=i?Ii.segment(p):null,f=i?s.createDocumentFragment():s.createTextNode(u?o+" ":o);if(i){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,c=s.createTextNode(a);ji(i,l,c,f,Fi,n,-1,h.length,l.length)}}e?ji(e,h,f,d,Ai,n,-1,h.length,l.length):i?d.appendChild(f):d.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,i=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==s.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>W(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Yi(e,Ai))),o&&(h||n)&&(this.chars=Yi(e,Fi));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(Mi,`${d}`);const r=e.querySelectorAll(`[${Mi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Mi,`${d}`);c=s}if(h){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<d+1;t++){const s=e.cloneNode(!0);Hi(s,t,new Set).forEach(t=>{const e=t.parentElement;e&&i.add(e),t.remove()}),a.push(s)}i.forEach(Wi);for(let e=0,s=a.length;e<s;e++)ji(r,this.lines,a[e],t,Li,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Yi(e,Ai)),o&&(this.chars=Yi(e,Fi))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!i)){const t=s.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(Xi),this.words.forEach(Xi),this.chars.forEach(Xi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Qi=(t,e)=>new Gi(t,e),Ji=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Gi(t,e));var Zi=Object.freeze({__proto__:null,TextSplitter:Gi,split:Ji,splitText:Qi});const Ki=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(yt(t(i/e),4));return`linear(${s.join(", ")})`},tr={},er=t=>{let e=tr[t];if(e)return e;if(e="linear",V(t)){if(I(t,"linear")||I(t,"cubic-")||I(t,"steps")||I(t,"ease"))e=t;else if(I(t,"cubicB"))e=P(t);else{const s=Ne(t);W(s)&&(e=s===we?"linear":Ki(s))}tr[t]=e}else if(W(t)){const s=Ki(t);s&&(e=s)}else t.ease&&(e=Ki(t.ease));return e},sr=["x","y","z"],ir=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...sr],rr=(()=>[...sr,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let nr=null;const or=(t,e,s,i,r)=>{let n=V(e)?e:At(e,s,i,r);return Y(n)?ir.includes(t)||I(t,"translate")?`${n}px`:I(t,"rotate")||I(t,"skew")?`${n}deg`:`${n}`:n},ar=(t,e,s,i,r,n)=>{let o="0";const a=H(i)?getComputedStyle(t)[e]:or(e,i,t,r,n);return o=H(s)?U(i)?i.map(s=>or(e,s,t,r,n)):a:[or(e,s,t,r,n),a],o};class hr{constructor(e,s){A.current&&A.current.register(this),q(nr)&&(!t||!H(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=I(t,"skew"),s=I(t,"scale"),i=I(t,"rotate"),r=I(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),nr=!0):nr=!1);const i=ve(e),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Lt(s.ease,er(F.defaults.ease)),o=n.ease&&n,a=Lt(s.autoplay,F.defaults.autoplay),h=!(!a||!a.link)&&a,l=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,u=Lt(s.loop,F.defaults.loop),p=!0===u||u===1/0?1/0:Y(u)?u+1:1,m=l?d?"alternate-reverse":"alternate":d?"reverse":"normal",g=er(n),y=1===F.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||F.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==h,this.reversed=d,this.persist=Lt(s.persist,F.defaults.persist),this.autoplay=a,this._speed=Lt(s.playbackRate,F.defaults.playbackRate),this._resolve=S,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[c],a=rr.some(t=>s.hasOwnProperty(t)),h=t.style,l=this._inlineStyles[e]={},d=(o?o.settlingDuration:At(Lt(s.duration,F.defaults.duration),t,e,r))*y,u=At(Lt(s.delay,F.defaults.delay),t,e,r)*y,f=Lt(s.composition,"replace");for(let o in s){if(!K(o))continue;const c={},_={iterations:p,direction:m,fill:"both",easing:g,duration:d,delay:u,composite:f},T=s[o],S=!!a&&(b.includes(o)?o:v.get(o)),w=S?"transform":o;let x;if(l[w]||(l[w]=h[w]),X(T)){const s=T,a=Lt(s.ease,n),l=a.ease&&a,p=s.to,m=s.from;if(_.duration=(l?l.settlingDuration:At(Lt(s.duration,d),t,e,r))*y,_.delay=At(Lt(s.delay,u),t,e,r)*y,_.composite=Lt(s.composition,f),_.easing=er(a),x=ar(t,o,m,p,e,r),S?(c[`--${S}`]=x,i[S]=x):c[o]=ar(t,o,m,p,e,r),Ge(this,t,o,c,_),!H(m))if(S){const t=`--${S}`;h.setProperty(t,c[t][0])}else h[o]=c[o][0]}else x=U(T)?T.map(s=>or(o,s,t,e,r)):or(o,T,t,e,r),S?(c[`--${S}`]=x,i[S]=x):c[o]=x,Ge(this,t,o,c,_)}if(a){let t=_;for(let e in i)t+=`${T[e]}var(--${e})) `;h.transform=t}}),h&&this.autoplay.link(this)}forEach(t){const e=V(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=F.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===F.timeScale?1:f);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel")}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let t in i){const e=i[t];H(e)||e===_?s.removeProperty(P(t)):s[t]=e}t.getAttribute("style")===_&&t.removeAttribute("style")}),this}then(t=S){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=S};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const lr={animate:(t,e)=>new hr(t,e),convertEase:Ki};export{ve as $,ns as Animatable,Cs as Draggable,We as JSAnimation,Bs as Scope,Us as ScrollObserver,_s as Spring,Gi as TextSplitter,is as Timeline,fe as Timer,hr as WAAPIAnimation,He as animate,li as clamp,jt as cleanInlineStyles,os as createAnimatable,Es as createDraggable,Ei as createDrawable,wi as createMotionPath,Os as createScope,fi as createSeededRandom,vs as createSpring,rs as createTimeline,ge as createTimer,Ws as cubicBezier,ui as damp,oi as degToRad,Be as eases,Gs as easings,ee as engine,Qe as get,js as irregular,$s as keepTime,di as lerp,qs as linear,ni as mapRange,ki as morphTo,Xs as onScroll,ii as padEnd,si as padStart,ai as radToDeg,pi as random,gi as randomPick,Ze as remove,ci as round,ei as roundPad,Ds as scrollContainers,Je as set,_i as shuffle,hi as snap,Ji as split,Qi as splitText,ys as spring,yi as stagger,Hs as steps,$i as svg,ks as sync,Zi as text,vi as utils,lr as waapi,ri as wrap};
|
|
7
|
+
const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),h=Symbol(),l=Symbol(),c=Symbol(),d=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=120,_="",y="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),S=()=>{},w=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,x=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,C=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,E=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,k=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,B=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,O=/([a-z])([A-Z])/g,N=/(\w+)(\([^)]+\)+)/g,R=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,L={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:S,onBeforeUpdate:S,onUpdate:S,onLoop:S,onPause:S,onComplete:S,onRender:S},A={current:null,root:s},F={defaults:L,precision:4,timeScale:1,tickThreshold:200},M={version:"4.2.2",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(M));const P=t=>t.replace(O,"$1-$2").toLowerCase(),I=(t,e)=>0===t.indexOf(e),z=Date.now,U=Array.isArray,X=t=>t&&t.constructor===Object,Y=t=>"number"==typeof t&&!isNaN(t),V=t=>"string"==typeof t,W=t=>"function"==typeof t,H=t=>void 0===t,q=t=>H(t)||null===t,j=e=>t&&e instanceof SVGElement,G=t=>w.test(t),Q=t=>I(t,"rgb"),J=t=>I(t,"hsl"),Z=t=>G(t)||Q(t)||J(t),K=t=>!F.defaults.hasOwnProperty(t),tt=["opacity","rotate","overflow","color"],et=(t,e)=>{if(tt.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}},st=t=>V(t)?parseFloat(t):t,it=Math.pow,rt=Math.sqrt,nt=Math.sin,ot=Math.cos,at=Math.abs,ht=Math.exp,lt=Math.ceil,ct=Math.floor,dt=Math.asin,ut=Math.max,pt=Math.atan2,mt=Math.PI,ft=Math.round,gt=(t,e,s)=>t<e?e:t>s?s:t,_t={},yt=(t,e)=>{if(e<0)return t;if(!e)return ft(t);let s=_t[e];return s||(s=_t[e]=10**e),ft(t*s)/s},vt=(t,e)=>U(e)?e.reduce((e,s)=>at(s-t)<at(e-t)?s:e):e?ft(t/e)*e:t,bt=(t,e,s)=>t+(e-t)*s,Tt=t=>t===1/0?m:t===-1/0?-m:t,St=t=>t<=p?p:Tt(yt(t,11)),wt=t=>U(t)?[...t]:t,xt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=H(r)?e[i]:r}return s},Ct=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},Et=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},kt=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},$t=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[c];let o;for(;o=N.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!H(r)?r:I(e,"scale")?"1":I(e,"rotate")||I(e,"skew")?"0deg":"0px"},Bt=t=>{const e=x.exec(t)||C.exec(t),s=H(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},Ot=t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]},Nt=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),Rt=t=>{const e=E.exec(t)||k.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=H(e[4])?1:+e[4];let o,a,h;if(0===i)o=a=h=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=yt(255*Nt(e,t,s+1/3),0),a=yt(255*Nt(e,t,s),0),h=yt(255*Nt(e,t,s-1/3),0)}return[o,a,h,n]},Dt=t=>Q(t)?Bt(t):G(t)?Ot(t):J(t)?Rt(t):[0,0,0,1],Lt=(t,e)=>H(t)?e:t,At=(t,e,s,i,r)=>{let n;if(W(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!V(t)||!I(t,y))return t;n=()=>{const s=t.match(D),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==_||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Ft=(t,e)=>t[h]?t[l]&&et(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:I(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Mt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Pt=(t,e,s,r)=>{const n=H(s)?Ft(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?$t(t,e,r):n===i.CSS_VAR?Mt(t,e,r).trimStart():Mt(t,e,r)},It=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,zt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ut=(t,e)=>{if(e.t=r.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const i=!s.includes(" ")&&B.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(Z(s))return e.t=r.COLOR,e.d=Dt(s),e;{const t=s.match($);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split($)||[],e}}return e.n=s,e},Xt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=wt(t._toNumbers),e.s=wt(t._strings),e),Yt=zt(),Vt=(t,e,s,a,h)=>{const l=t.parent,d=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,y=t._loopDelay,v=t._reversed,b=t._alternate,S=t._hasChildren,w=t._delay,x=t._currentTime,C=w+m,E=e-w,k=gt(x,-w,d),$=gt(E,-w,d),B=E-x,O=$>0,N=$>=d,R=d<=p,D=h===n.FORCE;let L=0,A=E,M=0;if(f>1){const e=~~($/(m+(N?0:y)));t._currentIteration=gt(e,0,f),N&&t._currentIteration--,L=t._currentIteration%2,A=$%(m+y)||0}const P=v^(b&&L),I=t._ease;let z=N?P?0:d:P?m-A:A;I&&(z=m*I(z/m)||0);const U=(l?l.backwards:E<x)?!P:!!P;if(t._currentTime=E,t._iterationTime=z,t.backwards=U,O&&!t.began?(t.began=!0,s||l&&(U||!l.began)||t.onBegin(t)):E<=0&&(t.began=!1),s||S||!O||t._currentIteration===g||t.onLoop(t),D||h===n.AUTO&&(e>=w&&e<=C||e<=w&&k>w||e>=C&&k!==d)||z>=C&&k!==d||z<=w&&k>0||e<=k&&k===d&&u||N&&!u&&R){if(O&&(t.computeDeltaTime(k),s||t.onBeforeUpdate(t)),!S){const e=D||(U?-1*B:B)>=F.tickThreshold,n=t._offset+(l?l._offset:0)+w+z;let h,d,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,l=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,y=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==l||n<=g+(y?y._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!y||y._isOverridden||n<=y._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=gt(z-m._startTime,0,l),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,_=m._tweenType,y=_===i.OBJECT,v=g===r.NUMBER,T=v&&y||0===s||1===s?-1:F.precision;let S,w;if(v)S=w=n(yt(bt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)w=n(yt(bt(m._fromNumber,m._toNumber,s),T)),S=`${w}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=yt(gt(n(bt(t[0],e[0],s)),0,255),0),r=yt(gt(n(bt(t[1],e[1],s)),0,255),0),o=yt(gt(n(bt(t[2],e[2],s)),0,255),0),a=gt(n(yt(bt(t[3],e[3],s),T)),0,1);if(S=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){S=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(yt(bt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];S+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=w),a||t===o.blend)m._value=S;else{const t=m.property;h=m.target,y?h[t]=S:_===i.ATTRIBUTE?h.setAttribute(t,S):(d=h.style,_===i.TRANSFORM?(h!==u&&(u=h,p=h[c]),p[t]=S,f=1):_===i.CSS?d[t]=S:_===i.CSS_VAR&&d.setProperty(t,S)),O&&(M=1)}}if(f&&m._renderTransforms){let t=_;for(let e in p)t+=`${T[e]}${p[e]}) `;d.transform=t,f=0}m=m._next}!s&&M&&t.onRender(t)}!s&&O&&t.onUpdate(t)}return l&&R?!s&&(l.began&&!U&&E>0&&!u||U&&E<=p&&u)&&(t.onComplete(t),t.completed=!U):O&&N?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||S||(t.completed=!0,s||l&&(U||!l.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,M},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Vt(t,e,s,i,r),t._hasChildren){const a=t,h=a.backwards,l=i?e:a._iterationTime,c=z();let d=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;Ct(a,e=>{if(h){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Vt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}Ct(a,t=>{const e=yt((l-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(c):r;d+=Vt(t,e,s,i,n),!t.completed&&u&&(u=!1)},h),!s&&d&&a.onRender(a),(u||h)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},Ht={},qt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&j(e)&&t in e.style){const e=Ht[t];if(e)return e;{const e=t?P(t):t;return Ht[t]=e,e}}return t},jt=t=>{if(t._hasChildren)Ct(t,jt,!0);else{const e=t;e.pause(),Ct(e,t=>{const s=t.property,r=t.target;if(r[h]){const n=r.style,o=t._inlineValue,a=q(o)||o===_;if(t._tweenType===i.TRANSFORM){const e=r[c];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=_;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(P(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===_&&t.removeAttribute("style")})}})}return t};class Gt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=yt(f/g,0),this._fps=g,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<p?p:s,r=yt(f/i,0);this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return n.NONE;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Qt={animation:null,update:S},Jt=t=>{let e=Qt.animation;return e||(e={duration:p,computeDeltaTime:S,_offset:0,_delay:0,_head:null,_tail:null},Qt.animation=e,Qt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?wt(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Vt(e,1,1,0,n.FORCE)}),e},Zt=(()=>t?requestAnimationFrame:setImmediate)(),Kt=(()=>t?cancelAnimationFrame:clearImmediate)();class te extends Gt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=L,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=z();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(Et(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Wt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Qt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Zt(se)),this}pause(){if(this.reqId)return this.paused=!0,ie()}resume(){if(this.paused)return this.paused=!1,Ct(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===F.timeScale?1:f)}set speed(t){this._speed=t*F.timeScale,Ct(this,t=>t.speed=t._speed)}get timeUnit(){return 1===F.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(F.timeScale!==s){F.timeScale=s,F.tickThreshold=200*s;const t=e?.001:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return F.precision}set precision(t){F.precision=t}}const ee=(()=>{const e=new te(z());return t&&(M.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),se=()=>{ee._head?(ee.reqId=Zt(se),ee.update()):ee.reqId=0},ie=()=>(Kt(ee.reqId),ee.reqId=0,ee),re={_rep:new WeakMap,_add:new Map},ne=(t,e,s="_rep")=>{const i=re[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},oe=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,ae=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},he=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;kt(e,t,oe,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){ae(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)ae(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=yt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&ae(i)}let o=!0;if(Ct(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Ct(t,t=>{t!==e&&Ct(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=ne(t.target,t.property,"_add"),s=Jt(re._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=wt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,kt(e,i),kt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=wt(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=wt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}kt(e,t,null,"_prevAdd","_nextAdd")}return t},le=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=re._rep.get(s)[i];if(Et(r,t,"_prevRep","_nextRep"),e===o.blend){const e=re._add,r=e.get(s);if(!r)return;const n=r[i],o=Qt.animation;Et(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Et(n,a,"_prevAdd","_nextAdd"),Et(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ce=(t,e,s)=>{let r=!1;return Ct(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,h=qt(s,o,a);(!h||h&&h===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Et(e,n),le(n),r=!0)}},!0),r},de=(t,e,s)=>{const i=e||ee;let r;if(i._hasChildren){let e=0;Ct(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Et(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?de(t,n,s):n._hasChildren=!1},!0),H(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},ue=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),pe=t=>t._cancelled?(t._hasChildren?Ct(t,pe):Ct(t,t=>{t._composition!==o.none&&he(t,ne(t.target,t.property))}),t._cancelled=0,t):t;let me=0;class fe extends Gt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:c,frameRate:d,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:_,onBeforeUpdate:y,onUpdate:v}=t;A.current&&A.current.register(this);const b=e?0:ee._elapsedTime,T=e?e.defaults:F.defaults,w=W(r)||H(r)?T.delay:+r,x=W(n)||H(n)?1/0:+n,C=Lt(h,T.loop),E=Lt(l,T.loopDelay),k=!0===C||C===1/0||C<0?1/0:C+1;let $=0;e?$=s:(ee.reqId||ee.requestTick(z()),$=(ee._elapsedTime-ee._startTime)*F.timeScale),this.id=H(i)?++me:i,this.parent=e,this.duration=Tt((x+E)*k-E)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||T.onBegin,this.onBeforeUpdate=y||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=x,this.iterationCount=k,this._autoplay=!e&&Lt(c,T.autoplay),this._offset=$,this._delay=w,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=S,this._running=!1,this._reversed=+Lt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Lt(a,T.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Lt(d,T.frameRate),this._speed=Lt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return gt(yt(this._currentTime,F.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return yt(this._iterationTime,F.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return gt(yt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return gt(yt(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*gt(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return pe(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),ue(this),this._hasChildren&&Ct(this,ue),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Wt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!H(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*ee._speed);return this._startTime=z()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=p&&!this._hasChildren?Wt(this,p,0,0,n.FORCE):(this._running||(kt(ee,this),ee._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,ee.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){pe(this),this.completed=!1;const i=this.paused;return this.paused=!0,Wt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ct(m/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Ct(this,t=>t.cancel(),!0):Ct(this,le),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=St(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:St(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Wt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=S){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=S};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ge=t=>new fe(t,null,0).init();function _e(t){const e=V(t)?A.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ye(e){if(q(e))return[];if(!t)return U(e)&&e.flat(1/0)||[e];if(U(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!q(i)){const t=_e(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!q(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=_e(e);return s?Array.from(s):[e]}function ve(t){const e=ye(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=j(s);(s.nodeType||t)&&(s[h]=!0,s[l]=t,s[c]={})}}return e}const be={deg:1,rad:180/mt,turn:360},Te={},Se=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const h=a+o+i,l=Te[h];if(H(l)||n){let r;if(o in be)r=a*be[o]/be[i];else{const e=100,n=t.cloneNode(),h=t.parentNode,l=h&&h!==s?h:s.body;l.appendChild(n);const c=n.style;c.width=e+o;const d=n.offsetWidth||e;c.width=e+i;const u=d/(n.offsetWidth||e);l.removeChild(n),r=u*a}e.n=r,Te[h]=r}else e.n=l;return e.t,e.u=i,e},we=t=>t,xe=(t=1.68)=>e=>it(e,+t),Ce={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},Ee=mt/2,ke=2*mt,$e={[_]:xe,Quad:xe(2),Cubic:xe(3),Quart:xe(4),Quint:xe(5),Sine:t=>1-ot(t*Ee),Circ:t=>1-rt(1-t*t),Expo:t=>t?it(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=it(2,--s))-1)/11;);return 1/it(4,3-s)-7.5625*it((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=gt(+t,1,10),i=gt(+e,p,2),r=i/ke*dt(1/s),n=ke/i;return t=>0===t||1===t?t:-s*it(2,-10*(1-t))*nt((1-t-r)*n)}},Be=(()=>{const t={linear:we,none:we};for(let e in Ce)for(let s in $e){const i=$e[s],r=Ce[e];t[e+s]=s===_||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),Oe={linear:we,none:we},Ne=t=>{if(Oe[t])return Oe[t];if(t.indexOf("(")<=-1){const e=Ce[t]||t.includes("Back")||t.includes("Elastic")?Be[t]():Be[t];return e?Oe[t]=e:we}{const e=t.slice(0,-1).split("("),s=Be[e[0]];return s?Oe[t]=s(...e[1].split(",")):we}},Re=["steps(","irregular(","linear(","cubicBezier("],De=t=>{if(V(t))for(let e=0,s=Re.length;e<s;e++)if(I(t,Re[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),we;return W(t)?t:V(t)?Ne(t):we},Le=zt(),Ae=zt(),Fe={},Me={func:null},Pe=[null],Ie=[null,null],ze={to:null};let Ue,Xe,Ye=0;const Ve=(t,e)=>{const s={};if(U(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(K);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map(t=>{const e={};for(let s in t){const i=t[s];K(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Lt(e.duration,F.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(K(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let c=0;for(let t=0;t<a;t++)c+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?c:0),n.push(l)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s};class We extends fe{constructor(t,e,s,n,a=!1,h=0,l=0){super(e,s,n);const c=ve(t),d=c.length,u=e.keyframes,m=u?xt(Ve(u,e),e):e,{delay:g,duration:_,ease:y,playbackEase:v,modifier:b,composition:T,onRender:S}=m,w=s?s.defaults:F.defaults,x=Lt(v,w.playbackEase),C=x?De(x):null,E=!H(y)&&!H(y.ease),k=E?y.ease:Lt(y,C?"linear":w.ease),$=E?y.settlingDuration:Lt(_,w.duration),B=Lt(g,w.delay),O=b||w.modifier,N=H(T)&&d>=f?o.none:H(T)?w.composition:T,R=this._offset+(s?s._offset:0);E&&(y.parent=this);let D=NaN,L=NaN,A=0,M=0;for(let t=0;t<d;t++){const e=c[t],n=h||t,u=l||d;let f=NaN,g=NaN;for(let t in m)if(K(t)){const h=Ft(e,t),l=qt(t,e,h);let c=m[t];const d=U(c);if(a&&!d&&(Ie[0]=c,Ie[1]=c,c=Ie),d){const t=c.length,e=!X(c[0]);2===t&&e?(ze.to=c,Pe[0]=ze,Ue=Pe):t>2&&e?(Ue=[],c.forEach((t,e)=>{e?1===e?(Ie[1]=t,Ue.push(Ie)):Ue.push(t):Ie[0]=t})):Ue=c}else Pe[0]=c,Ue=Pe;let _=null,y=null,v=NaN,b=0,T=0;for(let t=Ue.length;T<t;T++){const i=Ue[T];X(i)?Xe=i:(ze.to=i,Xe=ze),Me.func=null;const a=At(Xe.to,e,n,u,Me);let c;X(a)&&!H(a.to)?(Xe=a,c=a.to):c=a;const d=At(Xe.from,e,n,u),m=Xe.ease,f=!H(m)&&!H(m.ease),g=f?m.ease:m||k,S=f?m.settlingDuration:At(Lt(Xe.duration,t>1?At($,e,n,u)/t:$),e,n,u),w=At(Lt(Xe.delay,T?0:B),e,n,u),x=At(Lt(Xe.composition,N),e,n,u),C=Y(x)?x:o[x],E=Xe.modifier||O,D=!H(d),L=!H(c),F=U(c),P=F||D&&L,I=y?b+w:w,z=yt(R+I,12);M||!D&&!F||(M=1);let V=y;if(C!==o.none){_||(_=ne(e,l));let t=_._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=z;)if(V=t,t=t._nextRep,t&&t._absoluteStartTime>=z)for(;t;)ae(t),t=t._nextRep}if(P?(Ut(F?At(c[0],e,n,u):d,Le),Ut(F?At(c[1],e,n,u,Me):c,Ae),Le.t===r.NUMBER&&(V?V._valueType===r.UNIT&&(Le.t=r.UNIT,Le.u=V._unit):(Ut(Pt(e,l,h,Fe),Yt),Yt.t===r.UNIT&&(Le.t=r.UNIT,Le.u=Yt.u)))):(L?Ut(c,Ae):y?Xt(y,Ae):Ut(s&&V&&V.parent.parent===s?V._value:Pt(e,l,h,Fe),Ae),D?Ut(d,Le):y?Xt(y,Le):Ut(s&&V&&V.parent.parent===s?V._value:Pt(e,l,h,Fe),Le)),Le.o&&(Le.n=It(V?V._toNumber:Ut(Pt(e,l,h,Fe),Yt).n,Le.n,Le.o)),Ae.o&&(Ae.n=It(Le.n,Ae.n,Ae.o)),Le.t!==Ae.t)if(Le.t===r.COMPLEX||Ae.t===r.COMPLEX){const t=Le.t===r.COMPLEX?Le:Ae,e=Le.t===r.COMPLEX?Ae:Le;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Le.t===r.UNIT||Ae.t===r.UNIT){const t=Le.t===r.UNIT?Le:Ae,e=Le.t===r.UNIT?Ae:Le;e.t=r.UNIT,e.u=t.u}else if(Le.t===r.COLOR||Ae.t===r.COLOR){const t=Le.t===r.COLOR?Le:Ae,e=Le.t===r.COLOR?Ae:Le;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Le.u!==Ae.u){let t=Ae.u?Le:Ae;t=Se(e,t,Ae.u?Ae.u:Le.u,!1)}if(Ae.d&&Le.d&&Ae.d.length!==Le.d.length){const t=Le.d.length>Ae.d.length?Le:Ae,e=t===Le?Ae:Le;e.d=t.d.map((t,s)=>H(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const W=yt(+S||p,12);let j=Fe[l];q(j)||(Fe[l]=null);const G={parent:this,id:Ye++,property:l,target:e,_value:null,_func:Me.func,_ease:De(g),_fromNumbers:wt(Le.d),_toNumbers:wt(Ae.d),_strings:wt(Ae.s),_fromNumber:Le.n,_toNumber:Ae.n,_numbers:wt(Le.d),_number:Le.n,_unit:Ae.u,_modifier:E,_currentTime:0,_startTime:I,_delay:+w,_updateDuration:W,_changeDuration:W,_absoluteStartTime:z,_tweenType:h,_valueType:Ae.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:j,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&he(G,_),isNaN(v)&&(v=G._startTime),b=yt(I+W,12),y=G,A++,kt(this,G)}(isNaN(L)||v<L)&&(L=v),(isNaN(D)||b>D)&&(D=b),h===i.TRANSFORM&&(f=A-T,g=A)}if(!isNaN(f)){let t=0;Ct(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&Ct(Qt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}d||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),L?(Ct(this,t=>{t._startTime-t._delay||(t._delay-=L),t._startTime-=L}),D-=L):L=0,D||(D=p,this.iterationCount=0),this.targets=c,this.duration=D===p?p:Tt((D+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=L,this.iterationDuration=D,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e;return Ct(this,t=>{t._updateDuration=St(t._updateDuration*s),t._changeDuration=St(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Ct(this,t=>{const e=t._func;if(e){const s=Pt(t.target,t.property,t._tweenType);Ut(s,Yt),Ut(e(),Ae),t._fromNumbers=wt(Yt.d),t._fromNumber=Yt.n,t._toNumbers=wt(Ae.d),t._strings=wt(Ae.s),t._toNumber=Ae.o?It(Yt.n,Ae.n,Ae.o):Ae.n}}),this.duration===p&&this.restart(),this}revert(){return super.revert(),jt(this)}then(t){return super.then(t)}}const He=(t,e)=>new We(t,e,null,0,!1).init(),qe={_head:null,_tail:null},je=(t,e,s)=>{let i,r=qe._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Et(qe,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ge=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),je(e,s),kt(qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{je(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Qe(t,e,s){const i=ve(t);if(!i.length)return;const[n]=i,o=Ft(n,e),a=qt(e,n,o);let h=Pt(n,a);if(H(s))return h;if(Ut(h,Yt),Yt.t===r.NUMBER||Yt.t===r.UNIT){if(!1===s)return Yt.n;{const t=Se(n,Yt,s,!1);return`${yt(t.n,F.precision)}${t.u}`}}}const Je=(t,e)=>{if(!H(e))return e.duration=p,e.composition=Lt(e.composition,o.none),new We(t,e,null,0,!0).resume()},Ze=(t,e,s)=>{const i=ye(t);for(let t=0,r=i.length;t<r;t++)je(i[t],s,e&&e.controlAnimation&&e);return de(i,e,s),i},Ke=(t,e)=>{if(I(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},ts=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),H(e))return s;if(Y(+e))return+e;const i=e,r=t?t.labels:null,n=!q(r),o=Ke(t,i),a=!H(o),h=R.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,c=a?o:n?l:s,d=+e[1];return It(c,d,t[0])}return a?o:n?H(r[i])?s:r[i]:s};function es(t){return Tt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function ss(t,e,s,i,r,o){const a=Y(t.duration)&&t.duration<=p?s-p:s;Wt(e,a,1,1,n.AUTO);const h=i?new We(i,t,e,a,!1,r,o):new fe(t,e,a);return h.init(!0),kt(e,h),Ct(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=es(e),e}class is extends fe{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=F.defaults;this.defaults=e?xt(e,s):s,this.onRender=t.onRender||s.onRender;const i=Lt(t.playbackEase,s.playbackEase);this._ease=i?De(i):null,this.iterationDuration=0}add(t,e,s){const i=X(e),r=X(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=ye(t),n=this.duration,o=this.iterationDuration,a=i.id;let h=0;const l=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,H(a)||(s.id=a+"-"+h),ss(s,this,ts(this,e(t,h,l,this)),t,h,l),h++})}else ss(i,this,ts(this,s),t)}else ss(t,this,ts(this,e));return this.init(!0)}}sync(t,e){if(H(t)||t&&H(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,ease:"linear"},e)}set(t,e,s){return H(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return H(t)||t&&!W(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return H(t)||t&&!V(t)||(this.labels[t]=ts(this,e)),this}remove(t,e){return de(ye(t),this,e),this}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e,i=this.labels;Ct(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Ct(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Ct(this,t=>t.revert,!0),jt(this)}then(t){return super.then(t)}}const rs=t=>new is(t).init();class ns{constructor(t,e){A.current&&A.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!H(t)&&!H(e)){for(let t in e){const s=e[t];K(t)?n[t]=s:I(t,"on")?r[t]=s:i[t]=s}this.callbacks=new We({v:0},r);for(let e in n){const s=n[e],r=X(s);let a={},h="+=0";if(r){const t=s.unit;V(t)&&(h+=t)}else a.duration=s;a[e]=r?xt({to:h},s):h;const l=xt(i,a);l.composition=o.replace,l.autoplay=!1;const c=this.animations[e]=new We(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(H(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Ct(c,e=>{if(U(t))for(let s=0,i=t.length;s<i;s++)H(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;H(s)||(e._ease=De(s)),e._currentTime=0}),H(e)||c.stretch(e),c.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=S,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const os=(t,e)=>new ns(t,e),as=(t,e)=>(+t).toFixed(e),hs=(t,e,s)=>`${t}`.padStart(e,s),ls=(t,e,s)=>`${t}`.padEnd(e,s),cs=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,ds=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),us=t=>t*Math.PI/180,ps=t=>180*t/Math.PI,ms=(t,e,s,i)=>i?1===i?e:bt(t,e,1-Math.exp(-i*s*.1)):t;var fs=Object.freeze({__proto__:null,clamp:gt,damp:ms,degToRad:us,lerp:bt,mapRange:ds,padEnd:ls,padStart:hs,radToDeg:ps,round:yt,roundPad:as,snap:vt,wrap:cs});const gs=10*f;class _s{constructor(t={}){const e=!H(t.bounce)||!H(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=gt(Lt(t.bounce,.5),-1,1),this.pd=gt(Lt(t.duration,628),10*F.timeScale,gs*F.timeScale),this.m=gt(Lt(t.mass,1),1,gs),this.s=gt(Lt(t.stiffness,100),p,gs),this.d=gt(Lt(t.damping,10),p,gs),this.v=gt(Lt(t.velocity,0),-1e4,gs),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||S,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?ht(-n*e*s)*(1*ot(i*n)+r*nt(i*n)):1===e?(1+r*n)*ht(-n*s):((1+r)*ht((-e*s+i)*n)+(1-r)*ht((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===F.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=it(2*mt/t,2),this.bn>=0?this.d=4*(1-this.bn)*mt/t:this.d=4*mt/(t*(1+this.bn)),this.s=yt(gt(this.s,p,gs),3),this.d=yt(gt(this.d,p,300),3)}calculateBDFromSD(){const t=2*mt/rt(this.s);this.pd=t*(1===F.timeScale?f:1);const e=this.d/(2*rt(this.s));this.bn=e<=1?1-this.d*t/(4*mt):4*mt/(this.d*t)-1,this.bn=yt(gt(this.bn,-1,1),3),this.pd=yt(gt(this.pd,10*F.timeScale,gs*F.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=gt(rt(o/r),p,f),l=this.zeta=n/(2*rt(o*r));l<1?(this.wd=h*rt(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*rt(l*l-1),this.b=(l*h-a)/this.wd);let c=0,d=0,u=0;for(;d<=t&&u<=e;)at(1-this.solve(c))<s?d++:d=0,this.solverDuration=c,c+=i,u++;this.settlingDuration=yt(this.solverDuration*f,0)*F.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=gt(Lt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=gt(Lt(t,1),10*F.timeScale,gs*F.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=gt(Lt(t,100),p,gs),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=gt(Lt(t,10),p,gs),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=gt(Lt(t,1),1,gs),this.compute()}get velocity(){return this.v}set velocity(t){this.v=gt(Lt(t,0),-1e4,gs),this.compute()}}const ys=t=>new _s(t),vs=t=>(console.warn("createSpring() is deprecated use spring() instead"),new _s(t)),bs=t=>{t.cancelable&&t.preventDefault()};class Ts{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:S,remove:S}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class Ss{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const ws=(t,e)=>t&&W(t)?t(e):t;let xs=0;class Cs{constructor(t,i={}){if(!t)return;A.current&&A.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,h=i.releaseEase,l=h&&De(h),c=!H(h)&&!H(h.ease),d=X(r)&&!H(r.mapTo)?r.mapTo:"translateX",u=X(n)&&!H(n.mapTo)?n.mapTo:"translateY",p=ws(i.container,this);this.containerArray=U(p)?p:null,this.$container=p&&!this.containerArray?ye(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=X(t)?new Ts(t):ye(t)[0],this.$trigger=ye(o||t)[0],this.fixed="fixed"===Qe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:ys({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseYSpring=c?h:ys({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseEase=l||Be.outQuint,this.hasReleaseSpring=c,this.onGrab=i.onGrab||S,this.onDrag=i.onDrag||S,this.onRelease=i.onRelease||S,this.onUpdate=i.onUpdate||S,this.onSettle=i.onSettle||S,this.onSnap=i.onSnap||S,this.onResize=i.onResize||S,this.onAfterResize=i.onAfterResize||S,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),H(r)||!0===r)f[d]=0;else if(X(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[d]=e}else!1===r&&(f[d]=0,this.disabled[0]=1);if(H(n)||!0===n)f[u]=0;else if(X(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new ns(this.$target,f),this.xProp=d,this.yProp=u,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-m,m,m,-m],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=z(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Ss(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new fe({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new fe({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!H(p),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?d:u,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=pt(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new fe({autoplay:!1,duration:150*F.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),X(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=z(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,h=this.maxVelocity,l=this.velocityStackIndex;n[l]=yt(gt(rt(t*t+e*e)/r*o,a,h),5);const c=ut(n[0],n[1],n[2]);return this.velocity=c,this.velocityStackIndex=(l+1)%3,c}setX(t,e=!1){if(this.disabled[0])return;const s=yt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=vt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=yt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=vt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return yt(this.animate[this.xProp](),F.precision)}set x(t){this.setX(t,!1)}get y(){return yt(this.animate[this.yProp](),F.precision)}set y(t){this.setY(t,!1)}get progressX(){return ds(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ds(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ds(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ds(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=yt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=yt(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=s-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=e.innerWidth,h=this.window[1]=e.innerHeight,l=this.useWin,c=t.scrollWidth,d=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,_]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?gt(c,a,c):c,this.scrollView[1]=l?gt(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:T,right:S,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=yt(l?gt(y,a,a):y,0),this.dragArea[3]=yt(l?gt(v,h,h):v,0);const x=Qe(t,"overflow"),C="visible"===x,E="hidden"===x;if(this.canScroll=!u&&this.contained&&(t===s.body&&C||!E&&!C)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!U(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,c=i?this.scrollView[0]-n-y:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=yt(r.top+s-(l?0:T),0),this.targetBounds[1]=yt(r.right+e-(l?a:S),0),this.targetBounds[2]=yt(r.bottom+s-(l?h:w),0),this.targetBounds[3]=yt(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+_):(this.containerBounds[0]=-yt(r.top-(u?gt(T,0,h):T)+o-m,0),this.containerBounds[1]=-yt(r.right-(u?gt(S,0,a):S)-c+f,0),this.containerBounds[2]=-yt(r.bottom-(u?gt(w,0,h):w)-d+g,0),this.containerBounds[3]=-yt(r.left-(u?gt(b,0,a):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,h]=this.disabled,l=!a&&e<o||!a&&e>r,c=!h&&s<i||!h&&s>n;return l&&!c?1:!l&&c?2:l&&c?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=ws(t.container,this),o=ws(t.containerPadding,this)||0,a=U(o)?o:[o,o,o,o],h=this.x,l=this.y,c=ws(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}const u=ws(t.dragThreshold,this),p={mouse:3,touch:7};if(Y(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;H(t)||(p.mouse=t),H(e)||(p.touch=e)}this.containerArray=U(n)?n:null,this.$container=n&&!this.containerArray?ye(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Lt(a,[0,0,0,0]),this.containerFriction=gt(Lt(ws(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=gt(Lt(ws(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ws(X(i)&&!H(i.snap)?i.snap:t.snap,this),this.snapY=ws(X(r)&&!H(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Lt(ws(t.scrollSpeed,this),1.5),this.scrollThreshold=Lt(ws(t.scrollThreshold,this),20),this.dragSpeed=Lt(ws(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Lt(ws(t.minVelocity,this),0),this.maxVelocity=Lt(ws(t.maxVelocity,this),50),this.velocityMultiplier=Lt(ws(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[m,f,g,_]=this.containerBounds;this.setX(gt(h,_,f),!0),this.setY(gt(l,m,g),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?gt(c,this.window[0],c):c,p=this.useWin?gt(d,this.window[1],d):d,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,_=this.scrollThreshold,[y,v]=this.coords,[b,T,S,w]=this.scrollBounds,x=yt(gt((v-b+t)/_,-1,0)*g,0),C=yt(gt((y-T-e)/_,0,1)*g,0),E=yt(gt((v-S-s)/_,0,1)*g,0),k=yt(gt((y-w+i)/_,-1,0)*g,0);if(x||E||k||C){const[t,e]=this.disabled;let s=h,i=l;t||(s=yt(gt(h+(k||C),0,r-o),0),this.coords[0]-=h-s),e||(i=yt(gt(l+(x||E),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[c,d]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(c>e?e+(c-e)*m:c<i?i+(c-i)*m:c,!1),this.setY(d>s?s+(d-s)*m:d<t?t+(d-t)*m:d,!1),this.computeVelocity(r-h,n-l),this.angle=pt(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return de([this],null,"x"),de([this],null,"y"),de([this],null,"progressX"),de([this],null,"progressY"),de([this.scroll]),de([this.overshootCoords]),this}scrollInView(t,e=0,s=Be.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,c,d]=o,u=yt(gt(r-h,-m,0),0),p=yt(gt(i-l,0,m),0),f=yt(gt(r-c,0,m),0),g=yt(gt(i-d,-m,0),0);new We(n,{x:yt(n.x+(g?g-e:p?p+e:0),0),y:yt(n.y+(u?u-e:f?f+e:0),0),duration:H(t)?350*F.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Je(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Be.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,c=this.scroll.x-this.targetBounds[1]-o-e,d=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,c,d,u],i,r);if(p){const[e,n]=this.disabled,o=gt(vt(i,this.snapX),u,c),a=gt(vt(r,this.snapY),l,d),h=H(t)?350*F.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,h,s),n||2!==p&&3!==p||this.animate[this.yProp](a,h,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[h,l,c,d]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<d?d+(p-d)/u:p:p,this.coords[1]=this.coords[3]=u?m>c?c+(m-c)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Qe(this.$target,"zIndex",!1);xs=(f>xs?f:xs)+1,this.targetStyles=Je(this.$target,{zIndex:xs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Je(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Be.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let h=t.target,l=!1,c=!1,d=!1;for(;e&&h&&h!==this.$trigger;){const t=Qe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentElement}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(bs(t),this.triggerStyles||(this.triggerStyles=Je(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",bs,{passive:!1}),this.$trigger.addEventListener("touchmove",bs,{passive:!1}),this.$trigger.addEventListener("touchend",bs),(this.dragged||!this.disabled[0]&&at(o)>this.dragThreshold||!this.disabled[1]&&at(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[i,r,n,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,_=this.releaseYSpring,y=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,S=this.y,w=this.computeVelocity(i-h,r-l),x=this.angle=pt(r-a,i-n),C=150*w,E=(1-this.releaseContainerFriction)*this.dragSpeed,k=T+ot(x)*C,$=S+nt(x)*C,B=k>d?d+(k-d)*E:k<p?p+(k-p)*E:k,O=$>u?u+($-u)*E:$<c?c+($-c)*E:$,N=this.destX=gt(yt(vt(B,this.snapX),5),p,d),R=this.destY=gt(yt(vt(O,this.snapY),5),c,u),D=this.isOutOfBounds(this.containerBounds,k,$);let L=0,A=0,M=y,P=y,I=0;if(b.x=T,b.y=S,!t){const t=N===d?T>d?-1:1:T<p?-1:1,s=yt(T-N,0);g.velocity=e&&v?s?C*t/at(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;L=T===N?0:v?r:r-n*F.timeScale,v&&(M=i),L>I&&(I=L)}if(!e){const e=R===u?S>u?-1:1:S<c?-1:1,s=yt(S-R,0);_.velocity=t&&v?s?C*e/at(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=_;A=S===R?0:v?r:r-n*F.timeScale,v&&(P=i),A>I&&(I=A)}if(!v&&D&&E&&(L||A)){const t=o.blend;new We(b,{x:{to:B,duration:.65*L},y:{to:O,duration:.65*A},ease:y,composition:t}).init(),new We(b,{x:{to:N,duration:L},y:{to:R,duration:A},ease:y,composition:t}).init(),this.overshootTicker.stretch(ut(L,A)).restart()}else t||this.animate[this.xProp](N,L,M),e||this.animate[this.yProp](R,A,P);this.scrollInView(I,this.scrollThreshold,y);let z=!1;N!==m&&(this.snapped[0]=N,this.snapX&&(z=!0)),R!==f&&this.snapY&&(this.snapped[1]=R,this.snapY&&(z=!0)),z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",bs),this.$trigger.removeEventListener("touchmove",bs),this.$trigger.removeEventListener("touchend",bs),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=Je(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":bs(t)}}}const Es=(t,e)=>new Cs(t,e),ks=(t=S)=>new fe({duration:1*F.timeScale,onComplete:t},null,0).resume(),$s=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!W(a)&&a.revert&&(e=a),H(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||S}};class Bs{constructor(t={}){A.current&&A.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||ye(i)[0]||s);const n=t.defaults,o=F.defaults,a=t.mediaQueries;if(this.defaults=n?xt(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=A.current,s=A.root,i=F.defaults;A.current=this,A.root=this.root,F.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return A.current=e,A.root=s,F.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);W(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,W(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);W(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,W(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);W(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(W(s))return s(this);const i=$s(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const Os=t=>new Bs(t),Ns=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Rs=(t,e)=>t&&W(t)?t(e):t,Ds=new Map;class Ls{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new fe({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Ct(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new fe({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=yt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new fe({autoplay:!1,duration:250*F.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new fe({autoplay:!1,duration:500*F.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=yt(t?e.scrollX:s.scrollLeft,0),this.scrollY=yt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Ns()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){Ct(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Ct(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Ds.delete(this.element)}}const As=t=>{const e=t&&ye(t)[0]||s.body;let i=Ds.get(e);return i||(i=new Ls(e),Ds.set(e,i)),i},Fs=(t,e,s,i,r)=>{const n="min"===e,o="max"===e,a="top"===e||"left"===e||"start"===e||n?0:"bottom"===e||"right"===e||"end"===e||o?"100%":"center"===e?"50%":e,{n:h,u:l}=Ut(a,Yt);let c=h;return"%"===l?c=h/100*s:l&&(c=Se(t,Yt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Ms=(t,e,s,i,r)=>{let n;if(V(e)){const o=R.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=Fs(t,l[0],s,i,r),p=Fs(t,l[1],s,i,r);if(c){const e=It(Fs(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=It(Fs(t,"max",s),p,h);n=e>u?u:e}else n=It(u,p,h)}else n=Fs(t,e,s,i,r)}else n=e;return yt(n,0)},Ps=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[h]){e=i;break}}return e};let Is=0;const zs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Us{constructor(t={}){A.current&&A.current.register(this);const e=Lt(t.sync,"play pause"),i=e?De(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(Y(e)||!0===e||r),a=e&&V(e)&&!n&&!o,h=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,l=a&&h.length>2;this.index=Is++,this.id=H(t.id)?this.index:t.id,this.container=As(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!h,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:S,this.onSyncLeave=h&&!l&&h[1]?h[1]:S,this.onSyncEnterForward=h&&l&&h[0]?h[0]:S,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:S,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:S,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:S,this.onEnter=t.onEnter||S,this.onLeave=t.onLeave||S,this.onEnterForward=t.onEnterForward||S,this.onLeaveForward=t.onLeaveForward||S,this.onEnterBackward=t.onEnterBackward||S,this.onLeaveBackward=t.onLeaveBackward||S,this.onUpdate=t.onUpdate||S,this.onSyncComplete=t.onSyncComplete||S,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Lt(t.debug,!1),this._next=null,this._prev=null,kt(this.container,this),ks(()=>{if(!this.reverted){if(!this.target){const e=ye(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,H(t)||(t.persist=!0),!this._params.target)){let e;H(t.targets)?Ct(t,t=>{t.targets&&!e&&(e=Ps(t))}):e=Ps(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:yt(gt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Lt(Rs(t.repeat,this),!0),this.horizontal="x"===Lt(Rs(t.axis,this),"y"),this.enter=Lt(Rs(t.enter,this),"end start"),this.leave=Lt(Rs(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),a=zs[this.index%zs.length],h=t.useWin,l=h?t.winWidth:t.width,c=h?t.winHeight:t.height,d=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,_=e?g:15,y=e?60:g,v=e?y:_,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",S=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,w=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${w("absolute",m,f,e?d:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${w("sticky",0,0,e?l:g,e?g:c)}`,i||(n.style.cssText+=`background:\n ${S("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${S("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${w("relative",0,0,e?d:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${S("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${S("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const x=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,h=(r?0:this.offset)+t,m=i%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),S=s.createElement("div"),C=e?b?"right":"left":b?"bottom":"top",E=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;S.innerHTML=`${this.id}${x[m]}${this.thresholds[i]}`,T.style.cssText=`${w("absolute",0,0,y,_)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${C}: 2px solid ${a};\n `,S.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${_};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,T.appendChild(S);let k=h-E+(e?1:0);T.style[e?"left":"top"]=`${k}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Qe(t.element,"position")&&(this.debugStyles=Je(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==i.element&&a!==s.body;){const e="sticky"===Qe(a,"position")&&Je(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=i.scale,c=(r?h.left+i.scrollX-i.left:h.top+i.scrollY-i.top)*l,d=(r?h.width:h.height)*l,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",_="end",y="end",v="start";if(V(m)){const t=m.split(" ");y=t[0],g=t.length>1?t[1]:g}else if(X(m)){const t=m;H(t.container)||(y=t.container),H(t.target)||(g=t.target)}else Y(m)&&(y=m);if(V(f)){const t=f.split(" ");v=t[0],_=t.length>1?t[1]:_}else if(X(f)){const t=f;H(t.container)||(v=t.container),H(t.target)||(_=t.target)}else Y(f)&&(v=f);const b=Ms(e,g,d),T=Ms(e,_,d),S=b+c-u,w=T+c-p,x=Ms(e,y,u,S,w),C=Ms(e,v,u,S,w),E=b+c-x,k=T+c-C,$=k-E;this.offset=c,this.offsetStart=E,this.offsetEnd=k,this.distance=$<=0?0:$,this.thresholds=[g,_,y,v],this.coords=[b,T,x,C],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&Y(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=yt(bt(e,g,bt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return Et(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Xs=(t={})=>new Us(t),Ys=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Vs=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=Ys(r,e,s)-t,i>0?o=r:n=r}while(at(i)>1e-7&&++a<100);return r},Ws=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:Ys(Vs(r,t,s),e,i),Hs=(t=10,e)=>{const s=e?lt:ct;return e=>s(gt(e,0,1)*t)*(1/t)},qs=(...t)=>{const e=t.length;if(!e)return we;const s=e-1,i=t[0],r=t[s],n=[0],o=[st(i)];for(let e=1;e<s;e++){const i=t[e],r=V(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(H(h)?e/s:st(h)/100),o.push(st(a))}return o.push(st(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},js=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(gt(o,r,1))}return s.push(1),qs(...s)};var Gs=Object.freeze({__proto__:null,Spring:_s,createSpring:vs,cubicBezier:Ws,eases:Be,irregular:js,linear:qs,spring:ys,steps:Hs});const Qs=fs,Js={},Zs=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Ks=t=>(...e)=>{const s=t(...e);return new Proxy(S,{apply:(t,e,[i])=>s(i),get:(t,e)=>Ks((...t)=>{const i=Js[e](...t);return t=>i(s(t))})})},ti=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Ks(Zs(e,s)):e)(...t);return Js[t]||(Js[t]=i),i},ei=ti("roundPad",Qs.roundPad),si=ti("padStart",Qs.padStart),ii=ti("padEnd",Qs.padEnd),ri=ti("wrap",Qs.wrap),ni=ti("mapRange",Qs.mapRange),oi=ti("degToRad",Qs.degToRad),ai=ti("radToDeg",Qs.radToDeg),hi=ti("snap",Qs.snap),li=ti("clamp",Qs.clamp),ci=ti("round",Qs.round),di=ti("lerp",Qs.lerp,1),ui=ti("damp",Qs.damp,1),pi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let mi=0;const fi=(t,e=0,s=1,i=0)=>{let r=void 0===t?mi++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},gi=t=>t[pi(0,t.length-1)],_i=t=>{let e,s,i=t.length;for(;i;)s=pi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},yi=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!H(o),h=a&&!H(o.ease)?o.ease:a?De(o):null,l=e.grid,c=e.axis,d=e.total,u=H(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=U(t),y=e.use,v=st(g?t[0]:t),b=g?st(t[1]):0,T=B.exec((g?t[1]:t)+_),S=e.start||0+(g?v:0);let w=u?0:Y(r)?r:0;return(t,r,o,a)=>{const[u]=ve(t),_=H(d)?o:d,x=!H(y)&&(W(y)?y(u,r,_):Pt(u,y)),C=Y(x)||V(x)&&Y(+x)?+x:r;if(p&&(w=(_-1)/2),m&&(w=_-1),!s.length){for(let t=0;t<_;t++){if(l){const e=p?(l[0]-1)/2:w%l[0],i=p?(l[1]-1)/2:ct(w/l[0]),r=e-t%l[0],n=i-ct(t/l[0]);let o=rt(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(at(w-t));i=ut(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>c?t<0?-1*t:-t:at(i-t))),f&&(s=_i(s))}const E=g?(b-v)/i:v;let k=(a?ts(a,H(e.start)?a.iterationDuration:S):S)+(E*yt(s[C],2)||0);return e.modifier&&(k=e.modifier(k)),T&&(k=`${k}${T[2]}`),k}};var vi=Object.freeze({__proto__:null,$:ve,clamp:li,cleanInlineStyles:jt,createSeededRandom:fi,damp:ui,degToRad:oi,get:Qe,keepTime:$s,lerp:di,mapRange:ni,padEnd:ii,padStart:si,radToDeg:ai,random:pi,randomPick:gi,remove:Ze,round:ci,roundPad:ei,set:Je,shuffle:_i,snap:hi,stagger:yi,sync:ks,wrap:ri});const bi=t=>{const e=ye(t)[0];return e&&j(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ti=(t,e,s,i,r)=>{const n=s+i,o=r?Math.max(0,Math.min(n,e)):(n%e+e)%e;return t.getPointAtLength(o)},Si=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[l],o=t.getCTM(),a=0===s;return{from:0,to:r,modifier:i=>{const h=i+s*r;if("a"===e){const e=Ti(t,r,h,-1,a),s=Ti(t,r,h,1,a);return 180*pt(s.y-e.y,s.x-e.x)/mt}{const s=Ti(t,r,h,0,a);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},wi=(t,e=0)=>{const s=bi(t);if(s)return{translateX:Si(s,"x",e),translateY:Si(s,"y",e),rotate:Si(s,"a",e)}},xi=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(rt(s.a*s.a+s.b*s.b)+rt(s.c*s.c+s.d*s.d))/2)}return e},Ci=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=xi(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:W(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h},Ei=(t,e=0,s=0)=>ye(t).map(t=>Ci(t,e,s)),ki=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=bi(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[d];o&&s.setAttribute(r?"d":"points",o);let a="",h="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),l=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<l;e++){const c=e/(l-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+yt(d.x,3)+n+d.y+" ",h+=p+yt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[d]=h,[a,h]};var $i=Object.freeze({__proto__:null,createDrawable:Ei,createMotionPath:wi,morphTo:ki});const Bi="undefined"!=typeof Intl&&Intl.Segmenter,Oi=/\{value\}/g,Ni=/\{i\}/g,Ri=/(\s+)/,Di=/^\s+$/,Li="line",Ai="word",Fi="char",Mi="data-line";let Pi=null,Ii=null,zi=null;const Ui=t=>t.isWordLike||" "===t.segment||Y(+t.segment),Xi=t=>t.setAttribute("aria-hidden","true"),Yi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Vi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Wi=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Wi(e)}},Hi=(t,e,s)=>{const i=t.getAttribute(Mi);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)Hi(t.children[r],e,s);return s},qi=(t,e={})=>{let s="";const i=V(e.class)?` class="${e.class}"`:"",r=Lt(e.clone,!1),n=Lt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},ji=(t,e,s,i,r,n,o,a,h)=>{const l=r===Li,c=r===Fi,d=`_${r}_`,u=W(t)?t(s):t,p=l?"block":"inline-block";zi.innerHTML=u.replace(Oi,`<i class="${d}"></i>`).replace(Ni,`${c?h:l?o:a}`);const m=zi.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,_=m.querySelectorAll(`i.${d}`),y=_.length;if(y){f.style.display=p,g.style.display=p,g.setAttribute(Mi,`${o}`),l||(g.setAttribute("data-word",`${a}`),c&&g.setAttribute("data-char",`${h}`));let t=y;for(;t--;){const e=_[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${Vi[r]}`),f};class Gi{constructor(e,i={}){Pi||(Pi=Bi?new Bi([],{granularity:Ai}):{segment:t=>{const e=[],s=t.split(Ri);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Di.test(i)})}return e}}),Ii||(Ii=Bi?new Bi([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!zi&&t&&(zi=s.createElement("template")),A.current&&A.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=i,c=(e=U(e)?e[0]:e)&&e.nodeType?e:(_e(e)||[])[0],d=!0===o?{}:o,u=!0===r||H(r)?{}:r,p=!0===n?{}:n;this.debug=Lt(l,!1),this.includeSpaces=Lt(h,!1),this.accessible=Lt(a,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=X(d)?qi(Li,d):d,this.wordTemplate=X(u)||this.linesOnly?qi(Ai,u):u,this.charTemplate=X(p)?qi(Fi,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=$s(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>W(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,i=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,c=Pi.segment(o),d=s.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=Ui(t);if(!u||s&&u&&Ui(u))a.push(e);else{const t=a.length-1;a[t].includes(" ")||e.includes(" ")?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const c=a[t+1],u=r&&c&&!c.trim(),p=o,m=i?Ii.segment(p):null,f=i?s.createDocumentFragment():s.createTextNode(u?o+" ":o);if(i){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,c=s.createTextNode(a);ji(i,l,c,f,Fi,n,-1,h.length,l.length)}}e?ji(e,h,f,d,Ai,n,-1,h.length,l.length):i?d.appendChild(f):d.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,i=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==s.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>W(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Yi(e,Ai))),o&&(h||n)&&(this.chars=Yi(e,Fi));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(Mi,`${d}`);const r=e.querySelectorAll(`[${Mi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Mi,`${d}`);c=s}if(h){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<d+1;t++){const s=e.cloneNode(!0);Hi(s,t,new Set).forEach(t=>{const e=t.parentElement;e&&i.add(e),t.remove()}),a.push(s)}i.forEach(Wi);for(let e=0,s=a.length;e<s;e++)ji(r,this.lines,a[e],t,Li,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Yi(e,Ai)),o&&(this.chars=Yi(e,Fi))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!i)){const t=s.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(Xi),this.words.forEach(Xi),this.chars.forEach(Xi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Qi=(t,e)=>new Gi(t,e),Ji=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Gi(t,e));var Zi=Object.freeze({__proto__:null,TextSplitter:Gi,split:Ji,splitText:Qi});const Ki=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(yt(t(i/e),4));return`linear(${s.join(", ")})`},tr={},er=t=>{let e=tr[t];if(e)return e;if(e="linear",V(t)){if(I(t,"linear")||I(t,"cubic-")||I(t,"steps")||I(t,"ease"))e=t;else if(I(t,"cubicB"))e=P(t);else{const s=Ne(t);W(s)&&(e=s===we?"linear":Ki(s))}tr[t]=e}else if(W(t)){const s=Ki(t);s&&(e=s)}else t.ease&&(e=Ki(t.ease));return e},sr=["x","y","z"],ir=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...sr],rr=(()=>[...sr,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let nr=null;const or=(t,e,s,i,r)=>{let n=V(e)?e:At(e,s,i,r);return Y(n)?ir.includes(t)||I(t,"translate")?`${n}px`:I(t,"rotate")||I(t,"skew")?`${n}deg`:`${n}`:n},ar=(t,e,s,i,r,n)=>{let o="0";const a=H(i)?getComputedStyle(t)[e]:or(e,i,t,r,n);return o=H(s)?U(i)?i.map(s=>or(e,s,t,r,n)):a:[or(e,s,t,r,n),a],o};class hr{constructor(e,s){A.current&&A.current.register(this),q(nr)&&(!t||!H(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=I(t,"skew"),s=I(t,"scale"),i=I(t,"rotate"),r=I(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),nr=!0):nr=!1);const i=ve(e),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Lt(s.ease,er(F.defaults.ease)),o=n.ease&&n,a=Lt(s.autoplay,F.defaults.autoplay),h=!(!a||!a.link)&&a,l=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,u=Lt(s.loop,F.defaults.loop),p=!0===u||u===1/0?1/0:Y(u)?u+1:1,m=l?d?"alternate-reverse":"alternate":d?"reverse":"normal",g=er(n),y=1===F.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||F.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==h,this.reversed=d,this.persist=Lt(s.persist,F.defaults.persist),this.autoplay=a,this._speed=Lt(s.playbackRate,F.defaults.playbackRate),this._resolve=S,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[c],a=rr.some(t=>s.hasOwnProperty(t)),h=t.style,l=this._inlineStyles[e]={},d=(o?o.settlingDuration:At(Lt(s.duration,F.defaults.duration),t,e,r))*y,u=At(Lt(s.delay,F.defaults.delay),t,e,r)*y,f=Lt(s.composition,"replace");for(let o in s){if(!K(o))continue;const c={},_={iterations:p,direction:m,fill:"both",easing:g,duration:d,delay:u,composite:f},T=s[o],S=!!a&&(b.includes(o)?o:v.get(o)),w=S?"transform":o;let x;if(l[w]||(l[w]=h[w]),X(T)){const s=T,a=Lt(s.ease,n),l=a.ease&&a,p=s.to,m=s.from;if(_.duration=(l?l.settlingDuration:At(Lt(s.duration,d),t,e,r))*y,_.delay=At(Lt(s.delay,u),t,e,r)*y,_.composite=Lt(s.composition,f),_.easing=er(a),x=ar(t,o,m,p,e,r),S?(c[`--${S}`]=x,i[S]=x):c[o]=ar(t,o,m,p,e,r),Ge(this,t,o,c,_),!H(m))if(S){const t=`--${S}`;h.setProperty(t,c[t][0])}else h[o]=c[o][0]}else x=U(T)?T.map(s=>or(o,s,t,e,r)):or(o,T,t,e,r),S?(c[`--${S}`]=x,i[S]=x):c[o]=x,Ge(this,t,o,c,_)}if(a){let t=_;for(let e in i)t+=`${T[e]}var(--${e})) `;h.transform=t}}),h&&this.autoplay.link(this)}forEach(t){const e=V(t)?e=>e[t]():t;return this.animations.forEach(e),this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=F.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===F.timeScale?1:f);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel")}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let t in i){const e=i[t];H(e)||e===_?s.removeProperty(P(t)):s[t]=e}t.getAttribute("style")===_&&t.removeAttribute("style")}),this}then(t=S){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=S};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const lr={animate:(t,e)=>new hr(t,e),convertEase:Ki};export{ve as $,ns as Animatable,Cs as Draggable,We as JSAnimation,Bs as Scope,Us as ScrollObserver,_s as Spring,Gi as TextSplitter,is as Timeline,fe as Timer,hr as WAAPIAnimation,He as animate,li as clamp,jt as cleanInlineStyles,os as createAnimatable,Es as createDraggable,Ei as createDrawable,wi as createMotionPath,Os as createScope,fi as createSeededRandom,vs as createSpring,rs as createTimeline,ge as createTimer,Ws as cubicBezier,ui as damp,oi as degToRad,Be as eases,Gs as easings,ee as engine,Qe as get,js as irregular,$s as keepTime,di as lerp,qs as linear,ni as mapRange,ki as morphTo,Xs as onScroll,ii as padEnd,si as padStart,ai as radToDeg,pi as random,gi as randomPick,Ze as remove,ci as round,ei as roundPad,Ds as scrollContainers,Je as set,_i as shuffle,hi as snap,Ji as split,Qi as splitText,ys as spring,yi as stagger,Hs as steps,$i as svg,ks as sync,Zi as text,vi as utils,lr as waapi,ri as wrap};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - UMD bundle
|
|
3
|
-
* @version v4.2.
|
|
3
|
+
* @version v4.2.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -802,7 +802,7 @@
|
|
|
802
802
|
tickThreshold: 200,
|
|
803
803
|
};
|
|
804
804
|
|
|
805
|
-
const globalVersions = { version: '4.2.
|
|
805
|
+
const globalVersions = { version: '4.2.2', engine: null };
|
|
806
806
|
|
|
807
807
|
if (isBrowser) {
|
|
808
808
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
@@ -7661,12 +7661,15 @@
|
|
|
7661
7661
|
* @param {SVGGeometryElement} $path
|
|
7662
7662
|
* @param {Number} totalLength
|
|
7663
7663
|
* @param {Number} progress
|
|
7664
|
-
* @param {Number}lookup
|
|
7664
|
+
* @param {Number} lookup
|
|
7665
|
+
* @param {Boolean} shouldClamp
|
|
7665
7666
|
* @return {DOMPoint}
|
|
7666
7667
|
*/
|
|
7667
|
-
const getPathPoint = ($path, totalLength, progress, lookup
|
|
7668
|
+
const getPathPoint = ($path, totalLength, progress, lookup, shouldClamp) => {
|
|
7668
7669
|
const point = progress + lookup;
|
|
7669
|
-
const pointOnPath =
|
|
7670
|
+
const pointOnPath = shouldClamp
|
|
7671
|
+
? Math.max(0, Math.min(point, totalLength)) // Clamp between 0 and totalLength
|
|
7672
|
+
: (point % totalLength + totalLength) % totalLength; // Wrap around
|
|
7670
7673
|
return $path.getPointAtLength(pointOnPath);
|
|
7671
7674
|
};
|
|
7672
7675
|
|
|
@@ -7681,6 +7684,7 @@
|
|
|
7681
7684
|
const totalLength = +($path.getTotalLength());
|
|
7682
7685
|
const inSvg = $el[isSvgSymbol];
|
|
7683
7686
|
const ctm = $path.getCTM();
|
|
7687
|
+
const shouldClamp = offset === 0;
|
|
7684
7688
|
/** @type {TweenObjectValue} */
|
|
7685
7689
|
return {
|
|
7686
7690
|
from: 0,
|
|
@@ -7690,11 +7694,11 @@
|
|
|
7690
7694
|
const offsetLength = offset * totalLength;
|
|
7691
7695
|
const newProgress = progress + offsetLength;
|
|
7692
7696
|
if (pathProperty === 'a') {
|
|
7693
|
-
const p0 = getPathPoint($path, totalLength, newProgress, -1);
|
|
7694
|
-
const p1 = getPathPoint($path, totalLength, newProgress, 1);
|
|
7697
|
+
const p0 = getPathPoint($path, totalLength, newProgress, -1, shouldClamp);
|
|
7698
|
+
const p1 = getPathPoint($path, totalLength, newProgress, 1, shouldClamp);
|
|
7695
7699
|
return atan2(p1.y - p0.y, p1.x - p0.x) * 180 / PI;
|
|
7696
7700
|
} else {
|
|
7697
|
-
const p = getPathPoint($path, totalLength, newProgress, 0);
|
|
7701
|
+
const p = getPathPoint($path, totalLength, newProgress, 0, shouldClamp);
|
|
7698
7702
|
return pathProperty === 'x' ?
|
|
7699
7703
|
inSvg || !ctm ? p.x : p.x * ctm.a + p.y * ctm.c + ctm.e :
|
|
7700
7704
|
inSvg || !ctm ? p.y : p.x * ctm.b + p.y * ctm.d + ctm.f
|