animejs 4.2.1 → 4.3.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +82 -28
  2. package/dist/bundles/anime.esm.js +2707 -1301
  3. package/dist/bundles/anime.esm.min.js +2 -2
  4. package/dist/bundles/anime.umd.js +2717 -1309
  5. package/dist/bundles/anime.umd.min.js +2 -2
  6. package/dist/modules/animatable/animatable.cjs +1 -1
  7. package/dist/modules/animatable/animatable.js +1 -1
  8. package/dist/modules/animatable/index.cjs +1 -1
  9. package/dist/modules/animatable/index.js +1 -1
  10. package/dist/modules/animation/additive.cjs +1 -1
  11. package/dist/modules/animation/additive.js +1 -1
  12. package/dist/modules/animation/animation.cjs +18 -9
  13. package/dist/modules/animation/animation.js +19 -10
  14. package/dist/modules/animation/composition.cjs +1 -1
  15. package/dist/modules/animation/composition.js +1 -1
  16. package/dist/modules/animation/index.cjs +1 -1
  17. package/dist/modules/animation/index.js +1 -1
  18. package/dist/modules/core/clock.cjs +10 -10
  19. package/dist/modules/core/clock.d.ts +1 -1
  20. package/dist/modules/core/clock.js +10 -10
  21. package/dist/modules/core/colors.cjs +1 -1
  22. package/dist/modules/core/colors.js +1 -1
  23. package/dist/modules/core/consts.cjs +6 -4
  24. package/dist/modules/core/consts.d.ts +13 -5
  25. package/dist/modules/core/consts.js +6 -4
  26. package/dist/modules/core/globals.cjs +5 -2
  27. package/dist/modules/core/globals.d.ts +1 -0
  28. package/dist/modules/core/globals.js +5 -3
  29. package/dist/modules/core/helpers.cjs +1 -1
  30. package/dist/modules/core/helpers.js +1 -1
  31. package/dist/modules/core/render.cjs +1 -1
  32. package/dist/modules/core/render.js +1 -1
  33. package/dist/modules/core/styles.cjs +1 -1
  34. package/dist/modules/core/styles.js +1 -1
  35. package/dist/modules/core/targets.cjs +1 -1
  36. package/dist/modules/core/targets.js +1 -1
  37. package/dist/modules/core/transforms.cjs +1 -1
  38. package/dist/modules/core/transforms.js +1 -1
  39. package/dist/modules/core/units.cjs +1 -1
  40. package/dist/modules/core/units.js +1 -1
  41. package/dist/modules/core/values.cjs +1 -1
  42. package/dist/modules/core/values.js +1 -1
  43. package/dist/modules/draggable/draggable.cjs +1 -1
  44. package/dist/modules/draggable/draggable.js +1 -1
  45. package/dist/modules/draggable/index.cjs +1 -1
  46. package/dist/modules/draggable/index.js +1 -1
  47. package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
  48. package/dist/modules/easings/cubic-bezier/index.js +1 -1
  49. package/dist/modules/easings/eases/index.cjs +1 -1
  50. package/dist/modules/easings/eases/index.js +1 -1
  51. package/dist/modules/easings/eases/parser.cjs +1 -1
  52. package/dist/modules/easings/eases/parser.js +1 -1
  53. package/dist/modules/easings/index.cjs +1 -1
  54. package/dist/modules/easings/index.js +1 -1
  55. package/dist/modules/easings/irregular/index.cjs +1 -1
  56. package/dist/modules/easings/irregular/index.js +1 -1
  57. package/dist/modules/easings/linear/index.cjs +1 -1
  58. package/dist/modules/easings/linear/index.js +1 -1
  59. package/dist/modules/easings/none.cjs +1 -1
  60. package/dist/modules/easings/none.js +1 -1
  61. package/dist/modules/easings/spring/index.cjs +1 -1
  62. package/dist/modules/easings/spring/index.js +1 -1
  63. package/dist/modules/easings/steps/index.cjs +1 -1
  64. package/dist/modules/easings/steps/index.js +1 -1
  65. package/dist/modules/engine/engine.cjs +2 -2
  66. package/dist/modules/engine/engine.js +2 -2
  67. package/dist/modules/engine/index.cjs +1 -1
  68. package/dist/modules/engine/index.js +1 -1
  69. package/dist/modules/events/index.cjs +1 -1
  70. package/dist/modules/events/index.js +1 -1
  71. package/dist/modules/events/scroll.cjs +1 -1
  72. package/dist/modules/events/scroll.js +1 -1
  73. package/dist/modules/index.cjs +4 -1
  74. package/dist/modules/index.d.ts +1 -0
  75. package/dist/modules/index.js +2 -1
  76. package/dist/modules/layout/index.cjs +15 -0
  77. package/dist/modules/layout/index.d.ts +1 -0
  78. package/dist/modules/layout/index.js +8 -0
  79. package/dist/modules/layout/layout.cjs +1384 -0
  80. package/dist/modules/layout/layout.d.ts +211 -0
  81. package/dist/modules/layout/layout.js +1381 -0
  82. package/dist/modules/scope/index.cjs +1 -1
  83. package/dist/modules/scope/index.js +1 -1
  84. package/dist/modules/scope/scope.cjs +1 -1
  85. package/dist/modules/scope/scope.js +1 -1
  86. package/dist/modules/svg/drawable.cjs +1 -1
  87. package/dist/modules/svg/drawable.js +1 -1
  88. package/dist/modules/svg/helpers.cjs +1 -1
  89. package/dist/modules/svg/helpers.js +1 -1
  90. package/dist/modules/svg/index.cjs +1 -1
  91. package/dist/modules/svg/index.js +1 -1
  92. package/dist/modules/svg/morphto.cjs +1 -1
  93. package/dist/modules/svg/morphto.js +1 -1
  94. package/dist/modules/svg/motionpath.cjs +11 -7
  95. package/dist/modules/svg/motionpath.js +11 -7
  96. package/dist/modules/text/index.cjs +1 -1
  97. package/dist/modules/text/index.js +1 -1
  98. package/dist/modules/text/split.cjs +23 -9
  99. package/dist/modules/text/split.js +23 -9
  100. package/dist/modules/timeline/index.cjs +1 -1
  101. package/dist/modules/timeline/index.js +1 -1
  102. package/dist/modules/timeline/position.cjs +1 -1
  103. package/dist/modules/timeline/position.js +1 -1
  104. package/dist/modules/timeline/timeline.cjs +14 -6
  105. package/dist/modules/timeline/timeline.d.ts +2 -0
  106. package/dist/modules/timeline/timeline.js +15 -7
  107. package/dist/modules/timer/index.cjs +1 -1
  108. package/dist/modules/timer/index.js +1 -1
  109. package/dist/modules/timer/timer.cjs +26 -13
  110. package/dist/modules/timer/timer.d.ts +1 -0
  111. package/dist/modules/timer/timer.js +27 -14
  112. package/dist/modules/types/index.d.ts +3 -1
  113. package/dist/modules/utils/chainable.cjs +1 -1
  114. package/dist/modules/utils/chainable.js +1 -1
  115. package/dist/modules/utils/index.cjs +1 -1
  116. package/dist/modules/utils/index.js +1 -1
  117. package/dist/modules/utils/number.cjs +1 -1
  118. package/dist/modules/utils/number.js +1 -1
  119. package/dist/modules/utils/random.cjs +1 -1
  120. package/dist/modules/utils/random.js +1 -1
  121. package/dist/modules/utils/stagger.cjs +1 -1
  122. package/dist/modules/utils/stagger.js +1 -1
  123. package/dist/modules/utils/target.cjs +1 -1
  124. package/dist/modules/utils/target.js +1 -1
  125. package/dist/modules/utils/time.cjs +1 -1
  126. package/dist/modules/utils/time.js +1 -1
  127. package/dist/modules/waapi/composition.cjs +1 -1
  128. package/dist/modules/waapi/composition.js +1 -1
  129. package/dist/modules/waapi/index.cjs +1 -1
  130. package/dist/modules/waapi/index.js +1 -1
  131. package/dist/modules/waapi/waapi.cjs +15 -7
  132. package/dist/modules/waapi/waapi.js +16 -8
  133. package/package.json +8 -2
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Anime.js - UMD minified bundle
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).anime={})}(this,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=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),g=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],y=g.reduce((t,e)=>({...t,[e]:e+"("}),{}),_=()=>{},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,w=/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,x=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,$=/([a-z])([A-Z])/g,C=/(\w+)(\([^)]+\)+)/g,E=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,B={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:p,delay:0,loopDelay:0,ease:"out(2)",composition:r.replace,modifier:t=>t,onBegin:_,onBeforeUpdate:_,onUpdate:_,onLoop:_,onPause:_,onComplete:_,onRender:_},L={current:null,root:i},N={defaults:B,precision:4,timeScale:1,tickThreshold:200},A={version:"4.2.1",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(A));const F=t=>t.replace($,"$1-$2").toLowerCase(),P=(t,e)=>0===t.indexOf(e),O=Date.now,R=Array.isArray,M=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),I=t=>"string"==typeof t,Y=t=>"function"==typeof t,X=t=>void 0===t,V=t=>X(t)||null===t,W=t=>e&&t instanceof SVGElement,H=t=>v.test(t),U=t=>P(t,"rgb"),q=t=>P(t,"hsl"),j=t=>!N.defaults.hasOwnProperty(t),G=["opacity","rotate","overflow","color"],Q=t=>I(t)?parseFloat(t):t,Z=Math.pow,J=Math.sqrt,K=Math.sin,tt=Math.cos,et=Math.abs,st=Math.exp,it=Math.ceil,rt=Math.floor,nt=Math.asin,ot=Math.max,at=Math.atan2,ht=Math.PI,lt=Math.round,ct=(t,e,s)=>t<e?e:t>s?s:t,dt={},ut=(t,e)=>{if(e<0)return t;if(!e)return lt(t);let s=dt[e];return s||(s=dt[e]=10**e),lt(t*s)/s},pt=(t,e)=>R(e)?e.reduce((e,s)=>et(s-t)<et(e-t)?s:e):e?lt(t/e)*e:t,mt=(t,e,s)=>t+(e-t)*s,ft=t=>t===1/0?u:t===-1/0?-u:t,gt=t=>t<=d?d:ft(ut(t,11)),yt=t=>R(t)?[...t]:t,_t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=X(r)?e[i]:r}return s},vt=(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}},bt=(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},St=(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},wt=(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),Tt=(t,e)=>X(t)?e:t,xt=(t,e,s,i,r)=>{let n;if(Y(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!I(t)||!P(t,"var("))return t;n=()=>{const s=t.match(D),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==m||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},kt=(t,e)=>t[o]?t[a]&&((t,e)=>{if(G.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:P(e,"--")?4:e in t.style?2:e in t?0:1:0,$t=(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},Ct=(t,e,s,i)=>{const r=X(s)?kt(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=C.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&&!X(r)?r:P(e,"scale")?"1":P(e,"rotate")||P(e,"skew")?"0deg":"0px"})(t,e,i):4===r?$t(t,e,i).trimStart():$t(t,e,i)},Et=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Dt=(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(H(r=s)||U(r)||q(r))return e.t=2,e.d=U(i=s)?(t=>{const e=b.exec(t)||S.exec(t),s=X(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):H(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):q(i)?(t=>{const e=w.exec(t)||T.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=X(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=ut(255*wt(e,t,s+1/3),0),a=ut(255*wt(e,t,s),0),h=ut(255*wt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(x);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(x)||[],e}}var i,r;return e.n=s,e},Bt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=yt(t._toNumbers),e.s=yt(t._strings),e),Lt={t:0,n:0,u:null,o:null,d:null,s:null},Nt=(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,_=t._alternate,v=t._hasChildren,b=t._delay,S=t._currentTime,w=b+c,T=e-b,x=ct(S,-b,a),k=ct(T,-b,a),$=T-S,C=k>0,E=k>=a,D=a<=d,B=2===n;let L=0,A=T,F=0;if(u>1){const e=~~(k/(c+(E?0:f)));t._currentIteration=ct(e,0,u),E&&t._currentIteration--,L=t._currentIteration%2,A=k%(c+f)||0}const P=g^(_&&L),O=t._ease;let R=E?P?0:a:P?c-A:A;O&&(R=c*O(R/c)||0);const M=(o?o.backwards:T<S)?!P:!!P;if(t._currentTime=T,t._iterationTime=R,t.backwards=M,C&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):T<=0&&(t.began=!1),s||v||!C||t._currentIteration===p||t.onLoop(t),B||1===n&&(e>=b&&e<=w||e<=b&&x>b||e>=w&&x!==a)||R>=w&&x!==a||R<=b&&x>0||e<=x&&x===a&&l||E&&!l&&D){if(C&&(t.computeDeltaTime(x),s||t.onBeforeUpdate(t)),!v){const e=B||(M?-1*$:$)>=N.tickThreshold,n=t._offset+(o?o._offset:0)+b+R;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,_=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)&&(!_||_._isOverridden||n>=_._absoluteStartTime+_._changeDuration+u._delay))){const e=u._currentTime=ct(R-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,y=0===m,_=y&&g||0===s||1===s?-1:N.precision;let b,S;if(y)b=S=n(ut(mt(u._fromNumber,u._toNumber,s),_));else if(1===m)S=n(ut(mt(u._fromNumber,u._toNumber,s),_)),b=`${S}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=ut(ct(n(mt(t[0],e[0],s)),0,255),0),r=ut(ct(n(mt(t[1],e[1],s)),0,255),0),o=ut(ct(n(mt(t[2],e[2],s)),0,255),0),a=ct(n(ut(mt(t[3],e[3],s),_)),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(ut(mt(u._fromNumbers[t],u._toNumbers[t],s),_)),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)),C&&(F=1)}}if(p&&u._renderTransforms){let t=m;for(let e in d)t+=`${y[e]}${d[e]}) `;l.transform=t,p=0}u=u._next}!s&&F&&t.onRender(t)}!s&&C&&t.onUpdate(t)}return o&&D?!s&&(o.began&&!M&&T>0&&!l||M&&T<=d&&l)&&(t.onComplete(t),t.completed=!M):C&&E?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||v||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,F},At=(t,e,s,i,r)=>{const n=t._currentIteration;if(Nt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,h=i?e:o._iterationTime,l=O();let c=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;vt(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&&Nt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}vt(o,t=>{const e=ut((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;c+=Nt(t,e,s,i,n),!t.completed&&u&&(u=!1)},a),!s&&c&&o.onRender(o),(u||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Ft={},Pt=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&W(e)&&t in e.style){const e=Ft[t];if(e)return e;{const e=t?F(t):t;return Ft[t]=e,e}}return t},Ot=t=>{if(t._hasChildren)vt(t,Ot,!0);else{const e=t;e.pause(),vt(e,t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=t._inlineValue,o=V(n)||n===m;if(3===t._tweenType){const e=i[h];if(o?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=m;for(let s in e)t+=y[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else o?r.removeProperty(F(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Rt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._elapsedTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=ut(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=ut(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 Mt={animation:null,update:_},zt=(()=>e?requestAnimationFrame:setImmediate)(),It=(()=>e?cancelAnimationFrame:clearImmediate)();class Yt extends Rt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=B,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=O();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?(bt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):At(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Mt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(O()),this.reqId=zt(Vt)),this}pause(){if(this.reqId)return this.paused=!0,Wt()}resume(){if(this.paused)return this.paused=!1,vt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===N.timeScale?1:p)}set speed(t){this._speed=t*N.timeScale,vt(this,t=>t.speed=t._speed)}get timeUnit(){return 1===N.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(N.timeScale!==s){N.timeScale=s,N.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return N.precision}set precision(t){N.precision=t}}const Xt=(()=>{const t=new Yt(O());return e&&(A.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Vt=()=>{Xt._head?(Xt.reqId=zt(Vt),Xt.update()):Xt.reqId=0},Wt=()=>(It(Xt.reqId),Xt.reqId=0,Xt),Ht={_rep:new WeakMap,_add:new Map},Ut=(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=d,t._currentTime=d},Gt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;St(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),s=ut(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<d&&jt(i)}let o=!0;if(vt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;vt(t,t=>{t!==e&&vt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=Ut(t.target,t.property,"_add"),s=(t=>{let e=Mt.animation;return e||(e={duration:d,computeDeltaTime:_,_offset:0,_delay:0,_head:null,_tail:null},Mt.animation=e,Mt.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?yt(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}}}),Nt(e,1,1,0,2)}),e})(Ht._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=d,i._startTime=0,i._numbers=yt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,St(e,i),St(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=yt(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=yt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}St(e,t,null,"_prevAdd","_nextAdd")}return t},Qt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=Ht._rep.get(s)[i];if(bt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=Ht._add,r=e.get(s);if(!r)return;const n=r[i],o=Mt.animation;bt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){bt(n,a,"_prevAdd","_nextAdd"),bt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Zt=(t,e,s)=>{let i=!1;return vt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Pt(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),bt(e,r),Qt(r),i=!0)}},!0),i},Jt=(t,e,s)=>{const i=e||Xt;let r;if(i._hasChildren){let e=0;vt(i,n=>{if(!n._hasChildren)if(r=Zt(t,n,s),r&&!n._head)n.cancel(),bt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Jt(t,n,s):n._hasChildren=!1},!0),X(i.iterationDuration)||(i.iterationDuration=e)}else r=Zt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},Kt=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),te=t=>t._cancelled?(t._hasChildren?vt(t,te):vt(t,t=>{t._composition!==r.none&&Gt(t,Ut(t.target,t.property))}),t._cancelled=0,t):t;let ee=0;class se extends Rt{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:y,onBeforeUpdate:v,onUpdate:b}=t;L.current&&L.current.register(this);const S=e?0:Xt._elapsedTime,w=e?e.defaults:N.defaults,T=Y(r)||X(r)?w.delay:+r,x=Y(n)||X(n)?1/0:+n,k=Tt(h,w.loop),$=Tt(l,w.loopDelay),C=!0===k||k===1/0||k<0?1/0:k+1;let E=0;e?E=s:(Xt.reqId||Xt.requestTick(O()),E=(Xt._elapsedTime-Xt._startTime)*N.timeScale),this.id=X(i)?++ee:i,this.parent=e,this.duration=ft((x+$)*C-$)||d,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||w.onBegin,this.onBeforeUpdate=v||w.onBeforeUpdate,this.onUpdate=b||w.onUpdate,this.onLoop=f||w.onLoop,this.onPause=g||w.onPause,this.onComplete=m||w.onComplete,this.iterationDuration=x,this.iterationCount=C,this._autoplay=!e&&Tt(c,w.autoplay),this._offset=E,this._delay=T,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=_,this._running=!1,this._reversed=+Tt(o,w.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Tt(a,w.alternate),this._prev=null,this._next=null,this._elapsedTime=S,this._startTime=S,this._lastTime=S,this._fps=Tt(u,w.frameRate),this._speed=Tt(p,w.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ct(ut(this._currentTime,N.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ut(this._iterationTime,N.precision)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ct(ut(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ct(ut(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ct(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return te(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,At(this,0,1,~~t,2),Kt(this),this._hasChildren&&vt(this,Kt),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&At(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!X(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Xt._speed);return this._startTime=O()-(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?At(this,d,0,0,2):(this._running||(St(Xt,this),Xt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Xt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){te(this),this.completed=!1;const i=this.paused;return this.paused=!0,At(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?rt(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?vt(this,t=>t.cancel(),!0):vt(this,Qt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=gt(t);if(e===s)return this;const i=t/e,r=t<=d;return this.duration=r?d:s,this.iterationDuration=r?d:gt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){At(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))}}function ie(t){const e=I(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function re(t){if(V(t))return[];if(!e)return R(t)&&t.flat(1/0)||[t];if(R(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!V(i)){const t=ie(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!V(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=ie(t);return s?Array.from(s):[t]}function ne(t){const e=re(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=W(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[h]={})}}return e}const oe={deg:1,rad:180/ht,turn:360},ae={},he=(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=ae[a];if(X(h)||r){let r;if(n in oe)r=o*oe[n]/oe[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,ae[a]=r}else e.n=h;return e.t,e.u=s,e},le=t=>t,ce=(t=1.68)=>e=>Z(e,+t),de={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},ue=ht/2,pe=2*ht,me={[m]:ce,Quad:ce(2),Cubic:ce(3),Quart:ce(4),Quint:ce(5),Sine:t=>1-tt(t*ue),Circ:t=>1-J(1-t*t),Expo:t=>t?Z(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=Z(2,--s))-1)/11;);return 1/Z(4,3-s)-7.5625*Z((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ct(+t,1,10),i=ct(+e,d,2),r=i/pe*nt(1/s),n=pe/i;return t=>0===t||1===t?t:-s*Z(2,-10*(1-t))*K((1-t-r)*n)}},fe=(()=>{const t={linear:le,none:le};for(let e in de)for(let s in me){const i=me[s],r=de[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ge={linear:le,none:le},ye=t=>{if(ge[t])return ge[t];if(t.indexOf("(")<=-1){const e=de[t]||t.includes("Back")||t.includes("Elastic")?fe[t]():fe[t];return e?ge[t]=e:le}{const e=t.slice(0,-1).split("("),s=fe[e[0]];return s?ge[t]=s(...e[1].split(",")):le}},_e=["steps(","irregular(","linear(","cubicBezier("],ve=t=>{if(I(t))for(let e=0,s=_e.length;e<s;e++)if(P(t,_e[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),le;return Y(t)?t:I(t)?ye(t):le},be={t:0,n:0,u:null,o:null,d:null,s:null},Se={t:0,n:0,u:null,o:null,d:null,s:null},we={},Te={func:null},xe=[null],ke=[null,null],$e={to:null};let Ce,Ee,De=0;class Be extends se{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i);const h=ne(t),l=h.length,c=e.keyframes,u=c?_t(((t,e)=>{const s={};if(R(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(j);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];j(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Tt(e.duration,N.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(j(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:y,modifier:_,composition:v,onRender:b}=u,S=s?s.defaults:N.defaults,w=Tt(y,S.playbackEase),T=w?ve(w):null,x=!X(g)&&!X(g.ease),k=x?g.ease:Tt(g,T?"linear":S.ease),$=x?g.settlingDuration:Tt(f,S.duration),C=Tt(m,S.delay),E=_||S.modifier,D=X(v)&&l>=p?r.none:X(v)?S.composition:v,B=this._offset+(s?s._offset:0);x&&(g.parent=this);let L=NaN,A=NaN,F=0,P=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(j(t)){const o=kt(e,t),a=Pt(t,e,o);let h=u[t];const l=R(h);if(n&&!l&&(ke[0]=h,ke[1]=h,h=ke),l){const t=h.length,e=!M(h[0]);2===t&&e?($e.to=h,xe[0]=$e,Ce=xe):t>2&&e?(Ce=[],h.forEach((t,e)=>{e?1===e?(ke[1]=t,Ce.push(ke)):Ce.push(t):ke[0]=t})):Ce=h}else xe[0]=h,Ce=xe;let f=null,g=null,y=NaN,_=0,v=0;for(let t=Ce.length;v<t;v++){const n=Ce[v];M(n)?Ee=n:($e.to=n,Ee=$e),Te.func=null;const h=xt(Ee.to,e,i,c,Te);let l;M(h)&&!X(h.to)?(Ee=h,l=h.to):l=h;const u=xt(Ee.from,e,i,c),p=Ee.ease,m=!X(p)&&!X(p.ease),b=m?p.ease:p||k,S=m?p.settlingDuration:xt(Tt(Ee.duration,t>1?xt($,e,i,c)/t:$),e,i,c),w=xt(Tt(Ee.delay,v?0:C),e,i,c),T=xt(Tt(Ee.composition,D),e,i,c),x=z(T)?T:r[T],L=Ee.modifier||E,N=!X(u),A=!X(l),O=R(l),I=O||N&&A,Y=g?_+w:w,W=ut(B+Y,12);P||!N&&!O||(P=1);let H=g;if(x!==r.none){f||(f=Ut(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=W;)if(H=t,t=t._nextRep,t&&t._absoluteStartTime>=W)for(;t;)jt(t),t=t._nextRep}if(I?(Dt(O?xt(l[0],e,i,c):u,be),Dt(O?xt(l[1],e,i,c,Te):l,Se),0===be.t&&(H?1===H._valueType&&(be.t=1,be.u=H._unit):(Dt(Ct(e,a,o,we),Lt),1===Lt.t&&(be.t=1,be.u=Lt.u)))):(A?Dt(l,Se):g?Bt(g,Se):Dt(s&&H&&H.parent.parent===s?H._value:Ct(e,a,o,we),Se),N?Dt(u,be):g?Bt(g,be):Dt(s&&H&&H.parent.parent===s?H._value:Ct(e,a,o,we),be)),be.o&&(be.n=Et(H?H._toNumber:Dt(Ct(e,a,o,we),Lt).n,be.n,be.o)),Se.o&&(Se.n=Et(be.n,Se.n,Se.o)),be.t!==Se.t)if(3===be.t||3===Se.t){const t=3===be.t?be:Se,e=3===be.t?Se:be;e.t=3,e.s=yt(t.s),e.d=t.d.map(()=>e.n)}else if(1===be.t||1===Se.t){const t=1===be.t?be:Se,e=1===be.t?Se:be;e.t=1,e.u=t.u}else if(2===be.t||2===Se.t){const t=2===be.t?be:Se,e=2===be.t?Se:be;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(be.u!==Se.u){let t=Se.u?be:Se;t=he(e,t,Se.u?Se.u:be.u,!1)}if(Se.d&&be.d&&Se.d.length!==be.d.length){const t=be.d.length>Se.d.length?be:Se,e=t===be?Se:be;e.d=t.d.map((t,s)=>X(e.d[s])?0:e.d[s]),e.s=yt(t.s)}const U=ut(+S||d,12);let q=we[a];V(q)||(we[a]=null);const j={parent:this,id:De++,property:a,target:e,_value:null,_func:Te.func,_ease:ve(b),_fromNumbers:yt(be.d),_toNumbers:yt(Se.d),_strings:yt(Se.s),_fromNumber:be.n,_toNumber:Se.n,_numbers:yt(be.d),_number:be.n,_unit:Se.u,_modifier:L,_currentTime:0,_startTime:Y,_delay:+w,_updateDuration:U,_changeDuration:U,_absoluteStartTime:W,_tweenType:o,_valueType:Se.t,_composition:x,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:q,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};x!==r.none&&Gt(j,f),isNaN(y)&&(y=j._startTime),_=ut(Y+U,12),g=j,F++,St(this,j)}(isNaN(A)||y<A)&&(A=y),(isNaN(L)||_>L)&&(L=_),3===o&&(p=F-v,m=F)}if(!isNaN(p)){let t=0;vt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&vt(Mt.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."),A?(vt(this,t=>{t._startTime-t._delay||(t._delay-=A),t._startTime-=A}),L-=A):A=0,L||(L=d,this.iterationCount=0),this.targets=h,this.duration=L===d?d:ft((L+this._loopDelay)*this.iterationCount-this._loopDelay)||d,this.onRender=b||S.onRender,this._ease=T,this._delay=A,this.iterationDuration=L,!this._autoplay&&P&&this.onRender(this)}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e;return vt(this,t=>{t._updateDuration=gt(t._updateDuration*s),t._changeDuration=gt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return vt(this,t=>{const e=t._func;if(e){const s=Ct(t.target,t.property,t._tweenType);Dt(s,Lt),Dt(e(),Se),t._fromNumbers=yt(Lt.d),t._fromNumber=Lt.n,t._toNumbers=yt(Se.d),t._strings=yt(Se.s),t._toNumber=Se.o?Et(Lt.n,Se.n,Se.o):Se.n}}),this.duration===d&&this.restart(),this}revert(){return super.revert(),Ot(this)}then(t){return super.then(t)}}const Le={_head:null,_tail:null},Ne=(t,e,s)=>{let i,r=Le._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),bt(Le,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ae=(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),Ne(e,s),St(Le,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Ne(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Fe(t,e,s){const i=ne(t);if(!i.length)return;const[r]=i,n=kt(r,e),o=Pt(e,r,n);let a=Ct(r,o);if(X(s))return a;if(Dt(a,Lt),0===Lt.t||1===Lt.t){if(!1===s)return Lt.n;{const t=he(r,Lt,s,!1);return`${ut(t.n,N.precision)}${t.u}`}}}const Pe=(t,e)=>{if(!X(e))return e.duration=d,e.composition=Tt(e.composition,r.none),new Be(t,e,null,0,!0).resume()},Oe=(t,e,s)=>{const i=re(t);for(let t=0,r=i.length;t<r;t++)Ne(i[t],s,e&&e.controlAnimation&&e);return Jt(i,e,s),i},Re=(t,e)=>{let s=t.iterationDuration;if(s===d&&(s=0),X(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!V(r),o=((t,e)=>{if(P(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!X(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 Et(c,d,t[0])}return a?o:n?X(r[i])?s:r[i]:s};function Me(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=d?s-d:s;At(e,o,1,1,1);const a=i?new Be(i,t,e,o,!1,r,n):new se(t,e,o);return a.init(!0),St(e,a),vt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return ft((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||d}(e),e}class ze extends se{constructor(t={}){super(t,null,0),this.duration=0,this.labels={};const e=t.defaults,s=N.defaults;this.defaults=e?_t(e,s):s,this.onRender=t.onRender||s.onRender;const i=Tt(t.playbackEase,s.playbackEase);this._ease=i?ve(i):null,this.iterationDuration=0}add(t,e,s){const i=M(e),r=M(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(Y(s)){const e=s,r=re(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,X(a)||(s.id=a+"-"+h),Me(s,this,Re(this,e(t,h,l,this)),t,h,l),h++})}else Me(i,this,Re(this,s),t)}else Me(t,this,Re(this,e));return this.init(!0)}}sync(t,e){if(X(t)||t&&X(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 X(e)?this:(e.duration=d,e.composition=r.replace,this.add(t,e,s))}call(t,e){return X(t)||t&&!Y(t)?this:this.add({duration:0,onComplete:()=>t(this)},e)}label(t,e){return X(t)||t&&!I(t)||(this.labels[t]=Re(this,e)),this}remove(t,e){return Jt(re(t),this,e),this}stretch(t){const e=this.duration;if(e===gt(t))return this;const s=t/e,i=this.labels;vt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return vt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),vt(this,t=>t.revert,!0),Ot(this)}then(t){return super.then(t)}}class Ie{constructor(t,e){L.current&&L.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!X(t)&&!X(e)){for(let t in e){const s=e[t];j(t)?o[t]=s:P(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Be({v:0},n);for(let e in o){const s=o[e],n=M(s);let a={},h="+=0";if(n){const t=s.unit;I(t)&&(h+=t)}else a.duration=s;a[e]=n?_t({to:h},s):h;const l=_t(i,a);l.composition=r.replace,l.autoplay=!1;const c=this.animations[e]=new Be(t,l,null,0,!1).init();this.targets.length||this.targets.push(...c.targets),this[e]=(t,e,s)=>{const i=c._head;if(X(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return vt(c,e=>{if(R(t))for(let s=0,i=t.length;s<i;s++)X(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;X(s)||(e._ease=ve(s)),e._currentTime=0}),X(e)||c.stretch(e),c.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=_,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const Ye=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var Xe=Object.freeze({__proto__:null,clamp:ct,damp:(t,e,s,i)=>i?1===i?e:mt(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:mt,mapRange:Ye,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:ut,roundPad:(t,e)=>(+t).toFixed(e),snap:pt,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const Ve=10*p;class We{constructor(t={}){const e=!X(t.bounce)||!X(t.duration);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.bn=ct(Tt(t.bounce,.5),-1,1),this.pd=ct(Tt(t.duration,628),10*N.timeScale,Ve*N.timeScale),this.m=ct(Tt(t.mass,1),1,Ve),this.s=ct(Tt(t.stiffness,100),d,Ve),this.d=ct(Tt(t.damping,10),d,Ve),this.v=ct(Tt(t.velocity,0),-1e4,Ve),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||_,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?st(-n*e*s)*(1*tt(i*n)+r*K(i*n)):1===e?(1+r*n)*st(-n*s):((1+r)*st((-e*s+i)*n)+(1-r)*st((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===N.timeScale?this.pd/p:this.pd;this.m=1,this.v=0,this.s=Z(2*ht/t,2),this.bn>=0?this.d=4*(1-this.bn)*ht/t:this.d=4*ht/(t*(1+this.bn)),this.s=ut(ct(this.s,d,Ve),3),this.d=ut(ct(this.d,d,300),3)}calculateBDFromSD(){const t=2*ht/J(this.s);this.pd=t*(1===N.timeScale?p:1);const e=this.d/(2*J(this.s));this.bn=e<=1?1-this.d*t/(4*ht):4*ht/(this.d*t)-1,this.bn=ut(ct(this.bn,-1,1),3),this.pd=ut(ct(this.pd,10*N.timeScale,Ve*N.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ct(J(o/r),d,p),l=this.zeta=n/(2*J(o*r));l<1?(this.wd=h*J(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*J(l*l-1),this.b=(l*h-a)/this.wd);let c=0,u=0,m=0;for(;u<=t&&m<=e;)et(1-this.solve(c))<s?u++:u=0,this.solverDuration=c,c+=i,m++;this.settlingDuration=ut(this.solverDuration*p,0)*N.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ct(Tt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ct(Tt(t,1),10*N.timeScale,Ve*N.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ct(Tt(t,100),d,Ve),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ct(Tt(t,10),d,Ve),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ct(Tt(t,1),1,Ve),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ct(Tt(t,0),-1e4,Ve),this.compute()}}const He=t=>new We(t),Ue=t=>(console.warn("createSpring() is deprecated use spring() instead"),new We(t)),qe=t=>{t.cancelable&&t.preventDefault()};class je{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 Ge{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 Qe=(t,e)=>t&&Y(t)?t(e):t;let Ze=0;class Je{constructor(t,e={}){if(!t)return;L.current&&L.current.register(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,h=e.releaseEase,l=h&&ve(h),c=!X(h)&&!X(h.ease),d=M(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=M(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=Qe(e.container,this);this.containerArray=R(m)?m:null,this.$container=m&&!this.containerArray?re(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=M(t)?new je(t):re(t)[0],this.$trigger=re(o||t)[0],this.fixed="fixed"===Fe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=c?h:He({mass:Tt(e.releaseMass,1),stiffness:Tt(e.releaseStiffness,80),damping:Tt(e.releaseDamping,20)}),this.releaseYSpring=c?h:He({mass:Tt(e.releaseMass,1),stiffness:Tt(e.releaseStiffness,80),damping:Tt(e.releaseDamping,20)}),this.releaseEase=l||fe.outQuint,this.hasReleaseSpring=c,this.onGrab=e.onGrab||_,this.onDrag=e.onDrag||_,this.onRelease=e.onRelease||_,this.onUpdate=e.onUpdate||_,this.onSettle=e.onSettle||_,this.onSnap=e.onSnap||_,this.onResize=e.onResize||_,this.onAfterResize=e.onAfterResize||_,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),X(r)||!0===r)f[d]=0;else if(M(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(X(n)||!0===n)f[p]=0;else if(M(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 Ie(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=[-u,u,u,-u],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=O(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Ge(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new se({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new se({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!X(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[1]?d:p,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=at(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new se({autoplay:!1,duration:150*N.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),M(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=O(),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]=ut(ct(J(t*t+e*e)/r*o,a,h),5);const c=ot(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=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=pt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=ut(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=pt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return ut(this.animate[this.xProp](),N.precision)}set x(t){this.setX(t,!1)}get y(){return ut(this.animate[this.yProp](),N.precision)}set y(t){this.setY(t,!1)}get progressX(){return Ye(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(Ye(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ye(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(Ye(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=ut(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=ut(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;if(!t)return;const 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,y]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ct(c,a,c):c,this.scrollView[1]=l?ct(d,h,d):d,this.updateScrollCoords();const{width:_,height:v,left:b,top:S,right:w,bottom:T}=t.getBoundingClientRect();this.dragArea[2]=ut(l?ct(_,a,a):_,0),this.dragArea[3]=ut(l?ct(v,h,h):v,0);const x=Fe(t,"overflow"),k="visible"===x,$="hidden"===x;if(this.canScroll=!u&&this.contained&&(t===i.body&&k||!$&&!k)&&(c>this.dragArea[2]+y-f||d>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!R(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-_:0,d=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=ut(r.top+s-(l?0:S),0),this.targetBounds[1]=ut(r.right+e-(l?a:w),0),this.targetBounds[2]=ut(r.bottom+s-(l?h:T),0),this.targetBounds[3]=ut(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+y):(this.containerBounds[0]=-ut(r.top-(u?ct(S,0,h):S)+o-m,0),this.containerBounds[1]=-ut(r.right-(u?ct(w,0,a):w)-c+f,0),this.containerBounds[2]=-ut(r.bottom-(u?ct(T,0,h):T)-d+g,0),this.containerBounds[3]=-ut(r.left-(u?ct(b,0,a):b)+n-y,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=Qe(t.container,this),o=Qe(t.containerPadding,this)||0,a=R(o)?o:[o,o,o,o],h=this.x,l=this.y,c=Qe(t.cursor,this),d={onHover:"grab",onGrab:"grabbing"};if(c){const{onHover:t,onGrab:e}=c;t&&(d.onHover=t),e&&(d.onGrab=e)}const u=Qe(t.dragThreshold,this),p={mouse:3,touch:7};if(z(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;X(t)||(p.mouse=t),X(e)||(p.touch=e)}this.containerArray=R(n)?n:null,this.$container=n&&!this.containerArray?re(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=Tt(a,[0,0,0,0]),this.containerFriction=ct(Tt(Qe(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ct(Tt(Qe(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Qe(M(e)&&!X(e.snap)?e.snap:t.snap,this),this.snapY=Qe(M(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Tt(Qe(t.scrollSpeed,this),1.5),this.scrollThreshold=Tt(Qe(t.scrollThreshold,this),20),this.dragSpeed=Tt(Qe(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Tt(Qe(t.minVelocity,this),0),this.maxVelocity=Tt(Qe(t.maxVelocity,this),50),this.velocityMultiplier=Tt(Qe(t.velocityMultiplier,this),1),this.cursor=!1!==c&&d,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ct(h,y,f),!0),this.setY(ct(l,m,g),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,c=this.$container.scrollWidth,d=this.$container.scrollHeight,u=this.useWin?ct(c,this.window[0],c):c,p=this.useWin?ct(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,y=this.scrollThreshold,[_,v]=this.coords,[b,S,w,T]=this.scrollBounds,x=ut(ct((v-b+t)/y,-1,0)*g,0),k=ut(ct((_-S-e)/y,0,1)*g,0),$=ut(ct((v-w-s)/y,0,1)*g,0),C=ut(ct((_-T+i)/y,-1,0)*g,0);if(x||$||C||k){const[t,e]=this.disabled;let s=h,i=l;t||(s=ut(ct(h+(C||k),0,r-o),0),this.coords[0]-=h-s),e||(i=ut(ct(l+(x||$),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=at(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Jt([this],null,"x"),Jt([this],null,"y"),Jt([this],null,"progressX"),Jt([this],null,"progressY"),Jt([this.scroll]),Jt([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=ut(ct(r-h,-u,0),0),m=ut(ct(i-l,0,u),0),f=ut(ct(r-c,0,u),0),g=ut(ct(i-d,-u,0),0);new Be(n,{x:ut(n.x+(g?g-e:m?m+e:0),0),y:ut(n.y+(p?p-e:f?f+e:0),0),duration:X(t)?350*N.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=Pe(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=ct(pt(i,this.snapX),u,c),a=ct(pt(r,this.snapY),l,d),h=X(t)?350*N.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=Fe(this.$target,"zIndex",!1);Ze=(f>Ze?f:Ze)+1,this.targetStyles=Pe(this.$target,{zIndex:Ze}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Pe(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=Fe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){d=!0,l=t<=3,c=t>=e-s-3;break}}h=h.parentElement}d&&(!l&&!c||l&&a<0||c&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(qe(t),this.triggerStyles||(this.triggerStyles=Pe(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",qe,{passive:!1}),this.$trigger.addEventListener("touchmove",qe,{passive:!1}),this.$trigger.addEventListener("touchend",qe),(this.dragged||!this.disabled[0]&&et(o)>this.dragThreshold||!this.disabled[1]&&et(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[s,n,o,a,h,l]=this.pointer,[c,d,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,S=this.x,w=this.y,T=this.computeVelocity(s-h,n-l),x=this.angle=at(n-a,s-o),k=150*T,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=S+tt(x)*k,E=w+K(x)*k,D=C>d?d+(C-d)*$:C<p?p+(C-p)*$:C,B=E>u?u+(E-u)*$:E<c?c+(E-c)*$:E,L=this.destX=ct(ut(pt(D,this.snapX),5),p,d),A=this.destY=ct(ut(pt(B,this.snapY),5),c,u),F=this.isOutOfBounds(this.containerBounds,C,E);let P=0,O=0,R=_,M=_,z=0;if(b.x=S,b.y=w,!t){const t=L===d?S>d?-1:1:S<p?-1:1,s=ut(S-L,0);g.velocity=e&&v?s?k*t/et(s):0:T;const{ease:i,settlingDuration:r,restDuration:n}=g;P=S===L?0:v?r:r-n*N.timeScale,v&&(R=i),P>z&&(z=P)}if(!e){const e=A===u?w>u?-1:1:w<c?-1:1,s=ut(w-A,0);y.velocity=t&&v?s?k*e/et(s):0:T;const{ease:i,settlingDuration:r,restDuration:n}=y;O=w===A?0:v?r:r-n*N.timeScale,v&&(M=i),O>z&&(z=O)}if(!v&&F&&$&&(P||O)){const t=r.blend;new Be(b,{x:{to:D,duration:.65*P},y:{to:B,duration:.65*O},ease:_,composition:t}).init(),new Be(b,{x:{to:L,duration:P},y:{to:A,duration:O},ease:_,composition:t}).init(),this.overshootTicker.stretch(ot(P,O)).restart()}else t||this.animate[this.xProp](L,P,R),e||this.animate[this.yProp](A,O,M);this.scrollInView(z,this.scrollThreshold,_);let I=!1;L!==m&&(this.snapped[0]=L,this.snapX&&(I=!0)),A!==f&&this.snapY&&(this.snapped[1]=A,this.snapY&&(I=!0)),I&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",qe),this.$trigger.removeEventListener("touchmove",qe),this.$trigger.removeEventListener("touchend",qe),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=Pe(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),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.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":qe(t)}}}const Ke=(t=_)=>new se({duration:1*N.timeScale,onComplete:t},null,0).resume(),ts=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!Y(a)&&a.revert&&(e=a),X(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||_}};class es{constructor(t={}){L.current&&L.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||re(e)[0]||i);const n=t.defaults,o=N.defaults,a=t.mediaQueries;if(this.defaults=n?_t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const e=s.matchMedia(a[t]);this.mediaQueryLists[t]=e,e.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=N.defaults;L.current=this,L.root=this.root,N.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return L.current=e,L.root=s,N.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);Y(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,Y(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);Y(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,Y(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);Y(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(Y(s))return s(this);const i=ts(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const ss=(t,e)=>t&&Y(t)?t(e):t,is=new Map;class rs{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.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new se({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;vt(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=ut(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new se({autoplay:!1,duration:250*N.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new se({autoplay:!1,duration:500*N.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=ut(t?s.scrollX:e.scrollLeft,0),this.scrollY=ut(t?s.scrollY:e.scrollTop,0)}updateWindowBounds(){this.winWidth=s.innerWidth,this.winHeight=(()=>{const t=i.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=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){vt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),vt(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?s:this.element).removeEventListener("scroll",this),is.delete(this.element)}}const ns=(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}=Dt(a,Lt);let c=h;return"%"===l?c=h/100*s:l&&(c=he(t,Lt,"px",!0).n),o&&i<0&&(c+=i),n&&r>0&&(c+=r),c},os=(t,e,s,i,r)=>{let n;if(I(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=ns(t,l[0],s,i,r),p=ns(t,l[1],s,i,r);if(c){const e=Et(ns(t,"min",s),p,h);n=e<u?u:e}else if(d){const e=Et(ns(t,"max",s),p,h);n=e>u?u:e}else n=Et(u,p,h)}else n=ns(t,e,s,i,r)}else n=e;return ut(n,0)},as=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 hs=0;const ls=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class cs{constructor(t={}){L.current&&L.current.register(this);const e=Tt(t.sync,"play pause"),s=e?ve(e):null,r=e&&("linear"===e||e===le),n=e&&!(s===le&&!r),o=e&&(z(e)||!0===e||r),a=e&&I(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=hs++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&re(t)[0]||i.body;let s=is.get(e);return s||(s=new rs(e),is.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]:_,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.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Tt(t.debug,!1),this._next=null,this._prev=null,St(this.container,this),Ke(()=>{if(!this.reverted){if(!this.target){const e=re(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,X(t)||(t.persist=!0),!this._params.target)){let e;X(t.targets)?vt(t,t=>{t.targets&&!e&&(e=as(t))}):e=as(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:ut(ct(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Tt(ss(t.repeat,this),!0),this.horizontal="x"===Tt(ss(t.axis,this),"y"),this.enter=Tt(ss(t.enter,this),"end start"),this.leave=Tt(ss(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=ls[this.index%ls.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,y=e?g:15,_=e?60:g,v=e?_:y,b=e?"repeat-x":"repeat-y",S=t=>e?"0px "+t+"px":t+"px 2px",w=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 ${w("#FFFF")}${S(g-10)} / 100px 100px ${b},\n ${w("#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 ${w("#FFFF")}${S(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${w("#FFF8")}${S(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const x=[" 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"),w=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;w.innerHTML=`${this.id}${x[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 `,w.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,S.appendChild(w);let C=h-$+(e?1:0);S.style[e?"left":"top"]=`${C}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"===Fe(t.element,"position")&&(this.debugStyles=Pe(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;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==s.element&&a!==i.body;){const e="sticky"===Fe(a,"position")&&Pe(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=s.scale,c=(r?h.left+s.scrollX-s.left:h.top+s.scrollY-s.top)*l,d=(r?h.width:h.height)*l,u=r?s.width:s.height,p=(r?s.scrollWidth:s.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(I(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(M(m)){const t=m;X(t.container)||(_=t.container),X(t.target)||(g=t.target)}else z(m)&&(_=m);if(I(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(M(f)){const t=f;X(t.container)||(v=t.container),X(t.target)||(y=t.target)}else z(f)&&(v=f);const b=os(e,g,d),S=os(e,y,d),w=b+c-u,T=S+c-p,x=os(e,_,u,w,T),k=os(e,v,u,w,T),$=b+c-x,C=S+c-k,E=C-$;this.offset=c,this.offsetStart=$,this.offsetEnd=C,this.distance=E<=0?0:E,this.thresholds=[g,y,_,v],this.coords=[b,S,x,k],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,c=!h&&!l,d=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&d,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&z(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=ut(mt(e,g,mt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(c&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(c&&(this.isInView=!0),this.forceEnter&&this.hasEntered?c&&(this.forceEnter=!1):(p&&c&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(c||!c&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!c&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return bt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const ds=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,us=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?le:r=>0===r||1===r?r:ds(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ds(r,e,s)-t,i>0?o=r:n=r}while(et(i)>1e-7&&++a<100);return r})(r,t,s),e,i),ps=(t=10,e)=>{const s=e?it:rt;return e=>s(ct(e,0,1)*t)*(1/t)},ms=(...t)=>{const e=t.length;if(!e)return le;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=I(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(X(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]}},fs=(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(ct(o,r,1))}return s.push(1),ms(...s)};var gs=Object.freeze({__proto__:null,Spring:We,createSpring:Ue,cubicBezier:us,eases:fe,irregular:fs,linear:ms,spring:He,steps:ps});const ys=Xe,_s={},vs=t=>(...e)=>{const s=t(...e);return new Proxy(_,{apply:(t,e,[i])=>s(i),get:(t,e)=>vs((...t)=>{const i=_s[e](...t);return t=>i(s(t))})})},bs=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?vs(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return _s[t]||(_s[t]=i),i},Ss=bs("roundPad",ys.roundPad),ws=bs("padStart",ys.padStart),Ts=bs("padEnd",ys.padEnd),xs=bs("wrap",ys.wrap),ks=bs("mapRange",ys.mapRange),$s=bs("degToRad",ys.degToRad),Cs=bs("radToDeg",ys.radToDeg),Es=bs("snap",ys.snap),Ds=bs("clamp",ys.clamp),Bs=bs("round",ys.round),Ls=bs("lerp",ys.lerp,1),Ns=bs("damp",ys.damp,1),As=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Fs=0;const Ps=(t,e=0,s=1,i=0)=>{let r=void 0===t?Fs++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},Os=t=>t[As(0,t.length-1)],Rs=t=>{let e,s,i=t.length;for(;i;)s=As(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},Ms=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!X(o),h=a&&!X(o.ease)?o.ease:a?ve(o):null,l=e.grid,c=e.axis,d=e.total,u=X(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,y=R(t),_=e.use,v=Q(y?t[0]:t),b=y?Q(t[1]):0,S=k.exec((y?t[1]:t)+m),w=e.start||0+(y?v:0);let T=u?0:z(r)?r:0;return(t,r,o,a)=>{const[u]=ne(t),m=X(d)?o:d,x=!X(_)&&(Y(_)?_(u,r,m):Ct(u,_)),k=z(x)||I(x)&&z(+x)?+x:r;if(p&&(T=(m-1)/2),f&&(T=m-1),!s.length){for(let t=0;t<m;t++){if(l){const e=p?(l[0]-1)/2:T%l[0],i=p?(l[1]-1)/2:rt(T/l[0]),r=e-t%l[0],n=i-rt(t/l[0]);let o=J(r*r+n*n);"x"===c&&(o=-r),"y"===c&&(o=-n),s.push(o)}else s.push(et(T-t));i=ot(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>c?t<0?-1*t:-t:et(i-t))),g&&(s=Rs(s))}const $=y?(b-v)/i:v;let C=(a?Re(a,X(e.start)?a.iterationDuration:w):w)+($*ut(s[k],2)||0);return e.modifier&&(C=e.modifier(C)),S&&(C=`${C}${S[2]}`),C}};var zs=Object.freeze({__proto__:null,$:ne,clamp:Ds,cleanInlineStyles:Ot,createSeededRandom:Ps,damp:Ns,degToRad:$s,get:Fe,keepTime:ts,lerp:Ls,mapRange:ks,padEnd:Ts,padStart:ws,radToDeg:Cs,random:As,randomPick:Os,remove:Oe,round:Bs,roundPad:Ss,set:Pe,shuffle:Rs,snap:Es,stagger:Ms,sync:Ke,wrap:xs});const Is=t=>{const e=re(t)[0];return e&&W(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Ys=(t,e,s,i=0)=>{const r=((s+i)%e+e)%e;return t.getPointAtLength(r)},Xs=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM();return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=Ys(t,r,a,-1),s=Ys(t,r,a,1);return 180*at(s.y-e.y,s.x-e.x)/ht}{const s=Ys(t,r,a,0);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},Vs=(t,e=0)=>{const s=Is(t);if(s)return{translateX:Xs(s,"x",e),translateY:Xs(s,"y",e),rotate:Xs(s,"a",e)}},Ws=(t,e=0,s=0)=>re(t).map(t=>((t,e,s)=>{const i=p,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===c?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(J(s.a*s.a+s.b*s.b)+J(s.c*s.c+s.d*s.d))/2)}return e})(o),c=-1e3*r*l,d=h*i*l+c,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-d;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${c}`),t.setAttribute("stroke-dasharray",`${d} ${u}`)}return Reflect.apply(s,t,e)}:Y(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h})(t,e,s)),Hs=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=Is(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[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+ut(d.x,3)+n+d.y+" ",h+=p+ut(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]};var Us=Object.freeze({__proto__:null,createDrawable:Ws,createMotionPath:Vs,morphTo:Hs});const qs="undefined"!=typeof Intl&&Intl.Segmenter,js=/\{value\}/g,Gs=/\{i\}/g,Qs=/(\s+)/,Zs=/^\s+$/,Js="line",Ks="word",ti="char",ei="data-line";let si=null,ii=null,ri=null;const ni=t=>t.isWordLike||" "===t.segment||z(+t.segment),oi=t=>t.setAttribute("aria-hidden","true"),ai=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],hi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},li=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&li(e)}},ci=(t,e,s)=>{const i=t.getAttribute(ei);(null!==i&&+i!==e||"BR"===t.tagName)&&s.add(t);let r=t.childElementCount;for(;r--;)ci(t.children[r],e,s);return s},di=(t,e={})=>{let s="";const i=I(e.class)?` class="${e.class}"`:"",r=Tt(e.clone,!1),n=Tt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},ui=(t,e,s,i,r,n,o,a,h)=>{const l=r===Js,c=r===ti,d=`_${r}_`,u=Y(t)?t(s):t,p=l?"block":"inline-block";ri.innerHTML=u.replace(js,`<i class="${d}"></i>`).replace(Gs,`${c?h:l?o:a}`);const m=ri.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${d}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(ei,`${o}`),l||(g.setAttribute("data-word",`${a}`),c&&g.setAttribute("data-char",`${h}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${hi[r]}`),f};class pi{constructor(t,s={}){si||(si=qs?new qs([],{granularity:Ks}):{segment:t=>{const e=[],s=t.split(Qs);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Zs.test(i)})}return e}}),ii||(ii=qs?new qs([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!ri&&e&&(ri=i.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=s,c=(t=R(t)?t[0]:t)&&t.nodeType?t:(ie(t)||[])[0],d=!0===o?{}:o,u=!0===r||X(r)?{}:r,p=!0===n?{}:n;this.debug=Tt(l,!1),this.includeSpaces=Tt(h,!1),this.accessible=Tt(a,!0),this.linesOnly=d&&!u&&!p,this.lineTemplate=M(d)?di(Js,d):d,this.wordTemplate=M(u)||this.linesOnly?di(Ks,u):u,this.charTemplate=M(p)?di(ti,p):p,this.$target=c,this.html=c&&c.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(d||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=c.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),c?this.resizeObserver.observe(c):console.warn("No Text Splitter target found.")}addEffect(t){if(!Y(t))return console.warn("Effect must return a function.");const e=ts(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>Y(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,c=si.segment(o),d=i.createDocumentFragment();let u=null;for(const t of c){const e=t.segment,s=ni(t);if(!u||s&&u&&ni(u))a.push(e);else{const t=a.length-1;a[t].includes(" ")||e.includes(" ")?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const c=a[t+1],u=r&&c&&!c.trim(),p=o,m=s?ii.segment(p):null,f=s?i.createDocumentFragment():i.createTextNode(u?o+" ":o);if(s){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,c=i.createTextNode(a);ui(s,l,c,f,ti,n,-1,h.length,l.length)}}e?ui(e,h,f,d,Ks,n,-1,h.length,l.length):s?d.appendChild(f):d.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;d.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(d,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,s=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==i.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>Y(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=ai(e,Ks))),o&&(h||n)&&(this.chars=ai(e,ti));const l=this.words.length?this.words:this.chars;let c,d=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();c&&s-c>.5*i&&d++,e.setAttribute(ei,`${d}`);const r=e.querySelectorAll(`[${ei}]`);let n=r.length;for(;n--;)r[n].setAttribute(ei,`${d}`);c=s}if(h){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<d+1;t++){const i=e.cloneNode(!0);ci(i,t,new Set).forEach(t=>{const e=t.parentElement;e&&s.add(e),t.remove()}),a.push(i)}s.forEach(li);for(let e=0,s=a.length;e<s;e++)ui(r,this.lines,a[e],t,Js,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=ai(e,Ks)),o&&(this.chars=ai(e,ti))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!s)){const t=i.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(oi),this.words.forEach(oi),this.chars.forEach(oi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const mi=(t,e)=>new pi(t,e),fi=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new pi(t,e));var gi=Object.freeze({__proto__:null,TextSplitter:pi,split:fi,splitText:mi});const yi=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(ut(t(i/e),4));return`linear(${s.join(", ")})`},_i={},vi=t=>{let e=_i[t];if(e)return e;if(e="linear",I(t)){if(P(t,"linear")||P(t,"cubic-")||P(t,"steps")||P(t,"ease"))e=t;else if(P(t,"cubicB"))e=F(t);else{const s=ye(t);Y(s)&&(e=s===le?"linear":yi(s))}_i[t]=e}else if(Y(t)){const s=yi(t);s&&(e=s)}else t.ease&&(e=yi(t.ease));return e},bi=["x","y","z"],Si=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...bi],wi=(()=>[...bi,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Ti=null;const xi=(t,e,s,i,r)=>{let n=I(e)?e:xt(e,s,i,r);return z(n)?Si.includes(t)||P(t,"translate")?`${n}px`:P(t,"rotate")||P(t,"skew")?`${n}deg`:`${n}`:n},ki=(t,e,s,i,r,n)=>{let o="0";const a=X(i)?getComputedStyle(t)[e]:xi(e,i,t,r,n);return o=X(s)?R(i)?i.map(s=>xi(e,s,t,r,n)):a:[xi(e,s,t,r,n),a],o};class $i{constructor(t,s){L.current&&L.current.register(this),V(Ti)&&(!e||!X(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=P(t,"skew"),s=P(t,"scale"),i=P(t,"rotate"),r=P(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),Ti=!0):Ti=!1);const i=ne(t),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Tt(s.ease,vi(N.defaults.ease)),o=n.ease&&n,a=Tt(s.autoplay,N.defaults.autoplay),l=!(!a||!a.link)&&a,c=s.alternate&&!0===s.alternate,d=s.reversed&&!0===s.reversed,u=Tt(s.loop,N.defaults.loop),v=!0===u||u===1/0?1/0:z(u)?u+1:1,b=c?d?"alternate-reverse":"alternate":d?"reverse":"normal",S=vi(n),w=1===N.timeScale?1:p;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||N.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==l,this.reversed=d,this.persist=Tt(s.persist,N.defaults.persist),this.autoplay=a,this._speed=Tt(s.playbackRate,N.defaults.playbackRate),this._resolve=_,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[h],a=wi.some(t=>s.hasOwnProperty(t)),l=t.style,c=this._inlineStyles[e]={},d=(o?o.settlingDuration:xt(Tt(s.duration,N.defaults.duration),t,e,r))*w,u=xt(Tt(s.delay,N.defaults.delay),t,e,r)*w,p=Tt(s.composition,"replace");for(let o in s){if(!j(o))continue;const h={},m={iterations:v,direction:b,fill:"both",easing:S,duration:d,delay:u,composite:p},y=s[o],_=!!a&&(g.includes(o)?o:f.get(o)),T=_?"transform":o;let x;if(c[T]||(c[T]=l[T]),M(y)){const s=y,a=Tt(s.ease,n),c=a.ease&&a,f=s.to,g=s.from;if(m.duration=(c?c.settlingDuration:xt(Tt(s.duration,d),t,e,r))*w,m.delay=xt(Tt(s.delay,u),t,e,r)*w,m.composite=Tt(s.composition,p),m.easing=vi(a),x=ki(t,o,g,f,e,r),_?(h[`--${_}`]=x,i[_]=x):h[o]=ki(t,o,g,f,e,r),Ae(this,t,o,h,m),!X(g))if(_){const t=`--${_}`;l.setProperty(t,h[t][0])}else l[o]=h[o][0]}else x=R(y)?y.map(s=>xi(o,s,t,e,r)):xi(o,y,t,e,r),_?(h[`--${_}`]=x,i[_]=x):h[o]=x,Ae(this,t,o,h,m)}if(a){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;l.transform=t}}),l&&this.autoplay.link(this)}forEach(t){const e=I(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=N.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===N.timeScale?1:p);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel")}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let t in i){const e=i[t];X(e)||e===m?s.removeProperty(F(t)):s[t]=e}t.getAttribute("style")===m&&t.removeAttribute("style")}),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 Ci={animate:(t,e)=>new $i(t,e),convertEase:yi};t.$=ne,t.Animatable=Ie,t.Draggable=Je,t.JSAnimation=Be,t.Scope=es,t.ScrollObserver=cs,t.Spring=We,t.TextSplitter=pi,t.Timeline=ze,t.Timer=se,t.WAAPIAnimation=$i,t.animate=(t,e)=>new Be(t,e,null,0,!1).init(),t.clamp=Ds,t.cleanInlineStyles=Ot,t.createAnimatable=(t,e)=>new Ie(t,e),t.createDraggable=(t,e)=>new Je(t,e),t.createDrawable=Ws,t.createMotionPath=Vs,t.createScope=t=>new es(t),t.createSeededRandom=Ps,t.createSpring=Ue,t.createTimeline=t=>new ze(t).init(),t.createTimer=t=>new se(t,null,0).init(),t.cubicBezier=us,t.damp=Ns,t.degToRad=$s,t.eases=fe,t.easings=gs,t.engine=Xt,t.get=Fe,t.irregular=fs,t.keepTime=ts,t.lerp=Ls,t.linear=ms,t.mapRange=ks,t.morphTo=Hs,t.onScroll=(t={})=>new cs(t),t.padEnd=Ts,t.padStart=ws,t.radToDeg=Cs,t.random=As,t.randomPick=Os,t.remove=Oe,t.round=Bs,t.roundPad=Ss,t.scrollContainers=is,t.set=Pe,t.shuffle=Rs,t.snap=Es,t.split=fi,t.splitText=mi,t.spring=He,t.stagger=Ms,t.steps=ps,t.svg=Us,t.sync=Ke,t.text=gi,t.utils=zs,t.waapi=Ci,t.wrap=xs});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).anime={})}(this,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(),d=Symbol(),c=1e-11,u=1e12,p=1e3,m="",f=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),g=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],y=g.reduce((t,e)=>({...t,[e]:e+"("}),{}),v=()=>{},_=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,b=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,T=/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,w=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,S=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,$=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,k=/([a-z])([A-Z])/g,E=/(\w+)(\([^)]+\)+)/g,C=/(\*=|\+=|-=)/,N=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,D={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:p,delay:0,loopDelay:0,ease:"out(2)",composition:r.replace,modifier:t=>t,onBegin:v,onBeforeUpdate:v,onUpdate:v,onLoop:v,onPause:v,onComplete:v,onRender:v},I={current:null,root:i},A={defaults:D,precision:4,timeScale:1,tickThreshold:200},B=e&&s.AnimeJSDevTools,R={version:"4.3.0-beta.0",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(R));const L=t=>t.replace(k,"$1-$2").toLowerCase(),P=(t,e)=>0===t.indexOf(e),F=Date.now,M=Array.isArray,V=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),O=t=>"string"==typeof t,H=t=>"function"==typeof t,X=t=>void 0===t,Y=t=>X(t)||null===t,W=t=>e&&t instanceof SVGElement,U=t=>_.test(t),q=t=>P(t,"rgb"),j=t=>P(t,"hsl"),G=t=>!A.defaults.hasOwnProperty(t),Q=["opacity","rotate","overflow","color"],Z=t=>O(t)?parseFloat(t):t,J=Math.pow,K=Math.sqrt,tt=Math.sin,et=Math.cos,st=Math.abs,it=Math.exp,rt=Math.ceil,nt=Math.floor,ot=Math.asin,at=Math.max,ht=Math.atan2,lt=Math.PI,dt=Math.round,ct=(t,e,s)=>t<e?e:t>s?s:t,ut={},pt=(t,e)=>{if(e<0)return t;if(!e)return dt(t);let s=ut[e];return s||(s=ut[e]=10**e),dt(t*s)/s},mt=(t,e)=>M(e)?e.reduce((e,s)=>st(s-t)<st(e-t)?s:e):e?dt(t/e)*e:t,ft=(t,e,s)=>t+(e-t)*s,gt=t=>t===1/0?u:t===-1/0?-u:t,yt=t=>t<=c?c:gt(pt(t,11)),vt=t=>M(t)?[...t]:t,_t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=X(r)?e[i]:r}return s},bt=(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}},Tt=(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},xt=(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},wt=(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),St=(t,e)=>X(t)?e:t,$t=(t,e,s,i,r)=>{let n;if(H(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!O(t)||!P(t,"var("))return t;n=()=>{const s=t.match(N),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==m||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},kt=(t,e)=>t[o]?t[a]&&((t,e)=>{if(Q.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:P(e,"--")?4:e in t.style?2:e in t?0:1:0,Et=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[d]||t).getPropertyValue(e);return"auto"===r?"0":r},Ct=(t,e,s,i)=>{const r=X(s)?kt(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&&!X(r)?r:P(e,"scale")?"1":P(e,"rotate")||P(e,"skew")?"0deg":"0px"})(t,e,i):4===r?Et(t,e,i).trimStart():Et(t,e,i)},Nt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Dt=(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(" ")&&$.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(U(r=s)||q(r)||j(r))return e.t=2,e.d=q(i=s)?(t=>{const e=b.exec(t)||T.exec(t),s=X(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):U(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):j(i)?(t=>{const e=x.exec(t)||w.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=X(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=pt(255*wt(e,t,s+1/3),0),a=pt(255*wt(e,t,s),0),h=pt(255*wt(e,t,s-1/3),0)}return[o,a,h,n]})(i):[0,0,0,1],e;{const t=s.match(S);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split(S)||[],e}}var i,r;return e.n=s,e},It=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=vt(t._toNumbers),e.s=vt(t._strings),e),At={t:0,n:0,u:null,o:null,d:null,s:null},Bt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,l=t.completed,d=t.iterationDuration,u=t.iterationCount,p=t._currentIteration,f=t._loopDelay,g=t._reversed,v=t._alternate,_=t._hasChildren,b=t._delay,T=t._currentTime,x=b+d,w=e-b,S=ct(T,-b,a),$=ct(w,-b,a),k=w-T,E=$>0,C=$>=a,N=a<=c,D=2===n;let I=0,B=w,R=0;if(u>1){const e=~~($/(d+(C?0:f)));t._currentIteration=ct(e,0,u),C&&t._currentIteration--,I=t._currentIteration%2,B=$%(d+f)||0}const L=g^(v&&I),P=t._ease;let F=C?L?0:a:L?d-B:B;P&&(F=d*P(F/d)||0);const M=(o?o.backwards:w<T)?!L:!!L;if(t._currentTime=w,t._iterationTime=F,t.backwards=M,E&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):w<=0&&(t.began=!1),s||_||!E||t._currentIteration===p||t.onLoop(t),D||1===n&&(e>=b&&e<=x||e<=b&&S>b||e>=x&&S!==a)||F>=x&&S!==a||F<=b&&S>0||e<=S&&S===a&&l||C&&!l&&N){if(E&&(t.computeDeltaTime(S),s||t.onBeforeUpdate(t)),!_){const e=D||(M?-1*k:k)>=A.tickThreshold,n=t._offset+(o?o._offset:0)+b+F;let a,l,d,c,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,v=u._prevRep,_=t!==r.none;if((e||(s!==o||n<=f+(g?g._delay:0))&&(0!==s||n>=u._absoluteStartTime))&&(!_||!u._isOverridden&&(!u._isOverlapped||n<=f)&&(!g||g._isOverridden||n<=g._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+u._delay))){const e=u._currentTime=ct(F-u._startTime,0,o),s=u._ease(e/u._updateDuration),n=u._modifier,m=u._valueType,f=u._tweenType,g=0===f,y=0===m,v=y&&g||0===s||1===s?-1:A.precision;let b,T;if(y)b=T=n(pt(ft(u._fromNumber,u._toNumber,s),v));else if(1===m)T=n(pt(ft(u._fromNumber,u._toNumber,s),v)),b=`${T}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=pt(ct(n(ft(t[0],e[0],s)),0,255),0),r=pt(ct(n(ft(t[1],e[1],s)),0,255),0),o=pt(ct(n(ft(t[2],e[2],s)),0,255),0),a=ct(n(pt(ft(t[3],e[3],s),v)),0,1);if(b=`rgba(${i},${r},${o},${a})`,_){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(pt(ft(u._fromNumbers[t],u._toNumbers[t],s),v)),i=u._strings[t+1];b+=`${i?e+i:e}`,_&&(u._numbers[t]=e)}}if(_&&(u._number=T),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!==d&&(d=a,c=a[h]),c[t]=b,p=1):2===f?l[t]=b:4===f&&l.setProperty(t,b)),E&&(R=1)}}if(p&&u._renderTransforms){let t=m;for(let e in c)t+=`${y[e]}${c[e]}) `;l.transform=t,p=0}u=u._next}!s&&R&&t.onRender(t)}!s&&E&&t.onUpdate(t)}return o&&N?!s&&(o.began&&!M&&w>0&&!l||M&&w<=c&&l)&&(t.onComplete(t),t.completed=!M):E&&C?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,l||_||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,R},Rt=(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 d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;bt(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&&Bt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}bt(o,t=>{const e=pt((h-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(l):r;d+=Bt(t,e,s,i,n),!t.completed&&u&&(u=!1)},a),!s&&d&&o.onRender(o),(u||a)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Lt={},Pt=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&W(e)&&t in e.style){const e=Lt[t];if(e)return e;{const e=t?L(t):t;return Lt[t]=e,e}}return t},Ft=t=>{if(t._hasChildren)bt(t,Ft,!0);else{const e=t;e.pause(),bt(e,t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=t._inlineValue,o=Y(n)||n===m;if(3===t._tweenType){const e=i[h];if(o?delete e[s]:e[s]=n,t._renderTransforms)if(Object.keys(e).length){let t=m;for(let s in e)t+=y[s]+e[s]+") ";r.transform=t}else r.removeProperty("transform")}else o?r.removeProperty(L(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Mt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=p/240,this._fps=240,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=p/i;i>D.frameRate&&(D.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<c?c:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return 0;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,1}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Vt={animation:null,update:v},zt=(()=>e?requestAnimationFrame:setImmediate)(),Ot=(()=>e?cancelAnimationFrame:clearImmediate)();class Ht extends Mt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=D,this.paused=!0,this.reqId=0}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?(Tt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Rt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Vt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(F()),this.reqId=zt(Yt)),this}pause(){if(this.reqId)return this.paused=!0,Wt()}resume(){if(this.paused)return this.paused=!1,bt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===A.timeScale?1:p)}set speed(t){this._speed=t*A.timeScale,bt(this,t=>t.speed=t._speed)}get timeUnit(){return 1===A.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(A.timeScale!==s){A.timeScale=s,A.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return A.precision}set precision(t){A.precision=t}}const Xt=(()=>{const t=new Ht(F());return e&&(R.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Yt=()=>{Xt._head?(Xt.reqId=zt(Yt),Xt.update()):Xt.reqId=0},Wt=()=>(Ot(Xt.reqId),Xt.reqId=0,Xt),Ut={_rep:new WeakMap,_add:new Map},qt=(t,e,s="_rep")=>{const i=Ut[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=c,t._currentTime=c},Qt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;xt(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),s=pt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<c&&Gt(i)}let o=!0;if(bt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;bt(t,t=>{t!==e&&bt(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=Vt.animation;return e||(e={duration:c,computeDeltaTime:v,_offset:0,_delay:0,_head:null,_tail:null},Vt.animation=e,Vt.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?vt(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})(Ut._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=c,i._startTime=0,i._numbers=vt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,xt(e,i),xt(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=vt(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=vt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}xt(e,t,null,"_prevAdd","_nextAdd")}return t},Zt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=Ut._rep.get(s)[i];if(Tt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=Ut._add,r=e.get(s);if(!r)return;const n=r[i],o=Vt.animation;Tt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Tt(n,a,"_prevAdd","_nextAdd"),Tt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Jt=(t,e,s)=>{let i=!1;return bt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Pt(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),Tt(e,r),Zt(r),i=!0)}},!0),i},Kt=(t,e,s)=>{const i=e||Xt;let r;if(i._hasChildren){let e=0;bt(i,n=>{if(!n._hasChildren)if(r=Jt(t,n,s),r&&!n._head)n.cancel(),Tt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?Kt(t,n,s):n._hasChildren=!1},!0),X(i.iterationDuration)||(i.iterationDuration=e)}else r=Jt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},te=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),ee=t=>t._cancelled?(t._hasChildren?bt(t,ee):bt(t,t=>{t._composition!==r.none&&Qt(t,qt(t.target,t.property))}),t._cancelled=0,t):t;let se=0;class ie extends Mt{constructor(t={},e=null,s=0){super(0),++se;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:_,onUpdate:b}=t;I.current&&I.current.register(this);const T=e?0:Xt._lastTickTime,x=e?e.defaults:A.defaults,w=H(r)||X(r)?x.delay:+r,S=H(n)||X(n)?1/0:+n,$=St(h,x.loop),k=St(l,x.loopDelay);let E=!0===$||$===1/0||$<0?1/0:$+1;if(B){const s=E===1/0;if(B.register(this,t,s)&&s){const t=a?2:1,s=e?B.maxNestedInfiniteLoops:B.maxInfiniteLoops;E=Math.max(s,t)}}let C=0;e?C=s:(Xt.reqId||Xt.requestTick(F()),C=(Xt._lastTickTime-Xt._startTime)*A.timeScale),this.id=X(i)?se:i,this.parent=e,this.duration=gt((S+k)*E-k)||c,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||x.onBegin,this.onBeforeUpdate=_||x.onBeforeUpdate,this.onUpdate=b||x.onUpdate,this.onLoop=f||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=S,this.iterationCount=E,this._autoplay=!e&&St(d,x.autoplay),this._offset=C,this._delay=w,this._loopDelay=k,this._iterationTime=0,this._currentIteration=0,this._resolve=v,this._running=!1,this._reversed=+St(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=St(a,x.alternate),this._prev=null,this._next=null,this._lastTickTime=T,this._startTime=T,this._lastTime=T,this._fps=St(u,x.frameRate),this._speed=St(p,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ct(pt(this._currentTime,A.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return ct(pt(this._iterationTime,A.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ct(pt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ct(pt(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*ct(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return ee(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,~~t,2),te(this),this._hasChildren&&bt(this,te),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Rt(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!X(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Xt._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<=c&&!this._hasChildren?Rt(this,c,0,0,2):(this._running||(xt(Xt,this),Xt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Xt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){ee(this),this.completed=!1;const i=this.paused;return this.paused=!0,Rt(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?nt(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?bt(this,t=>t.cancel(),!0):bt(this,Zt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=yt(t);if(e===s)return this;const i=t/e,r=t<=c;return this.duration=r?c:s,this.iterationDuration=r?c:yt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Rt(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=v){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=v};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}function re(t){const e=O(t)?I.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ne(t){if(Y(t))return[];if(!e)return M(t)&&t.flat(1/0)||[t];if(M(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!Y(i)){const t=re(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!Y(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=re(t);return s?Array.from(s):[t]}function oe(t){const e=ne(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=W(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[h]={})}}return e}const ae={deg:1,rad:180/lt,turn:360},he={},le=(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=he[a];if(X(h)||r){let r;if(n in ae)r=o*ae[n]/ae[s];else{const e=100,a=t.cloneNode(),h=t.parentNode,l=h&&h!==i?h:i.body;l.appendChild(a);const d=a.style;d.width=e+n;const c=a.offsetWidth||e;d.width=e+s;const u=c/(a.offsetWidth||e);l.removeChild(a),r=u*o}e.n=r,he[a]=r}else e.n=h;return e.t,e.u=s,e},de=t=>t,ce=(t=1.68)=>e=>J(e,+t),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=lt/2,me=2*lt,fe={[m]:ce,Quad:ce(2),Cubic:ce(3),Quart:ce(4),Quint:ce(5),Sine:t=>1-et(t*pe),Circ:t=>1-K(1-t*t),Expo:t=>t?J(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=J(2,--s))-1)/11;);return 1/J(4,3-s)-7.5625*J((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=ct(+t,1,10),i=ct(+e,c,2),r=i/me*ot(1/s),n=me/i;return t=>0===t||1===t?t:-s*J(2,-10*(1-t))*tt((1-t-r)*n)}},ge=(()=>{const t={linear:de,none:de};for(let e in ue)for(let s in fe){const i=fe[s],r=ue[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ye={linear:de,none:de},ve=t=>{if(ye[t])return ye[t];if(t.indexOf("(")<=-1){const e=ue[t]||t.includes("Back")||t.includes("Elastic")?ge[t]():ge[t];return e?ye[t]=e:de}{const e=t.slice(0,-1).split("("),s=ge[e[0]];return s?ye[t]=s(...e[1].split(",")):de}},_e=["steps(","irregular(","linear(","cubicBezier("],be=t=>{if(O(t))for(let e=0,s=_e.length;e<s;e++)if(P(t,_e[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),de;return H(t)?t:O(t)?ve(t):de},Te={t:0,n:0,u:null,o:null,d:null,s:null},xe={t:0,n:0,u:null,o:null,d:null,s:null},we={},Se={func:null},$e=[null],ke=[null,null],Ee={to:null};let Ce,Ne,De=0,Ie=0;class Ae extends ie{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i),++Ie;const h=oe(t),l=h.length,d=e.keyframes,u=d?_t(((t,e)=>{const s={};if(M(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(G);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];G(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=St(e.duration,A.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(G(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,h=n[a-1];const l={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(l.from=h.to),r.ease&&(l.ease=r.ease),l.duration=o-(a?d:0),n.push(l)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s})(d,e),e):e,{id:m,delay:f,duration:g,ease:y,playbackEase:v,modifier:_,composition:b,onRender:T}=u,x=s?s.defaults:A.defaults,w=St(y,x.ease),S=St(v,x.playbackEase),$=S?be(S):null,k=!X(w.ease),E=k?w.ease:St(y,$?"linear":x.ease),C=k?w.settlingDuration:St(g,x.duration),N=St(f,x.delay),D=_||x.modifier,I=X(b)&&l>=p?r.none:X(b)?x.composition:b,B=this._offset+(s?s._offset:0);k&&(w.parent=this);let R=NaN,L=NaN,P=0,F=0;for(let t=0;t<l;t++){const e=h[t],i=o||t,d=a||l;let p=NaN,m=NaN;for(let t in u)if(G(t)){const o=kt(e,t),a=Pt(t,e,o);let h=u[t];const l=M(h);if(n&&!l&&(ke[0]=h,ke[1]=h,h=ke),l){const t=h.length,e=!V(h[0]);2===t&&e?(Ee.to=h,$e[0]=Ee,Ce=$e):t>2&&e?(Ce=[],h.forEach((t,e)=>{e?1===e?(ke[1]=t,Ce.push(ke)):Ce.push(t):ke[0]=t})):Ce=h}else $e[0]=h,Ce=$e;let f=null,g=null,y=NaN,v=0,_=0;for(let t=Ce.length;_<t;_++){const n=Ce[_];V(n)?Ne=n:(Ee.to=n,Ne=Ee),Se.func=null;const h=$t(Ne.to,e,i,d,Se);let l;V(h)&&!X(h.to)?(Ne=h,l=h.to):l=h;const u=$t(Ne.from,e,i,d),p=Ne.ease,m=!X(p)&&!X(p.ease),b=m?p.ease:p||E,T=m?p.settlingDuration:$t(St(Ne.duration,t>1?$t(C,e,i,d)/t:C),e,i,d),x=$t(St(Ne.delay,_?0:N),e,i,d),w=$t(St(Ne.composition,I),e,i,d),S=z(w)?w:r[w],$=Ne.modifier||D,k=!X(u),A=!X(l),R=M(l),L=R||k&&A,O=g?v+x:x,H=pt(B+O,12);F||!k&&!R||(F=1);let W=g;if(S!==r.none){f||(f=qt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=H;)if(W=t,t=t._nextRep,t&&t._absoluteStartTime>=H)for(;t;)Gt(t),t=t._nextRep}if(L){Dt(R?$t(l[0],e,i,d):u,Te),Dt(R?$t(l[1],e,i,d,Se):l,xe);const t=Ct(e,a,o,we);0===Te.t&&(W?1===W._valueType&&(Te.t=1,Te.u=W._unit):(Dt(t,At),1===At.t&&(Te.t=1,Te.u=At.u)))}else A?Dt(l,xe):g?It(g,xe):Dt(s&&W&&W.parent.parent===s?W._value:Ct(e,a,o,we),xe),k?Dt(u,Te):g?It(g,Te):Dt(s&&W&&W.parent.parent===s?W._value:Ct(e,a,o,we),Te);if(Te.o&&(Te.n=Nt(W?W._toNumber:Dt(Ct(e,a,o,we),At).n,Te.n,Te.o)),xe.o&&(xe.n=Nt(Te.n,xe.n,xe.o)),Te.t!==xe.t)if(3===Te.t||3===xe.t){const t=3===Te.t?Te:xe,e=3===Te.t?xe:Te;e.t=3,e.s=vt(t.s),e.d=t.d.map(()=>e.n)}else if(1===Te.t||1===xe.t){const t=1===Te.t?Te:xe,e=1===Te.t?xe:Te;e.t=1,e.u=t.u}else if(2===Te.t||2===xe.t){const t=2===Te.t?Te:xe,e=2===Te.t?xe:Te;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(Te.u!==xe.u){let t=xe.u?Te:xe;t=le(e,t,xe.u?xe.u:Te.u,!1)}if(xe.d&&Te.d&&xe.d.length!==Te.d.length){const t=Te.d.length>xe.d.length?Te:xe,e=t===Te?xe:Te;e.d=t.d.map((t,s)=>X(e.d[s])?0:e.d[s]),e.s=vt(t.s)}const U=pt(+T||c,12);let q=we[a];Y(q)||(we[a]=null);const j={parent:this,id:De++,property:a,target:e,_value:null,_func:Se.func,_ease:be(b),_fromNumbers:vt(Te.d),_toNumbers:vt(xe.d),_strings:vt(xe.s),_fromNumber:Te.n,_toNumber:xe.n,_numbers:vt(Te.d),_number:Te.n,_unit:xe.u,_modifier:$,_currentTime:0,_startTime:O,_delay:+x,_updateDuration:U,_changeDuration:U,_absoluteStartTime:H,_tweenType:o,_valueType:xe.t,_composition:S,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:q,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};S!==r.none&&Qt(j,f),isNaN(y)&&(y=j._startTime),v=pt(O+U,12),g=j,P++,xt(this,j)}(isNaN(L)||y<L)&&(L=y),(isNaN(R)||v>R)&&(R=v),3===o&&(p=P-_,m=P)}if(!isNaN(p)){let t=0;bt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&bt(Vt.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."),L?(bt(this,t=>{t._startTime-t._delay||(t._delay-=L),t._startTime-=L}),R-=L):L=0,R||(R=c,this.iterationCount=0),this.targets=h,this.id=X(m)?Ie:m,this.duration=R===c?c:gt((R+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=T||x.onRender,this._ease=$,this._delay=L,this.iterationDuration=R,!this._autoplay&&F&&this.onRender(this)}stretch(t){const e=this.duration;if(e===yt(t))return this;const s=t/e;return bt(this,t=>{t._updateDuration=yt(t._updateDuration*s),t._changeDuration=yt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return bt(this,t=>{const e=t._func;if(e){const s=Ct(t.target,t.property,t._tweenType);Dt(s,At),Dt(e(),xe),t._fromNumbers=vt(At.d),t._fromNumber=At.n,t._toNumbers=vt(xe.d),t._strings=vt(xe.s),t._toNumber=xe.o?Nt(At.n,xe.n,xe.o):xe.n}}),this.duration===c&&this.restart(),this}revert(){return super.revert(),Ft(this)}then(t){return super.then(t)}}const Be={_head:null,_tail:null},Re=(t,e,s)=>{let i,r=Be._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,h=!s||r.parent===s;if(o&&a&&h){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Tt(Be,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Le=(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),Re(e,s),xt(Be,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Re(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Pe(t,e,s){const i=oe(t);if(!i.length)return;const[r]=i,n=kt(r,e),o=Pt(e,r,n);let a=Ct(r,o);if(X(s))return a;if(Dt(a,At),0===At.t||1===At.t){if(!1===s)return At.n;{const t=le(r,At,s,!1);return`${pt(t.n,A.precision)}${t.u}`}}}const Fe=(t,e)=>{if(!X(e))return e.duration=c,e.composition=St(e.composition,r.none),new Ae(t,e,null,0,!0).resume()},Me=(t,e,s)=>{const i=ne(t);for(let t=0,r=i.length;t<r;t++)Re(i[t],s,e&&e.controlAnimation&&e);return Kt(i,e,s),i},Ve=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),X(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!Y(r),o=((t,e)=>{if(P(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!X(o),h=C.exec(i);if(h){const t=h[0],e=i.split(t),l=n&&e[0]?r[e[0]]:s,d=a?o:n?l:s,c=+e[1];return Nt(d,c,t[0])}return a?o:n?X(r[i])?s:r[i]:s};function ze(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=c?s-c:s;e.composition&&Rt(e,o,1,1,1);const a=i?new Ae(i,t,e,o,!1,r,n):new ie(t,e,o);return e.composition&&a.init(!0),xt(e,a),bt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return gt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}let Oe=0;class He extends ie{constructor(t={}){super(t,null,0),++Oe,this.id=X(t.id)?Oe:t.id,this.duration=0,this.labels={};const e=t.defaults,s=A.defaults;this.defaults=e?_t(e,s):s,this.composition=St(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=St(t.playbackEase,s.playbackEase);this._ease=i?be(i):null,this.iterationDuration=0}add(t,e,s){const i=V(e),r=V(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(H(s)){const e=s,r=ne(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,X(a)||(s.id=a+"-"+h),ze(s,this,Ve(this,e(t,h,l,this)),t,h,l),h++})}else ze(i,this,Ve(this,s),t)}else ze(t,this,Ve(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(X(t)||t&&X(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return X(e)?this:(e.duration=c,e.composition=r.replace,this.add(t,e,s))}call(t,e){return X(t)||t&&!H(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return X(t)||t&&!O(t)||(this.labels[t]=Ve(this,e)),this}remove(t,e){return Kt(ne(t),this,e),this}stretch(t){const e=this.duration;if(e===yt(t))return this;const s=t/e,i=this.labels;bt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return bt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),bt(this,t=>t.revert,!0),Ft(this)}then(t){return super.then(t)}}const Xe=t=>new He(t).init();class Ye{constructor(t,e){I.current&&I.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!X(t)&&!X(e)){for(let t in e){const s=e[t];G(t)?o[t]=s:P(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Ae({v:0},n);for(let e in o){const s=o[e],n=V(s);let a={},h="+=0";if(n){const t=s.unit;O(t)&&(h+=t)}else a.duration=s;a[e]=n?_t({to:h},s):h;const l=_t(i,a);l.composition=r.replace,l.autoplay=!1;const d=this.animations[e]=new Ae(t,l,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(X(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return bt(d,e=>{if(M(t))for(let s=0,i=t.length;s<i;s++)X(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;X(s)||(e._ease=be(s)),e._currentTime=0}),X(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=v,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const We=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var Ue=Object.freeze({__proto__:null,clamp:ct,damp:(t,e,s,i)=>i?1===i?e:ft(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:ft,mapRange:We,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:pt,roundPad:(t,e)=>(+t).toFixed(e),snap:mt,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const qe=10*p;class je{constructor(t={}){const e=!X(t.bounce)||!X(t.duration);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.bn=ct(St(t.bounce,.5),-1,1),this.pd=ct(St(t.duration,628),10*A.timeScale,qe*A.timeScale),this.m=ct(St(t.mass,1),1,qe),this.s=ct(St(t.stiffness,100),c,qe),this.d=ct(St(t.damping,10),c,qe),this.v=ct(St(t.velocity,0),-1e4,qe),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=t.onComplete||v,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?it(-n*e*s)*(1*et(i*n)+r*tt(i*n)):1===e?(1+r*n)*it(-n*s):((1+r)*it((-e*s+i)*n)+(1-r)*it((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===A.timeScale?this.pd/p:this.pd;this.m=1,this.v=0,this.s=J(2*lt/t,2),this.bn>=0?this.d=4*(1-this.bn)*lt/t:this.d=4*lt/(t*(1+this.bn)),this.s=pt(ct(this.s,c,qe),3),this.d=pt(ct(this.d,c,300),3)}calculateBDFromSD(){const t=2*lt/K(this.s);this.pd=t*(1===A.timeScale?p:1);const e=this.d/(2*K(this.s));this.bn=e<=1?1-this.d*t/(4*lt):4*lt/(this.d*t)-1,this.bn=pt(ct(this.bn,-1,1),3),this.pd=pt(ct(this.pd,10*A.timeScale,qe*A.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,h=this.w0=ct(K(o/r),c,p),l=this.zeta=n/(2*K(o*r));l<1?(this.wd=h*K(1-l*l),this.b=(l*h-a)/this.wd):1===l?(this.wd=0,this.b=-a+h):(this.wd=h*K(l*l-1),this.b=(l*h-a)/this.wd);let d=0,u=0,m=0;for(;u<=t&&m<=e;)st(1-this.solve(d))<s?u++:u=0,this.solverDuration=d,d+=i,m++;this.settlingDuration=pt(this.solverDuration*p,0)*A.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ct(St(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ct(St(t,1),10*A.timeScale,qe*A.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ct(St(t,100),c,qe),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ct(St(t,10),c,qe),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ct(St(t,1),1,qe),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ct(St(t,0),-1e4,qe),this.compute()}}const Ge=t=>new je(t),Qe=t=>(console.warn("createSpring() is deprecated use spring() instead"),new je(t)),Ze=t=>{t.cancelable&&t.preventDefault()};class Je{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:v,remove:v}}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 Ke{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 ts=(t,e)=>t&&H(t)?t(e):t;let es=0;class ss{constructor(t,e={}){if(!t)return;I.current&&I.current.register(this);const r=e.x,n=e.y,o=e.trigger,a=e.modifier,h=e.releaseEase,l=h&&be(h),d=!X(h)&&!X(h.ease),c=V(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=V(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=ts(e.container,this);this.containerArray=M(m)?m:null,this.$container=m&&!this.containerArray?ne(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=V(t)?new Je(t):ne(t)[0],this.$trigger=ne(o||t)[0],this.fixed="fixed"===Pe(this.$target,"position"),this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=d?h:Ge({mass:St(e.releaseMass,1),stiffness:St(e.releaseStiffness,80),damping:St(e.releaseDamping,20)}),this.releaseYSpring=d?h:Ge({mass:St(e.releaseMass,1),stiffness:St(e.releaseStiffness,80),damping:St(e.releaseDamping,20)}),this.releaseEase=l||ge.outQuint,this.hasReleaseSpring=d,this.onGrab=e.onGrab||v,this.onDrag=e.onDrag||v,this.onRelease=e.onRelease||v,this.onUpdate=e.onUpdate||v,this.onSettle=e.onSettle||v,this.onSnap=e.onSnap||v,this.onResize=e.onResize||v,this.onAfterResize=e.onAfterResize||v,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),X(r)||!0===r)f[c]=0;else if(V(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(X(n)||!0===n)f[p]=0;else if(V(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 Ye(this.$target,f),this.xProp=c,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=[-u,u,u,-u],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 Ke(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ie({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ie({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!X(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[1]?c:p,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=ht(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ie({autoplay:!1,duration:150*A.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),V(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]=pt(ct(K(t*t+e*e)/r*o,a,h),5);const d=at(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(l+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=pt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=mt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=pt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=mt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return pt(this.animate[this.xProp](),A.precision)}set x(t){this.setX(t,!1)}get y(){return pt(this.animate[this.yProp](),A.precision)}set y(t){this.setY(t,!1)}get progressX(){return We(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(We(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return We(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(We(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=pt(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=pt(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;if(!t)return;const 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,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=l?0:p.left,this.dragArea[1]=l?0:p.top,this.scrollView[0]=l?ct(d,a,d):d,this.scrollView[1]=l?ct(c,h,c):c,this.updateScrollCoords();const{width:v,height:_,left:b,top:T,right:x,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=pt(l?ct(v,a,a):v,0),this.dragArea[3]=pt(l?ct(_,h,h):_,0);const S=Pe(t,"overflow"),$="visible"===S,k="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===i.body&&$||!k&&!$)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!M(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?l?0:t.scrollLeft:0,o=i?l?0:t.scrollTop:0,d=i?this.scrollView[0]-n-v:0,c=i?this.scrollView[1]-o-_:0;this.targetBounds[0]=pt(r.top+s-(l?0:T),0),this.targetBounds[1]=pt(r.right+e-(l?a:x),0),this.targetBounds[2]=pt(r.bottom+s-(l?h:w),0),this.targetBounds[3]=pt(r.left+e-(l?0:b),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+m,this.containerBounds[1]=this.containerArray[1]-f,this.containerBounds[2]=this.containerArray[2]-g,this.containerBounds[3]=this.containerArray[3]+y):(this.containerBounds[0]=-pt(r.top-(u?ct(T,0,h):T)+o-m,0),this.containerBounds[1]=-pt(r.right-(u?ct(x,0,a):x)-d+f,0),this.containerBounds[2]=-pt(r.bottom-(u?ct(w,0,h):w)-c+g,0),this.containerBounds[3]=-pt(r.left-(u?ct(b,0,a):b)+n-y,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,d=!h&&s<i||!h&&s>n;return l&&!d?1:!l&&d?2:l&&d?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=ts(t.container,this),o=ts(t.containerPadding,this)||0,a=M(o)?o:[o,o,o,o],h=this.x,l=this.y,d=ts(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=ts(t.dragThreshold,this),p={mouse:3,touch:7};if(z(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;X(t)||(p.mouse=t),X(e)||(p.touch=e)}this.containerArray=M(n)?n:null,this.$container=n&&!this.containerArray?ne(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=St(a,[0,0,0,0]),this.containerFriction=ct(St(ts(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ct(St(ts(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ts(V(e)&&!X(e.snap)?e.snap:t.snap,this),this.snapY=ts(V(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=St(ts(t.scrollSpeed,this),1.5),this.scrollThreshold=St(ts(t.scrollThreshold,this),20),this.dragSpeed=St(ts(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=St(ts(t.minVelocity,this),0),this.maxVelocity=St(ts(t.maxVelocity,this),50),this.velocityMultiplier=St(ts(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ct(h,y,f),!0),this.setY(ct(l,m,g),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[t,e,s,i]=this.containerPadding,[r,n]=this.scrollView,o=this.dragArea[2],a=this.dragArea[3],h=this.scroll.x,l=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?ct(d,this.window[0],d):d,p=this.useWin?ct(c,this.window[1],c):c,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,y=this.scrollThreshold,[v,_]=this.coords,[b,T,x,w]=this.scrollBounds,S=pt(ct((_-b+t)/y,-1,0)*g,0),$=pt(ct((v-T-e)/y,0,1)*g,0),k=pt(ct((_-x-s)/y,0,1)*g,0),E=pt(ct((v-w+i)/y,-1,0)*g,0);if(S||k||E||$){const[t,e]=this.disabled;let s=h,i=l;t||(s=pt(ct(h+(E||$),0,r-o),0),this.coords[0]-=h-s),e||(i=pt(ct(l+(S||k),0,n-a),0),this.coords[1]-=l-i),this.useWin?this.$scrollContainer.scrollBy(-(h-s),-(l-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,h,l]=this.pointer;this.coords[0]+=(r-h)*this.dragSpeed,this.coords[1]+=(n-l)*this.dragSpeed,this.pointer[4]=r,this.pointer[5]=n;const[d,c]=this.coords,[u,p]=this.snapped,m=(1-this.containerFriction)*this.dragSpeed;this.setX(d>e?e+(d-e)*m:d<i?i+(d-i)*m:d,!1),this.setY(c>s?s+(c-s)*m:c<t?t+(c-t)*m:c,!1),this.computeVelocity(r-h,n-l),this.angle=ht(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return Kt([this],null,"x"),Kt([this],null,"y"),Kt([this],null,"progressX"),Kt([this],null,"progressY"),Kt([this.scroll]),Kt([this.overshootCoords]),this}scrollInView(t,e=0,s=ge.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[h,l,d,c]=o,p=pt(ct(r-h,-u,0),0),m=pt(ct(i-l,0,u),0),f=pt(ct(r-d,0,u),0),g=pt(ct(i-c,-u,0),0);new Ae(n,{x:pt(n.x+(g?g-e:m?m+e:0),0),y:pt(n.y+(p?p-e:f?f+e:0),0),duration:X(t)?350*A.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=Fe(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=ge.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,h]=this.containerPadding,l=this.scroll.y-this.targetBounds[0]+n+e,d=this.scroll.x-this.targetBounds[1]-o-e,c=this.scroll.y-this.targetBounds[2]-a-e,u=this.scroll.x-this.targetBounds[3]+h+e,p=this.isOutOfBounds([l,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=ct(mt(i,this.snapX),u,d),a=ct(mt(r,this.snapY),l,c),h=X(t)?350*A.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,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>l?l+(p-l)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<h?h+(m-h)/u:m:m,this.pointer[0]=o,this.pointer[1]=a,this.pointer[2]=o,this.pointer[3]=a,this.pointer[4]=o,this.pointer[5]=a,this.pointer[6]=o,this.pointer[7]=a,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Pe(this.$target,"zIndex",!1);es=(f>es?f:es)+1,this.targetStyles=Fe(this.$target,{zIndex:es}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Fe(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,ge.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,d=!1,c=!1;for(;e&&h&&h!==this.$trigger;){const t=Pe(h,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=h;if(e>s){c=!0,l=t<=3,d=t>=e-s-3;break}}h=h.parentElement}c&&(!l&&!d||l&&a<0||d&&a>0)?(this.pointer[0]=r,this.pointer[1]=n,this.pointer[2]=r,this.pointer[3]=n,this.pointer[4]=r,this.pointer[5]=n,this.pointer[6]=r,this.pointer[7]=n):(Ze(t),this.triggerStyles||(this.triggerStyles=Fe(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Ze,{passive:!1}),this.$trigger.addEventListener("touchmove",Ze,{passive:!1}),this.$trigger.addEventListener("touchend",Ze),(this.dragged||!this.disabled[0]&&st(o)>this.dragThreshold||!this.disabled[1]&&st(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[s,n,o,a,h,l]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,w=this.computeVelocity(s-h,n-l),S=this.angle=ht(n-a,s-o),$=150*w,k=(1-this.releaseContainerFriction)*this.dragSpeed,E=T+et(S)*$,C=x+tt(S)*$,N=E>c?c+(E-c)*k:E<p?p+(E-p)*k:E,D=C>u?u+(C-u)*k:C<d?d+(C-d)*k:C,I=this.destX=ct(pt(mt(N,this.snapX),5),p,c),B=this.destY=ct(pt(mt(D,this.snapY),5),d,u),R=this.isOutOfBounds(this.containerBounds,E,C);let L=0,P=0,F=v,M=v,V=0;if(b.x=T,b.y=x,!t){const t=I===c?T>c?-1:1:T<p?-1:1,s=pt(T-I,0);g.velocity=e&&_?s?$*t/st(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;L=T===I?0:_?r:r-n*A.timeScale,_&&(F=i),L>V&&(V=L)}if(!e){const e=B===u?x>u?-1:1:x<d?-1:1,s=pt(x-B,0);y.velocity=t&&_?s?$*e/st(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=y;P=x===B?0:_?r:r-n*A.timeScale,_&&(M=i),P>V&&(V=P)}if(!_&&R&&k&&(L||P)){const t=r.blend;new Ae(b,{x:{to:N,duration:.65*L},y:{to:D,duration:.65*P},ease:v,composition:t}).init(),new Ae(b,{x:{to:I,duration:L},y:{to:B,duration:P},ease:v,composition:t}).init(),this.overshootTicker.stretch(at(L,P)).restart()}else t||this.animate[this.xProp](I,L,F),e||this.animate[this.yProp](B,P,M);this.scrollInView(V,this.scrollThreshold,v);let z=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(z=!0)),B!==f&&this.snapY&&(this.snapped[1]=B,this.snapY&&(z=!0)),z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Ze),this.$trigger.removeEventListener("touchmove",Ze),this.$trigger.removeEventListener("touchend",Ze),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=Fe(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),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.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":Ze(t)}}}const is=(t=v)=>new ie({duration:1*A.timeScale,onComplete:t},null,0).resume(),rs=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!H(a)&&a.revert&&(e=a),X(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||v}};class ns{constructor(t={}){I.current&&I.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||ne(e)[0]||i);const n=t.defaults,o=A.defaults,a=t.mediaQueries;if(this.defaults=n?_t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const e=s.matchMedia(a[t]);this.mediaQueryLists[t]=e,e.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=I.current,s=I.root,i=A.defaults;I.current=this,I.root=this.root,A.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return I.current=e,I.root=s,A.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);H(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,H(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);H(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,H(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);H(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(H(s))return s(this);const i=rs(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,h=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;h--;)i[h](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const os=(t,e)=>t&&H(t)?t(e):t,as=new Map;class hs{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.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ie({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;bt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ie({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=pt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ie({autoplay:!1,duration:250*A.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ie({autoplay:!1,duration:500*A.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=pt(t?s.scrollX:e.scrollLeft,0),this.scrollY=pt(t?s.scrollY:e.scrollTop,0)}updateWindowBounds(){this.winWidth=s.innerWidth,this.winHeight=(()=>{const t=i.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=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){bt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),bt(this,t=>{t.refresh(),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?s:this.element).removeEventListener("scroll",this),as.delete(this.element)}}const ls=(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}=Dt(a,At);let d=h;return"%"===l?d=h/100*s:l&&(d=le(t,At,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},ds=(t,e,s,i,r)=>{let n;if(O(e)){const o=C.exec(e);if(o){const a=o[0],h=a[0],l=e.split(a),d="min"===l[0],c="max"===l[0],u=ls(t,l[0],s,i,r),p=ls(t,l[1],s,i,r);if(d){const e=Nt(ls(t,"min",s),p,h);n=e<u?u:e}else if(c){const e=Nt(ls(t,"max",s),p,h);n=e>u?u:e}else n=Nt(u,p,h)}else n=ls(t,e,s,i,r)}else n=e;return pt(n,0)},cs=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 us=0;const ps=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class ms{constructor(t={}){I.current&&I.current.register(this);const e=St(t.sync,"play pause"),s=e?be(e):null,r=e&&("linear"===e||e===de),n=e&&!(s===de&&!r),o=e&&(z(e)||!0===e||r),a=e&&O(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=us++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&ne(t)[0]||i.body;let s=as.get(e);return s||(s=new hs(e),as.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]:v,this.onSyncLeave=h&&!l&&h[1]?h[1]:v,this.onSyncEnterForward=h&&l&&h[0]?h[0]:v,this.onSyncLeaveForward=h&&l&&h[1]?h[1]:v,this.onSyncEnterBackward=h&&l&&h[2]?h[2]:v,this.onSyncLeaveBackward=h&&l&&h[3]?h[3]:v,this.onEnter=t.onEnter||v,this.onLeave=t.onLeave||v,this.onEnterForward=t.onEnterForward||v,this.onLeaveForward=t.onLeaveForward||v,this.onEnterBackward=t.onEnterBackward||v,this.onLeaveBackward=t.onLeaveBackward||v,this.onUpdate=t.onUpdate||v,this.onSyncComplete=t.onSyncComplete||v,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=St(t.debug,!1),this._next=null,this._prev=null,xt(this.container,this),is(()=>{if(!this.reverted){if(!this.target){const e=ne(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,X(t)||(t.persist=!0),!this._params.target)){let e;X(t.targets)?bt(t,t=>{t.targets&&!e&&(e=cs(t))}):e=cs(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:pt(ct(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=St(os(t.repeat,this),!0),this.horizontal="x"===St(os(t.axis,this),"y"),this.enter=St(os(t.enter,this),"end start"),this.leave=St(os(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=ps[this.index%ps.length],h=t.useWin,l=h?t.winWidth:t.width,d=h?t.winHeight:t.height,c=t.scrollWidth,u=t.scrollHeight,p=this.container.width>360?320:260,m=e?0:10,f=e?10:0,g=e?24:p/2,y=e?g:15,v=e?60:g,_=e?v:y,b=e?"repeat-x":"repeat-y",T=t=>e?"0px "+t+"px":t+"px 2px",x=t=>`linear-gradient(${e?90:0}deg, ${t} 2px, transparent 1px)`,w=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${w("absolute",m,f,e?c:p,e?p:u)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${e?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,n.style.cssText=`${w("sticky",0,0,e?l:g,e?g:d)}`,s||(n.style.cssText+=`background:\n ${x("#FFFF")}${T(g-10)} / 100px 100px ${b},\n ${x("#FFF8")}${T(g-10)} / 10px 10px ${b};\n `),o.style.cssText=`${w("relative",0,0,e?c:g,e?g:u)}`,s||(o.style.cssText+=`background:\n ${x("#FFFF")}${T(0)} / ${e?"100px 10px":"10px 100px"} ${b},\n ${x("#FFF8")}${T(0)} / ${e?"10px 0px":"0px 10px"} ${b};\n `);const S=[" enter: "," leave: "];this.coords.forEach((t,s)=>{const r=s>1,h=(r?0:this.offset)+t,m=s%2,f=h<_,g=h>(r?e?l:d:e?c:u)-_,b=(r?m&&!f:!m&&!f)||g,T=i.createElement("div"),x=i.createElement("div"),$=e?b?"right":"left":b?"bottom":"top",k=b?(e?v:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${S[m]}${this.thresholds[s]}`,T.style.cssText=`${w("absolute",0,0,v,y)}\n display: flex;\n flex-direction: ${e?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${$}: 2px solid ${a};\n `,x.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${y};\n margin-${e?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${e&&b||!e&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${m?a:"rgba(0,0,0,.75)"};\n background-color: ${m?"rgba(0,0,0,.65)":a};\n border: 2px solid ${m?a:"transparent"};\n border-${e?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${e?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,T.appendChild(x);let E=h-k+(e?1:0);T.style[e?"left":"top"]=`${E}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Pe(t.element,"position")&&(this.debugStyles=Fe(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;for(n&&(o=n.currentTime,n.seek(0,!0)),a.parentElement;a&&a!==s.element&&a!==i.body;){const e="sticky"===Pe(a,"position")&&Fe(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const h=e.getBoundingClientRect(),l=s.scale,d=(r?h.left+s.scrollX-s.left:h.top+s.scrollY-s.top)*l,c=(r?h.width:h.height)*l,u=r?s.width:s.height,p=(r?s.scrollWidth:s.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",v="end",_="start";if(O(m)){const t=m.split(" ");v=t[0],g=t.length>1?t[1]:g}else if(V(m)){const t=m;X(t.container)||(v=t.container),X(t.target)||(g=t.target)}else z(m)&&(v=m);if(O(f)){const t=f.split(" ");_=t[0],y=t.length>1?t[1]:y}else if(V(f)){const t=f;X(t.container)||(_=t.container),X(t.target)||(y=t.target)}else z(f)&&(_=f);const b=ds(e,g,c),T=ds(e,y,c),x=b+d-u,w=T+d-p,S=ds(e,v,u,x,w),$=ds(e,_,u,x,w),k=b+d-S,E=T+d-$,C=E-k;this.offset=d,this.offsetStart=k,this.offsetEnd=E,this.distance=C<=0?0:C,this.thresholds=[g,y,v,_],this.coords=[b,T,S,$],t&&t.forEach(t=>t.revert()),n&&n.seek(o,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const t=this.linked,e=this.sync,s=this.syncEase,i=this.syncSmooth,r=t&&(s||i),n=this.horizontal,o=this.container,a=this.scroll,h=a<=this.offsetStart,l=a>=this.offsetEnd,d=!h&&!l,c=a===this.offsetStart||a===this.offsetEnd,u=!this.hasEntered&&c,p=this._debug&&this.$debug;let m=!1,f=!1,g=this.progress;if(h&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&z(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=pt(ft(e,g,ft(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return Tt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const fs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,gs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?de:r=>0===r||1===r?r:fs(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=fs(r,e,s)-t,i>0?o=r:n=r}while(st(i)>1e-7&&++a<100);return r})(r,t,s),e,i),ys=(t=10,e)=>{const s=e?rt:nt;return e=>s(ct(e,0,1)*t)*(1/t)},vs=(...t)=>{const e=t.length;if(!e)return de;const s=e-1,i=t[0],r=t[s],n=[0],o=[Z(i)];for(let e=1;e<s;e++){const i=t[e],r=O(i)?i.trim().split(" "):[i],a=r[0],h=r[1];n.push(X(h)?e/s:Z(h)/100),o.push(Z(a))}return o.push(Z(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]}},_s=(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(ct(o,r,1))}return s.push(1),vs(...s)};var bs=Object.freeze({__proto__:null,Spring:je,createSpring:Qe,cubicBezier:gs,eases:ge,irregular:_s,linear:vs,spring:Ge,steps:ys});const Ts=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(pt(t(i/e),4));return`linear(${s.join(", ")})`},xs={},ws=t=>{let e=xs[t];if(e)return e;if(e="linear",O(t)){if(P(t,"linear")||P(t,"cubic-")||P(t,"steps")||P(t,"ease"))e=t;else if(P(t,"cubicB"))e=L(t);else{const s=ve(t);H(s)&&(e=s===de?"linear":Ts(s))}xs[t]=e}else if(H(t)){const s=Ts(t);s&&(e=s)}else t.ease&&(e=Ts(t.ease));return e},Ss=["x","y","z"],$s=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Ss],ks=(()=>[...Ss,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Es=null;const Cs=(t,e,s,i,r)=>{let n=O(e)?e:$t(e,s,i,r);return z(n)?$s.includes(t)||P(t,"translate")?`${n}px`:P(t,"rotate")||P(t,"skew")?`${n}deg`:`${n}`:n},Ns=(t,e,s,i,r,n)=>{let o="0";const a=X(i)?getComputedStyle(t)[e]:Cs(e,i,t,r,n);return o=X(s)?M(i)?i.map(s=>Cs(e,s,t,r,n)):a:[Cs(e,s,t,r,n),a],o};class Ds{constructor(t,s){I.current&&I.current.register(this),Y(Es)&&(!e||!X(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=P(t,"skew"),s=P(t,"scale"),i=P(t,"rotate"),r=P(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),Es=!0):Es=!1);const i=oe(t),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=St(s.ease,ws(A.defaults.ease)),o=n.ease&&n,a=St(s.autoplay,A.defaults.autoplay),l=!(!a||!a.link)&&a,d=s.alternate&&!0===s.alternate,c=s.reversed&&!0===s.reversed,u=St(s.loop,A.defaults.loop),_=!0===u||u===1/0?1/0:z(u)?u+1:1,b=d?c?"alternate-reverse":"alternate":c?"reverse":"normal",T=ws(n),x=1===A.timeScale?1:p;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||A.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!a||!1!==l,this.reversed=c,this.persist=St(s.persist,A.defaults.persist),this.autoplay=a,this._speed=St(s.playbackRate,A.defaults.playbackRate),this._resolve=v,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[h],a=ks.some(t=>s.hasOwnProperty(t)),l=t.style,d=this._inlineStyles[e]={},c=(o?o.settlingDuration:$t(St(s.duration,A.defaults.duration),t,e,r))*x,u=$t(St(s.delay,A.defaults.delay),t,e,r)*x,p=St(s.composition,"replace");for(let o in s){if(!G(o))continue;const h={},m={iterations:_,direction:b,fill:"both",easing:T,duration:c,delay:u,composite:p},y=s[o],v=!!a&&(g.includes(o)?o:f.get(o)),w=v?"transform":o;let S;if(d[w]||(d[w]=l[w]),V(y)){const s=y,a=St(s.ease,n),d=a.ease&&a,f=s.to,g=s.from;if(m.duration=(d?d.settlingDuration:$t(St(s.duration,c),t,e,r))*x,m.delay=$t(St(s.delay,u),t,e,r)*x,m.composite=St(s.composition,p),m.easing=ws(a),S=Ns(t,o,g,f,e,r),v?(h[`--${v}`]=S,i[v]=S):h[o]=Ns(t,o,g,f,e,r),Le(this,t,o,h,m),!X(g))if(v){const t=`--${v}`;l.setProperty(t,h[t][0])}else l[o]=h[o][0]}else S=M(y)?y.map(s=>Cs(o,s,t,e,r)):Cs(o,y,t,e,r),v?(h[`--${v}`]=S,i[v]=S):h[o]=S,Le(this,t,o,h,m)}if(a){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;l.transform=t}}),l&&this.autoplay.link(this)}forEach(t){try{const e=O(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=A.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===A.timeScale?1:p);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];X(r)||r===m?s.removeProperty(L(e)):t.style[e]=r}t.getAttribute("style")===m&&t.removeAttribute("style")}),this}then(t=v){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=v};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const Is={animate:(t,e)=>new Ds(t,e),convertEase:Ts};let As=0,Bs=0;const Rs=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),Ls=(t,e)=>{let s=t[e];for(;s&&s.nodeType===Node.TEXT_NODE&&!s.textContent.trim();)s=s[e];return s&&s.nodeType===Node.TEXT_NODE},Ps=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},Fs=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},Ms=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,Ps(s)),i&&!e.has(i)&&e.set(i,Ps(i))},Vs=t=>{t.forEach((t,e)=>Fs(e,t)),t.clear()},zs={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},Os=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},Hs=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+Bs++);const n=i||{};return n.$el=t,n.$measure=t,n.id=r,n.index=0,n.total=1,n.delay=0,n.duration=0,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.hasTransform=!1,n.isAnimated=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.isInlined=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:"none",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(t=>n.properties[t]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Xs=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,h=t.state.rootNode,l=t.parentNode,d=s.transform,c=r.style.transform,u=!!l&&l.measuredIsRemoved,p=s.position;if(o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=Rs(n,e),t.measuredInlineTransform=null,t.measuredDisplay=s.display,t.measuredVisibility=s.visibility,t.measuredPosition=p,t.measuredHasDisplayNone="none"===s.display,t.measuredHasVisibilityHidden="hidden"===s.visibility,t.measuredIsVisible=!(t.measuredHasDisplayNone||t.measuredHasVisibilityHidden),t.measuredIsRemoved=t.measuredHasDisplayNone||t.measuredHasVisibilityHidden||u,t.isInlined=t.measuredDisplay.includes("inline")&&(t=>Ls(t,"previousSibling")||Ls(t,"nextSibling"))(r),t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=Ps(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=Ps(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let m,f,g=0,y=0,v=0,_=0;if(!i){const t=e.getBoundingClientRect();g=t.left,y=t.top,v=t.width,_=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);X(e)||(a[t]=e)}if(a.left=g,a.top=y,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(m=g,f=y):(m=0,f=0);else{const e=l||h,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)m=g-s-r,f=y-i-n;else if(e===h){const t=h.properties.left,e=h.properties.top;m=g-t-h.properties.clientLeft,f=y-e-h.properties.clientTop}else m=g-s-r,f=y-i-n}return a.x=m,a.y=f,a.width=v,a.height=_,t},Ys=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Ws=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},Us=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},qs=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(Fs(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(Fs(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},js=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.measuredIsRemoved&&t.layout.pendingRemoved.delete(t.$el)},Gs=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class Qs{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}get(t){const e=this.nodes.get(t.dataset.layoutId);if(e)return e.properties;console.warn("No node found on state")}getValue(t,e){if(!t||!t.dataset)return void console.warn(`No element found on state (${t})`);const s=this.nodes.get(t.dataset.layoutId);if(!s)return void console.warn("No node found on state");const i=s.properties[e];return X(i)?void 0:$t(i,t,s.index,s.total)}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,Ps(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||W(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?zs:getComputedStyle(e),a=!!n||"none"===o.display,h=!!n||"hidden"===o.visibility,l=!a&&!h,d=e.dataset.layoutId,c=Rs(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=Rs(i,u.$el),h=u.measuredIsVisible;if(a||!c&&(c||h||!l)){if(a&&!h&&l){Xs(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}Os(u),u=Hs(e,t,this,u)}else u=Hs(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.isAnimated=!1,u.hasVisibilityHidden=h,u.hasDisplayNone=a,u.hasVisibilitySwap=h&&!u.measuredHasVisibilityHidden||a&&!u.measuredHasDisplayNone,this.nodes.set(u.id,u),u.parentNode=t||null,u._prev=null,u._next=null,t?(this.rootNodes.delete(u),t._head?(t._tail._next=u,u._prev=t._tail,t._tail=u):(t._head=u,t._tail=u)):this.rootNodes.add(u),Xs(u,u.$el,o,n);let p=e.lastElementChild;for(;p;)s.push(p,u),p=p.previousElementSibling;r||(r=u)}return r}ensureDetachedNode(t,e){if(!t||t===this.layout.root)return null;const s=t.dataset.layoutId,i=s?this.nodes.get(s):null;if(i&&i.$el===t)return i;let r=null,n=t.parentElement;for(;n&&n!==this.layout.root;){if(e.has(n)){r=this.ensureDetachedNode(n,e);break}n=n.parentElement}return this.registerElement(t,r)}record(){const{children:t,root:e}=this.layout,s=M(t)?t:[t],i=[],r="*"===t?e:I.root;for(let t=0,e=s.length;t<e;t++){const e=s[t];i[t]=O(e)?r.querySelectorAll(e):e}const n=oe(i);this.nodes.clear(),this.rootNodes.clear();const o=this.registerElement(e,null);o.isTarget=!0,this.rootNode=o;const a=new Set;this.nodes.forEach((t,e)=>{t&&t.measuredIsInsideRoot&&a.add(e)});const h=new Set,l=[];for(let t=0,s=n.length;t<s;t++){const s=n[t];if(s&&1===s.nodeType&&s!==e){if(!Rs(e,s)){const t=s.dataset.layoutId;if(!t||!a.has(t))continue}h.has(s)||(h.add(s),l.push(s))}}for(let t=0,e=l.length;t<e;t++)this.ensureDetachedNode(l[t],h);for(let t=0,e=n.length;t<e;t++){const e=n[t],s=this.nodes.get(e.dataset.layoutId);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY;const d=this.nodes.size;return this.forEachNode(qs),this.forEachNode((t,e)=>{t.index=e,t.total=d}),this}}class Zs{constructor(t,e={}){I.current&&I.current.register(this);const s=e.frozen,i=e.added,r=e.removed,n=e.properties;if(this.params=e,this.root=oe(t)[0],this.id=As++,this.children=e.children||"*",this.absoluteCoords=!1,this.duration=St(e.duration,500),this.delay=St(e.delay,0),this.ease=St(e.ease,"inOutExpo"),this.onComplete=St(e.onComplete,v),this.frozenParams=s||{opacity:0},this.addedParams=i||{opacity:0},this.removedParams=r||{opacity:0},this.properties=new Set(["opacity","borderRadius"]),s)for(let t in s)this.properties.add(t);if(i)for(let t in i)this.properties.add(t);if(r)for(let t in r)this.properties.add(t);if(n)for(let t=0,e=n.length;t<e;t++)this.properties.add(n[t]);this.recordedProperties=new Set(["display","visibility","translate","position","left","top","marginLeft","marginTop","width","height","maxWidth","maxHeight","minWidth","minHeight"]),this.properties.forEach(t=>this.recordedProperties.add(t)),this.pendingRemoved=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Qs(this),this.newState=new Qs(this),this.timeline=null,this.transformAnimation=null,this.frozen=[],this.removed=[],this.added=[],this.oldState.record(),Vs(this.transitionMuteStore)}revert(){return this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.root.classList.remove("is-animated"),this.frozen.length=this.removed.length=this.added.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>Vs(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(Us),this}animate(t={}){const e=St(t.delay,this.delay),s=St(t.duration,this.duration),i=St(t.onComplete,this.onComplete),r=t.frozen?_t(t.frozen,this.frozenParams):this.frozenParams,n=t.added?_t(t.added,this.addedParams):this.addedParams,o=t.removed?_t(t.removed,this.removedParams):this.removedParams,a=this.oldState,h=this.newState,l=this.added,d=this.removed,c=this.frozen,u=this.pendingRemoved;l.length=d.length=c.length=0,a.forEachRootNode(Ms),h.record(),h.forEachRootNode(Ws);const p=[],m=[],f=[],g=[],y=h.rootNode.$el;h.forEachRootNode(t=>{const i=t.$el,r=t.id,y=t.parentNode,v=!!y&&y.branchAdded,_=!!y&&y.branchRemoved,b=!!y&&y.branchNotRendered;t.delay=+(H(e)?e(i,t.index,t.total):e),t.duration=+(H(s)?s(i,t.index,t.total):s);let T=a.nodes.get(r);const x=!T;x?(T=Gs(t,{},a),a.nodes.set(r,T),T.measuredIsRemoved=!0):T.measuredIsRemoved&&!t.measuredIsRemoved&&(Gs(t,T,a),T.measuredIsRemoved=!0);const w=T.parentNode,S=(w?w.id:null)!==(y?y.id:null),$=T.$el!==t.$el,k=T.measuredIsRemoved,E=t.measuredIsRemoved;if(!T.measuredIsRemoved&&!E&&!x&&(S||$)){let e=0,s=0,i=t.parentNode;for(;i&&(e+=i.properties.x||0,s+=i.properties.y||0,i.parentNode!==h.rootNode);)i=i.parentNode;let r=0,n=0,o=T.parentNode;for(;o&&(r+=o.properties.x||0,n+=o.properties.y||0,o.parentNode!==a.rootNode);)o=o.parentNode;T.properties.x+=r-e,T.properties.y+=n-s}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=T.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const C=u.has(i),N=T.measuredIsVisible,D=t.measuredIsVisible,I=!N&&D&&!b,A=!E&&(k||C)&&!v,B=E&&!k&&!_,R=B||E&&C&&!_;t.measuredIsRemoved&&N&&(t.$el.style.display=T.measuredDisplay,t.$el.style.visibility="visible",Gs(T,t,h)),B?(d.push(i),u.add(i)):!E&&C&&u.delete(i),A&&!b||I?(Ys(T,n),l.push(i)):R&&!b&&Ys(t,o);for(let e in t.properties)t.properties[e]=h.getValue(t.$el,e),T.properties[e]=a.getValue(t.$el,e);const L=(A||B)&&k!==E;let P=!1;if(t.isTarget&&(!t.measuredIsRemoved&&N||t.measuredIsRemoved&&D)){t.isInlined||"none"===t.properties.transform&&"none"===T.properties.transform||(t.hasTransform=!0,P=!0,f.push(i));for(let e in t.properties)if("transform"!==e&&(t.properties[e]!==T.properties[e]||L)){P=!0,m.push(i);break}}const F=P||A||R||I,M=t.isTarget&&F;t.isAnimated=M,t.branchAdded=v||A,t.branchRemoved=_||R,t.branchNotRendered=b||t.measuredIsRemoved;const V=Math.abs(t.properties.width-T.properties.width)>1,z=Math.abs(t.properties.height-T.properties.height)>1;t.sizeChanged=V||z,p.push(i),t.isTarget||(c.push(i),(F||t.sizeChanged)&&y&&y.isTarget&&y.isAnimated&&y.sizeChanged&&g.push(i))});const v={ease:St(t.ease,this.ease),duration:t=>h.nodes.get(t.dataset.layoutId).duration,delay:t=>h.nodes.get(t.dataset.layoutId).delay};if(this.timeline=Xe({onComplete:()=>{this.transformAnimation&&this.transformAnimation.cancel(),h.forEachRootNode(t=>{js(t),Us(t)});for(let t=0,e=f.length;t<e;t++){const e=f[t];e.style.transform=h.getValue(e,"transform")}this.root.classList.remove("is-animated"),i&&i(this),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||Vs(this.transitionMuteStore)})},onPause:()=>{this.transformAnimation&&this.transformAnimation.cancel(),h.forEachRootNode(js),this.root.classList.remove("is-animated"),i&&i(this)},composition:!1,defaults:v}),p.length){this.root.classList.add("is-animated");for(let t=0,e=p.length;t<e;t++){const e=p[t],s=e.dataset.layoutId,i=a.nodes.get(s),r=h.nodes.get(s),n=i.properties;Ms(r),r.isInlined||(e.style.display="block",(e!==y||this.absoluteCoords)&&(e.style.position=this.absoluteCoords?"fixed":"absolute",e.style.left="0px",e.style.top="0px",e.style.marginLeft="0px",e.style.marginTop="0px",e.style.translate=`${n.x}px ${n.y}px`),e===y&&"static"===r.measuredPosition&&(e.style.position="relative",e.style.left="0px",e.style.top="0px"),e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none")}a.scrollX===window.scrollX&&a.scrollY===window.scrollY||requestAnimationFrame(()=>{window.scrollTo(a.scrollX,a.scrollY)});for(let t=0,e=m.length;t<e;t++){const e=m[t],s=e.dataset.layoutId,i=a.nodes.get(s),r=h.nodes.get(s),n=i.properties,o=r.properties;let l=!1;const d={composition:"none"};r.isInlined||(n.width!==o.width&&(d.width=[n.width,o.width],l=!0),n.height!==o.height&&(d.height=[n.height,o.height],l=!0),r.hasTransform||(d.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],l=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(d[t]=[e,s],l=!0)}),l&&this.timeline.add(e,d,0)}}if(c.length){for(let t=0,e=c.length;t<e;t++){const e=c[t];if(!a.nodes.get(e.dataset.layoutId).isInlined){const t=a.get(e);e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${t.x}px ${t.y}px`}this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${a.getValue(e,t)}`)})}for(let t=0,e=c.length;t<e;t++){const e=c[t],s=h.nodes.get(e.dataset.layoutId),i=h.get(e);this.timeline.call(()=>{s.isInlined||(e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.minWidth="auto",e.style.minHeight="auto",e.style.maxWidth="none",e.style.maxHeight="none",e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${h.getValue(e,t)}`)})},s.delay+s.duration/2)}if(g.length){const t={};if(r)for(let e in r)t[e]=[{from:t=>a.getValue(t,e),ease:"in(1.75)",to:r[e]},{from:r[e],to:t=>h.getValue(t,e),ease:"out(1.75)"}];this.timeline.add(g,t,0)}}const _=f.length;if(_){for(let t=0;t<_;t++){const e=f[t];e.style.translate=`${a.get(e).x}px ${a.get(e).y}px`,e.style.transform=a.getValue(e,"transform")}this.transformAnimation=Is.animate(f,{translate:t=>`${h.get(t).x}px ${h.get(t).y}px`,transform:t=>h.getValue(t,"transform"),autoplay:!1,persist:!0,...v}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e),this}}const Js=Ue,Ks={},ti=t=>(...e)=>{const s=t(...e);return new Proxy(v,{apply:(t,e,[i])=>s(i),get:(t,e)=>ti((...t)=>{const i=Ks[e](...t);return t=>i(s(t))})})},ei=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?ti(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return Ks[t]||(Ks[t]=i),i},si=ei("roundPad",Js.roundPad),ii=ei("padStart",Js.padStart),ri=ei("padEnd",Js.padEnd),ni=ei("wrap",Js.wrap),oi=ei("mapRange",Js.mapRange),ai=ei("degToRad",Js.degToRad),hi=ei("radToDeg",Js.radToDeg),li=ei("snap",Js.snap),di=ei("clamp",Js.clamp),ci=ei("round",Js.round),ui=ei("lerp",Js.lerp,1),pi=ei("damp",Js.damp,1),mi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let fi=0;const gi=(t,e=0,s=1,i=0)=>{let r=void 0===t?fi++:t;return(t=e,n=s,o=i)=>{r+=1831565813,r=Math.imul(r^r>>>15,1|r),r^=r+Math.imul(r^r>>>7,61|r);const a=10**o;return Math.floor((((r^r>>>14)>>>0)/4294967296*(n-t+1/a)+t)*a)/a}},yi=t=>t[mi(0,t.length-1)],vi=t=>{let e,s,i=t.length;for(;i;)s=mi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},_i=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!X(o),h=a&&!X(o.ease)?o.ease:a?be(o):null,l=e.grid,d=e.axis,c=e.total,u=X(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,y=M(t),v=e.use,_=Z(y?t[0]:t),b=y?Z(t[1]):0,T=$.exec((y?t[1]:t)+m),x=e.start||0+(y?_:0);let w=u?0:z(r)?r:0;return(t,r,o,a)=>{const[u]=oe(t),m=X(c)?o:c,S=!X(v)&&(H(v)?v(u,r,m):Ct(u,v)),$=z(S)||O(S)&&z(+S)?+S:r;if(p&&(w=(m-1)/2),f&&(w=m-1),!s.length){for(let t=0;t<m;t++){if(l){const e=p?(l[0]-1)/2:w%l[0],i=p?(l[1]-1)/2:nt(w/l[0]),r=e-t%l[0],n=i-nt(t/l[0]);let o=K(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(st(w-t));i=at(...s)}h&&(s=s.map(t=>h(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:st(i-t))),g&&(s=vi(s))}const k=y?(b-_)/i:_;let E=(a?Ve(a,X(e.start)?a.iterationDuration:x):x)+(k*pt(s[$],2)||0);return e.modifier&&(E=e.modifier(E)),T&&(E=`${E}${T[2]}`),E}};var bi=Object.freeze({__proto__:null,$:oe,clamp:di,cleanInlineStyles:Ft,createSeededRandom:gi,damp:pi,degToRad:ai,get:Pe,keepTime:rs,lerp:ui,mapRange:oi,padEnd:ri,padStart:ii,radToDeg:hi,random:mi,randomPick:yi,remove:Me,round:ci,roundPad:si,set:Fe,shuffle:vi,snap:li,stagger:_i,sync:is,wrap:ni});const Ti=t=>{const e=ne(t)[0];return e&&W(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},xi=(t,e,s,i,r)=>{const n=s+i,o=r?Math.max(0,Math.min(n,e)):(n%e+e)%e;return t.getPointAtLength(o)},wi=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),h=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=xi(t,r,a,-1,h),s=xi(t,r,a,1,h);return 180*ht(s.y-e.y,s.x-e.x)/lt}{const s=xi(t,r,a,0,h);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},Si=(t,e=0)=>{const s=Ti(t);if(s)return{translateX:wi(s,"x",e),translateY:wi(s,"y",e),rotate:wi(s,"a",e)}},$i=(t,e=0,s=0)=>ne(t).map(t=>((t,e,s)=>{const i=p,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const h=new Proxy(t,{get(t,e){const s=t[e];return e===d?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],h=+s[1],l=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(K(s.a*s.a+s.b*s.b)+K(s.c*s.c+s.d*s.d))/2)}return e})(o),d=-1e3*r*l,c=h*i*l+d,u=i*l+(0===r&&1===h||1===r&&0===h?0:10*l)-c;if("butt"!==n){const e=r===h?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:H(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),h.setAttribute("draw",`${e} ${s}`)),h})(t,e,s)),ki=(t,e=.33)=>s=>{if(!(s.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const i=Ti(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[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 d=e/(l-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+pt(c.x,3)+n+c.y+" ",h+=p+pt(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]};var Ei=Object.freeze({__proto__:null,createDrawable:$i,createMotionPath:Si,morphTo:ki});const Ci="undefined"!=typeof Intl&&Intl.Segmenter,Ni=/\{value\}/g,Di=/\{i\}/g,Ii=/(\s+)/,Ai=/^\s+$/,Bi="line",Ri="word",Li="char",Pi="data-line";let Fi=null,Mi=null,Vi=null;const zi=t=>t.isWordLike||" "===t.segment||z(+t.segment),Oi=t=>t.setAttribute("aria-hidden","true"),Hi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Xi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Yi=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Yi(e)}},Wi=(t,e,s)=>{const i=t.getAttribute(Pi);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&Ai.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&Ai.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)Wi(t.children[r],e,s);return s},Ui=(t,e={})=>{let s="";const i=O(e.class)?` class="${e.class}"`:"",r=St(e.clone,!1),n=St(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},qi=(t,e,s,i,r,n,o,a,h)=>{const l=r===Bi,d=r===Li,c=`_${r}_`,u=H(t)?t(s):t,p=l?"block":"inline-block";Vi.innerHTML=u.replace(Ni,`<i class="${c}"></i>`).replace(Di,`${d?h:l?o:a}`);const m=Vi.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),v=y.length;if(v){f.style.display=p,g.style.display=p,g.setAttribute(Pi,`${o}`),l||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${h}`));let t=v;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,l?i.innerHTML=s.innerHTML:i.replaceChild(s.cloneNode(!0),e)}e.push(g),i.appendChild(m)}else console.warn('The expression "{value}" is missing from the provided template.');return n&&(f.style.outline=`1px dotted ${Xi[r]}`),f};class ji{constructor(t,s={}){Fi||(Fi=Ci?new Ci([],{granularity:Ri}):{segment:t=>{const e=[],s=t.split(Ii);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Ai.test(i)})}return e}}),Mi||(Mi=Ci?new Ci([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Vi&&e&&(Vi=i.createElement("template")),I.current&&I.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:h,debug:l}=s,d=(t=M(t)?t[0]:t)&&t.nodeType?t:(re(t)||[])[0],c=!0===o?{}:o,u=!0===r||X(r)?{}:r,p=!0===n?{}:n;this.debug=St(l,!1),this.includeSpaces=St(h,!1),this.accessible=St(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=V(c)?Ui(Bi,c):c,this.wordTemplate=V(u)||this.linesOnly?Ui(Ri,u):u,this.charTemplate=V(p)?Ui(Li,p):p,this.$target=d,this.html=d&&d.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?i.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!H(t))return console.warn("Effect must return a function.");const e=rs(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>H(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],h=this.words,l=this.chars,d=Fi.segment(o),c=i.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=zi(t);if(!u||s&&u&&zi(u))a.push(e);else{const t=a.length-1,s=a[t];Ii.test(s)||Ii.test(e)?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const d=a[t+1],u=r&&d&&!d.trim(),p=o,m=s?Mi.segment(p):null,f=s?i.createDocumentFragment():i.createTextNode(u?o+" ":o);if(s){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,d=i.createTextNode(a);qi(s,l,d,f,Li,n,-1,h.length,l.length)}}e?qi(e,h,f,c,Ri,n,-1,h.length,l.length):s?c.appendChild(f):c.appendChild(i.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(i.createTextNode(o))}}t.parentNode.replaceChild(c,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,s=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==i.fonts.status,h=r&&a;this.ready=!r||a,(h||t)&&this.effectsCleanups.forEach(t=>H(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),h&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Hi(e,Ri))),o&&(h||n)&&(this.chars=Hi(e,Li));const l=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=l.length;t<e;t++){const e=l[t],{top:s,height:i}=e.getBoundingClientRect();!X(d)&&s-d>.5*i&&c++,e.setAttribute(Pi,`${c}`);const r=e.querySelectorAll(`[${Pi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Pi,`${c}`);d=s}if(h){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<c+1;t++){const i=e.cloneNode(!0);Wi(i,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&s.add(e),e.removeChild(t))}),a.push(i)}s.forEach(Yi);for(let e=0,s=a.length;e<s;e++)qi(r,this.lines,a[e],t,Bi,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Hi(e,Ri)),o&&(this.chars=Hi(e,Li))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(h||!s)){const t=i.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(Oi),this.words.forEach(Oi),this.chars.forEach(Oi)}return this.width=e.offsetWidth,(h||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Gi=(t,e)=>new ji(t,e),Qi=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new ji(t,e));var Zi=Object.freeze({__proto__:null,TextSplitter:ji,split:Qi,splitText:Gi});t.$=oe,t.Animatable=Ye,t.AutoLayout=Zs,t.Draggable=ss,t.JSAnimation=Ae,t.Scope=ns,t.ScrollObserver=ms,t.Spring=je,t.TextSplitter=ji,t.Timeline=He,t.Timer=ie,t.WAAPIAnimation=Ds,t.animate=(t,e)=>new Ae(t,e,null,0,!1).init(),t.clamp=di,t.cleanInlineStyles=Ft,t.createAnimatable=(t,e)=>new Ye(t,e),t.createDraggable=(t,e)=>new ss(t,e),t.createDrawable=$i,t.createLayout=(t,e)=>new Zs(t,e),t.createMotionPath=Si,t.createScope=t=>new ns(t),t.createSeededRandom=gi,t.createSpring=Qe,t.createTimeline=Xe,t.createTimer=t=>new ie(t,null,0).init(),t.cubicBezier=gs,t.damp=pi,t.degToRad=ai,t.eases=ge,t.easings=bs,t.engine=Xt,t.get=Pe,t.irregular=_s,t.keepTime=rs,t.lerp=ui,t.linear=vs,t.mapRange=oi,t.morphTo=ki,t.onScroll=(t={})=>new ms(t),t.padEnd=ri,t.padStart=ii,t.radToDeg=hi,t.random=mi,t.randomPick=yi,t.remove=Me,t.round=ci,t.roundPad=si,t.scrollContainers=as,t.set=Fe,t.shuffle=vi,t.snap=li,t.split=Qi,t.splitText=Gi,t.spring=Ge,t.stagger=_i,t.steps=ys,t.svg=Ei,t.sync=is,t.text=Zi,t.utils=bi,t.waapi=Is,t.wrap=ni});
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - CJS
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - ESM
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - CJS
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - ESM
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - CJS
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - ESM
3
- * @version v4.2.1
3
+ * @version v4.3.0-beta.0
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */