animejs 3.2.2 → 4.0.1
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/LICENSE.md +1 -1
- package/README.md +260 -85
- package/lib/anime.cjs +9 -0
- package/lib/anime.esm.js +7590 -0
- package/lib/anime.esm.min.js +9 -0
- package/lib/anime.iife.js +9 -0
- package/lib/anime.iife.min.js +9 -0
- package/lib/anime.min.cjs +9 -0
- package/lib/anime.umd.js +9 -0
- package/lib/anime.umd.min.js +9 -0
- package/package.json +43 -19
- package/types/index.d.ts +1019 -0
- package/types/index.js +6874 -0
- package/lib/anime.es.js +0 -1311
- package/lib/anime.js +0 -1313
- package/lib/anime.min.js +0 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* anime.js - IIFE
|
|
3
|
+
* @version v4.0.1
|
|
4
|
+
* @author Julian Garnier
|
|
5
|
+
* @license MIT
|
|
6
|
+
* @copyright (c) 2025 Julian Garnier
|
|
7
|
+
* @see https://animejs.com
|
|
8
|
+
*/
|
|
9
|
+
var anime=function(t){"use strict";const e="undefined"!=typeof window,s=e?window:null,i=e?document:null,r={replace:0,none:1,blend:2},n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),c=Symbol(),d=1e-11,u=1e12,p=1e3,m="",f=new Map;f.set("x","translateX"),f.set("y","translateY"),f.set("z","translateZ");const g=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],_=g.reduce(((t,e)=>({...t,[e]:e+"("})),{}),y=()=>{},v=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,b=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,S=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,T=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,w=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,$=/([a-z])([A-Z])/g,E=/(\w+)(\([^)]+\)+)/g,C=/(\*=|\+=|-=)/,B={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:p,delay:0,loopDelay:0,ease:"out(2)",composition:r.replace,modifier:t=>t,onBegin:y,onBeforeUpdate:y,onUpdate:y,onLoop:y,onPause:y,onComplete:y,onRender:y},D={defaults:B,root:i,scope:null,precision:4,timeScale:1,tickThreshold:200},L={version:"4.0.1",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(L));const A=t=>t.replace($,"$1-$2").toLowerCase(),N=(t,e)=>0===t.indexOf(e),F=Date.now,P=Array.isArray,R=t=>t&&t.constructor===Object,Y=t=>"number"==typeof t&&!isNaN(t),X=t=>"string"==typeof t,M=t=>"function"==typeof t,O=t=>void 0===t,z=t=>O(t)||null===t,I=t=>e&&t instanceof SVGElement,W=t=>v.test(t),V=t=>N(t,"rgb"),U=t=>N(t,"hsl"),H=t=>!D.defaults.hasOwnProperty(t),q=t=>X(t)?parseFloat(t):t,Q=Math.pow,j=Math.sqrt,G=Math.sin,Z=Math.cos,J=Math.abs,K=Math.exp,tt=Math.ceil,et=Math.floor,st=Math.asin,it=Math.max,rt=Math.atan2,nt=Math.PI,ot=Math.round,at=(t,e,s)=>t<e?e:t>s?s:t,ht={},lt=(t,e)=>{if(e<0)return t;if(!e)return ot(t);let s=ht[e];return s||(s=ht[e]=10**e),ot(t*s)/s},ct=(t,e)=>P(e)?e.reduce(((e,s)=>J(s-t)<J(e-t)?s:e)):e?ot(t/e)*e:t,dt=(t,e,s)=>t+(e-t)*s,ut=t=>t===1/0?u:t===-1/0?-1e12:t,pt=t=>t<d?d:t,mt=t=>P(t)?[...t]:t,ft=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=O(r)?e[i]:r}return s},gt=(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}},_t=(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},yt=(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};class vt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=lt(p/120,0),this._fps=120,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<d?d:s,r=lt(p/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<d?d:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const bt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,l=t.completed,c=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,f=t._loopDelay,g=t._reversed,y=t._alternate,v=t._hasChildren,b=t._delay,S=t._currentTime,x=b+c,T=e-b,w=at(S,-b,a),k=at(T,-b,a),$=T-S,E=k>0,C=k>=a,B=a<=d,L=2===n;let A=0,N=T,F=0;if(u>1){const e=~~(k/(c+(C?0:f)));t._currentIteration=at(e,0,u),C&&t._currentIteration--,A=t._currentIteration%2,N=k%(c+f)||0}const P=g^(y&&A),R=t._ease;let Y=C?P?0:a:P?c-N:N;R&&(Y=c*R(Y/c)||0);const X=(o?o.backwards:T<S)?!P:!!P;if(t._currentTime=T,t._iterationTime=Y,t.backwards=X,E&&!t.began?(t.began=!0,s||o&&(X||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||v||!E||t._currentIteration===p||t.onLoop(t),L||1===n&&(e>=b&&e<=x||e<=b&&w>b||e>=x&&w!==a)||Y>=x&&w!==a||Y<=b&&w>0||e<=w&&w===a&&l||C&&!l&&B){if(E&&(t.computeDeltaTime(w),s||t.onBeforeUpdate(t)),!v){const e=L||(X?-1*$:$)>=D.tickThreshold,n=t._offset+(o?o._offset:0)+b+Y;let a,l,c,d,u=t._head,p=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,g=u._nextRep,y=u._prevRep,v=t!==r.none;if((e||(s!==o||n<=f+(g?g._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!g||g._isOverridden||n<=g._absoluteStartTime)&&(!y||y._isOverridden||n>=y._absoluteStartTime+y._changeDuration+u._delay))){const e=u._currentTime=at(Y-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,_=0===m,y=_&&g||0===s||1===s?-1:D.precision;let b,S;if(_)b=S=n(lt(dt(u._fromNumber,u._toNumber,s),y));else if(1===m)S=n(lt(dt(u._fromNumber,u._toNumber,s),y)),b=`${S}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=lt(at(n(dt(t[0],e[0],s)),0,255),0),r=lt(at(n(dt(t[1],e[1],s)),0,255),0),o=lt(at(n(dt(t[2],e[2],s)),0,255),0),a=at(n(lt(dt(t[3],e[3],s),y)),0,1);if(b=`rgba(${i},${r},${o},${a})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(3===m){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(lt(dt(u._fromNumbers[t],u._toNumbers[t],s),y)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=S),i||t===r.blend)u._value=b;else{const t=u.property;a=u.target,g?a[t]=b:1===f?a.setAttribute(t,b):(l=a.style,3===f?(a!==c&&(c=a,d=a[h]),d[t]=b,p=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(F=1)}}if(p&&u._renderTransforms){let t=m;for(let e in d)t+=`${_[e]}${d[e]}) `;l.transform=t,p=0}u=u._next}!s&&F&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&B?!s&&(o.began&&!X&&T>=a&&!l||X&&T<=d&&l)&&(t.onComplete(t),t.completed=!X):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(X||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},St=(t,e,s,i,r)=>{const n=t._currentIteration;if(bt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=F();let c=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;gt(o,(e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=d)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&bt(e,t,s,1,2),e.began=!1,e.completed=!1})),s||o.onLoop(o)}gt(o,(t=>{const e=lt((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;c+=bt(t,e,s,i,n),!t.completed&&u&&(u=!1)}),a),!s&&c&&o.onRender(o),u&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},xt={animation:null,update:y},Tt=e?requestAnimationFrame:setImmediate,wt=e?cancelAnimationFrame:clearImmediate;class kt extends vt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=B,this.paused=!(!e||!i.hidden),this.reqId=null}update(){const t=this._currentTime=F();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?(_t(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):St(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}xt.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=Tt(Et)),this}pause(){return this.paused=!0,Ct()}resume(){if(this.paused)return this.paused=!1,gt(this,(t=>t.resetTime())),this.wake()}get speed(){return this._speed*(1===D.timeScale?1:p)}set speed(t){this._speed=t*D.timeScale,gt(this,(t=>t.speed=t._speed))}get timeUnit(){return 1===D.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(D.timeScale!==s){D.timeScale=s,D.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return D.precision}set precision(t){D.precision=t}}const $t=(()=>{const t=new kt(F());return e&&(L.engine=t,i.addEventListener("visibilitychange",(()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())}))),t})(),Et=()=>{$t._head?($t.reqId=Tt(Et),$t.update()):$t.reqId=0},Ct=()=>(wt($t.reqId),$t.reqId=0,$t);function Bt(t){const e=X(t)?D.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Dt(t){if(z(t))return[];if(P(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!z(i)){const t=Bt(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!z(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}if(!e)return[t];const s=Bt(t);return s?Array.from(s):[t]}function Lt(t){const e=Dt(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[n]){s[n]=!0;const t=I(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[h]={})}}return e}const At=t=>{const e=Dt(t)[0];if(e&&I(e))return e},Nt=(t,e,s=0)=>t.getPointAtLength(e+s>=1?e+s:0),Ft=(t,e)=>s=>{const i=+t.getTotalLength(),r=s[a],n=t.getCTM();return{from:0,to:i,modifier:s=>{if("a"===e){const e=Nt(t,s,-1),i=Nt(t,s,1);return 180*rt(i.y-e.y,i.x-e.x)/nt}{const i=Nt(t,s,0);return"x"===e?r||!n?i.x:i.x*n.a+i.y*n.c+n.e:r||!n?i.y:i.x*n.b+i.y*n.d+n.f}}}},Pt=["opacity","rotate","overflow","color"],Rt={morphTo:(t,e=.33)=>s=>{const i=At(t);if(!i)return;const r="path"===s.tagName,n=r?" ":",",o=s[l];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+lt(d.x,3)+n+d.y+" ",h+=p+lt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),h=i.getAttribute(r?"d":"points");return s[l]=h,[a,h]},createMotionPath:t=>{const e=At(t);if(e)return{translateX:Ft(e,"x"),translateY:Ft(e,"y"),rotate:Ft(e,"a")}},createDrawable:(t,e=0,s=0)=>{const i=Dt(t);return i.forEach(((t,r)=>i[r]=function(t,e,s){const i=getComputedStyle(t).strokeLinecap,r=p;let n=i;const o=new Proxy(t,{get(t,e){const s=t[e];return e===c?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),o=+s[0],a=+s[1],h=-1e3*o,l=a*r+h,c=r+(0===o&&1===a||1===o&&0===a?0:10)-l;if("butt"!==i){const e=o===a?"butt":i;n!==e&&(t.setAttribute("stroke-linecap",`${e}`),n=e)}t.setAttribute("stroke-dashoffset",`${h}`),t.setAttribute("stroke-dasharray",`${l} ${c}`)}return Reflect.apply(s,t,e)}:M(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),o.setAttribute("draw",`${e} ${s}`)),o}(t,e,s))),i}},Yt=(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),Xt=(t,e)=>O(t)?e:t,Mt=(t,e,s,i,r)=>{if(M(t)){const n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};return r&&(r.func=n),n()}return t},Ot=(t,e)=>t[o]?t[a]&&((t,e)=>{if(Pt.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}})(t,e)?1:g.includes(e)||f.get(e)?3:N(e,"--")?4:e in t.style?2:e in t?0:1:0,zt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[c]||t).getPropertyValue(e);return"auto"===r?"0":r},It=(t,e,s,i)=>{const r=O(s)?Ot(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[h];let o;for(;o=E.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&&!O(r)?r:N(e,"scale")?"1":N(e,"rotate")||N(e,"skew")?"0deg":"0px"})(t,e,i):4===r?zt(t,e,i).trimStart():zt(t,e,i)},Wt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Vt=(t,e)=>{if(e.t=0,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 n=!s.includes(" ")&&k.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(W(r=s)||V(r)||U(r))return e.t=2,e.d=V(i=s)?(t=>{const e=b.exec(t)||S.exec(t),s=O(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):W(i)?(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]})(i):U(i)?(t=>{const e=x.exec(t)||T.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=O(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=lt(255*Yt(e,t,s+1/3),0),a=lt(255*Yt(e,t,s),0),h=lt(255*Yt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(w);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(w)||[],e}}var i,r;return e.n=s,e},Ut=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=mt(t._toNumbers),e.s=mt(t._strings),e),Ht={t:0,n:0,u:null,o:null,d:null,s:null},qt={_rep:new WeakMap,_add:new Map},Qt=(t,e,s="_rep")=>{const i=qt[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},jt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,Gt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=d,t._currentTime=d},Zt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;yt(e,t,jt,"_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){Gt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)Gt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration);i._changeDuration=n-e-t,i._currentTime=i._changeDuration,i._isOverlapped=1,i._changeDuration<d&&Gt(i)}let o=!0;if(gt(e,(t=>{t._isOverlapped||(o=!1)})),o){const t=e.parent;if(t){let s=!0;gt(t,(t=>{t!==e&>(t,(t=>{t._isOverlapped||(s=!1)}))})),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=Qt(t.target,t.property,"_add"),s=(t=>{let e=xt.animation;return e||(e={duration:d,computeDeltaTime:y,_offset:0,_delay:0,_head:null,_tail:null},xt.animation=e,xt.update=()=>{t.forEach((t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?mt(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}})),bt(e,1,1,0,2)}),e})(qt._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=d,i._startTime=0,i._numbers=mt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,yt(e,i),yt(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=mt(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=mt(t._toNumbers);e&&e.forEach(((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0})),i._fromNumbers=e}yt(e,t,null,"_prevAdd","_nextAdd")}return t},Jt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=qt._rep.get(s)[i];if(_t(n,t,"_prevRep","_nextRep"),e===r.blend){const e=qt._add,r=e.get(s);if(!r)return;const n=r[i],o=xt.animation;_t(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){_t(n,a,"_prevAdd","_nextAdd"),_t(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Kt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),te=t=>t._cancelled?(t._hasChildren?gt(t,te):gt(t,(t=>{t._composition!==r.none&&Zt(t,Qt(t.target,t.property))})),t._cancelled=0,t):t;let ee=0;class se extends vt{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:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:b}=t;D.scope&&D.scope.revertibles.push(this);const S=e?0:$t._elapsedTime,x=e?e.defaults:D.defaults,T=M(r)||O(r)?x.delay:+r,w=M(n)||O(n)?1/0:+n,k=Xt(h,x.loop),$=Xt(l,x.loopDelay),E=!0===k||k===1/0||k<0?1/0:k+1;let C=0;if(e)C=s;else{let t=F();$t.paused&&($t.requestTick(t),t=$t._elapsedTime),C=t-$t._startTime}this.id=O(i)?++ee:i,this.parent=e,this.duration=ut((w+$)*E-$)||d,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=b||x.onUpdate,this.onLoop=f||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=!e&&Xt(c,x.autoplay),this._offset=C,this._delay=T,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=y,this._running=!1,this._reversed=+Xt(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Xt(a,x.alternate),this._prev=null,this._next=null,this._elapsedTime=S,this._startTime=S,this._lastTime=S,this._fps=Xt(u,x.frameRate),this._speed=Xt(p,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(1).play()}get currentTime(){return at(lt(this._currentTime,D.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return lt(this._iterationTime,D.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return at(lt(this._currentTime/this.duration,5),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return at(lt(this._iterationTime/this.iterationDuration,5),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*at(+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=0){return te(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,St(this,0,1,t,2),Kt(this),this._hasChildren&>(this,Kt),this}init(t=0){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&St(this,this.duration,1,t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!O(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*$t._speed);return this._startTime=F()-(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<=d&&!this._hasChildren?St(this,d,0,0,2):(this._running||(yt($t,this),$t._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,$t.wake()),this):this}restart(){return this.reset(0).resume()}seek(t,e=0,s=0){te(this),this.completed=!1;const i=this.paused;return this.paused=!0,St(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?et(u/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?gt(this,(t=>t.cancel()),!0):gt(this,Jt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration;if(e===pt(t))return this;const s=t/e,i=t<=d;return this.duration=i?d:pt(ut(lt(e*s,12))),this.iterationDuration=i?d:pt(ut(lt(this.iterationDuration*s,12))),this._offset*=s,this._delay*=s,this._loopDelay*=s,this}revert(){St(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=y){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=y};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const ie=t=>t,re=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,ne=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?ie:r=>0===r||1===r?r:re(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=re(r,e,s)-t,i>0?o=r:n=r}while(J(i)>1e-7&&++a<100);return r})(r,t,s),e,i),oe=(t=10,e)=>{const s=e?tt:et;return e=>s(at(e,0,1)*t)*(1/t)},ae=(...t)=>{const e=t.length;if(!e)return ie;const s=e-1,i=t[0],r=t[s],n=[0],o=[q(i)];for(let e=1;e<s;e++){const i=t[e],r=X(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(O(h)?e/s:q(h)/100),o.push(q(a))}return o.push(q(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]}},he=(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(at(o,r,1))}return s.push(1),ae(...s)},le=nt/2,ce=2*nt,de=(t=1.68)=>e=>Q(e,+t),ue={[m]:de,Quad:de(2),Cubic:de(3),Quart:de(4),Quint:de(5),Sine:t=>1-Z(t*le),Circ:t=>1-j(1-t*t),Expo:t=>t?Q(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=Q(2,--s))-1)/11;);return 1/Q(4,3-s)-7.5625*Q((3*e-2)/22-t,2)},Back:(t=1.70158)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=at(+t,1,10),i=at(+e,d,2),r=i/ce*st(1/s),n=ce/i;return t=>0===t||1===t?t:-s*Q(2,-10*(1-t))*G((1-t-r)*n)}},pe={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},me=(t,e,s)=>{if(s[t])return s[t];if(t.indexOf("(")<=-1){const i=pe[t]||t.includes("Back")||t.includes("Elastic")?e[t]():e[t];return i?s[t]=i:ie}{const i=t.slice(0,-1).split("("),r=e[i[0]];return r?s[t]=r(...i[1].split(",")):ie}},fe=(()=>{const t={linear:ae,irregular:he,steps:oe,cubicBezier:ne};for(let e in pe)for(let s in ue){const i=ue[s],r=pe[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ge={linear:ie},_e=t=>M(t)?t:X(t)?me(t,fe,ge):ie,ye={},ve=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&I(e)&&t in e.style){const e=ye[t];if(e)return e;{const e=t?A(t):t;return ye[t]=e,e}}return t},be={deg:1,rad:180/nt,turn:360},Se={},xe=(t,e,s,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===s)return e;const a=o+n+s,h=Se[a];if(O(h)||r){let r;if(n in be)r=o*be[n]/be[s];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==i?h:i.body;l.appendChild(a);const c=a.style;c.width=e+n;const d=a.offsetWidth||e;c.width=e+s;const u=d/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,Se[a]=r}else e.n=h;return e.t,e.u=s,e},Te=t=>{if(t._hasChildren)gt(t,Te,!0);else{const e=t;e.pause(),gt(e,(t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=e._inlineStyles[s];if(3===t._tweenType){const e=i[h];if(O(n)||n===m?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=m;for(let s in e)t+=_[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else O(n)||n===m?r.removeProperty(s):r[s]=n;e._tail===t&&e.targets.forEach((t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")}))}}))}return t},we={t:0,n:0,u:null,o:null,d:null,s:null},ke={t:0,n:0,u:null,o:null,d:null,s:null},$e={func:null},Ee=[null],Ce=[null,null],Be={to:null};let De,Le,Ae=0;class Ne extends se{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i);const h=Lt(t),l=h.length,c=e.keyframes,u=c?ft(((t,e)=>{const s={};if(P(t)){const e=[].concat(...t.map((t=>Object.keys(t)))).filter(H);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];H(s)?s===r&&(e.to=i):e[s]=i}return e}));s[r]=n}}else{const i=Xt(e.duration,D.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(H(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})(c,e),e):e,{delay:m,duration:f,ease:g,playbackEase:_,modifier:y,composition:v,onRender:b}=u,S=s?s.defaults:D.defaults,x=Xt(_,S.playbackEase),T=x?_e(x):null,w=!O(g)&&!O(g.ease),k=w?g.ease:Xt(g,T?"linear":S.ease),$=w?g.duration:Xt(f,S.duration),E=Xt(m,S.delay),C=y||S.modifier,B=O(v)&&l>=p?r.none:O(v)?S.composition:v,L={},A=this._offset+(s?s._offset:0);let N=NaN,F=NaN,X=0,M=0;for(let t=0;t<l;t++){const e=h[t],i=o||t,c=a||l;let p=NaN,m=NaN;for(let t in u)if(H(t)){const o=Ot(e,t),a=ve(t,e,o);let h=u[t];const l=P(h);if(n&&!l&&(Ce[0]=h,Ce[1]=h,h=Ce),l){const t=h.length,e=!R(h[0]);2===t&&e?(Be.to=h,Ee[0]=Be,De=Ee):t>2&&e?(De=[],h.forEach(((t,e)=>{e?1===e?(Ce[1]=t,De.push(Ce)):De.push(t):Ce[0]=t}))):De=h}else Ee[0]=h,De=Ee;let f=null,g=null,_=NaN,y=0,v=0;for(let t=De.length;v<t;v++){const n=De[v];R(n)?Le=n:(Be.to=n,Le=Be),$e.func=null;const h=Mt(Le.to,e,i,c,$e);let l;R(h)&&!O(h.to)?(Le=h,l=h.to):l=h;const u=Mt(Le.from,e,i,c),p=Le.ease,m=!O(p)&&!O(p.ease),b=m?p.ease:p||k,S=m?p.duration:Mt(Xt(Le.duration,t>1?Mt($,e,i,c)/t:$),e,i,c),x=Mt(Xt(Le.delay,v?0:E),e,i,c),T=Mt(Xt(Le.composition,B),e,i,c),w=Y(T)?T:r[T],D=Le.modifier||C,N=!O(u),F=!O(l),z=P(l),I=z||N&&F,W=g?y+x:x,V=A+W;M||!N&&!z||(M=1);let U=g;if(w!==r.none){f||(f=Qt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(U=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)Gt(t),t=t._nextRep}if(I?(Vt(z?Mt(l[0],e,i,c):u,we),Vt(z?Mt(l[1],e,i,c,$e):l,ke),0===we.t&&(U?1===U._valueType&&(we.t=1,we.u=U._unit):(Vt(It(e,a,o,L),Ht),1===Ht.t&&(we.t=1,we.u=Ht.u)))):(F?Vt(l,ke):g?Ut(g,ke):Vt(s&&U&&U.parent.parent===s?U._value:It(e,a,o,L),ke),N?Vt(u,we):g?Ut(g,we):Vt(s&&U&&U.parent.parent===s?U._value:It(e,a,o,L),we)),we.o&&(we.n=Wt(U?U._toNumber:Vt(It(e,a,o,L),Ht).n,we.n,we.o)),ke.o&&(ke.n=Wt(we.n,ke.n,ke.o)),we.t!==ke.t)if(3===we.t||3===ke.t){const t=3===we.t?we:ke,e=3===we.t?ke:we;e.t=3,e.s=mt(t.s),e.d=t.d.map((()=>e.n))}else if(1===we.t||1===ke.t){const t=1===we.t?we:ke,e=1===we.t?ke:we;e.t=1,e.u=t.u}else if(2===we.t||2===ke.t){const t=2===we.t?we:ke,e=2===we.t?ke:we;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(we.u!==ke.u){let t=ke.u?we:ke;t=xe(e,t,ke.u?ke.u:we.u,!1)}if(ke.d&&we.d&&ke.d.length!==we.d.length){const t=we.d.length>ke.d.length?we:ke,e=t===we?ke:we;e.d=t.d.map(((t,s)=>O(e.d[s])?0:e.d[s])),e.s=mt(t.s)}const H=lt(+S||d,12),q={parent:this,id:Ae++,property:a,target:e,_value:null,_func:$e.func,_ease:_e(b),_fromNumbers:mt(we.d),_toNumbers:mt(ke.d),_strings:mt(ke.s),_fromNumber:we.n,_toNumber:ke.n,_numbers:mt(we.d),_number:we.n,_unit:ke.u,_modifier:D,_currentTime:0,_startTime:W,_delay:+x,_updateDuration:H,_changeDuration:H,_absoluteStartTime:V,_tweenType:o,_valueType:ke.t,_composition:w,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};w!==r.none&&Zt(q,f),isNaN(_)&&(_=q._startTime),y=lt(W+H,12),g=q,X++,yt(this,q)}(isNaN(F)||_<F)&&(F=_),(isNaN(N)||y>N)&&(N=y),3===o&&(p=X-v,m=X)}if(!isNaN(p)){let t=0;gt(this,(e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&>(xt.animation,(t=>{t.id===e.id&&(t._renderTransforms=1)}))),t++}))}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),F?(gt(this,(t=>{t._startTime-t._delay||(t._delay-=F),t._startTime-=F})),N-=F):F=0,N||(N=d,this.iterationCount=0),this.targets=h,this.duration=N===d?d:ut((N+this._loopDelay)*this.iterationCount-this._loopDelay)||d,this.onRender=b||S.onRender,this._ease=T,this._delay=F,this.iterationDuration=N,this._inlineStyles=L,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===pt(t))return this;const s=t/e;return gt(this,(t=>{t._updateDuration=pt(lt(t._updateDuration*s,12)),t._changeDuration=pt(lt(t._changeDuration*s,12)),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s})),super.stretch(t)}refresh(){return gt(this,(t=>{const e=It(t.target,t.property,t._tweenType);Vt(e,Ht),t._fromNumbers=mt(Ht.d),t._fromNumber=Ht.n,t._func&&(Vt(t._func(),ke),t._toNumbers=mt(ke.d),t._strings=mt(ke.s),t._toNumber=ke.n)})),this}revert(){return super.revert(),Te(this)}then(t){return super.then(t)}}const Fe=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(t(i/e));return`linear(${s.join(", ")})`},Pe={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Re=(()=>{const t={};for(let e in pe)t[e]=t=>pe[e](de(t));return t})(),Ye=t=>{let e=Pe[t];if(e)return e;if(e="linear",X(t))if(N(t,"linear")||N(t,"cubic-")||N(t,"steps")||N(t,"ease"))e=t;else if(N(t,"cubicB"))e=A(t);else{const s=me(t,Re,Pe);M(s)&&(e=s===ie?"linear":Fe(s))}else if(M(t)){const s=Fe(t);s&&(e=s)}else t.ease&&(e=Fe(t.ease));return Pe[t]=e},Xe=["x","y","z"],Me=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Xe],Oe=[...Xe,...g.filter((t=>["X","Y","Z"].some((e=>t.endsWith(e)))))];let ze=e&&(O(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"));const Ie={_head:null,_tail:null},We=(t,e,s)=>{let i=Ie._head;for(;i;){const r=i._next,n=i.$el===t,o=!e||i.property===e,a=!s||i.parent===s;if(n&&o&&a){const t=i.animation;try{t.commitStyles()}catch{}t.cancel(),_t(Ie,i);const e=i.parent;e&&(e._completed++,e.animations.length===e._completed&&(e.completed=!0,e.muteCallbacks||(e.paused=!0,e.onComplete(e),e._resolve(e))))}i=r}},Ve=(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),We(e,s),yt(Ie,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{We(e,s,t)};return n.onremove=a,n.onfinish=a,n},Ue=(t,e,s,i,r)=>{let n=Mt(e,s,i,r);return Y(n)?Me.includes(t)||N(t,"translate")?`${n}px`:N(t,"rotate")||N(t,"skew")?`${n}deg`:`${n}`:n},He=(t,e,s,i,r,n)=>{let o="0";const a=O(i)?getComputedStyle(t)[e]:Ue(e,i,t,r,n);return o=O(s)?P(i)?i.map((s=>Ue(e,s,t,r,n))):a:[Ue(e,s,t,r,n),a],o};class qe{constructor(t,e){D.scope&&D.scope.revertibles.push(this),ze||(g.forEach((t=>{const e=N(t,"skew"),s=N(t,"scale"),i=N(t,"rotate"),r=N(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})})),ze=!0);const s=Lt(t),i=s.length;i||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const r=Xt(e.ease,Ye(D.defaults.ease)),n=r.ease&&r,o=Xt(e.autoplay,D.defaults.autoplay),a=!(!o||!o.link)&&o,l=e.alternate&&!0===e.alternate,c=e.reversed&&!0===e.reversed,d=Xt(e.loop,D.defaults.loop),u=!0===d||d===1/0?1/0:Y(d)?d+1:1,v=l?c?"alternate-reverse":"alternate":c?"reverse":"normal",b=Ye(r),S=1===D.timeScale?1:p;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=e.onComplete||y,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!o||!1!==a,this.reversed=c,this.autoplay=o,this._speed=Xt(e.playbackRate,D.defaults.playbackRate),this._resolve=y,this._completed=0,this._inlineStyles=s.map((t=>t.getAttribute("style"))),s.forEach(((t,s)=>{const o=t[h],a=Oe.some((t=>e.hasOwnProperty(t))),l=(n?n.duration:Mt(Xt(e.duration,D.defaults.duration),t,s,i))*S,c=Mt(Xt(e.delay,D.defaults.delay),t,s,i)*S,d=Xt(e.composition,"replace");for(let n in e){if(!H(n))continue;const h={},p={iterations:u,direction:v,fill:"forwards",easing:b,duration:l,delay:c,composite:d},m=e[n],_=!!a&&(g.includes(n)?n:f.get(n));let y;if(R(m)){const e=m,a=Xt(e.ease,r),u=a.ease&&a,f=e.to,g=e.from;if(p.duration=(u?u.duration:Mt(Xt(e.duration,l),t,s,i))*S,p.delay=Mt(Xt(e.delay,c),t,s,i)*S,p.composite=Xt(e.composition,d),p.easing=Ye(a),y=He(t,n,g,f,s,i),_?(h[`--${_}`]=y,o[_]=y):h[n]=He(t,n,g,f,s,i),Ve(this,t,n,h,p),!O(g))if(_){const e=`--${_}`;t.style.setProperty(e,h[e][0])}else t.style[n]=h[n][0]}else y=P(m)?m.map((e=>Ue(n,e,t,s,i))):Ue(n,m,t,s,i),_?(h[`--${_}`]=y,o[_]=y):h[n]=y,Ve(this,t,n,h,p)}if(a){let e=m;for(let t in o)e+=`${_[t]}var(--${t})) `;t.style.transform=e}})),a&&this.autoplay.link(this)}forEach(t){const e=X(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=D.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===D.timeScale?1:p);this.forEach((t=>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.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach(((t,e)=>t.setAttribute("style",this._inlineStyles[e]))),this}then(t=y){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=y};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const Qe={animate:(t,e)=>new qe(t,e),convertEase:Fe},je=(t=y)=>new se({duration:1*D.timeScale,onComplete:t},null,0).resume();function Ge(t,e,s){const i=Lt(t);if(!i.length)return;const[r]=i,n=Ot(r,e),o=ve(e,r,n);let a=It(r,o);if(O(s))return a;if(Vt(a,Ht),0===Ht.t||1===Ht.t){if(!1===s)return Ht.n;{const t=xe(r,Ht,s,!1);return`${lt(t.n,D.precision)}${t.u}`}}}const Ze=(t,e)=>{if(!O(e))return e.duration=d,e.composition=Xt(e.composition,r.none),new Ne(t,e,null,0,!0).resume()},Je=(t,e,s)=>{let i=!1;return gt(e,(r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=ve(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),_t(e,r),Jt(r),i=!0)}}),!0),i},Ke=(t,e,s)=>{const i=Dt(t),r=e||$t,n=e&&e.controlAnimation&&e;for(let t=0,e=i.length;t<e;t++){const e=i[t];We(e,s,n)}let o;if(r._hasChildren){let e=0;gt(r,(n=>{if(!n._hasChildren)if(o=Je(i,n,s),o&&!n._head)n.cancel(),_t(r,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Ke(t,n,s):n._hasChildren=!1}),!0),O(r.iterationDuration)||(r.iterationDuration=e)}else o=Je(i,r,s);return o&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),i},ts=(t,e,s)=>{const i=10**(s||0);return et((Math.random()*(e-t+1/i)+t)*i)/i},es=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),ss=(t,e,s,i)=>{let r=p/D.defaults.frameRate;if(!1!==i){const t=i||$t._hasChildren&&$t;t&&t.deltaTime&&(r=t.deltaTime)}const n=1-Math.exp(-s*r*.1);return s?1===s?e:(1-n)*t+n*e:t},is=t=>(...e)=>{const s=t(...e);return new Proxy(y,{apply:(t,e,[i])=>s(i),get:(t,e)=>is(((...t)=>{const i=ns[e](...t);return t=>i(s(t))}))})},rs=(t,e=0)=>(...s)=>(s.length<t.length?is(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(t,e)):t)(...s),ns={$:Lt,get:Ge,set:Ze,remove:Ke,cleanInlineStyles:Te,random:ts,randomPick:t=>t[ts(0,t.length-1)],shuffle:t=>{let e,s,i=t.length;for(;i;)s=ts(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},lerp:ss,sync:je,clamp:rs(at),round:rs(lt),snap:rs(ct),wrap:rs(((t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e)),interpolate:rs(dt,1),mapRange:rs(es),roundPad:rs(((t,e)=>(+t).toFixed(e))),padStart:rs(((t,e,s)=>`${t}`.padStart(e,s))),padEnd:rs(((t,e,s)=>`${t}`.padEnd(e,s))),degToRad:rs((t=>t*nt/180)),radToDeg:rs((t=>180*t/nt))},os=(t,e)=>{let s=t.iterationDuration;if(s===d&&(s=0),O(e))return s;if(Y(+e))return+e;const i=e,r=t?t.labels:null,n=!z(r),o=((t,e)=>{if(N(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!O(o),h=C.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 Wt(c,d,t[0])}return a?o:n?O(r[i])?s:r[i]:s};function as(t,e,s,i,r,n){const o=Y(t.duration)&&t.duration<=d?s-d:s;St(e,o,1,1,1);const a=i?new Ne(i,t,e,o,!1,r,n):new se(t,e,o);return a.init(1),yt(e,a),gt(e,(t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)})),e.duration=function(t){return ut((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||d}(e),e}class hs extends se{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=D.defaults;this.defaults=e?ft(e,s):s,this.onRender=t.onRender||s.onRender;const i=Xt(t.playbackEase,s.playbackEase);this._ease=i?_e(i):null,this.iterationDuration=0}add(t,e,s){const i=R(e),r=R(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(M(s)){const e=s,r=Dt(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,O(a)||(s.id=a+"-"+h),as(s,this,e(t,h,l,this),t,h,l),h++}))}else as(i,this,os(this,s),t)}else as(t,this,os(this,e));return this.init(1)}}sync(t,e){if(O(t)||t&&O(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 O(e)?this:(e.duration=d,e.composition=r.replace,this.add(t,e,s))}call(t,e){return O(t)||t&&!M(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return O(t)||t&&!X(t)||(this.labels[t]=os(this,e)),this}remove(t,e){return Ke(t,this,e),this}stretch(t){const e=this.duration;if(e===pt(t))return this;const s=t/e,i=this.labels;gt(this,(t=>{t.stretch(t.duration*s)}));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return gt(this,(t=>{t.refresh&&t.refresh()})),this}revert(){return super.revert(),gt(this,(t=>t.revert),!0),Te(this)}then(t){return super.then(t)}}class ls{constructor(t,e){D.scope&&D.scope.revertibles.push(this);const s={},i={};if(this.targets=[],this.animations={},!O(t)&&!O(e)){for(let t in e){const r=e[t];H(t)?i[t]=r:s[t]=r}for(let e in i){const n=i[e],o=R(n);let a={},h="+=0";if(o){const t=n.unit;X(t)&&(h+=t)}else a.duration=n;a[e]=o?ft({to:h},n):h;const l=ft(s,a);l.composition=r.replace,l.autoplay=!1;const c=this.animations[e]=new Ne(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(O(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return gt(c,(e=>{if(P(t))for(let s=0,i=t.length;s<i;s++)O(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;O(s)||(e._ease=_e(s)),e._currentTime=0})),O(e)||c.stretch(e),c.reset(1).resume(),this}}}}revert(){for(let t in this.animations)this[t]=y,this.animations[t].revert();return this.animations={},this.targets.length=0,this}}class cs{constructor(t={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/p,this.maxIterations=this.maxDuration/this.timeStep/p,this.m=at(Xt(t.mass,1),0,p),this.s=at(Xt(t.stiffness,100),1,p),this.d=at(Xt(t.damping,10),.1,p),this.v=at(Xt(t.velocity,0),-1e3,p),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>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?K(-n*e*s)*(1*Z(i*n)+r*G(i*n)):(1+r*n)*K(-n*s),1-n}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=at(j(o/r),d,p),l=this.zeta=n/(2*j(o*r)),c=this.wd=l<1?h*j(1-l*l):0;this.b=l<1?(l*h-a)/c:-a+h;let u=0,m=0,f=0;for(;m<t&&f<e;)J(1-this.solve(u))<s?m++:m=0,this.solverDuration=u,u+=i,f++;this.duration=lt(this.solverDuration*p,0)*D.timeScale}get mass(){return this.m}set mass(t){this.m=at(Xt(t,1),0,p),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=at(Xt(t,100),1,p),this.compute()}get damping(){return this.d}set damping(t){this.d=at(Xt(t,10),.1,p),this.compute()}get velocity(){return this.v}set velocity(t){this.v=at(Xt(t,0),-1e3,p),this.compute()}}const ds=t=>new cs(t),us=t=>{t.cancelable&&t.preventDefault()};class ps{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:y,remove:y}}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 ms{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,s=0;for(;e&&e!==i;)t(e,s),e=e.parentElement,s++}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 fs=(t,e)=>t&&M(t)?t(e):t;let gs=0;class _s{constructor(t,e={}){if(!t)return;D.scope&&D.scope.revertibles.push(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,h=e.releaseEase,l=h&&_e(h),c=!O(h)&&!O(h.ease),d=R(r)&&!O(r.mapTo)?r.mapTo:"translateX",p=R(n)&&!O(n.mapTo)?n.mapTo:"translateY",m=fs(e.container,this);this.containerArray=P(m)?m:null,this.$container=m&&!this.containerArray?Dt(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=R(t)?new ps(t):Dt(t)[0],this.$trigger=Dt(o||t)[0],this.fixed="fixed"===Ge(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.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:ds({mass:Xt(e.releaseMass,1),stiffness:Xt(e.releaseStiffness,80),damping:Xt(e.releaseDamping,20)}),this.releaseYSpring=c?h:ds({mass:Xt(e.releaseMass,1),stiffness:Xt(e.releaseStiffness,80),damping:Xt(e.releaseDamping,20)}),this.releaseEase=l||fe.outQuint,this.hasReleaseSpring=c,this.onGrab=e.onGrab||y,this.onDrag=e.onDrag||y,this.onRelease=e.onRelease||y,this.onUpdate=e.onUpdate||y,this.onSettle=e.onSettle||y,this.onSnap=e.onSnap||y,this.onResize=e.onResize||y,this.onAfterResize=e.onAfterResize||y,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),O(r)||!0===r)f[d]=0;else if(R(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(O(n)||!0===n)f[p]=0;else if(R(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new ls(this.$target,f),this.xProp=d,this.yProp=p,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=[-1e12,u,u,-1e12],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=F(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new ms(this.$target),this.overshootCoords={x:0,y:0},this.overshootXTicker=new se({autoplay:!1},null,0).init(),this.overshootYTicker=new se({autoplay:!1},null,0).init(),this.updateTicker=new se({autoplay:!1},null,0).init(),this.overshootXTicker.onUpdate=()=>{this.disabled[0]||(this.updated=!0,this.manual=!0,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootXTicker.onComplete=()=>{this.disabled[0]||(this.manual=!1,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootYTicker.onUpdate=()=>{this.disabled[1]||(this.updated=!0,this.manual=!0,this.animate[this.yProp](this.overshootCoords.y,0))},this.overshootYTicker.onComplete=()=>{this.disabled[1]||(this.manual=!1,this.animate[this.yProp](this.overshootCoords.y,0))},this.updateTicker.onUpdate=()=>this.update(),this.contained=!O(m),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[0]?p:d,this.animate.animations[this.activeProp].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&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=rt(n,r)):this.updated=!1},this.animate.animations[this.activeProp].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 se({autoplay:!1,duration:150*D.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=e,this.resizeObserver=new ResizeObserver((()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0})),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),R(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=F(),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]=lt(at(j(t*t+e*e)/r*o,a,h),5);const c=it(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=lt(t,5);return this.overshootXTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=ct(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=lt(t,5);return this.overshootYTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=ct(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return lt(this.animate[this.xProp](),D.precision)}set x(t){this.setX(t,!1)}get y(){return lt(this.animate[this.yProp](),D.precision)}set y(t){this.setY(t,!1)}get progressX(){return es(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(es(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return es(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(es(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=lt(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=lt(this.useWin?s.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=e,this.scrollBounds[0]=e-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=e-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container,e=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]=s.innerWidth,h=this.window[1]=s.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?at(c,a,c):c,this.scrollView[1]=l?at(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:S,right:x,bottom:T}=t.getBoundingClientRect();this.dragArea[2]=lt(l?at(y,a,a):y,0),this.dragArea[3]=lt(l?at(v,h,h):v,0);const w=Ge(t,"overflow"),k="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===i.body&&k||!$&&!k)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!P(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]=lt(r.top+s-(l?0:S),0),this.targetBounds[1]=lt(r.right+e-(l?a:x),0),this.targetBounds[2]=lt(r.bottom+s-(l?h:T),0),this.targetBounds[3]=lt(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]=-lt(r.top-(u?at(S,0,h):S)+o-m,0),this.containerBounds[1]=-lt(r.right-(u?at(x,0,a):x)-c+f,0),this.containerBounds[2]=-lt(r.bottom-(u?at(T,0,h):T)-d+g,0),this.containerBounds[3]=-lt(r.left-(u?at(b,0,a):b)+n-_,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(e,!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,e=t.x,r=t.y,n=fs(t.container,this),o=fs(t.containerPadding,this)||0,a=P(o)?o:[o,o,o,o],h=this.x,l=this.y,c=fs(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}this.containerArray=P(n)?n:null,this.$container=n&&!this.containerArray?Dt(n)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Xt(a,[0,0,0,0]),this.containerFriction=at(Xt(fs(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=at(Xt(fs(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=fs(R(e)&&!O(e.snap)?e.snap:t.snap,this),this.snapY=fs(R(r)&&!O(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Xt(fs(t.scrollSpeed,this),1.5),this.scrollThreshold=Xt(fs(t.scrollThreshold,this),20),this.dragSpeed=Xt(fs(t.dragSpeed,this),1),this.minVelocity=Xt(fs(t.minVelocity,this),0),this.maxVelocity=Xt(fs(t.maxVelocity,this),50),this.velocityMultiplier=Xt(fs(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[u,p,m,f]=this.containerBounds;this.setX(at(h,f,p),!0),this.setY(at(l,u,m),!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?at(c,this.window[0],c):c,p=this.useWin?at(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,S,x,T]=this.scrollBounds,w=lt(at((v-b+t)/_,-1,0)*g,0),k=lt(at((y-S-e)/_,0,1)*g,0),$=lt(at((v-x-s)/_,0,1)*g,0),E=lt(at((y-T+i)/_,-1,0)*g,0);if(w||$||E||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=lt(at(h+(E||k),0,r-o),0),this.coords[0]-=h-s),e||(i=lt(at(l+(w||$),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=rt(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.overshootXTicker.pause(),this.overshootYTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Ke(this,null,"x"),Ke(this,null,"y"),Ke(this,null,"progressX"),Ke(this,null,"progressY"),Ke(this.scroll),Ke(this.overshootCoords),this}scrollInView(t,e=0,s=fe.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,p=lt(at(r-h,-1e12,0),0),m=lt(at(i-l,0,u),0),f=lt(at(r-c,0,u),0),g=lt(at(i-d,-1e12,0),0);new Ne(n,{x:lt(n.x+(g?g-e:m?m+e:0),0),y:lt(n.y+(p?p-e:f?f+e:0),0),duration:O(t)?350*D.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=Ze(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=fe.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=at(ct(i,this.snapX),u,c),a=at(ct(r,this.snapY),l,d),h=O(t)?350*D.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 s=t.changedTouches,r=s?s[0].clientX:t.clientX,n=s?s[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=Ge(this.$target,"zIndex",!1);gs=(f>gs?f:gs)+1,this.targetStyles=Ze(this.$target,{zIndex:gs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ze(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,fe.out(3)),this.onGrab(this),i.addEventListener("touchmove",this),i.addEventListener("touchend",this),i.addEventListener("touchcancel",this),i.addEventListener("mousemove",this),i.addEventListener("mouseup",this),i.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=Ge(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.parentNode}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):(us(t),this.triggerStyles||(this.triggerStyles=Ze(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",us,{passive:!1}),this.$trigger.addEventListener("touchmove",us,{passive:!1}),this.$trigger.addEventListener("touchend",us),(!this.disabled[0]&&J(o)>3||!this.disabled[1]&&J(a)>3)&&(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,[s,n,o,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,S=this.x,x=this.y,T=this.computeVelocity(s-h,n-l),w=this.angle=rt(n-a,s-o),k=150*T,$=(1-this.releaseContainerFriction)*this.dragSpeed,E=S+Z(w)*k,C=x+G(w)*k,B=E>d?d+(E-d)*$:E<p?p+(E-p)*$:E,L=C>u?u+(C-u)*$:C<c?c+(C-c)*$:C,A=this.destX=at(lt(ct(B,this.snapX),5),p,d),N=this.destY=at(lt(ct(L,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,E,C);let P=0,R=0,Y=y,X=y,M=0;if(b.x=S,b.y=x,!t){const t=A===d?S>d?-1:1:S<p?-1:1,s=lt(S-A,0);g.velocity=e&&v?s?k*t/J(s):0:T;const{ease:i,duration:r,restDuration:n}=g;P=S===A?0:v?r:r-n*D.timeScale,v&&(Y=i),P>M&&(M=P)}if(!e){const e=N===u?x>u?-1:1:x<c?-1:1,s=lt(x-N,0);_.velocity=t&&v?s?k*e/J(s):0:T;const{ease:i,duration:r,restDuration:n}=_;R=x===N?0:v?r:r-n*D.timeScale,v&&(X=i),R>M&&(M=R)}if(!v&&F&&$&&(P||R)){const t=r.blend;new Ne(b,{x:{to:B,duration:.65*P},y:{to:L,duration:.65*R},ease:y,composition:t}).init(),new Ne(b,{x:{to:A,duration:P},y:{to:N,duration:R},ease:y,composition:t}).init(),this.overshootXTicker.stretch(P).restart(),this.overshootYTicker.stretch(R).restart()}else t||this.animate[this.xProp](A,P,Y),e||this.animate[this.yProp](N,R,X);this.scrollInView(M,this.scrollThreshold,y);let O=!1;A!==m&&(this.snapped[0]=A,this.snapX&&(O=!0)),N!==f&&this.snapY&&(this.snapped[1]=N,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",us),this.$trigger.removeEventListener("touchmove",us),this.$trigger.removeEventListener("touchend",us),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.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=Ze(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.stop(),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),i.removeEventListener("touchmove",this),i.removeEventListener("touchend",this),i.removeEventListener("touchcancel",this),i.removeEventListener("mousemove",this),i.removeEventListener("mouseup",this),i.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootXTicker.revert(),this.overshootYTicker.revert(),this.resizeTicker.revert(),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":us(t)}}}class ys{constructor(t={}){D.scope&&D.scope.revertibles.push(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||Dt(e)[0]||i);const n=t.defaults,o=D.defaults,a=t.mediaQueries;if(this.defaults=n?ft(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const e=s.matchMedia(a[t]);this.mediaQueryLists[t]=e,e.addEventListener("change",this)}}execute(t){let e=D.scope,s=D.root,i=D.defaults;D.scope=this,D.root=this.root,D.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return D.scope=e,D.root=s,D.defaults=i,n}refresh(){return 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);e&&this.revertConstructors.push(e)}))})),this}add(t,e){if(M(t)){const e=t;this.constructors.push(e),this.execute((()=>{const t=e(this);t&&this.revertConstructors.push(t)}))}else this.methods[t]=(...t)=>this.execute((()=>e(...t)));return this}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.mediaQueryLists;let i=t.length,r=e.length;for(;i--;)t[i].revert();for(;r--;)e[r](this);for(let t in s)s[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vs=(t,e)=>t&&M(t)?t(e):t,bs=new Map;class Ss{constructor(t){this.element=t,this.useWin=this.element===i.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,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 se({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;gt(this,(t=>t.handleScroll()),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new se({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=lt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new se({autoplay:!1,duration:250*D.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new se({autoplay:!1,duration:500*D.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?s:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,e=this.element;this.scrollX=lt(t?s.scrollX:e.scrollLeft,0),this.scrollY=lt(t?s.scrollY:e.scrollTop,0)}updateWindowBounds(){this.winWidth=s.innerWidth,this.winHeight=(()=>{const t=document.createElement("div");i.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return i.body.removeChild(t),e})()}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=t.width,i=t.height,this.top=t.top,this.left=t.left}this.width=s,this.height=i}refreshScrollObservers(){gt(this,(t=>{t._debug&&t.removeDebug()})),this.updateBounds(),gt(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.unobserve(this.element),(this.useWin?s:this.element).removeEventListener("scroll",this),bs.delete(this.element)}}const xs=(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}=Vt(a,Ht);let c=h;return"%"===l?c=h/100*s:l&&(c=xe(t,Ht,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Ts=(t,e,s,i,r)=>{let n;if(X(e)){const o=C.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=xs(t,l[0],s,i,r),p=xs(t,l[1],s,i,r);if(c){const e=Wt(xs(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=Wt(xs(t,"max",s),p,h);n=e>u?u:e}else n=Wt(u,p,h)}else n=xs(t,e,s,i,r)}else n=e;return lt(n,0)},ws=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[o]){e=i;break}}return e};let ks=0;const $s=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Es{constructor(t={}){D.scope&&D.scope.revertibles.push(this);const e=Xt(t.sync,"play pause"),s=e?_e(e):null,r=e&&("linear"===e||e===ie),n=e&&!(s===ie&&!r),o=e&&(Y(e)||!0===e||r),a=e&&X(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=ks++,this.id=O(t.id)?this.index:t.id,this.container=(t=>{const e=t&&Dt(t)[0]||i.body;let s=bs.get(e);return s||(s=new Ss(e),bs.set(e,s)),s})(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?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=h&&!l&&h[0]?h[0]:y,this.onSyncLeave=h&&!l&&h[1]?h[1]:y,this.onSyncEnterForward=h&&l&&h[0]?h[0]:y,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:y,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:y,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:y,this.onEnter=t.onEnter||y,this.onLeave=t.onLeave||y,this.onEnterForward=t.onEnterForward||y,this.onLeaveForward=t.onLeaveForward||y,this.onEnterBackward=t.onEnterBackward||y,this.onLeaveBackward=t.onLeaveBackward||y,this.onUpdate=t.onUpdate||y,this.onSyncComplete=t.onSyncComplete||y,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],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=Xt(t.debug,!1),this._next=null,this._prev=null,yt(this.container,this),je((()=>{if(!this.reverted){if(!this.target){const e=Dt(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}}))}link(t){if(t&&(t.pause(),this.linked=t,!this._params.target)){let e;O(t.targets)?gt(t,(t=>{t.targets&&!e&&(e=ws(t))})):e=ws(t),this.target=e||i.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:lt(at(t,0,1),6)}refresh(){this.reverted=!1;const t=this._params;return this.repeat=Xt(vs(t.repeat,this),!0),this.horizontal="x"===Xt(vs(t.axis,this),"y"),this.enter=Xt(vs(t.enter,this),"end start"),this.leave=Xt(vs(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,s=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=i.createElement("div"),n=i.createElement("div"),o=i.createElement("div"),a=$s[this.index%$s.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",S=t=>e?"0px "+t+"px":t+"px 2px",x=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,T=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${T("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=`${T("sticky",0,0,e?l:g,e?g:c)}`,s||(n.style.cssText+=`background:\n ${x("#FFFF")}${S(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${S(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${T("relative",0,0,e?d:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${x("#FFFF")}${S(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${S(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const w=[" enter: "," leave: "];this.coords.forEach(((t,s)=>{const r=s>1,h=(r?0:this.offset)+t,m=s%2,f=h<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,S=i.createElement("div"),x=i.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${w[m]}${this.thresholds[s]}`,S.style.cssText=`${T("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-${k}: 2px solid ${a};\n `,x.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 `,S.appendChild(x);let E=h-$+(e?1:0);S.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(S)})),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Ge(t.element,"position")&&(this.debugStyles=Ze(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,s=this.container,r=this.horizontal,n=this.linked;let o,a=e,h=0,l=0,c=a;n&&(o=n.currentTime,n.seek(0,!0));const d="static"===Ge(s.element,"position")&&Ze(s.element,{position:"relative "});for(;a&&a!==s.element&&a!==i.body;){const e="sticky"===Ge(a,"position")&&Ze(a,{position:"static"});a===c&&(h+=a.offsetLeft||0,l+=a.offsetTop||0,c=a.offsetParent),a=a.parentElement,e&&(t||(t=[]),t.push(e))}d&&d.revert();const u=r?h:l,p=r?e.offsetWidth:e.offsetHeight,m=r?s.width:s.height,f=(r?s.scrollWidth:s.scrollHeight)-m,g=this.enter,_=this.leave;let y="start",v="end",b="end",S="start";if(X(g)){const t=g.split(" ");b=t[0],y=t.length>1?t[1]:y}else if(R(g)){const t=g;O(t.container)||(b=t.container),O(t.target)||(y=t.target)}else Y(g)&&(b=g);if(X(_)){const t=_.split(" ");S=t[0],v=t.length>1?t[1]:v}else if(R(_)){const t=_;O(t.container)||(S=t.container),O(t.target)||(v=t.target)}else Y(_)&&(S=_);const x=Ts(e,y,p),T=Ts(e,v,p),w=x+u-m,k=T+u-f,$=Ts(e,b,m,w,k),E=Ts(e,S,m,w,k),C=x+u-$,B=T+u-E,D=B-C;this.offsets[0]=h,this.offsets[1]=l,this.offset=u,this.offsetStart=C,this.offsetEnd=B,this.distance=D<=0?0:D,this.thresholds=[y,v,b,S],this.coords=[x,T,$,E],t&&t.forEach((t=>t.revert())),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){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=e<g&&1===g?1e-4:e>g&&!g?-1e-4:0;g=lt(ss(e,g,dt(.01,.2,i),!1)+t,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 _t(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}return t.Animatable=ls,t.Draggable=_s,t.JSAnimation=Ne,t.Scope=ys,t.ScrollObserver=Es,t.Spring=cs,t.Timeline=hs,t.Timer=se,t.WAAPIAnimation=qe,t.animate=(t,e)=>new Ne(t,e,null,0,!1).init(),t.createAnimatable=(t,e)=>new ls(t,e),t.createDraggable=(t,e)=>new _s(t,e),t.createScope=t=>new ys(t),t.createSpring=ds,t.createTimeline=t=>new hs(t).init(),t.createTimer=t=>new se(t,null,0).init(),t.eases=fe,t.engine=$t,t.onScroll=(t={})=>new Es(t),t.scrollContainers=bs,t.stagger=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!O(o),h=a&&!O(o.ease)?o.ease:a?_e(o):null,l=e.grid,c=e.axis,d=O(r)||0===r||"first"===r,u="center"===r,p="last"===r,f=P(t),g=q(f?t[0]:t),_=f?q(t[1]):0,y=k.exec((f?t[1]:t)+m),v=e.start||0+(f?g:0);let b=d?0:Y(r)?r:0;return(t,r,o,a)=>{if(u&&(b=(o-1)/2),p&&(b=o-1),!s.length){for(let t=0;t<o;t++){if(l){const e=u?(l[0]-1)/2:b%l[0],i=u?(l[1]-1)/2:et(b/l[0]),r=e-t%l[0],n=i-et(t/l[0]);let o=j(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(J(b-t));i=it(...s)}h&&(s=s.map((t=>h(t/i)*i))),n&&(s=s.map((t=>c?t<0?-1*t:-t:J(i-t))))}const d=f?(_-g)/i:g;let m=(a?os(a,O(e.start)?a.iterationDuration:v):v)+(d*lt(s[r],2)||0);return e.modifier&&(m=e.modifier(m)),y&&(m=`${m}${y[2]}`),m}},t.svg=Rt,t.utils=ns,t.waapi=Qe,t}({});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* anime.js - CJS
|
|
3
|
+
* @version v4.0.1
|
|
4
|
+
* @author Julian Garnier
|
|
5
|
+
* @license MIT
|
|
6
|
+
* @copyright (c) 2025 Julian Garnier
|
|
7
|
+
* @see https://animejs.com
|
|
8
|
+
*/
|
|
9
|
+
"use strict";const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={replace:0,none:1,blend:2},r=Symbol(),n=Symbol(),o=Symbol(),a=Symbol(),h=Symbol(),l=Symbol(),c=1e-11,d=1e12,u=1e3,p="",m=new Map;m.set("x","translateX"),m.set("y","translateY"),m.set("z","translateZ");const f=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],g=f.reduce(((t,e)=>({...t,[e]:e+"("})),{}),_=()=>{},y=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,v=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,b=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,x=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,S=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,T=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,w=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,k=/([a-z])([A-Z])/g,$=/(\w+)(\([^)]+\)+)/g,E=/(\*=|\+=|-=)/,C={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:u,delay:0,loopDelay:0,ease:"out(2)",composition:i.replace,modifier:t=>t,onBegin:_,onBeforeUpdate:_,onUpdate:_,onLoop:_,onPause:_,onComplete:_,onRender:_},B={defaults:C,root:s,scope:null,precision:4,timeScale:1,tickThreshold:200},D={version:"4.0.1",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(D));const L=t=>t.replace(k,"$1-$2").toLowerCase(),A=(t,e)=>0===t.indexOf(e),N=Date.now,F=Array.isArray,P=t=>t&&t.constructor===Object,R=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,X=t=>"function"==typeof t,M=t=>void 0===t,O=t=>M(t)||null===t,z=e=>t&&e instanceof SVGElement,I=t=>y.test(t),W=t=>A(t,"rgb"),V=t=>A(t,"hsl"),U=t=>!B.defaults.hasOwnProperty(t),H=t=>Y(t)?parseFloat(t):t,q=Math.pow,Q=Math.sqrt,j=Math.sin,G=Math.cos,Z=Math.abs,J=Math.exp,K=Math.ceil,tt=Math.floor,et=Math.asin,st=Math.max,it=Math.atan2,rt=Math.PI,nt=Math.round,ot=(t,e,s)=>t<e?e:t>s?s:t,at={},ht=(t,e)=>{if(e<0)return t;if(!e)return nt(t);let s=at[e];return s||(s=at[e]=10**e),nt(t*s)/s},lt=(t,e)=>F(e)?e.reduce(((e,s)=>Z(s-t)<Z(e-t)?s:e)):e?nt(t/e)*e:t,ct=(t,e,s)=>t+(e-t)*s,dt=t=>t===1/0?d:t===-1/0?-1e12:t,ut=t=>t<c?c:t,pt=t=>F(t)?[...t]:t,mt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=M(r)?e[i]:r}return s},ft=(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}},gt=(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},_t=(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};class yt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=ht(u/120,0),this._fps=120,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<c?c:s,r=ht(u/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<c?c:e}requestTick(t){const e=this._scheduledTime,s=this._elapsedTime;if(this._elapsedTime+=t-s,s<e)return 0;const i=this._frameDuration,r=s-e;return this._scheduledTime+=r<i?i:r,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const vt=(t,e,s,r,n)=>{const o=t.parent,h=t.duration,l=t.completed,d=t.iterationDuration,u=t.iterationCount,m=t._currentIteration,f=t._loopDelay,_=t._reversed,y=t._alternate,v=t._hasChildren,b=t._delay,x=t._currentTime,S=b+d,T=e-b,w=ot(x,-b,h),k=ot(T,-b,h),$=T-x,E=k>0,C=k>=h,D=h<=c,L=2===n;let A=0,N=T,F=0;if(u>1){const e=~~(k/(d+(C?0:f)));t._currentIteration=ot(e,0,u),C&&t._currentIteration--,A=t._currentIteration%2,N=k%(d+f)||0}const P=_^(y&&A),R=t._ease;let Y=C?P?0:h:P?d-N:N;R&&(Y=d*R(Y/d)||0);const X=(o?o.backwards:T<x)?!P:!!P;if(t._currentTime=T,t._iterationTime=Y,t.backwards=X,E&&!t.began?(t.began=!0,s||o&&(X||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||v||!E||t._currentIteration===m||t.onLoop(t),L||1===n&&(e>=b&&e<=S||e<=b&&w>b||e>=S&&w!==h)||Y>=S&&w!==h||Y<=b&&w>0||e<=w&&w===h&&l||C&&!l&&D){if(E&&(t.computeDeltaTime(w),s||t.onBeforeUpdate(t)),!v){const e=L||(X?-1*$:$)>=B.tickThreshold,n=t._offset+(o?o._offset:0)+b+Y;let h,l,c,d,u=t._head,m=0;for(;u;){const t=u._composition,s=u._currentTime,o=u._changeDuration,f=u._absoluteStartTime+u._changeDuration,_=u._nextRep,y=u._prevRep,v=t!==i.none;if((e||(s!==o||n<=f+(_?_._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!v||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!y||y._isOverridden||n>=y._absoluteStartTime+y._changeDuration+u._delay))){const e=u._currentTime=ot(Y-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,p=u._valueType,f=u._tweenType,g=0===f,_=0===p,y=_&&g||0===s||1===s?-1:B.precision;let b,x;if(_)b=x=n(ht(ct(u._fromNumber,u._toNumber,s),y));else if(1===p)x=n(ht(ct(u._fromNumber,u._toNumber,s),y)),b=`${x}${u._unit}`;else if(2===p){const t=u._fromNumbers,e=u._toNumbers,i=ht(ot(n(ct(t[0],e[0],s)),0,255),0),r=ht(ot(n(ct(t[1],e[1],s)),0,255),0),o=ht(ot(n(ct(t[2],e[2],s)),0,255),0),a=ot(n(ht(ct(t[3],e[3],s),y)),0,1);if(b=`rgba(${i},${r},${o},${a})`,v){const t=u._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(3===p){b=u._strings[0];for(let t=0,e=u._toNumbers.length;t<e;t++){const e=n(ht(ct(u._fromNumbers[t],u._toNumbers[t],s),y)),i=u._strings[t+1];b+=`${i?e+i:e}`,v&&(u._numbers[t]=e)}}if(v&&(u._number=x),r||t===i.blend)u._value=b;else{const t=u.property;h=u.target,g?h[t]=b:1===f?h.setAttribute(t,b):(l=h.style,3===f?(h!==c&&(c=h,d=h[a]),d[t]=b,m=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(F=1)}}if(m&&u._renderTransforms){let t=p;for(let e in d)t+=`${g[e]}${d[e]}) `;l.transform=t,m=0}u=u._next}!s&&F&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&D?!s&&(o.began&&!X&&T>=h&&!l||X&&T<=c&&l)&&(t.onComplete(t),t.completed=!X):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(X||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},bt=(t,e,s,i,r)=>{const n=t._currentIteration;if(vt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=N();let d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;ft(o,(e=>{if(a){const i=e.duration,r=e._offset+e._delay;s||!(i<=c)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&vt(e,t,s,1,2),e.began=!1,e.completed=!1})),s||o.onLoop(o)}ft(o,(t=>{const e=ht((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;d+=vt(t,e,s,i,n),!t.completed&&u&&(u=!1)}),a),!s&&d&&o.onRender(o),u&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},xt={animation:null,update:_},St=t?requestAnimationFrame:setImmediate,Tt=t?cancelAnimationFrame:clearImmediate;class wt extends yt{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=C,this.paused=!(!t||!s.hidden),this.reqId=null}update(){const t=this._currentTime=N();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?(gt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):bt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}xt.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=St($t)),this}pause(){return this.paused=!0,Et()}resume(){if(this.paused)return this.paused=!1,ft(this,(t=>t.resetTime())),this.wake()}get speed(){return this._speed*(1===B.timeScale?1:u)}set speed(t){this._speed=t*B.timeScale,ft(this,(t=>t.speed=t._speed))}get timeUnit(){return 1===B.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(B.timeScale!==s){B.timeScale=s,B.tickThreshold=200*s;const t=e?.001:u;this.defaults.duration*=t,this._speed*=t}}get precision(){return B.precision}set precision(t){B.precision=t}}const kt=(()=>{const e=new wt(N());return t&&(D.engine=e,s.addEventListener("visibilitychange",(()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())}))),e})(),$t=()=>{kt._head?(kt.reqId=St($t),kt.update()):kt.reqId=0},Et=()=>(Tt(kt.reqId),kt.reqId=0,kt);function Ct(t){const e=Y(t)?B.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Bt(e){if(O(e))return[];if(F(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!O(i)){const t=Ct(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!O(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}if(!t)return[e];const s=Ct(e);return s?Array.from(s):[e]}function Dt(t){const e=Bt(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[r]){s[r]=!0;const t=z(s);(s.nodeType||t)&&(s[n]=!0,s[o]=t,s[a]={})}}return e}const Lt=t=>{const e=Bt(t)[0];if(e&&z(e))return e},At=(t,e,s=0)=>t.getPointAtLength(e+s>=1?e+s:0),Nt=(t,e)=>s=>{const i=+t.getTotalLength(),r=s[o],n=t.getCTM();return{from:0,to:i,modifier:s=>{if("a"===e){const e=At(t,s,-1),i=At(t,s,1);return 180*it(i.y-e.y,i.x-e.x)/rt}{const i=At(t,s,0);return"x"===e?r||!n?i.x:i.x*n.a+i.y*n.c+n.e:r||!n?i.y:i.x*n.b+i.y*n.d+n.f}}}},Ft=["opacity","rotate","overflow","color"],Pt={morphTo:(t,e=.33)=>s=>{const i=Lt(t);if(!i)return;const r="path"===s.tagName,n=r?" ":",",o=s[h];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const c=e/(h-1),d=s.getPointAtLength(t*c),u=i.getPointAtLength(o*c),p=r?0===e?"M":"L":"";a+=p+ht(d.x,3)+n+d.y+" ",l+=p+ht(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[h]=l,[a,l]},createMotionPath:t=>{const e=Lt(t);if(e)return{translateX:Nt(e,"x"),translateY:Nt(e,"y"),rotate:Nt(e,"a")}},createDrawable:(t,e=0,s=0)=>{const i=Bt(t);return i.forEach(((t,r)=>i[r]=function(t,e,s){const i=getComputedStyle(t).strokeLinecap,r=u;let n=i;const o=new Proxy(t,{get(t,e){const s=t[e];return e===l?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),o=+s[0],a=+s[1],h=-1e3*o,l=a*r+h,c=r+(0===o&&1===a||1===o&&0===a?0:10)-l;if("butt"!==i){const e=o===a?"butt":i;n!==e&&(t.setAttribute("stroke-linecap",`${e}`),n=e)}t.setAttribute("stroke-dashoffset",`${h}`),t.setAttribute("stroke-dasharray",`${l} ${c}`)}return Reflect.apply(s,t,e)}:X(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),o.setAttribute("draw",`${e} ${s}`)),o}(t,e,s))),i}},Rt=(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),Yt=(t,e)=>M(t)?e:t,Xt=(t,e,s,i,r)=>{if(X(t)){const n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};return r&&(r.func=n),n()}return t},Mt=(t,e)=>t[n]?t[o]&&((t,e)=>{if(Ft.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}})(t,e)?1:f.includes(e)||m.get(e)?3:A(e,"--")?4:e in t.style?2:e in t?0:1:0,Ot=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[l]||t).getPropertyValue(e);return"auto"===r?"0":r},zt=(t,e,s,i)=>{const r=M(s)?Mt(t,e):s;return 0===r?t[e]||0:1===r?t.getAttribute(e):3===r?((t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[a];let o;for(;o=$.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&&!M(r)?r:A(e,"scale")?"1":A(e,"rotate")||A(e,"skew")?"0deg":"0px"})(t,e,i):4===r?Ot(t,e,i).trimStart():Ot(t,e,i)},It=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Wt=(t,e)=>{if(e.t=0,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 n=!s.includes(" ")&&w.exec(s);if(n)return e.t=1,e.n=+n[1],e.u=n[2],e;if(e.o)return e.n=+s,e;if(I(r=s)||W(r)||V(r))return e.t=2,e.d=W(i=s)?(t=>{const e=v.exec(t)||b.exec(t),s=M(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):I(i)?(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]})(i):V(i)?(t=>{const e=x.exec(t)||S.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=M(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=ht(255*Rt(e,t,s+1/3),0),a=ht(255*Rt(e,t,s),0),h=ht(255*Rt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(T);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(T)||[],e}}var i,r;return e.n=s,e},Vt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=pt(t._toNumbers),e.s=pt(t._strings),e),Ut={t:0,n:0,u:null,o:null,d:null,s:null},Ht={_rep:new WeakMap,_add:new Map},qt=(t,e,s="_rep")=>{const i=Ht[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Qt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,jt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=c,t._currentTime=c},Gt=(t,e)=>{const s=t._composition;if(s===i.replace){const s=t._absoluteStartTime;_t(e,t,Qt,"_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){jt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)jt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration);i._changeDuration=n-e-t,i._currentTime=i._changeDuration,i._isOverlapped=1,i._changeDuration<c&&jt(i)}let o=!0;if(ft(e,(t=>{t._isOverlapped||(o=!1)})),o){const t=e.parent;if(t){let s=!0;ft(t,(t=>{t!==e&&ft(t,(t=>{t._isOverlapped||(s=!1)}))})),s&&t.cancel()}else e.cancel()}}}else if(s===i.blend){const e=qt(t.target,t.property,"_add"),s=(t=>{let e=xt.animation;return e||(e={duration:c,computeDeltaTime:_,_offset:0,_delay:0,_head:null,_tail:null},xt.animation=e,xt.update=()=>{t.forEach((t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=3===t||2===t?pt(i._fromNumbers):null;let r=i._fromNumber,n=s._tail;for(;n&&n!==i;){if(e)for(let t=0,s=n._numbers.length;t<s;t++)e[t]+=n._numbers[t];else r+=n._number;n=n._prevAdd}i._toNumber=r,i._toNumbers=e}}})),vt(e,1,1,0,2)}),e})(Ht._add);let r=e._head;r||(r={...t},r._composition=i.replace,r._updateDuration=c,r._startTime=0,r._numbers=pt(t._fromNumbers),r._number=0,r._next=null,r._prev=null,_t(e,r),_t(s,r));const n=t._toNumber;if(t._fromNumber=r._fromNumber-n,t._toNumber=0,t._numbers=pt(t._fromNumbers),t._number=0,r._fromNumber=n,t._toNumbers){const e=pt(t._toNumbers);e&&e.forEach(((e,s)=>{t._fromNumbers[s]=r._fromNumbers[s]-e,t._toNumbers[s]=0})),r._fromNumbers=e}_t(e,t,null,"_prevAdd","_nextAdd")}return t},Zt=t=>{const e=t._composition;if(e!==i.none){const s=t.target,r=t.property,n=Ht._rep.get(s)[r];if(gt(n,t,"_prevRep","_nextRep"),e===i.blend){const e=Ht._add,i=e.get(s);if(!i)return;const n=i[r],o=xt.animation;gt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){gt(n,a,"_prevAdd","_nextAdd"),gt(o,a);let t=!0;for(let e in i)if(i[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Jt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),Kt=t=>t._cancelled?(t._hasChildren?ft(t,Kt):ft(t,(t=>{t._composition!==i.none&&Gt(t,qt(t.target,t.property))})),t._cancelled=0,t):t;let te=0;class ee extends yt{constructor(t={},e=null,s=0){super(0);const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:h,loopDelay:l,autoplay:d,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:v,onUpdate:b}=t;B.scope&&B.scope.revertibles.push(this);const x=e?0:kt._elapsedTime,S=e?e.defaults:B.defaults,T=X(r)||M(r)?S.delay:+r,w=X(n)||M(n)?1/0:+n,k=Yt(h,S.loop),$=Yt(l,S.loopDelay),E=!0===k||k===1/0||k<0?1/0:k+1;let C=0;if(e)C=s;else{let t=N();kt.paused&&(kt.requestTick(t),t=kt._elapsedTime),C=t-kt._startTime}this.id=M(i)?++te:i,this.parent=e,this.duration=dt((w+$)*E-$)||c,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||S.onBegin,this.onBeforeUpdate=v||S.onBeforeUpdate,this.onUpdate=b||S.onUpdate,this.onLoop=f||S.onLoop,this.onPause=g||S.onPause,this.onComplete=m||S.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=!e&&Yt(d,S.autoplay),this._offset=C,this._delay=T,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=_,this._running=!1,this._reversed=+Yt(o,S.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Yt(a,S.alternate),this._prev=null,this._next=null,this._elapsedTime=x,this._startTime=x,this._lastTime=x,this._fps=Yt(u,S.frameRate),this._speed=Yt(p,S.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(1).play()}get currentTime(){return ot(ht(this._currentTime,B.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ht(this._iterationTime,B.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ot(ht(this._currentTime/this.duration,5),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ot(ht(this._iterationTime/this.iterationDuration,5),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*ot(+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=0){return Kt(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,bt(this,0,1,t,2),Jt(this),this._hasChildren&&ft(this,Jt),this}init(t=0){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&bt(this,this.duration,1,t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!M(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*kt._speed);return this._startTime=N()-(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<=c&&!this._hasChildren?bt(this,c,0,0,2):(this._running||(_t(kt,this),kt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,kt.wake()),this):this}restart(){return this.reset(0).resume()}seek(t,e=0,s=0){Kt(this),this.completed=!1;const i=this.paused;return this.paused=!0,bt(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?tt(d/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?ft(this,(t=>t.cancel()),!0):ft(this,Zt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration;if(e===ut(t))return this;const s=t/e,i=t<=c;return this.duration=i?c:ut(dt(ht(e*s,12))),this.iterationDuration=i?c:ut(dt(ht(this.iterationDuration*s,12))),this._offset*=s,this._delay*=s,this._loopDelay*=s,this}revert(){bt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const se=t=>t,ie=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,re=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?se:r=>0===r||1===r?r:ie(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ie(r,e,s)-t,i>0?o=r:n=r}while(Z(i)>1e-7&&++a<100);return r})(r,t,s),e,i),ne=(t=10,e)=>{const s=e?K:tt;return e=>s(ot(e,0,1)*t)*(1/t)},oe=(...t)=>{const e=t.length;if(!e)return se;const s=e-1,i=t[0],r=t[s],n=[0],o=[H(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(M(h)?e/s:H(h)/100),o.push(H(a))}return o.push(H(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]}},ae=(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(ot(o,r,1))}return s.push(1),oe(...s)},he=rt/2,le=2*rt,ce=(t=1.68)=>e=>q(e,+t),de={[p]:ce,Quad:ce(2),Cubic:ce(3),Quart:ce(4),Quint:ce(5),Sine:t=>1-G(t*he),Circ:t=>1-Q(1-t*t),Expo:t=>t?q(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=q(2,--s))-1)/11;);return 1/q(4,3-s)-7.5625*q((3*e-2)/22-t,2)},Back:(t=1.70158)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ot(+t,1,10),i=ot(+e,c,2),r=i/le*et(1/s),n=le/i;return t=>0===t||1===t?t:-s*q(2,-10*(1-t))*j((1-t-r)*n)}},ue={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},pe=(t,e,s)=>{if(s[t])return s[t];if(t.indexOf("(")<=-1){const i=ue[t]||t.includes("Back")||t.includes("Elastic")?e[t]():e[t];return i?s[t]=i:se}{const i=t.slice(0,-1).split("("),r=e[i[0]];return r?s[t]=r(...i[1].split(",")):se}},me=(()=>{const t={linear:oe,irregular:ae,steps:ne,cubicBezier:re};for(let e in ue)for(let s in de){const i=de[s],r=ue[e];t[e+s]=s===p||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),fe={linear:se},ge=t=>X(t)?t:Y(t)?pe(t,me,fe):se,_e={},ye=(t,e,s)=>{if(3===s)return m.get(t)||t;if(2===s||1===s&&z(e)&&t in e.style){const e=_e[t];if(e)return e;{const e=t?L(t):t;return _e[t]=e,e}}return t},ve={deg:1,rad:180/rt,turn:360},be={},xe=(t,e,i,r=!1)=>{const n=e.u,o=e.n;if(1===e.t&&n===i)return e;const a=o+n+i,h=be[a];if(M(h)||r){let r;if(n in ve)r=o*ve[n]/ve[i];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==s?h:s.body;l.appendChild(a);const c=a.style;c.width=e+n;const d=a.offsetWidth||e;c.width=e+i;const u=d/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,be[a]=r}else e.n=h;return e.t,e.u=i,e},Se=t=>{if(t._hasChildren)ft(t,Se,!0);else{const e=t;e.pause(),ft(e,(t=>{const s=t.property,i=t.target;if(i[n]){const r=i.style,n=e._inlineStyles[s];if(3===t._tweenType){const e=i[a];if(M(n)||n===p?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=p;for(let s in e)t+=g[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else M(n)||n===p?r.removeProperty(s):r[s]=n;e._tail===t&&e.targets.forEach((t=>{t.getAttribute&&t.getAttribute("style")===p&&t.removeAttribute("style")}))}}))}return t},Te={t:0,n:0,u:null,o:null,d:null,s:null},we={t:0,n:0,u:null,o:null,d:null,s:null},ke={func:null},$e=[null],Ee=[null,null],Ce={to:null};let Be,De,Le=0;class Ae extends ee{constructor(t,e,s,r,n=!1,o=0,a=0){super(e,s,r);const h=Dt(t),l=h.length,d=e.keyframes,p=d?mt(((t,e)=>{const s={};if(F(t)){const e=[].concat(...t.map((t=>Object.keys(t)))).filter(U);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];U(s)?s===r&&(e.to=i):e[s]=i}return e}));s[r]=n}}else{const i=Yt(e.duration,B.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(U(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})(d,e),e):e,{delay:m,duration:f,ease:g,playbackEase:_,modifier:y,composition:v,onRender:b}=p,x=s?s.defaults:B.defaults,S=Yt(_,x.playbackEase),T=S?ge(S):null,w=!M(g)&&!M(g.ease),k=w?g.ease:Yt(g,T?"linear":x.ease),$=w?g.duration:Yt(f,x.duration),E=Yt(m,x.delay),C=y||x.modifier,D=M(v)&&l>=u?i.none:M(v)?x.composition:v,L={},A=this._offset+(s?s._offset:0);let N=NaN,Y=NaN,X=0,O=0;for(let t=0;t<l;t++){const e=h[t],r=o||t,d=a||l;let u=NaN,m=NaN;for(let t in p)if(U(t)){const o=Mt(e,t),a=ye(t,e,o);let h=p[t];const l=F(h);if(n&&!l&&(Ee[0]=h,Ee[1]=h,h=Ee),l){const t=h.length,e=!P(h[0]);2===t&&e?(Ce.to=h,$e[0]=Ce,Be=$e):t>2&&e?(Be=[],h.forEach(((t,e)=>{e?1===e?(Ee[1]=t,Be.push(Ee)):Be.push(t):Ee[0]=t}))):Be=h}else $e[0]=h,Be=$e;let f=null,g=null,_=NaN,y=0,v=0;for(let t=Be.length;v<t;v++){const n=Be[v];P(n)?De=n:(Ce.to=n,De=Ce),ke.func=null;const h=Xt(De.to,e,r,d,ke);let l;P(h)&&!M(h.to)?(De=h,l=h.to):l=h;const u=Xt(De.from,e,r,d),p=De.ease,m=!M(p)&&!M(p.ease),b=m?p.ease:p||k,x=m?p.duration:Xt(Yt(De.duration,t>1?Xt($,e,r,d)/t:$),e,r,d),S=Xt(Yt(De.delay,v?0:E),e,r,d),T=Xt(Yt(De.composition,D),e,r,d),w=R(T)?T:i[T],B=De.modifier||C,N=!M(u),Y=!M(l),z=F(l),I=z||N&&Y,W=g?y+S:S,V=A+W;O||!N&&!z||(O=1);let U=g;if(w!==i.none){f||(f=qt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=V;)if(U=t,t=t._nextRep,t&&t._absoluteStartTime>=V)for(;t;)jt(t),t=t._nextRep}if(I?(Wt(z?Xt(l[0],e,r,d):u,Te),Wt(z?Xt(l[1],e,r,d,ke):l,we),0===Te.t&&(U?1===U._valueType&&(Te.t=1,Te.u=U._unit):(Wt(zt(e,a,o,L),Ut),1===Ut.t&&(Te.t=1,Te.u=Ut.u)))):(Y?Wt(l,we):g?Vt(g,we):Wt(s&&U&&U.parent.parent===s?U._value:zt(e,a,o,L),we),N?Wt(u,Te):g?Vt(g,Te):Wt(s&&U&&U.parent.parent===s?U._value:zt(e,a,o,L),Te)),Te.o&&(Te.n=It(U?U._toNumber:Wt(zt(e,a,o,L),Ut).n,Te.n,Te.o)),we.o&&(we.n=It(Te.n,we.n,we.o)),Te.t!==we.t)if(3===Te.t||3===we.t){const t=3===Te.t?Te:we,e=3===Te.t?we:Te;e.t=3,e.s=pt(t.s),e.d=t.d.map((()=>e.n))}else if(1===Te.t||1===we.t){const t=1===Te.t?Te:we,e=1===Te.t?we:Te;e.t=1,e.u=t.u}else if(2===Te.t||2===we.t){const t=2===Te.t?Te:we,e=2===Te.t?we:Te;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(Te.u!==we.u){let t=we.u?Te:we;t=xe(e,t,we.u?we.u:Te.u,!1)}if(we.d&&Te.d&&we.d.length!==Te.d.length){const t=Te.d.length>we.d.length?Te:we,e=t===Te?we:Te;e.d=t.d.map(((t,s)=>M(e.d[s])?0:e.d[s])),e.s=pt(t.s)}const H=ht(+x||c,12),q={parent:this,id:Le++,property:a,target:e,_value:null,_func:ke.func,_ease:ge(b),_fromNumbers:pt(Te.d),_toNumbers:pt(we.d),_strings:pt(we.s),_fromNumber:Te.n,_toNumber:we.n,_numbers:pt(Te.d),_number:Te.n,_unit:we.u,_modifier:B,_currentTime:0,_startTime:W,_delay:+S,_updateDuration:H,_changeDuration:H,_absoluteStartTime:V,_tweenType:o,_valueType:we.t,_composition:w,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};w!==i.none&&Gt(q,f),isNaN(_)&&(_=q._startTime),y=ht(W+H,12),g=q,X++,_t(this,q)}(isNaN(Y)||_<Y)&&(Y=_),(isNaN(N)||y>N)&&(N=y),3===o&&(u=X-v,m=X)}if(!isNaN(u)){let t=0;ft(this,(e=>{t>=u&&t<m&&(e._renderTransforms=1,e._composition===i.blend&&ft(xt.animation,(t=>{t.id===e.id&&(t._renderTransforms=1)}))),t++}))}}l||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),Y?(ft(this,(t=>{t._startTime-t._delay||(t._delay-=Y),t._startTime-=Y})),N-=Y):Y=0,N||(N=c,this.iterationCount=0),this.targets=h,this.duration=N===c?c:dt((N+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=b||x.onRender,this._ease=T,this._delay=Y,this.iterationDuration=N,this._inlineStyles=L,!this._autoplay&&O&&this.onRender(this)}stretch(t){const e=this.duration;if(e===ut(t))return this;const s=t/e;return ft(this,(t=>{t._updateDuration=ut(ht(t._updateDuration*s,12)),t._changeDuration=ut(ht(t._changeDuration*s,12)),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s})),super.stretch(t)}refresh(){return ft(this,(t=>{const e=zt(t.target,t.property,t._tweenType);Wt(e,Ut),t._fromNumbers=pt(Ut.d),t._fromNumber=Ut.n,t._func&&(Wt(t._func(),we),t._toNumbers=pt(we.d),t._strings=pt(we.s),t._toNumber=we.n)})),this}revert(){return super.revert(),Se(this)}then(t){return super.then(t)}}const Ne=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(t(i/e));return`linear(${s.join(", ")})`},Fe={in:"ease-in",out:"ease-out",inOut:"ease-in-out"},Pe=(()=>{const t={};for(let e in ue)t[e]=t=>ue[e](ce(t));return t})(),Re=t=>{let e=Fe[t];if(e)return e;if(e="linear",Y(t))if(A(t,"linear")||A(t,"cubic-")||A(t,"steps")||A(t,"ease"))e=t;else if(A(t,"cubicB"))e=L(t);else{const s=pe(t,Pe,Fe);X(s)&&(e=s===se?"linear":Ne(s))}else if(X(t)){const s=Ne(t);s&&(e=s)}else t.ease&&(e=Ne(t.ease));return Fe[t]=e},Ye=["x","y","z"],Xe=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Ye],Me=[...Ye,...f.filter((t=>["X","Y","Z"].some((e=>t.endsWith(e)))))];let Oe=t&&(M(CSS)||!Object.hasOwnProperty.call(CSS,"registerProperty"));const ze={_head:null,_tail:null},Ie=(t,e,s)=>{let i=ze._head;for(;i;){const r=i._next,n=i.$el===t,o=!e||i.property===e,a=!s||i.parent===s;if(n&&o&&a){const t=i.animation;try{t.commitStyles()}catch{}t.cancel(),gt(ze,i);const e=i.parent;e&&(e._completed++,e.animations.length===e._completed&&(e.completed=!0,e.muteCallbacks||(e.paused=!0,e.onComplete(e),e._resolve(e))))}i=r}},We=(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),Ie(e,s),_t(ze,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Ie(e,s,t)};return n.onremove=a,n.onfinish=a,n},Ve=(t,e,s,i,r)=>{let n=Xt(e,s,i,r);return R(n)?Xe.includes(t)||A(t,"translate")?`${n}px`:A(t,"rotate")||A(t,"skew")?`${n}deg`:`${n}`:n},Ue=(t,e,s,i,r,n)=>{let o="0";const a=M(i)?getComputedStyle(t)[e]:Ve(e,i,t,r,n);return o=M(s)?F(i)?i.map((s=>Ve(e,s,t,r,n))):a:[Ve(e,s,t,r,n),a],o};class He{constructor(t,e){B.scope&&B.scope.revertibles.push(this),Oe||(f.forEach((t=>{const e=A(t,"skew"),s=A(t,"scale"),i=A(t,"rotate"),r=A(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})})),Oe=!0);const s=Dt(t),i=s.length;i||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const r=Yt(e.ease,Re(B.defaults.ease)),n=r.ease&&r,o=Yt(e.autoplay,B.defaults.autoplay),h=!(!o||!o.link)&&o,l=e.alternate&&!0===e.alternate,c=e.reversed&&!0===e.reversed,d=Yt(e.loop,B.defaults.loop),y=!0===d||d===1/0?1/0:R(d)?d+1:1,v=l?c?"alternate-reverse":"alternate":c?"reverse":"normal",b=Re(r),x=1===B.timeScale?1:u;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=e.onComplete||_,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!o||!1!==h,this.reversed=c,this.autoplay=o,this._speed=Yt(e.playbackRate,B.defaults.playbackRate),this._resolve=_,this._completed=0,this._inlineStyles=s.map((t=>t.getAttribute("style"))),s.forEach(((t,s)=>{const o=t[a],h=Me.some((t=>e.hasOwnProperty(t))),l=(n?n.duration:Xt(Yt(e.duration,B.defaults.duration),t,s,i))*x,c=Xt(Yt(e.delay,B.defaults.delay),t,s,i)*x,d=Yt(e.composition,"replace");for(let n in e){if(!U(n))continue;const a={},u={iterations:y,direction:v,fill:"forwards",easing:b,duration:l,delay:c,composite:d},p=e[n],g=!!h&&(f.includes(n)?n:m.get(n));let _;if(P(p)){const e=p,h=Yt(e.ease,r),m=h.ease&&h,f=e.to,y=e.from;if(u.duration=(m?m.duration:Xt(Yt(e.duration,l),t,s,i))*x,u.delay=Xt(Yt(e.delay,c),t,s,i)*x,u.composite=Yt(e.composition,d),u.easing=Re(h),_=Ue(t,n,y,f,s,i),g?(a[`--${g}`]=_,o[g]=_):a[n]=Ue(t,n,y,f,s,i),We(this,t,n,a,u),!M(y))if(g){const e=`--${g}`;t.style.setProperty(e,a[e][0])}else t.style[n]=a[n][0]}else _=F(p)?p.map((e=>Ve(n,e,t,s,i))):Ve(n,p,t,s,i),g?(a[`--${g}`]=_,o[g]=_):a[n]=_,We(this,t,n,a,u)}if(h){let e=p;for(let t in o)e+=`${g[t]}var(--${t})) `;t.style.transform=e}})),h&&this.autoplay.link(this)}forEach(t){const e=Y(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=B.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===B.timeScale?1:u);this.forEach((t=>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.forEach("cancel"),this.pause()}revert(){return this.cancel(),this.targets.forEach(((t,e)=>t.setAttribute("style",this._inlineStyles[e]))),this}then(t=_){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=_};return new Promise((t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this)))}}const qe={animate:(t,e)=>new He(t,e),convertEase:Ne},Qe=(t=_)=>new ee({duration:1*B.timeScale,onComplete:t},null,0).resume();function je(t,e,s){const i=Dt(t);if(!i.length)return;const[r]=i,n=Mt(r,e),o=ye(e,r,n);let a=zt(r,o);if(M(s))return a;if(Wt(a,Ut),0===Ut.t||1===Ut.t){if(!1===s)return Ut.n;{const t=xe(r,Ut,s,!1);return`${ht(t.n,B.precision)}${t.u}`}}}const Ge=(t,e)=>{if(!M(e))return e.duration=c,e.composition=Yt(e.composition,i.none),new Ae(t,e,null,0,!0).resume()},Ze=(t,e,s)=>{let i=!1;return ft(e,(r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=ye(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),gt(e,r),Zt(r),i=!0)}}),!0),i},Je=(t,e,s)=>{const i=Bt(t),r=e||kt,n=e&&e.controlAnimation&&e;for(let t=0,e=i.length;t<e;t++){const e=i[t];Ie(e,s,n)}let o;if(r._hasChildren){let e=0;ft(r,(n=>{if(!n._hasChildren)if(o=Ze(i,n,s),o&&!n._head)n.cancel(),gt(r,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Je(t,n,s):n._hasChildren=!1}),!0),M(r.iterationDuration)||(r.iterationDuration=e)}else o=Ze(i,r,s);return o&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),i},Ke=(t,e,s)=>{const i=10**(s||0);return tt((Math.random()*(e-t+1/i)+t)*i)/i},ts=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),es=(t,e,s,i)=>{let r=u/B.defaults.frameRate;if(!1!==i){const t=i||kt._hasChildren&&kt;t&&t.deltaTime&&(r=t.deltaTime)}const n=1-Math.exp(-s*r*.1);return s?1===s?e:(1-n)*t+n*e:t},ss=t=>(...e)=>{const s=t(...e);return new Proxy(_,{apply:(t,e,[i])=>s(i),get:(t,e)=>ss(((...t)=>{const i=rs[e](...t);return t=>i(s(t))}))})},is=(t,e=0)=>(...s)=>(s.length<t.length?ss(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(t,e)):t)(...s),rs={$:Dt,get:je,set:Ge,remove:Je,cleanInlineStyles:Se,random:Ke,randomPick:t=>t[Ke(0,t.length-1)],shuffle:t=>{let e,s,i=t.length;for(;i;)s=Ke(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},lerp:es,sync:Qe,clamp:is(ot),round:is(ht),snap:is(lt),wrap:is(((t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e)),interpolate:is(ct,1),mapRange:is(ts),roundPad:is(((t,e)=>(+t).toFixed(e))),padStart:is(((t,e,s)=>`${t}`.padStart(e,s))),padEnd:is(((t,e,s)=>`${t}`.padEnd(e,s))),degToRad:is((t=>t*rt/180)),radToDeg:is((t=>180*t/rt))},ns=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),M(e))return s;if(R(+e))return+e;const i=e,r=t?t.labels:null,n=!O(r),o=((t,e)=>{if(A(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!M(o),h=E.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?M(r[i])?s:r[i]:s};function os(t,e,s,i,r,n){const o=R(t.duration)&&t.duration<=c?s-c:s;bt(e,o,1,1,1);const a=i?new Ae(i,t,e,o,!1,r,n):new ee(t,e,o);return a.init(1),_t(e,a),ft(e,(t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)})),e.duration=function(t){return dt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}class as extends ee{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=B.defaults;this.defaults=e?mt(e,s):s,this.onRender=t.onRender||s.onRender;const i=Yt(t.playbackEase,s.playbackEase);this._ease=i?ge(i):null,this.iterationDuration=0}add(t,e,s){const i=P(e),r=P(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(X(s)){const e=s,r=Bt(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,M(a)||(s.id=a+"-"+h),os(s,this,e(t,h,l,this),t,h,l),h++}))}else os(i,this,ns(this,s),t)}else os(t,this,ns(this,e));return this.init(1)}}sync(t,e){if(M(t)||t&&M(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 M(e)?this:(e.duration=c,e.composition=i.replace,this.add(t,e,s))}call(t,e){return M(t)||t&&!X(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return M(t)||t&&!Y(t)||(this.labels[t]=ns(this,e)),this}remove(t,e){return Je(t,this,e),this}stretch(t){const e=this.duration;if(e===ut(t))return this;const s=t/e,i=this.labels;ft(this,(t=>{t.stretch(t.duration*s)}));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return ft(this,(t=>{t.refresh&&t.refresh()})),this}revert(){return super.revert(),ft(this,(t=>t.revert),!0),Se(this)}then(t){return super.then(t)}}class hs{constructor(t,e){B.scope&&B.scope.revertibles.push(this);const s={},r={};if(this.targets=[],this.animations={},!M(t)&&!M(e)){for(let t in e){const i=e[t];U(t)?r[t]=i:s[t]=i}for(let e in r){const n=r[e],o=P(n);let a={},h="+=0";if(o){const t=n.unit;Y(t)&&(h+=t)}else a.duration=n;a[e]=o?mt({to:h},n):h;const l=mt(s,a);l.composition=i.replace,l.autoplay=!1;const c=this.animations[e]=new Ae(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(M(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return ft(c,(e=>{if(F(t))for(let s=0,i=t.length;s<i;s++)M(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;M(s)||(e._ease=ge(s)),e._currentTime=0})),M(e)||c.stretch(e),c.reset(1).resume(),this}}}}revert(){for(let t in this.animations)this[t]=_,this.animations[t].revert();return this.animations={},this.targets.length=0,this}}class ls{constructor(t={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/u,this.maxIterations=this.maxDuration/this.timeStep/u,this.m=ot(Yt(t.mass,1),0,u),this.s=ot(Yt(t.stiffness,100),1,u),this.d=ot(Yt(t.damping,10),.1,u),this.v=ot(Yt(t.velocity,0),-1e3,u),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>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?J(-n*e*s)*(1*G(i*n)+r*j(i*n)):(1+r*n)*J(-n*s),1-n}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ot(Q(o/r),c,u),l=this.zeta=n/(2*Q(o*r)),d=this.wd=l<1?h*Q(1-l*l):0;this.b=l<1?(l*h-a)/d:-a+h;let p=0,m=0,f=0;for(;m<t&&f<e;)Z(1-this.solve(p))<s?m++:m=0,this.solverDuration=p,p+=i,f++;this.duration=ht(this.solverDuration*u,0)*B.timeScale}get mass(){return this.m}set mass(t){this.m=ot(Yt(t,1),0,u),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ot(Yt(t,100),1,u),this.compute()}get damping(){return this.d}set damping(t){this.d=ot(Yt(t,10),.1,u),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ot(Yt(t,0),-1e3,u),this.compute()}}const cs=t=>new ls(t),ds=t=>{t.cancelable&&t.preventDefault()};class us{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:_,remove:_}}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 ps{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 ms=(t,e)=>t&&X(t)?t(e):t;let fs=0;class gs{constructor(t,i={}){if(!t)return;B.scope&&B.scope.revertibles.push(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,h=i.releaseEase,l=h&&ge(h),c=!M(h)&&!M(h.ease),u=P(r)&&!M(r.mapTo)?r.mapTo:"translateX",p=P(n)&&!M(n.mapTo)?n.mapTo:"translateY",m=ms(i.container,this);this.containerArray=F(m)?m:null,this.$container=m&&!this.containerArray?Bt(m)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=P(t)?new us(t):Bt(t)[0],this.$trigger=Bt(o||t)[0],this.fixed="fixed"===je(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.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:cs({mass:Yt(i.releaseMass,1),stiffness:Yt(i.releaseStiffness,80),damping:Yt(i.releaseDamping,20)}),this.releaseYSpring=c?h:cs({mass:Yt(i.releaseMass,1),stiffness:Yt(i.releaseStiffness,80),damping:Yt(i.releaseDamping,20)}),this.releaseEase=l||me.outQuint,this.hasReleaseSpring=c,this.onGrab=i.onGrab||_,this.onDrag=i.onDrag||_,this.onRelease=i.onRelease||_,this.onUpdate=i.onUpdate||_,this.onSettle=i.onSettle||_,this.onSnap=i.onSnap||_,this.onResize=i.onResize||_,this.onAfterResize=i.onAfterResize||_,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),M(r)||!0===r)f[u]=0;else if(P(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===r&&(f[u]=0,this.disabled[0]=1);if(M(n)||!0===n)f[p]=0;else if(P(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[p]=e}else!1===n&&(f[p]=0,this.disabled[1]=1);this.animate=new hs(this.$target,f),this.xProp=u,this.yProp=p,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=[-1e12,d,d,-1e12],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=N(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new ps(this.$target),this.overshootCoords={x:0,y:0},this.overshootXTicker=new ee({autoplay:!1},null,0).init(),this.overshootYTicker=new ee({autoplay:!1},null,0).init(),this.updateTicker=new ee({autoplay:!1},null,0).init(),this.overshootXTicker.onUpdate=()=>{this.disabled[0]||(this.updated=!0,this.manual=!0,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootXTicker.onComplete=()=>{this.disabled[0]||(this.manual=!1,this.animate[this.xProp](this.overshootCoords.x,0))},this.overshootYTicker.onUpdate=()=>{this.disabled[1]||(this.updated=!0,this.manual=!0,this.animate[this.yProp](this.overshootCoords.y,0))},this.overshootYTicker.onComplete=()=>{this.disabled[1]||(this.manual=!1,this.animate[this.yProp](this.overshootCoords.y,0))},this.updateTicker.onUpdate=()=>this.update(),this.contained=!M(m),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[0]?p:u,this.animate.animations[this.activeProp].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&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=it(n,r)):this.updated=!1},this.animate.animations[this.activeProp].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 ee({autoplay:!1,duration:150*B.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),P(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=N(),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]=ht(ot(Q(t*t+e*e)/r*o,a,h),5);const c=st(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=ht(t,5);return this.overshootXTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=lt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=ht(t,5);return this.overshootYTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=lt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return ht(this.animate[this.xProp](),B.precision)}set x(t){this.setX(t,!1)}get y(){return ht(this.animate[this.yProp](),B.precision)}set y(t){this.setY(t,!1)}get progressX(){return ts(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(ts(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return ts(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(ts(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=ht(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=ht(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,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?ot(c,a,c):c,this.scrollView[1]=l?ot(d,h,d):d,this.updateScrollCoords();const{width:y,height:v,left:b,top:x,right:S,bottom:T}=t.getBoundingClientRect();this.dragArea[2]=ht(l?ot(y,a,a):y,0),this.dragArea[3]=ht(l?ot(v,h,h):v,0);const w=je(t,"overflow"),k="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&k||!$&&!k)&&(c>this.dragArea[2]+_-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!F(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]=ht(r.top+s-(l?0:x),0),this.targetBounds[1]=ht(r.right+e-(l?a:S),0),this.targetBounds[2]=ht(r.bottom+s-(l?h:T),0),this.targetBounds[3]=ht(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]=-ht(r.top-(u?ot(x,0,h):x)+o-m,0),this.containerBounds[1]=-ht(r.right-(u?ot(S,0,a):S)-c+f,0),this.containerBounds[2]=-ht(r.bottom-(u?ot(T,0,h):T)-d+g,0),this.containerBounds[3]=-ht(r.left-(u?ot(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=ms(t.container,this),o=ms(t.containerPadding,this)||0,a=F(o)?o:[o,o,o,o],h=this.x,l=this.y,c=ms(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}this.containerArray=F(n)?n:null,this.$container=n&&!this.containerArray?Bt(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=Yt(a,[0,0,0,0]),this.containerFriction=ot(Yt(ms(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ot(Yt(ms(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ms(P(i)&&!M(i.snap)?i.snap:t.snap,this),this.snapY=ms(P(r)&&!M(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Yt(ms(t.scrollSpeed,this),1.5),this.scrollThreshold=Yt(ms(t.scrollThreshold,this),20),this.dragSpeed=Yt(ms(t.dragSpeed,this),1),this.minVelocity=Yt(ms(t.minVelocity,this),0),this.maxVelocity=Yt(ms(t.maxVelocity,this),50),this.velocityMultiplier=Yt(ms(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[u,p,m,f]=this.containerBounds;this.setX(ot(h,f,p),!0),this.setY(ot(l,u,m),!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?ot(c,this.window[0],c):c,p=this.useWin?ot(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,x,S,T]=this.scrollBounds,w=ht(ot((v-b+t)/_,-1,0)*g,0),k=ht(ot((y-x-e)/_,0,1)*g,0),$=ht(ot((v-S-s)/_,0,1)*g,0),E=ht(ot((y-T+i)/_,-1,0)*g,0);if(w||$||E||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=ht(ot(h+(E||k),0,r-o),0),this.coords[0]-=h-s),e||(i=ht(ot(l+(w||$),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=it(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.overshootXTicker.pause(),this.overshootYTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Je(this,null,"x"),Je(this,null,"y"),Je(this,null,"progressX"),Je(this,null,"progressY"),Je(this.scroll),Je(this.overshootCoords),this}scrollInView(t,e=0,s=me.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,u]=o,p=ht(ot(r-h,-1e12,0),0),m=ht(ot(i-l,0,d),0),f=ht(ot(r-c,0,d),0),g=ht(ot(i-u,-1e12,0),0);new Ae(n,{x:ht(n.x+(g?g-e:m?m+e:0),0),y:ht(n.y+(p?p-e:f?f+e:0),0),duration:M(t)?350*B.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=Ge(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=me.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=ot(lt(i,this.snapX),u,c),a=ot(lt(r,this.snapY),l,d),h=M(t)?350*B.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=je(this.$target,"zIndex",!1);fs=(f>fs?f:fs)+1,this.targetStyles=Ge(this.$target,{zIndex:fs}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ge(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,me.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=je(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.parentNode}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):(ds(t),this.triggerStyles||(this.triggerStyles=Ge(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ds,{passive:!1}),this.$trigger.addEventListener("touchmove",ds,{passive:!1}),this.$trigger.addEventListener("touchend",ds),(!this.disabled[0]&&Z(o)>3||!this.disabled[1]&&Z(a)>3)&&(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,[r,n,o,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,x=this.x,S=this.y,T=this.computeVelocity(r-h,n-l),w=this.angle=it(n-a,r-o),k=150*T,$=(1-this.releaseContainerFriction)*this.dragSpeed,E=x+G(w)*k,C=S+j(w)*k,D=E>d?d+(E-d)*$:E<p?p+(E-p)*$:E,L=C>u?u+(C-u)*$:C<c?c+(C-c)*$:C,A=this.destX=ot(ht(lt(D,this.snapX),5),p,d),N=this.destY=ot(ht(lt(L,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,E,C);let P=0,R=0,Y=y,X=y,M=0;if(b.x=x,b.y=S,!t){const t=A===d?x>d?-1:1:x<p?-1:1,s=ht(x-A,0);g.velocity=e&&v?s?k*t/Z(s):0:T;const{ease:i,duration:r,restDuration:n}=g;P=x===A?0:v?r:r-n*B.timeScale,v&&(Y=i),P>M&&(M=P)}if(!e){const e=N===u?S>u?-1:1:S<c?-1:1,s=ht(S-N,0);_.velocity=t&&v?s?k*e/Z(s):0:T;const{ease:i,duration:r,restDuration:n}=_;R=S===N?0:v?r:r-n*B.timeScale,v&&(X=i),R>M&&(M=R)}if(!v&&F&&$&&(P||R)){const t=i.blend;new Ae(b,{x:{to:D,duration:.65*P},y:{to:L,duration:.65*R},ease:y,composition:t}).init(),new Ae(b,{x:{to:A,duration:P},y:{to:N,duration:R},ease:y,composition:t}).init(),this.overshootXTicker.stretch(P).restart(),this.overshootYTicker.stretch(R).restart()}else t||this.animate[this.xProp](A,P,Y),e||this.animate[this.yProp](N,R,X);this.scrollInView(M,this.scrollThreshold,y);let O=!1;A!==m&&(this.snapped[0]=A,this.snapX&&(O=!0)),N!==f&&this.snapY&&(this.snapped[1]=N,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ds),this.$trigger.removeEventListener("touchmove",ds),this.$trigger.removeEventListener("touchend",ds),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=Ge(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.stop(),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.overshootXTicker.revert(),this.overshootYTicker.revert(),this.resizeTicker.revert(),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":ds(t)}}}class _s{constructor(t={}){B.scope&&B.scope.revertibles.push(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||Bt(i)[0]||s);const n=t.defaults,o=B.defaults,a=t.mediaQueries;if(this.defaults=n?mt(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],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)}}execute(t){let e=B.scope,s=B.root,i=B.defaults;B.scope=this,B.root=this.root,B.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return B.scope=e,B.root=s,B.defaults=i,n}refresh(){return 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);e&&this.revertConstructors.push(e)}))})),this}add(t,e){if(X(t)){const e=t;this.constructors.push(e),this.execute((()=>{const t=e(this);t&&this.revertConstructors.push(t)}))}else this.methods[t]=(...t)=>this.execute((()=>e(...t)));return this}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.mediaQueryLists;let i=t.length,r=e.length;for(;i--;)t[i].revert();for(;r--;)e[r](this);for(let t in s)s[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const ys=(t,e)=>t&&X(t)?t(e):t,vs=new Map;class bs{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.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 ee({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ft(this,(t=>t.handleScroll()),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ee({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=ht(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ee({autoplay:!1,duration:250*B.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ee({autoplay:!1,duration:500*B.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=ht(t?e.scrollX:s.scrollLeft,0),this.scrollY=ht(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=(()=>{const t=document.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e})()}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=t.width,i=t.height,this.top=t.top,this.left=t.left}this.width=s,this.height=i}refreshScrollObservers(){ft(this,(t=>{t._debug&&t.removeDebug()})),this.updateBounds(),ft(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.unobserve(this.element),(this.useWin?e:this.element).removeEventListener("scroll",this),vs.delete(this.element)}}const xs=(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}=Wt(a,Ut);let c=h;return"%"===l?c=h/100*s:l&&(c=xe(t,Ut,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},Ss=(t,e,s,i,r)=>{let n;if(Y(e)){const o=E.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),c="min"===l[0],d="max"===l[0],u=xs(t,l[0],s,i,r),p=xs(t,l[1],s,i,r);if(c){const e=It(xs(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=It(xs(t,"max",s),p,h);n=e>u?u:e}else n=It(u,p,h)}else n=xs(t,e,s,i,r)}else n=e;return ht(n,0)},Ts=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[n]){e=i;break}}return e};let ws=0;const ks=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class $s{constructor(t={}){B.scope&&B.scope.revertibles.push(this);const e=Yt(t.sync,"play pause"),i=e?ge(e):null,r=e&&("linear"===e||e===se),n=e&&!(i===se&&!r),o=e&&(R(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=ws++,this.id=M(t.id)?this.index:t.id,this.container=(t=>{const e=t&&Bt(t)[0]||s.body;let i=vs.get(e);return i||(i=new bs(e),vs.set(e,i)),i})(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]:_,this.onSyncLeave=h&&!l&&h[1]?h[1]:_,this.onSyncEnterForward=h&&l&&h[0]?h[0]:_,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:_,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:_,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:_,this.onEnter=t.onEnter||_,this.onLeave=t.onLeave||_,this.onEnterForward=t.onEnterForward||_,this.onLeaveForward=t.onLeaveForward||_,this.onEnterBackward=t.onEnterBackward||_,this.onLeaveBackward=t.onLeaveBackward||_,this.onUpdate=t.onUpdate||_,this.onSyncComplete=t.onSyncComplete||_,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],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=Yt(t.debug,!1),this._next=null,this._prev=null,_t(this.container,this),Qe((()=>{if(!this.reverted){if(!this.target){const e=Bt(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}}))}link(t){if(t&&(t.pause(),this.linked=t,!this._params.target)){let e;M(t.targets)?ft(t,(t=>{t.targets&&!e&&(e=Ts(t))})):e=Ts(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:ht(ot(t,0,1),6)}refresh(){this.reverted=!1;const t=this._params;return this.repeat=Yt(ys(t.repeat,this),!0),this.horizontal="x"===Yt(ys(t.axis,this),"y"),this.enter=Yt(ys(t.enter,this),"end start"),this.leave=Yt(ys(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=ks[this.index%ks.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",x=t=>e?"0px "+t+"px":t+"px 2px",S=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,T=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${T("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=`${T("sticky",0,0,e?l:g,e?g:c)}`,i||(n.style.cssText+=`background:\n ${S("#FFFF")}${x(g-10)} / 100px 100px ${b},\n ${S("#FFF8")}${x(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${T("relative",0,0,e?d:g,e?g:u)}`,i||(o.style.cssText+=`background:\n ${S("#FFFF")}${x(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${S("#FFF8")}${x(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<v,g=h>(r?e?l:c:e?d:u)-v,b=(r?m&&!f:!m&&!f)||g,x=s.createElement("div"),S=s.createElement("div"),k=e?b?"right":"left":b?"bottom":"top",$=b?(e?y:_)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;S.innerHTML=`${this.id}${w[m]}${this.thresholds[i]}`,x.style.cssText=`${T("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-${k}: 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 `,x.appendChild(S);let E=h-$+(e?1:0);x.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(x)})),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===je(t.element,"position")&&(this.debugStyles=Ge(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,h=0,l=0,c=a;n&&(o=n.currentTime,n.seek(0,!0));const d="static"===je(i.element,"position")&&Ge(i.element,{position:"relative "});for(;a&&a!==i.element&&a!==s.body;){const e="sticky"===je(a,"position")&&Ge(a,{position:"static"});a===c&&(h+=a.offsetLeft||0,l+=a.offsetTop||0,c=a.offsetParent),a=a.parentElement,e&&(t||(t=[]),t.push(e))}d&&d.revert();const u=r?h:l,p=r?e.offsetWidth:e.offsetHeight,m=r?i.width:i.height,f=(r?i.scrollWidth:i.scrollHeight)-m,g=this.enter,_=this.leave;let y="start",v="end",b="end",x="start";if(Y(g)){const t=g.split(" ");b=t[0],y=t.length>1?t[1]:y}else if(P(g)){const t=g;M(t.container)||(b=t.container),M(t.target)||(y=t.target)}else R(g)&&(b=g);if(Y(_)){const t=_.split(" ");x=t[0],v=t.length>1?t[1]:v}else if(P(_)){const t=_;M(t.container)||(x=t.container),M(t.target)||(v=t.target)}else R(_)&&(x=_);const S=Ss(e,y,p),T=Ss(e,v,p),w=S+u-m,k=T+u-f,$=Ss(e,b,m,w,k),E=Ss(e,x,m,w,k),C=S+u-$,B=T+u-E,D=B-C;this.offsets[0]=h,this.offsets[1]=l,this.offset=u,this.offsetStart=C,this.offsetEnd=B,this.distance=D<=0?0:D,this.thresholds=[y,v,b,x],this.coords=[S,T,$,E],t&&t.forEach((t=>t.revert())),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){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&&R(i)){if(i<1){const t=e<g&&1===g?1e-4:e>g&&!g?-1e-4:0;g=ht(es(e,g,ct(.01,.2,i),!1)+t,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 gt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}exports.Animatable=hs,exports.Draggable=gs,exports.JSAnimation=Ae,exports.Scope=_s,exports.ScrollObserver=$s,exports.Spring=ls,exports.Timeline=as,exports.Timer=ee,exports.WAAPIAnimation=He,exports.animate=(t,e)=>new Ae(t,e,null,0,!1).init(),exports.createAnimatable=(t,e)=>new hs(t,e),exports.createDraggable=(t,e)=>new gs(t,e),exports.createScope=t=>new _s(t),exports.createSpring=cs,exports.createTimeline=t=>new as(t).init(),exports.createTimer=t=>new ee(t,null,0).init(),exports.eases=me,exports.engine=kt,exports.onScroll=(t={})=>new $s(t),exports.scrollContainers=vs,exports.stagger=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!M(o),h=a&&!M(o.ease)?o.ease:a?ge(o):null,l=e.grid,c=e.axis,d=M(r)||0===r||"first"===r,u="center"===r,m="last"===r,f=F(t),g=H(f?t[0]:t),_=f?H(t[1]):0,y=w.exec((f?t[1]:t)+p),v=e.start||0+(f?g:0);let b=d?0:R(r)?r:0;return(t,r,o,a)=>{if(u&&(b=(o-1)/2),m&&(b=o-1),!s.length){for(let t=0;t<o;t++){if(l){const e=u?(l[0]-1)/2:b%l[0],i=u?(l[1]-1)/2:tt(b/l[0]),r=e-t%l[0],n=i-tt(t/l[0]);let o=Q(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(Z(b-t));i=st(...s)}h&&(s=s.map((t=>h(t/i)*i))),n&&(s=s.map((t=>c?t<0?-1*t:-t:Z(i-t))))}const d=f?(_-g)/i:g;let p=(a?ns(a,M(e.start)?a.iterationDuration:v):v)+(d*ht(s[r],2)||0);return e.modifier&&(p=e.modifier(p)),y&&(p=`${p}${y[2]}`),p}},exports.svg=Pt,exports.utils=rs,exports.waapi=qe;
|