animejs 4.2.1 → 4.3.0-beta.0
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/README.md +82 -28
- package/dist/bundles/anime.esm.js +2707 -1301
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +2717 -1309
- 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 +18 -9
- package/dist/modules/animation/animation.js +19 -10
- 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 +10 -10
- package/dist/modules/core/clock.d.ts +1 -1
- package/dist/modules/core/clock.js +10 -10
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +6 -4
- package/dist/modules/core/consts.d.ts +13 -5
- package/dist/modules/core/consts.js +6 -4
- package/dist/modules/core/globals.cjs +5 -2
- package/dist/modules/core/globals.d.ts +1 -0
- package/dist/modules/core/globals.js +5 -3
- 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 +2 -2
- package/dist/modules/engine/engine.js +2 -2
- 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 +4 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +2 -1
- package/dist/modules/layout/index.cjs +15 -0
- package/dist/modules/layout/index.d.ts +1 -0
- package/dist/modules/layout/index.js +8 -0
- package/dist/modules/layout/layout.cjs +1384 -0
- package/dist/modules/layout/layout.d.ts +211 -0
- package/dist/modules/layout/layout.js +1381 -0
- 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 +23 -9
- package/dist/modules/text/split.js +23 -9
- 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 +14 -6
- package/dist/modules/timeline/timeline.d.ts +2 -0
- package/dist/modules/timeline/timeline.js +15 -7
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +26 -13
- package/dist/modules/timer/timer.d.ts +1 -0
- package/dist/modules/timer/timer.js +27 -14
- package/dist/modules/types/index.d.ts +3 -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 +15 -7
- package/dist/modules/waapi/waapi.js +16 -8
- package/package.json +8 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM minified bundle
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.3.0-beta.0
|
|
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(),d=Symbol(),c=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=240,y="",v="var(",_=(()=>{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=()=>{},x=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,w=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,$=/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,C=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,R=/([a-z])([A-Z])/g,I=/(\w+)(\([^)]+\)+)/g,D=/(\*=|\+=|-=)/,A=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,O={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},B={current:null,root:s},L={defaults:O,precision:4,timeScale:1,tickThreshold:200},P=t&&e.AnimeJSDevTools,M={version:"4.3.0-beta.0",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(M));const F=t=>t.replace(R,"$1-$2").toLowerCase(),V=(t,e)=>0===t.indexOf(e),z=Date.now,X=Array.isArray,H=t=>t&&t.constructor===Object,U=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,W=t=>"function"==typeof t,q=t=>void 0===t,j=t=>q(t)||null===t,G=e=>t&&e instanceof SVGElement,Q=t=>x.test(t),J=t=>V(t,"rgb"),Z=t=>V(t,"hsl"),K=t=>Q(t)||J(t)||Z(t),tt=t=>!L.defaults.hasOwnProperty(t),et=["opacity","rotate","overflow","color"],st=(t,e)=>{if(et.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}},it=t=>Y(t)?parseFloat(t):t,rt=Math.pow,nt=Math.sqrt,ot=Math.sin,at=Math.cos,ht=Math.abs,lt=Math.exp,dt=Math.ceil,ct=Math.floor,ut=Math.asin,pt=Math.max,mt=Math.atan2,ft=Math.PI,gt=Math.round,yt=(t,e,s)=>t<e?e:t>s?s:t,vt={},_t=(t,e)=>{if(e<0)return t;if(!e)return gt(t);let s=vt[e];return s||(s=vt[e]=10**e),gt(t*s)/s},bt=(t,e)=>X(e)?e.reduce((e,s)=>ht(s-t)<ht(e-t)?s:e):e?gt(t/e)*e:t,Tt=(t,e,s)=>t+(e-t)*s,St=t=>t===1/0?m:t===-1/0?-m:t,xt=t=>t<=p?p:St(_t(t,11)),wt=t=>X(t)?[...t]:t,$t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=q(r)?e[i]:r}return s},Et=(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}},Ct=(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},Nt=(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},kt=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[d];let o;for(;o=I.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&&!q(r)?r:V(e,"scale")?"1":V(e,"rotate")||V(e,"skew")?"0deg":"0px"},Rt=t=>{const e=w.exec(t)||$.exec(t),s=q(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},It=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]},Dt=(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),At=t=>{const e=E.exec(t)||C.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=q(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=_t(255*Dt(e,t,s+1/3),0),a=_t(255*Dt(e,t,s),0),h=_t(255*Dt(e,t,s-1/3),0)}return[o,a,h,n]},Ot=t=>J(t)?Rt(t):Q(t)?It(t):Z(t)?At(t):[0,0,0,1],Bt=(t,e)=>q(t)?e:t,Lt=(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(!Y(t)||!V(t,v))return t;n=()=>{const s=t.match(A),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==y||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Pt=(t,e)=>t[h]?t[l]&&st(t,e)?i.ATTRIBUTE:b.includes(e)||_.get(e)?i.TRANSFORM:V(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},Ft=(t,e,s,r)=>{const n=q(s)?Pt(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?kt(t,e,r):n===i.CSS_VAR?Mt(t,e,r).trimStart():Mt(t,e,r)},Vt=(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}),Xt=(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(" ")&&k.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(K(s))return e.t=r.COLOR,e.d=Ot(s),e;{const t=s.match(N);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split(N)||[],e}}return e.n=s,e},Ht=(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),Ut=zt(),Yt=(t,e,s,a,h)=>{const l=t.parent,c=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,v=t._loopDelay,_=t._reversed,b=t._alternate,S=t._hasChildren,x=t._delay,w=t._currentTime,$=x+m,E=e-x,C=yt(w,-x,c),N=yt(E,-x,c),k=E-w,R=N>0,I=N>=c,D=c<=p,A=h===n.FORCE;let O=0,B=E,P=0;if(f>1){const e=~~(N/(m+(I?0:v)));t._currentIteration=yt(e,0,f),I&&t._currentIteration--,O=t._currentIteration%2,B=N%(m+v)||0}const M=_^(b&&O),F=t._ease;let V=I?M?0:c:M?m-B:B;F&&(V=m*F(V/m)||0);const z=(l?l.backwards:E<w)?!M:!!M;if(t._currentTime=E,t._iterationTime=V,t.backwards=z,R&&!t.began?(t.began=!0,s||l&&(z||!l.began)||t.onBegin(t)):E<=0&&(t.began=!1),s||S||!R||t._currentIteration===g||t.onLoop(t),A||h===n.AUTO&&(e>=x&&e<=$||e<=x&&C>x||e>=$&&C!==c)||V>=$&&C!==c||V<=x&&C>0||e<=C&&C===c&&u||I&&!u&&D){if(R&&(t.computeDeltaTime(C),s||t.onBeforeUpdate(t)),!S){const e=A||(z?-1*k:k)>=L.tickThreshold,n=t._offset+(l?l._offset:0)+x+V;let h,c,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,l=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,v=m._nextRep,_=m._prevRep,b=t!==o.none;if((e||(s!==l||n<=g+(v?v._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!v||v._isOverridden||n<=v._absoluteStartTime)&&(!_||_._isOverridden||n>=_._absoluteStartTime+_._changeDuration+m._delay))){const e=m._currentTime=yt(V-m._startTime,0,l),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,y=m._tweenType,v=y===i.OBJECT,_=g===r.NUMBER,T=_&&v||0===s||1===s?-1:L.precision;let S,x;if(_)S=x=n(_t(Tt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)x=n(_t(Tt(m._fromNumber,m._toNumber,s),T)),S=`${x}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=_t(yt(n(Tt(t[0],e[0],s)),0,255),0),r=_t(yt(n(Tt(t[1],e[1],s)),0,255),0),o=_t(yt(n(Tt(t[2],e[2],s)),0,255),0),a=yt(n(_t(Tt(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(_t(Tt(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=x),a||t===o.blend)m._value=S;else{const t=m.property;h=m.target,v?h[t]=S:y===i.ATTRIBUTE?h.setAttribute(t,S):(c=h.style,y===i.TRANSFORM?(h!==u&&(u=h,p=h[d]),p[t]=S,f=1):y===i.CSS?c[t]=S:y===i.CSS_VAR&&c.setProperty(t,S)),R&&(P=1)}}if(f&&m._renderTransforms){let t=y;for(let e in p)t+=`${T[e]}${p[e]}) `;c.transform=t,f=0}m=m._next}!s&&P&&t.onRender(t)}!s&&R&&t.onUpdate(t)}return l&&D?!s&&(l.began&&!z&&E>0&&!u||z&&E<=p&&u)&&(t.onComplete(t),t.completed=!z):R&&I?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||S||(t.completed=!0,s||l&&(z||!l.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,P},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Yt(t,e,s,i,r),t._hasChildren){const a=t,h=a.backwards,l=i?e:a._iterationTime,d=z();let c=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;Et(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&&Yt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}Et(a,t=>{const e=_t((l-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(d):r;c+=Yt(t,e,s,i,n),!t.completed&&u&&(u=!1)},h),!s&&c&&a.onRender(a),(u||h)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},qt={},jt=(t,e,s)=>{if(s===i.TRANSFORM)return _.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&G(e)&&t in e.style){const e=qt[t];if(e)return e;{const e=t?F(t):t;return qt[t]=e,e}}return t},Gt=t=>{if(t._hasChildren)Et(t,Gt,!0);else{const e=t;e.pause(),Et(e,t=>{const s=t.property,r=t.target;if(r[h]){const n=r.style,o=t._inlineValue,a=j(o)||o===y;if(t._tweenType===i.TRANSFORM){const e=r[d];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=y;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(F(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===y&&t.removeAttribute("style")})}})}return t};class Qt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=f/g,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=f/i;i>O.frameRate&&(O.frameRate=i),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;if(this._lastTickTime=t,t<e)return n.NONE;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Jt={animation:null,update:S},Zt=t=>{let e=Jt.animation;return e||(e={duration:p,computeDeltaTime:S,_offset:0,_delay:0,_head:null,_tail:null},Jt.animation=e,Jt.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}}}),Yt(e,1,1,0,n.FORCE)}),e},Kt=(()=>t?requestAnimationFrame:setImmediate)(),te=(()=>t?cancelAnimationFrame:clearImmediate)();class ee extends Qt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=O,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?(Ct(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}Jt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Kt(ie)),this}pause(){if(this.reqId)return this.paused=!0,re()}resume(){if(this.paused)return this.paused=!1,Et(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===L.timeScale?1:f)}set speed(t){this._speed=t*L.timeScale,Et(this,t=>t.speed=t._speed)}get timeUnit(){return 1===L.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(L.timeScale!==s){L.timeScale=s,L.tickThreshold=200*s;const t=e?.001:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return L.precision}set precision(t){L.precision=t}}const se=(()=>{const e=new ee(z());return t&&(M.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),ie=()=>{se._head?(se.reqId=Kt(ie),se.update()):se.reqId=0},re=()=>(te(se.reqId),se.reqId=0,se),ne={_rep:new WeakMap,_add:new Map},oe=(t,e,s="_rep")=>{const i=ne[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},ae=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,he=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},le=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;Nt(e,t,ae,"_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){he(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)he(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=_t(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&he(i)}let o=!0;if(Et(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Et(t,t=>{t!==e&&Et(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=oe(t.target,t.property,"_add"),s=Zt(ne._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,Nt(e,i),Nt(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}Nt(e,t,null,"_prevAdd","_nextAdd")}return t},de=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=ne._rep.get(s)[i];if(Ct(r,t,"_prevRep","_nextRep"),e===o.blend){const e=ne._add,r=e.get(s);if(!r)return;const n=r[i],o=Jt.animation;Ct(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Ct(n,a,"_prevAdd","_nextAdd"),Ct(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 Et(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,h=jt(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),Ct(e,n),de(n),r=!0)}},!0),r},ue=(t,e,s)=>{const i=e||se;let r;if(i._hasChildren){let e=0;Et(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Ct(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?ue(t,n,s):n._hasChildren=!1},!0),q(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},pe=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),me=t=>t._cancelled?(t._hasChildren?Et(t,me):Et(t,t=>{t._composition!==o.none&&le(t,oe(t.target,t.property))}),t._cancelled=0,t):t;let fe=0;class ge extends Qt{constructor(t={},e=null,s=0){super(0),++fe;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:d,frameRate:c,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:v,onUpdate:_}=t;B.current&&B.current.register(this);const b=e?0:se._lastTickTime,T=e?e.defaults:L.defaults,x=W(r)||q(r)?T.delay:+r,w=W(n)||q(n)?1/0:+n,$=Bt(h,T.loop),E=Bt(l,T.loopDelay);let C=!0===$||$===1/0||$<0?1/0:$+1;if(P){const s=C===1/0;if(P.register(this,t,s)&&s){const t=a?2:1,s=e?P.maxNestedInfiniteLoops:P.maxInfiniteLoops;C=Math.max(s,t)}}let N=0;e?N=s:(se.reqId||se.requestTick(z()),N=(se._lastTickTime-se._startTime)*L.timeScale),this.id=q(i)?fe:i,this.parent=e,this.duration=St((w+E)*C-E)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||T.onBegin,this.onBeforeUpdate=v||T.onBeforeUpdate,this.onUpdate=_||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=w,this.iterationCount=C,this._autoplay=!e&&Bt(d,T.autoplay),this._offset=N,this._delay=x,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=S,this._running=!1,this._reversed=+Bt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Bt(a,T.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=Bt(c,T.frameRate),this._speed=Bt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return yt(_t(this._currentTime,L.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return yt(_t(this._iterationTime,L.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return yt(_t(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return yt(_t(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*yt(+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 me(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),pe(this),this._hasChildren&&Et(this,pe),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&&!q(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*se._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||(Nt(se,this),se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,se.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){me(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?Et(this,t=>t.cancel(),!0):Et(this,de),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=xt(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:xt(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 ye=t=>new ge(t,null,0).init();function ve(t){const e=Y(t)?B.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function _e(e){if(j(e))return[];if(!t)return X(e)&&e.flat(1/0)||[e];if(X(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(i)){const t=ve(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(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=ve(e);return s?Array.from(s):[e]}function be(t){const e=_e(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=G(s);(s.nodeType||t)&&(s[h]=!0,s[l]=t,s[d]={})}}return e}const Te={deg:1,rad:180/ft,turn:360},Se={},xe=(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=Se[h];if(q(l)||n){let r;if(o in Te)r=a*Te[o]/Te[i];else{const e=100,n=t.cloneNode(),h=t.parentNode,l=h&&h!==s?h:s.body;l.appendChild(n);const d=n.style;d.width=e+o;const c=n.offsetWidth||e;d.width=e+i;const u=c/(n.offsetWidth||e);l.removeChild(n),r=u*a}e.n=r,Se[h]=r}else e.n=l;return e.t,e.u=i,e},we=t=>t,$e=(t=1.68)=>e=>rt(e,+t),Ee={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},Ce=ft/2,Ne=2*ft,ke={[y]:$e,Quad:$e(2),Cubic:$e(3),Quart:$e(4),Quint:$e(5),Sine:t=>1-at(t*Ce),Circ:t=>1-nt(1-t*t),Expo:t=>t?rt(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=rt(2,--s))-1)/11;);return 1/rt(4,3-s)-7.5625*rt((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=yt(+t,1,10),i=yt(+e,p,2),r=i/Ne*ut(1/s),n=Ne/i;return t=>0===t||1===t?t:-s*rt(2,-10*(1-t))*ot((1-t-r)*n)}},Re=(()=>{const t={linear:we,none:we};for(let e in Ee)for(let s in ke){const i=ke[s],r=Ee[e];t[e+s]=s===y||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),Ie={linear:we,none:we},De=t=>{if(Ie[t])return Ie[t];if(t.indexOf("(")<=-1){const e=Ee[t]||t.includes("Back")||t.includes("Elastic")?Re[t]():Re[t];return e?Ie[t]=e:we}{const e=t.slice(0,-1).split("("),s=Re[e[0]];return s?Ie[t]=s(...e[1].split(",")):we}},Ae=["steps(","irregular(","linear(","cubicBezier("],Oe=t=>{if(Y(t))for(let e=0,s=Ae.length;e<s;e++)if(V(t,Ae[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:Y(t)?De(t):we},Be=zt(),Le=zt(),Pe={},Me={func:null},Fe=[null],Ve=[null,null],ze={to:null};let Xe,He,Ue=0,Ye=0;const We=(t,e)=>{const s={};if(X(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(tt);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];tt(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Bt(e.duration,L.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(tt(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 d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?d: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 qe extends ge{constructor(t,e,s,n,a=!1,h=0,l=0){super(e,s,n),++Ye;const d=be(t),c=d.length,u=e.keyframes,m=u?$t(We(u,e),e):e,{id:g,delay:y,duration:v,ease:_,playbackEase:b,modifier:T,composition:S,onRender:x}=m,w=s?s.defaults:L.defaults,$=Bt(_,w.ease),E=Bt(b,w.playbackEase),C=E?Oe(E):null,N=!q($.ease),k=N?$.ease:Bt(_,C?"linear":w.ease),R=N?$.settlingDuration:Bt(v,w.duration),I=Bt(y,w.delay),D=T||w.modifier,A=q(S)&&c>=f?o.none:q(S)?w.composition:S,O=this._offset+(s?s._offset:0);N&&($.parent=this);let B=NaN,P=NaN,M=0,F=0;for(let t=0;t<c;t++){const e=d[t],n=h||t,u=l||c;let f=NaN,g=NaN;for(let t in m)if(tt(t)){const h=Pt(e,t),l=jt(t,e,h);let d=m[t];const c=X(d);if(a&&!c&&(Ve[0]=d,Ve[1]=d,d=Ve),c){const t=d.length,e=!H(d[0]);2===t&&e?(ze.to=d,Fe[0]=ze,Xe=Fe):t>2&&e?(Xe=[],d.forEach((t,e)=>{e?1===e?(Ve[1]=t,Xe.push(Ve)):Xe.push(t):Ve[0]=t})):Xe=d}else Fe[0]=d,Xe=Fe;let y=null,v=null,_=NaN,b=0,T=0;for(let t=Xe.length;T<t;T++){const i=Xe[T];H(i)?He=i:(ze.to=i,He=ze),Me.func=null;const a=Lt(He.to,e,n,u,Me);let d;H(a)&&!q(a.to)?(He=a,d=a.to):d=a;const c=Lt(He.from,e,n,u),m=He.ease,f=!q(m)&&!q(m.ease),g=f?m.ease:m||k,S=f?m.settlingDuration:Lt(Bt(He.duration,t>1?Lt(R,e,n,u)/t:R),e,n,u),x=Lt(Bt(He.delay,T?0:I),e,n,u),w=Lt(Bt(He.composition,A),e,n,u),$=U(w)?w:o[w],E=He.modifier||D,C=!q(c),N=!q(d),B=X(d),L=B||C&&N,P=v?b+x:x,V=_t(O+P,12);F||!C&&!B||(F=1);let z=v;if($!==o.none){y||(y=oe(e,l));let t=y._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(z=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)he(t),t=t._nextRep}if(L){Xt(B?Lt(d[0],e,n,u):c,Be),Xt(B?Lt(d[1],e,n,u,Me):d,Le);const t=Ft(e,l,h,Pe);Be.t===r.NUMBER&&(z?z._valueType===r.UNIT&&(Be.t=r.UNIT,Be.u=z._unit):(Xt(t,Ut),Ut.t===r.UNIT&&(Be.t=r.UNIT,Be.u=Ut.u)))}else N?Xt(d,Le):v?Ht(v,Le):Xt(s&&z&&z.parent.parent===s?z._value:Ft(e,l,h,Pe),Le),C?Xt(c,Be):v?Ht(v,Be):Xt(s&&z&&z.parent.parent===s?z._value:Ft(e,l,h,Pe),Be);if(Be.o&&(Be.n=Vt(z?z._toNumber:Xt(Ft(e,l,h,Pe),Ut).n,Be.n,Be.o)),Le.o&&(Le.n=Vt(Be.n,Le.n,Le.o)),Be.t!==Le.t)if(Be.t===r.COMPLEX||Le.t===r.COMPLEX){const t=Be.t===r.COMPLEX?Be:Le,e=Be.t===r.COMPLEX?Le:Be;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Be.t===r.UNIT||Le.t===r.UNIT){const t=Be.t===r.UNIT?Be:Le,e=Be.t===r.UNIT?Le:Be;e.t=r.UNIT,e.u=t.u}else if(Be.t===r.COLOR||Le.t===r.COLOR){const t=Be.t===r.COLOR?Be:Le,e=Be.t===r.COLOR?Le:Be;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Be.u!==Le.u){let t=Le.u?Be:Le;t=xe(e,t,Le.u?Le.u:Be.u,!1)}if(Le.d&&Be.d&&Le.d.length!==Be.d.length){const t=Be.d.length>Le.d.length?Be:Le,e=t===Be?Le:Be;e.d=t.d.map((t,s)=>q(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const Y=_t(+S||p,12);let W=Pe[l];j(W)||(Pe[l]=null);const G={parent:this,id:Ue++,property:l,target:e,_value:null,_func:Me.func,_ease:Oe(g),_fromNumbers:wt(Be.d),_toNumbers:wt(Le.d),_strings:wt(Le.s),_fromNumber:Be.n,_toNumber:Le.n,_numbers:wt(Be.d),_number:Be.n,_unit:Le.u,_modifier:E,_currentTime:0,_startTime:P,_delay:+x,_updateDuration:Y,_changeDuration:Y,_absoluteStartTime:V,_tweenType:h,_valueType:Le.t,_composition:$,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:W,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};$!==o.none&&le(G,y),isNaN(_)&&(_=G._startTime),b=_t(P+Y,12),v=G,M++,Nt(this,G)}(isNaN(P)||_<P)&&(P=_),(isNaN(B)||b>B)&&(B=b),h===i.TRANSFORM&&(f=M-T,g=M)}if(!isNaN(f)){let t=0;Et(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&Et(Jt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),P?(Et(this,t=>{t._startTime-t._delay||(t._delay-=P),t._startTime-=P}),B-=P):P=0,B||(B=p,this.iterationCount=0),this.targets=d,this.id=q(g)?Ye:g,this.duration=B===p?p:St((B+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=x||w.onRender,this._ease=C,this._delay=P,this.iterationDuration=B,!this._autoplay&&F&&this.onRender(this)}stretch(t){const e=this.duration;if(e===xt(t))return this;const s=t/e;return Et(this,t=>{t._updateDuration=xt(t._updateDuration*s),t._changeDuration=xt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Et(this,t=>{const e=t._func;if(e){const s=Ft(t.target,t.property,t._tweenType);Xt(s,Ut),Xt(e(),Le),t._fromNumbers=wt(Ut.d),t._fromNumber=Ut.n,t._toNumbers=wt(Le.d),t._strings=wt(Le.s),t._toNumber=Le.o?Vt(Ut.n,Le.n,Le.o):Le.n}}),this.duration===p&&this.restart(),this}revert(){return super.revert(),Gt(this)}then(t){return super.then(t)}}const je=(t,e)=>new qe(t,e,null,0,!1).init(),Ge={_head:null,_tail:null},Qe=(t,e,s)=>{let i,r=Ge._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(),Ct(Ge,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},Je=(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),Qe(e,s),Nt(Ge,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Qe(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Ze(t,e,s){const i=be(t);if(!i.length)return;const[n]=i,o=Pt(n,e),a=jt(e,n,o);let h=Ft(n,a);if(q(s))return h;if(Xt(h,Ut),Ut.t===r.NUMBER||Ut.t===r.UNIT){if(!1===s)return Ut.n;{const t=xe(n,Ut,s,!1);return`${_t(t.n,L.precision)}${t.u}`}}}const Ke=(t,e)=>{if(!q(e))return e.duration=p,e.composition=Bt(e.composition,o.none),new qe(t,e,null,0,!0).resume()},ts=(t,e,s)=>{const i=_e(t);for(let t=0,r=i.length;t<r;t++)Qe(i[t],s,e&&e.controlAnimation&&e);return ue(i,e,s),i},es=(t,e)=>{if(V(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},ss=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),q(e))return s;if(U(+e))return+e;const i=e,r=t?t.labels:null,n=!j(r),o=es(t,i),a=!q(o),h=D.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,d=a?o:n?l:s,c=+e[1];return Vt(d,c,t[0])}return a?o:n?q(r[i])?s:r[i]:s};function is(t){return St((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function rs(t,e,s,i,r,o){const a=U(t.duration)&&t.duration<=p?s-p:s;e.composition&&Wt(e,a,1,1,n.AUTO);const h=i?new qe(i,t,e,a,!1,r,o):new ge(t,e,a);return e.composition&&h.init(!0),Nt(e,h),Et(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=is(e),e}let ns=0;class os extends ge{constructor(t={}){super(t,null,0),++ns,this.id=q(t.id)?ns:t.id,this.duration=0,this.labels={};const e=t.defaults,s=L.defaults;this.defaults=e?$t(e,s):s,this.composition=Bt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=Bt(t.playbackEase,s.playbackEase);this._ease=i?Oe(i):null,this.iterationDuration=0}add(t,e,s){const i=H(e),r=H(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=_e(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,q(a)||(s.id=a+"-"+h),rs(s,this,ss(this,e(t,h,l,this)),t,h,l),h++})}else rs(i,this,ss(this,s),t)}else rs(t,this,ss(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(q(t)||t&&q(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,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return q(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return q(t)||t&&!W(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return q(t)||t&&!Y(t)||(this.labels[t]=ss(this,e)),this}remove(t,e){return ue(_e(t),this,e),this}stretch(t){const e=this.duration;if(e===xt(t))return this;const s=t/e,i=this.labels;Et(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Et(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Et(this,t=>t.revert,!0),Gt(this)}then(t){return super.then(t)}}const as=t=>new os(t).init();class hs{constructor(t,e){B.current&&B.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,!q(t)&&!q(e)){for(let t in e){const s=e[t];tt(t)?n[t]=s:V(t,"on")?r[t]=s:i[t]=s}this.callbacks=new qe({v:0},r);for(let e in n){const s=n[e],r=H(s);let a={},h="+=0";if(r){const t=s.unit;Y(t)&&(h+=t)}else a.duration=s;a[e]=r?$t({to:h},s):h;const l=$t(i,a);l.composition=o.replace,l.autoplay=!1;const d=this.animations[e]=new qe(t,l,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(q(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Et(d,e=>{if(X(t))for(let s=0,i=t.length;s<i;s++)q(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;q(s)||(e._ease=Oe(s)),e._currentTime=0}),q(e)||d.stretch(e),d.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 ls=(t,e)=>new hs(t,e),ds=(t,e)=>(+t).toFixed(e),cs=(t,e,s)=>`${t}`.padStart(e,s),us=(t,e,s)=>`${t}`.padEnd(e,s),ps=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,ms=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),fs=t=>t*Math.PI/180,gs=t=>180*t/Math.PI,ys=(t,e,s,i)=>i?1===i?e:Tt(t,e,1-Math.exp(-i*s*.1)):t;var vs=Object.freeze({__proto__:null,clamp:yt,damp:ys,degToRad:fs,lerp:Tt,mapRange:ms,padEnd:us,padStart:cs,radToDeg:gs,round:_t,roundPad:ds,snap:bt,wrap:ps});const _s=10*f;class bs{constructor(t={}){const e=!q(t.bounce)||!q(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=yt(Bt(t.bounce,.5),-1,1),this.pd=yt(Bt(t.duration,628),10*L.timeScale,_s*L.timeScale),this.m=yt(Bt(t.mass,1),1,_s),this.s=yt(Bt(t.stiffness,100),p,_s),this.d=yt(Bt(t.damping,10),p,_s),this.v=yt(Bt(t.velocity,0),-1e4,_s),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?lt(-n*e*s)*(1*at(i*n)+r*ot(i*n)):1===e?(1+r*n)*lt(-n*s):((1+r)*lt((-e*s+i)*n)+(1-r)*lt((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===L.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=rt(2*ft/t,2),this.bn>=0?this.d=4*(1-this.bn)*ft/t:this.d=4*ft/(t*(1+this.bn)),this.s=_t(yt(this.s,p,_s),3),this.d=_t(yt(this.d,p,300),3)}calculateBDFromSD(){const t=2*ft/nt(this.s);this.pd=t*(1===L.timeScale?f:1);const e=this.d/(2*nt(this.s));this.bn=e<=1?1-this.d*t/(4*ft):4*ft/(this.d*t)-1,this.bn=_t(yt(this.bn,-1,1),3),this.pd=_t(yt(this.pd,10*L.timeScale,_s*L.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=yt(nt(o/r),p,f),l=this.zeta=n/(2*nt(o*r));l<1?(this.wd=h*nt(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*nt(l*l-1),this.b=(l*h-a)/this.wd);let d=0,c=0,u=0;for(;c<=t&&u<=e;)ht(1-this.solve(d))<s?c++:c=0,this.solverDuration=d,d+=i,u++;this.settlingDuration=_t(this.solverDuration*f,0)*L.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=yt(Bt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=yt(Bt(t,1),10*L.timeScale,_s*L.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=yt(Bt(t,100),p,_s),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=yt(Bt(t,10),p,_s),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=yt(Bt(t,1),1,_s),this.compute()}get velocity(){return this.v}set velocity(t){this.v=yt(Bt(t,0),-1e4,_s),this.compute()}}const Ts=t=>new bs(t),Ss=t=>(console.warn("createSpring() is deprecated use spring() instead"),new bs(t)),xs=t=>{t.cancelable&&t.preventDefault()};class ws{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 $s{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 Es=(t,e)=>t&&W(t)?t(e):t;let Cs=0;class Ns{constructor(t,i={}){if(!t)return;B.current&&B.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,h=i.releaseEase,l=h&&Oe(h),d=!q(h)&&!q(h.ease),c=H(r)&&!q(r.mapTo)?r.mapTo:"translateX",u=H(n)&&!q(n.mapTo)?n.mapTo:"translateY",p=Es(i.container,this);this.containerArray=X(p)?p:null,this.$container=p&&!this.containerArray?_e(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=H(t)?new ws(t):_e(t)[0],this.$trigger=_e(o||t)[0],this.fixed="fixed"===Ze(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=d?h:Ts({mass:Bt(i.releaseMass,1),stiffness:Bt(i.releaseStiffness,80),damping:Bt(i.releaseDamping,20)}),this.releaseYSpring=d?h:Ts({mass:Bt(i.releaseMass,1),stiffness:Bt(i.releaseStiffness,80),damping:Bt(i.releaseDamping,20)}),this.releaseEase=l||Re.outQuint,this.hasReleaseSpring=d,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),q(r)||!0===r)f[c]=0;else if(H(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(q(n)||!0===n)f[u]=0;else if(H(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 hs(this.$target,f),this.xProp=c,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 $s(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ge({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 ge({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!q(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]?c: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=mt(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 ge({autoplay:!1,duration:150*L.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),H(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]=_t(yt(nt(t*t+e*e)/r*o,a,h),5);const d=pt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(l+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=_t(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=bt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=_t(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=bt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return _t(this.animate[this.xProp](),L.precision)}set x(t){this.setX(t,!1)}get y(){return _t(this.animate[this.yProp](),L.precision)}set y(t){this.setY(t,!1)}get progressX(){return ms(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ms(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ms(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ms(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=_t(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=_t(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,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?yt(d,a,d):d,this.scrollView[1]=l?yt(c,h,c):c,this.updateScrollCoords();const{width:v,height:_,left:b,top:T,right:S,bottom:x}=t.getBoundingClientRect();this.dragArea[2]=_t(l?yt(v,a,a):v,0),this.dragArea[3]=_t(l?yt(_,h,h):_,0);const w=Ze(t,"overflow"),$="visible"===w,E="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&$||!E&&!$)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!X(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,d=i?this.scrollView[0]-n-v:0,c=i?this.scrollView[1]-o-_:0;this.targetBounds[0]=_t(r.top+s-(l?0:T),0),this.targetBounds[1]=_t(r.right+e-(l?a:S),0),this.targetBounds[2]=_t(r.bottom+s-(l?h:x),0),this.targetBounds[3]=_t(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]+y):(this.containerBounds[0]=-_t(r.top-(u?yt(T,0,h):T)+o-m,0),this.containerBounds[1]=-_t(r.right-(u?yt(S,0,a):S)-d+f,0),this.containerBounds[2]=-_t(r.bottom-(u?yt(x,0,h):x)-c+g,0),this.containerBounds[3]=-_t(r.left-(u?yt(b,0,a):b)+n-y,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,d=!h&&s<i||!h&&s>n;return l&&!d?1:!l&&d?2:l&&d?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Es(t.container,this),o=Es(t.containerPadding,this)||0,a=X(o)?o:[o,o,o,o],h=this.x,l=this.y,d=Es(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=Es(t.dragThreshold,this),p={mouse:3,touch:7};if(U(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;q(t)||(p.mouse=t),q(e)||(p.touch=e)}this.containerArray=X(n)?n:null,this.$container=n&&!this.containerArray?_e(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=Bt(a,[0,0,0,0]),this.containerFriction=yt(Bt(Es(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=yt(Bt(Es(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Es(H(i)&&!q(i.snap)?i.snap:t.snap,this),this.snapY=Es(H(r)&&!q(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Bt(Es(t.scrollSpeed,this),1.5),this.scrollThreshold=Bt(Es(t.scrollThreshold,this),20),this.dragSpeed=Bt(Es(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Bt(Es(t.minVelocity,this),0),this.maxVelocity=Bt(Es(t.maxVelocity,this),50),this.velocityMultiplier=Bt(Es(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(yt(h,y,f),!0),this.setY(yt(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,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?yt(d,this.window[0],d):d,p=this.useWin?yt(c,this.window[1],c):c,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,y=this.scrollThreshold,[v,_]=this.coords,[b,T,S,x]=this.scrollBounds,w=_t(yt((_-b+t)/y,-1,0)*g,0),$=_t(yt((v-T-e)/y,0,1)*g,0),E=_t(yt((_-S-s)/y,0,1)*g,0),C=_t(yt((v-x+i)/y,-1,0)*g,0);if(w||E||C||$){const[t,e]=this.disabled;let s=h,i=l;t||(s=_t(yt(h+(C||$),0,r-o),0),this.coords[0]-=h-s),e||(i=_t(yt(l+(w||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[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-h,n-l),this.angle=mt(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 ue([this],null,"x"),ue([this],null,"y"),ue([this],null,"progressX"),ue([this],null,"progressY"),ue([this.scroll]),ue([this.overshootCoords]),this}scrollInView(t,e=0,s=Re.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,d,c]=o,u=_t(yt(r-h,-m,0),0),p=_t(yt(i-l,0,m),0),f=_t(yt(r-d,0,m),0),g=_t(yt(i-c,-m,0),0);new qe(n,{x:_t(n.x+(g?g-e:p?p+e:0),0),y:_t(n.y+(u?u-e:f?f+e:0),0),duration:q(t)?350*L.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=Ke(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Re.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,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=yt(bt(i,this.snapX),u,d),a=yt(bt(r,this.snapY),l,c),h=q(t)?350*L.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,d,c]=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<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/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=Ze(this.$target,"zIndex",!1);Cs=(f>Cs?f:Cs)+1,this.targetStyles=Ke(this.$target,{zIndex:Cs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ke(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Re.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,d=!1,c=!1;for(;e&&h&&h!==this.$trigger;){const t=Ze(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){c=!0,l=t<=3,d=t>=e-s-3;break}}h=h.parentElement}c&&(!l&&!d||l&&a<0||d&&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):(xs(t),this.triggerStyles||(this.triggerStyles=Ke(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",xs,{passive:!1}),this.$trigger.addEventListener("touchmove",xs,{passive:!1}),this.$trigger.addEventListener("touchend",xs),(this.dragged||!this.disabled[0]&&ht(o)>this.dragThreshold||!this.disabled[1]&&ht(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,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,S=this.y,x=this.computeVelocity(i-h,r-l),w=this.angle=mt(r-a,i-n),$=150*x,E=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+at(w)*$,N=S+ot(w)*$,k=C>c?c+(C-c)*E:C<p?p+(C-p)*E:C,R=N>u?u+(N-u)*E:N<d?d+(N-d)*E:N,I=this.destX=yt(_t(bt(k,this.snapX),5),p,c),D=this.destY=yt(_t(bt(R,this.snapY),5),d,u),A=this.isOutOfBounds(this.containerBounds,C,N);let O=0,B=0,P=v,M=v,F=0;if(b.x=T,b.y=S,!t){const t=I===c?T>c?-1:1:T<p?-1:1,s=_t(T-I,0);g.velocity=e&&_?s?$*t/ht(s):0:x;const{ease:i,settlingDuration:r,restDuration:n}=g;O=T===I?0:_?r:r-n*L.timeScale,_&&(P=i),O>F&&(F=O)}if(!e){const e=D===u?S>u?-1:1:S<d?-1:1,s=_t(S-D,0);y.velocity=t&&_?s?$*e/ht(s):0:x;const{ease:i,settlingDuration:r,restDuration:n}=y;B=S===D?0:_?r:r-n*L.timeScale,_&&(M=i),B>F&&(F=B)}if(!_&&A&&E&&(O||B)){const t=o.blend;new qe(b,{x:{to:k,duration:.65*O},y:{to:R,duration:.65*B},ease:v,composition:t}).init(),new qe(b,{x:{to:I,duration:O},y:{to:D,duration:B},ease:v,composition:t}).init(),this.overshootTicker.stretch(pt(O,B)).restart()}else t||this.animate[this.xProp](I,O,P),e||this.animate[this.yProp](D,B,M);this.scrollInView(F,this.scrollThreshold,v);let V=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(V=!0)),D!==f&&this.snapY&&(this.snapped[1]=D,this.snapY&&(V=!0)),V&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",xs),this.$trigger.removeEventListener("touchmove",xs),this.$trigger.removeEventListener("touchend",xs),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=Ke(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":xs(t)}}}const ks=(t,e)=>new Ns(t,e),Rs=(t=S)=>new ge({duration:1*L.timeScale,onComplete:t},null,0).resume(),Is=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),q(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||S}};class Ds{constructor(t={}){B.current&&B.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||_e(i)[0]||s);const n=t.defaults,o=L.defaults,a=t.mediaQueries;if(this.defaults=n?$t(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=B.current,s=B.root,i=L.defaults;B.current=this,B.root=this.root,L.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return B.current=e,B.root=s,L.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=Is(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 As=t=>new Ds(t),Os=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Bs=(t,e)=>t&&W(t)?t(e):t,Ls=new Map;class Ps{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 ge({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Et(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ge({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=_t(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ge({autoplay:!1,duration:250*L.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ge({autoplay:!1,duration:500*L.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=_t(t?e.scrollX:s.scrollLeft,0),this.scrollY=_t(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Os()}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(){Et(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Et(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),Ls.delete(this.element)}}const Ms=t=>{const e=t&&_e(t)[0]||s.body;let i=Ls.get(e);return i||(i=new Ps(e),Ls.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}=Xt(a,Ut);let d=h;return"%"===l?d=h/100*s:l&&(d=xe(t,Ut,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},Vs=(t,e,s,i,r)=>{let n;if(Y(e)){const o=D.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),d="min"===l[0],c="max"===l[0],u=Fs(t,l[0],s,i,r),p=Fs(t,l[1],s,i,r);if(d){const e=Vt(Fs(t,"min",s),p,h);n=e<u?u:e}else if(c){const e=Vt(Fs(t,"max",s),p,h);n=e>u?u:e}else n=Vt(u,p,h)}else n=Fs(t,e,s,i,r)}else n=e;return _t(n,0)},zs=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 Xs=0;const Hs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Us{constructor(t={}){B.current&&B.current.register(this);const e=Bt(t.sync,"play pause"),i=e?Oe(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(U(e)||!0===e||r),a=e&&Y(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=Xs++,this.id=q(t.id)?this.index:t.id,this.container=Ms(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=Bt(t.debug,!1),this._next=null,this._prev=null,Nt(this.container,this),Rs(()=>{if(!this.reverted){if(!this.target){const e=_e(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,q(t)||(t.persist=!0),!this._params.target)){let e;q(t.targets)?Et(t,t=>{t.targets&&!e&&(e=zs(t))}):e=zs(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:_t(yt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Bt(Bs(t.repeat,this),!0),this.horizontal="x"===Bt(Bs(t.axis,this),"y"),this.enter=Bt(Bs(t.enter,this),"end start"),this.leave=Bt(Bs(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=Hs[this.index%Hs.length],h=t.useWin,l=h?t.winWidth:t.width,d=h?t.winHeight:t.height,c=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,y=e?g:15,v=e?60:g,_=e?v: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)`,x=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${x("absolute",m,f,e?c: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=`${x("sticky",0,0,e?l:g,e?g:d)}`,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=`${x("relative",0,0,e?c: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 w=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,h=(r?0:this.offset)+t,m=i%2,f=h<_,g=h>(r?e?l:d:e?c:u)-_,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),S=s.createElement("div"),$=e?b?"right":"left":b?"bottom":"top",E=b?(e?v:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;S.innerHTML=`${this.id}${w[m]}${this.thresholds[i]}`,T.style.cssText=`${x("absolute",0,0,v,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-${$}: 2px solid ${a};\n `,S.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\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 C=h-E+(e?1:0);T.style[e?"left":"top"]=`${C}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"===Ze(t.element,"position")&&(this.debugStyles=Ke(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"===Ze(a,"position")&&Ke(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=i.scale,d=(r?h.left+i.scrollX-i.left:h.top+i.scrollY-i.top)*l,c=(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",y="end",v="end",_="start";if(Y(m)){const t=m.split(" ");v=t[0],g=t.length>1?t[1]:g}else if(H(m)){const t=m;q(t.container)||(v=t.container),q(t.target)||(g=t.target)}else U(m)&&(v=m);if(Y(f)){const t=f.split(" ");_=t[0],y=t.length>1?t[1]:y}else if(H(f)){const t=f;q(t.container)||(_=t.container),q(t.target)||(y=t.target)}else U(f)&&(_=f);const b=Vs(e,g,c),T=Vs(e,y,c),S=b+d-u,x=T+d-p,w=Vs(e,v,u,S,x),$=Vs(e,_,u,S,x),E=b+d-w,C=T+d-$,N=C-E;this.offset=d,this.offsetStart=E,this.offsetEnd=C,this.distance=N<=0?0:N,this.thresholds=[g,y,v,_],this.coords=[b,T,w,$],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,d=!h&&!l,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,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&&U(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=_t(Tt(e,g,Tt(.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"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(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))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&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 Ct(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Ys=(t={})=>new Us(t),Ws=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,qs=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=Ws(r,e,s)-t,i>0?o=r:n=r}while(ht(i)>1e-7&&++a<100);return r},js=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:Ws(qs(r,t,s),e,i),Gs=(t=10,e)=>{const s=e?dt:ct;return e=>s(yt(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=[it(i)];for(let e=1;e<s;e++){const i=t[e],r=Y(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(q(h)?e/s:it(h)/100),o.push(it(a))}return o.push(it(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(yt(o,r,1))}return s.push(1),Qs(...s)};var Zs=Object.freeze({__proto__:null,Spring:bs,createSpring:Ss,cubicBezier:js,eases:Re,irregular:Js,linear:Qs,spring:Ts,steps:Gs});const Ks=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(_t(t(i/e),4));return`linear(${s.join(", ")})`},ti={},ei=t=>{let e=ti[t];if(e)return e;if(e="linear",Y(t)){if(V(t,"linear")||V(t,"cubic-")||V(t,"steps")||V(t,"ease"))e=t;else if(V(t,"cubicB"))e=F(t);else{const s=De(t);W(s)&&(e=s===we?"linear":Ks(s))}ti[t]=e}else if(W(t)){const s=Ks(t);s&&(e=s)}else t.ease&&(e=Ks(t.ease));return e},si=["x","y","z"],ii=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...si],ri=(()=>[...si,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let ni=null;const oi=(t,e,s,i,r)=>{let n=Y(e)?e:Lt(e,s,i,r);return U(n)?ii.includes(t)||V(t,"translate")?`${n}px`:V(t,"rotate")||V(t,"skew")?`${n}deg`:`${n}`:n},ai=(t,e,s,i,r,n)=>{let o="0";const a=q(i)?getComputedStyle(t)[e]:oi(e,i,t,r,n);return o=q(s)?X(i)?i.map(s=>oi(e,s,t,r,n)):a:[oi(e,s,t,r,n),a],o};class hi{constructor(e,s){B.current&&B.current.register(this),j(ni)&&(!t||!q(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=V(t,"skew"),s=V(t,"scale"),i=V(t,"rotate"),r=V(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{}}),ni=!0):ni=!1);const i=be(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=Bt(s.ease,ei(L.defaults.ease)),o=n.ease&&n,a=Bt(s.autoplay,L.defaults.autoplay),h=!(!a||!a.link)&&a,l=s.alternate&&!0===s.alternate,c=s.reversed&&!0===s.reversed,u=Bt(s.loop,L.defaults.loop),p=!0===u||u===1/0?1/0:U(u)?u+1:1,m=l?c?"alternate-reverse":"alternate":c?"reverse":"normal",g=ei(n),v=1===L.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||L.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==h,this.reversed=c,this.persist=Bt(s.persist,L.defaults.persist),this.autoplay=a,this._speed=Bt(s.playbackRate,L.defaults.playbackRate),this._resolve=S,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[d],a=ri.some(t=>s.hasOwnProperty(t)),h=t.style,l=this._inlineStyles[e]={},c=(o?o.settlingDuration:Lt(Bt(s.duration,L.defaults.duration),t,e,r))*v,u=Lt(Bt(s.delay,L.defaults.delay),t,e,r)*v,f=Bt(s.composition,"replace");for(let o in s){if(!tt(o))continue;const d={},y={iterations:p,direction:m,fill:"both",easing:g,duration:c,delay:u,composite:f},T=s[o],S=!!a&&(b.includes(o)?o:_.get(o)),x=S?"transform":o;let w;if(l[x]||(l[x]=h[x]),H(T)){const s=T,a=Bt(s.ease,n),l=a.ease&&a,p=s.to,m=s.from;if(y.duration=(l?l.settlingDuration:Lt(Bt(s.duration,c),t,e,r))*v,y.delay=Lt(Bt(s.delay,u),t,e,r)*v,y.composite=Bt(s.composition,f),y.easing=ei(a),w=ai(t,o,m,p,e,r),S?(d[`--${S}`]=w,i[S]=w):d[o]=ai(t,o,m,p,e,r),Je(this,t,o,d,y),!q(m))if(S){const t=`--${S}`;h.setProperty(t,d[t][0])}else h[o]=d[o][0]}else w=X(T)?T.map(s=>oi(o,s,t,e,r)):oi(o,T,t,e,r),S?(d[`--${S}`]=w,i[S]=w):d[o]=w,Je(this,t,o,d,y)}if(a){let t=y;for(let e in i)t+=`${T[e]}var(--${e})) `;h.transform=t}}),h&&this.autoplay.link(this)}forEach(t){try{const e=Y(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return 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=L.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===L.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"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];q(r)||r===y?s.removeProperty(F(e)):t.style[e]=r}t.getAttribute("style")===y&&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 li={animate:(t,e)=>new hi(t,e),convertEase:Ks};let di=0,ci=0;const ui=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),pi=(t,e)=>{let s=t[e];for(;s&&s.nodeType===Node.TEXT_NODE&&!s.textContent.trim();)s=s[e];return s&&s.nodeType===Node.TEXT_NODE},mi=t=>pi(t,"previousSibling")||pi(t,"nextSibling"),fi=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},gi=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},yi=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,fi(s)),i&&!e.has(i)&&e.set(i,fi(i))},vi=t=>{t.forEach((t,e)=>gi(e,t)),t.clear()},_i={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},bi=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},Ti=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+ci++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.total=1,n.delay=0,n.duration=0,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.hasTransform=!1,n.isAnimated=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.isInlined=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Si=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,h=t.state.rootNode,l=t.parentNode,d=s.transform,c=r.style.transform,u=!!l&&l.measuredIsRemoved,p=s.position;if(o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=ui(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u,t.isInlined=t.measuredDisplay.includes("inline")&&mi(r),t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=fi(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=fi(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let m,f,g=0,y=0,v=0,_=0;if(!i){const t=e.getBoundingClientRect();g=t.left,y=t.top,v=t.width,_=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);q(e)||(a[t]=e)}if(a.left=g,a.top=y,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(m=g,f=y):(m=0,f=0);else{const e=l||h,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)m=g-s-r,f=y-i-n;else if(e===h){const t=h.properties.left,e=h.properties.top;m=g-t-h.properties.clientLeft,f=y-e-h.properties.clientTop}else m=g-s-r,f=y-i-n}return a.x=m,a.y=f,a.width=v,a.height=_,t},xi=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},wi=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},$i=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},Ei=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(gi(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(gi(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Ci=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.measuredIsRemoved&&t.layout.pendingRemoved.delete(t.$el)},Ni=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class ki{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}get(t){const e=this.nodes.get(t.dataset.layoutId);if(e)return e.properties;console.warn("No node found on state")}getValue(t,e){if(!t||!t.dataset)return void console.warn(`No element found on state (${t})`);const s=this.nodes.get(t.dataset.layoutId);if(!s)return void console.warn("No node found on state");const i=s.properties[e];return q(i)?void 0:Lt(i,t,s.index,s.total)}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,fi(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||G(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?_i:getComputedStyle(e),a=!!n||"none"===o.display,h=!!n||"hidden"===o.visibility,l=!a&&!h,d=e.dataset.layoutId,c=ui(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=ui(i,u.$el),h=u.measuredIsVisible;if(a||!c&&(c||h||!l)){if(a&&!h&&l){Si(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}bi(u),u=Ti(e,t,this,u)}else u=Ti(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.isAnimated=!1,u.hasVisibilityHidden=h,u.hasDisplayNone=a,u.hasVisibilitySwap=h&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Si(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const{children:t,root:e}=this.layout,s=X(t)?t:[t],i=[],r="*"===t?e:B.root;for(let t=0,e=s.length;t<e;t++){const e=s[t];i[t]=Y(e)?r.querySelectorAll(e):e}const n=be(i);this.nodes.clear(),this.rootNodes.clear();const o=this.registerElement(e,null);o.isTarget=!0,this.rootNode=o;const a=new Set;this.nodes.forEach((t,e)=>{t&&t.measuredIsInsideRoot&&a.add(e)});const h=new Set,l=[];for(let t=0,s=n.length;t<s;t++){const s=n[t];if(s&&1===s.nodeType&&s!==e){if(!ui(e,s)){const t=s.dataset.layoutId;if(!t||!a.has(t))continue}h.has(s)||(h.add(s),l.push(s))}}for(let t=0,e=l.length;t<e;t++)this.ensureDetachedNode(l[t],h);for(let t=0,e=n.length;t<e;t++){const e=n[t],s=this.nodes.get(e.dataset.layoutId);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY;const d=this.nodes.size;return this.forEachNode(Ei),this.forEachNode((t,e)=>{t.index=e,t.total=d}),this}}class Ri{constructor(t,e={}){B.current&&B.current.register(this);const s=e.frozen,i=e.added,r=e.removed,n=e.properties;if(this.params=e,this.root=be(t)[0],this.id=di++,this.children=e.children||"*",this.absoluteCoords=!1,this.duration=Bt(e.duration,500),this.delay=Bt(e.delay,0),this.ease=Bt(e.ease,"inOutExpo"),this.onComplete=Bt(e.onComplete,S),this.frozenParams=s||{opacity:0},this.addedParams=i||{opacity:0},this.removedParams=r||{opacity:0},this.properties=new Set(["opacity","borderRadius"]),s)for(let t in s)this.properties.add(t);if(i)for(let t in i)this.properties.add(t);if(r)for(let t in r)this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoved=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new ki(this),this.newState=new ki(this),this.timeline=null,this.transformAnimation=null,this.frozen=[],this.removed=[],this.added=[],this.oldState.record(),vi(this.transitionMuteStore)}revert(){return this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.root.classList.remove("is-animated"),this.frozen.length=this.removed.length=this.added.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>vi(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode($i),this}animate(t={}){const e=Bt(t.delay,this.delay),s=Bt(t.duration,this.duration),i=Bt(t.onComplete,this.onComplete),r=t.frozen?$t(t.frozen,this.frozenParams):this.frozenParams,n=t.added?$t(t.added,this.addedParams):this.addedParams,o=t.removed?$t(t.removed,this.removedParams):this.removedParams,a=this.oldState,h=this.newState,l=this.added,d=this.removed,c=this.frozen,u=this.pendingRemoved;l.length=d.length=c.length=0,a.forEachRootNode(yi),h.record(),h.forEachRootNode(wi);const p=[],m=[],f=[],g=[],y=h.rootNode.$el;h.forEachRootNode(t=>{const i=t.$el,r=t.id,y=t.parentNode,v=!!y&&y.branchAdded,_=!!y&&y.branchRemoved,b=!!y&&y.branchNotRendered;t.delay=+(W(e)?e(i,t.index,t.total):e),t.duration=+(W(s)?s(i,t.index,t.total):s);let T=a.nodes.get(r);const S=!T;S?(T=Ni(t,{},a),a.nodes.set(r,T),T.measuredIsRemoved=!0):T.measuredIsRemoved&&!t.measuredIsRemoved&&(Ni(t,T,a),T.measuredIsRemoved=!0);const x=T.parentNode,w=(x?x.id:null)!==(y?y.id:null),$=T.$el!==t.$el,E=T.measuredIsRemoved,C=t.measuredIsRemoved;if(!T.measuredIsRemoved&&!C&&!S&&(w||$)){let e=0,s=0,i=t.parentNode;for(;i&&(e+=i.properties.x||0,s+=i.properties.y||0,i.parentNode!==h.rootNode);)i=i.parentNode;let r=0,n=0,o=T.parentNode;for(;o&&(r+=o.properties.x||0,n+=o.properties.y||0,o.parentNode!==a.rootNode);)o=o.parentNode;T.properties.x+=r-e,T.properties.y+=n-s}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=T.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const N=u.has(i),k=T.measuredIsVisible,R=t.measuredIsVisible,I=!k&&R&&!b,D=!C&&(E||N)&&!v,A=C&&!E&&!_,O=A||C&&N&&!_;t.measuredIsRemoved&&k&&(t.$el.style.display=T.measuredDisplay,t.$el.style.visibility="visible",Ni(T,t,h)),A?(d.push(i),u.add(i)):!C&&N&&u.delete(i),D&&!b||I?(xi(T,n),l.push(i)):O&&!b&&xi(t,o);for(let e in t.properties)t.properties[e]=h.getValue(t.$el,e),T.properties[e]=a.getValue(t.$el,e);const B=(D||A)&&E!==C;let L=!1;if(t.isTarget&&(!t.measuredIsRemoved&&k||t.measuredIsRemoved&&R)){t.isInlined||"none"===t.properties.transform&&"none"===T.properties.transform||(t.hasTransform=!0,L=!0,f.push(i));for(let e in t.properties)if("transform"!==e&&(t.properties[e]!==T.properties[e]||B)){L=!0,m.push(i);break}}const P=L||D||O||I,M=t.isTarget&&P;t.isAnimated=M,t.branchAdded=v||D,t.branchRemoved=_||O,t.branchNotRendered=b||t.measuredIsRemoved;const F=Math.abs(t.properties.width-T.properties.width)>1,V=Math.abs(t.properties.height-T.properties.height)>1;t.sizeChanged=F||V,p.push(i),t.isTarget||(c.push(i),(P||t.sizeChanged)&&y&&y.isTarget&&y.isAnimated&&y.sizeChanged&&g.push(i))});const v={ease:Bt(t.ease,this.ease),duration:t=>h.nodes.get(t.dataset.layoutId).duration,delay:t=>h.nodes.get(t.dataset.layoutId).delay};if(this.timeline=as({onComplete:()=>{this.transformAnimation&&this.transformAnimation.cancel(),h.forEachRootNode(t=>{Ci(t),$i(t)});for(let t=0,e=f.length;t<e;t++){const e=f[t];e.style.transform=h.getValue(e,"transform")}this.root.classList.remove("is-animated"),i&&i(this),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||vi(this.transitionMuteStore)})},onPause:()=>{this.transformAnimation&&this.transformAnimation.cancel(),h.forEachRootNode(Ci),this.root.classList.remove("is-animated"),i&&i(this)},composition:!1,defaults:v}),p.length){this.root.classList.add("is-animated");for(let t=0,e=p.length;t<e;t++){const e=p[t],s=e.dataset.layoutId,i=a.nodes.get(s),r=h.nodes.get(s),n=i.properties;yi(r),r.isInlined||(e.style.display="block",(e!==y||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===y&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px"),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none")}a.scrollX===window.scrollX&&a.scrollY===window.scrollY||requestAnimationFrame(()=>{window.scrollTo(a.scrollX,a.scrollY)});for(let t=0,e=m.length;t<e;t++){const e=m[t],s=e.dataset.layoutId,i=a.nodes.get(s),r=h.nodes.get(s),n=i.properties,o=r.properties;let l=!1;const d={composition:"none"};r.isInlined||(n.width!==o.width&&(d.width=[n.width,o.width],l=!0),n.height!==o.height&&(d.height=[n.height,o.height],l=!0),r.hasTransform||(d.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],l=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(d[t]=[e,s],l=!0)}),l&&this.timeline.add(e,d,0)}}if(c.length){for(let t=0,e=c.length;t<e;t++){const e=c[t];if(!a.nodes.get(e.dataset.layoutId).isInlined){const t=a.get(e);e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${t.x}px ${t.y}px`}this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${a.getValue(e,t)}`)})}for(let t=0,e=c.length;t<e;t++){const e=c[t],s=h.nodes.get(e.dataset.layoutId),i=h.get(e);this.timeline.call(()=>{s.isInlined||(e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${h.getValue(e,t)}`)})},s.delay+s.duration/2)}if(g.length){const t={};if(r)for(let e in r)t[e]=[{from:t=>a.getValue(t,e),ease:"in(1.75)",to:r[e]},{from:r[e],to:t=>h.getValue(t,e),ease:"out(1.75)"}];this.timeline.add(g,t,0)}}const _=f.length;if(_){for(let t=0;t<_;t++){const e=f[t];e.style.translate=`${a.get(e).x}px ${a.get(e).y}px`,e.style.transform=a.getValue(e,"transform")}this.transformAnimation=li.animate(f,{translate:t=>`${h.get(t).x}px ${h.get(t).y}px`,transform:t=>h.getValue(t,"transform"),autoplay:!1,persist:!0,...v}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e),this}}const Ii=(t,e)=>new Ri(t,e),Di=vs,Ai={},Oi=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Bi=t=>(...e)=>{const s=t(...e);return new Proxy(S,{apply:(t,e,[i])=>s(i),get:(t,e)=>Bi((...t)=>{const i=Ai[e](...t);return t=>i(s(t))})})},Li=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Bi(Oi(e,s)):e)(...t);return Ai[t]||(Ai[t]=i),i},Pi=Li("roundPad",Di.roundPad),Mi=Li("padStart",Di.padStart),Fi=Li("padEnd",Di.padEnd),Vi=Li("wrap",Di.wrap),zi=Li("mapRange",Di.mapRange),Xi=Li("degToRad",Di.degToRad),Hi=Li("radToDeg",Di.radToDeg),Ui=Li("snap",Di.snap),Yi=Li("clamp",Di.clamp),Wi=Li("round",Di.round),qi=Li("lerp",Di.lerp,1),ji=Li("damp",Di.damp,1),Gi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Qi=0;const Ji=(t,e=0,s=1,i=0)=>{let r=void 0===t?Qi++: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}},Zi=t=>t[Gi(0,t.length-1)],Ki=t=>{let e,s,i=t.length;for(;i;)s=Gi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},tr=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!q(o),h=a&&!q(o.ease)?o.ease:a?Oe(o):null,l=e.grid,d=e.axis,c=e.total,u=q(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=X(t),v=e.use,_=it(g?t[0]:t),b=g?it(t[1]):0,T=k.exec((g?t[1]:t)+y),S=e.start||0+(g?_:0);let x=u?0:U(r)?r:0;return(t,r,o,a)=>{const[u]=be(t),y=q(c)?o:c,w=!q(v)&&(W(v)?v(u,r,y):Ft(u,v)),$=U(w)||Y(w)&&U(+w)?+w:r;if(p&&(x=(y-1)/2),m&&(x=y-1),!s.length){for(let t=0;t<y;t++){if(l){const e=p?(l[0]-1)/2:x%l[0],i=p?(l[1]-1)/2:ct(x/l[0]),r=e-t%l[0],n=i-ct(t/l[0]);let o=nt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(ht(x-t));i=pt(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:ht(i-t))),f&&(s=Ki(s))}const E=g?(b-_)/i:_;let C=(a?ss(a,q(e.start)?a.iterationDuration:S):S)+(E*_t(s[$],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var er=Object.freeze({__proto__:null,$:be,clamp:Yi,cleanInlineStyles:Gt,createSeededRandom:Ji,damp:ji,degToRad:Xi,get:Ze,keepTime:Is,lerp:qi,mapRange:zi,padEnd:Fi,padStart:Mi,radToDeg:Hi,random:Gi,randomPick:Zi,remove:ts,round:Wi,roundPad:Pi,set:Ke,shuffle:Ki,snap:Ui,stagger:tr,sync:Rs,wrap:Vi});const sr=t=>{const e=_e(t)[0];return e&&G(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},ir=(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)},rr=(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=ir(t,r,h,-1,a),s=ir(t,r,h,1,a);return 180*mt(s.y-e.y,s.x-e.x)/ft}{const s=ir(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}}}},nr=(t,e=0)=>{const s=sr(t);if(s)return{translateX:rr(s,"x",e),translateY:rr(s,"y",e),rotate:rr(s,"a",e)}},or=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(nt(s.a*s.a+s.b*s.b)+nt(s.c*s.c+s.d*s.d))/2)}return e},ar=(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=or(o),d=-1e3*r*l,c=h*i*l+d,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-c;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${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},hr=(t,e=0,s=0)=>_e(t).map(t=>ar(t,e,s)),lr=(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=sr(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[c];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 d=e/(l-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+_t(c.x,3)+n+c.y+" ",h+=p+_t(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[c]=h,[a,h]};var dr=Object.freeze({__proto__:null,createDrawable:hr,createMotionPath:nr,morphTo:lr});const cr="undefined"!=typeof Intl&&Intl.Segmenter,ur=/\{value\}/g,pr=/\{i\}/g,mr=/(\s+)/,fr=/^\s+$/,gr="line",yr="word",vr="char",_r="data-line";let br=null,Tr=null,Sr=null;const xr=t=>t.isWordLike||" "===t.segment||U(+t.segment),wr=t=>t.setAttribute("aria-hidden","true"),$r=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Er={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Cr=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Cr(e)}},Nr=(t,e,s)=>{const i=t.getAttribute(_r);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&fr.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&fr.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)Nr(t.children[r],e,s);return s},kr=(t,e={})=>{let s="";const i=Y(e.class)?` class="${e.class}"`:"",r=Bt(e.clone,!1),n=Bt(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},Rr=(t,e,s,i,r,n,o,a,h)=>{const l=r===gr,d=r===vr,c=`_${r}_`,u=W(t)?t(s):t,p=l?"block":"inline-block";Sr.innerHTML=u.replace(ur,`<i class="${c}"></i>`).replace(pr,`${d?h:l?o:a}`);const m=Sr.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),v=y.length;if(v){f.style.display=p,g.style.display=p,g.setAttribute(_r,`${o}`),l||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${h}`));let t=v;for(;t--;){const e=y[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 ${Er[r]}`),f};class Ir{constructor(e,i={}){br||(br=cr?new cr([],{granularity:yr}):{segment:t=>{const e=[],s=t.split(mr);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!fr.test(i)})}return e}}),Tr||(Tr=cr?new cr([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Sr&&t&&(Sr=s.createElement("template")),B.current&&B.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=i,d=(e=X(e)?e[0]:e)&&e.nodeType?e:(ve(e)||[])[0],c=!0===o?{}:o,u=!0===r||q(r)?{}:r,p=!0===n?{}:n;this.debug=Bt(l,!1),this.includeSpaces=Bt(h,!1),this.accessible=Bt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=H(c)?kr(gr,c):c,this.wordTemplate=H(u)||this.linesOnly?kr(yr,u):u,this.charTemplate=H(p)?kr(vr,p):p,this.$target=d,this.html=d&&d.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&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=Is(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,d=br.segment(o),c=s.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=xr(t);if(!u||s&&u&&xr(u))a.push(e);else{const t=a.length-1,s=a[t];mr.test(s)||mr.test(e)?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 d=a[t+1],u=r&&d&&!d.trim(),p=o,m=i?Tr.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,d=s.createTextNode(a);Rr(i,l,d,f,vr,n,-1,h.length,l.length)}}e?Rr(e,h,f,c,yr,n,-1,h.length,l.length):i?c.appendChild(f):c.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(c,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=$r(e,yr))),o&&(h||n)&&(this.chars=$r(e,vr));const l=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();!q(d)&&s-d>.5*i&&c++,e.setAttribute(_r,`${c}`);const r=e.querySelectorAll(`[${_r}]`);let n=r.length;for(;n--;)r[n].setAttribute(_r,`${c}`);d=s}if(h){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<c+1;t++){const s=e.cloneNode(!0);Nr(s,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&i.add(e),e.removeChild(t))}),a.push(s)}i.forEach(Cr);for(let e=0,s=a.length;e<s;e++)Rr(r,this.lines,a[e],t,gr,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=$r(e,yr)),o&&(this.chars=$r(e,vr))}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(wr),this.words.forEach(wr),this.chars.forEach(wr)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Dr=(t,e)=>new Ir(t,e),Ar=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ir(t,e));var Or=Object.freeze({__proto__:null,TextSplitter:Ir,split:Ar,splitText:Dr});export{be as $,hs as Animatable,Ri as AutoLayout,Ns as Draggable,qe as JSAnimation,Ds as Scope,Us as ScrollObserver,bs as Spring,Ir as TextSplitter,os as Timeline,ge as Timer,hi as WAAPIAnimation,je as animate,Yi as clamp,Gt as cleanInlineStyles,ls as createAnimatable,ks as createDraggable,hr as createDrawable,Ii as createLayout,nr as createMotionPath,As as createScope,Ji as createSeededRandom,Ss as createSpring,as as createTimeline,ye as createTimer,js as cubicBezier,ji as damp,Xi as degToRad,Re as eases,Zs as easings,se as engine,Ze as get,Js as irregular,Is as keepTime,qi as lerp,Qs as linear,zi as mapRange,lr as morphTo,Ys as onScroll,Fi as padEnd,Mi as padStart,Hi as radToDeg,Gi as random,Zi as randomPick,ts as remove,Wi as round,Pi as roundPad,Ls as scrollContainers,Ke as set,Ki as shuffle,Ui as snap,Ar as split,Dr as splitText,Ts as spring,tr as stagger,Gs as steps,dr as svg,Rs as sync,Or as text,er as utils,li as waapi,Vi as wrap};
|