JavaScript animation engine
v4.3.5
Julian Garnierd33098727cb2
diff --git a/dist/bundles/anime.esm.js b/dist/bundles/anime.esm.jsindex 6e156f30..151e9d83 100644--- a/dist/bundles/anime.esm.js+++ b/dist/bundles/anime.esm.js@@ -1,6 +1,6 @@/*** Anime.js - ESM bundle- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -740,6 +740,7 @@ const noop = () => {};// Regex+const validRgbHslRgx = /\)\s*[-.\d]/;const hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;const rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;const rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;@@ -803,7 +804,7 @@ const globals = {const devTools = isBrowser && win.AnimeJSDevTools;-const globalVersions = { version: '4.3.4', engine: null };+const globalVersions = { version: '4.3.5', engine: null };if (isBrowser) {if (!win.AnimeJS) win.AnimeJS = [];@@ -851,11 +852,11 @@ const isSvg = a => isBrowser && a instanceof SVGElement;/**@param {any} a @return {Boolean} */const isHex = a => hexTestRgx.test(a);/**@param {any} a @return {Boolean} */-const isRgb = a => stringStartsWith(a, 'rgb') && a[a.length - 1] === ')';+const isRgb = a => stringStartsWith(a, 'rgb');/**@param {any} a @return {Boolean} */-const isHsl = a => stringStartsWith(a, 'hsl') && a[a.length - 1] === ')';-/**@param {any} a @return {Boolean} */-const isCol = a => isHex(a) || isRgb(a) || isHsl(a);+const isHsl = a => stringStartsWith(a, 'hsl');+/**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type+const isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !validRgbHslRgx.test(a)));/**@param {any} a @return {Boolean} */const isKey = a => !globals.defaults.hasOwnProperty(a);@@ -3977,7 +3978,7 @@ const addWAAPIAnimation = (parent, $el, property, keyframes, params) => {parent.animations.push(animation);removeWAAPIAnimation($el, property);addChild(WAAPIAnimationsLookups, { parent, animation, $el, property, _next: null, _prev: null });- const handleRemove = () => { removeWAAPIAnimation($el, property, parent); };+ const handleRemove = () => removeWAAPIAnimation($el, property, parent);animation.oncancel = handleRemove;animation.onremove = handleRemove;if (!parent.persist) {@@ -9078,7 +9079,7 @@ class AutoLayout {// const hiddenStateChanged = (topLevelAdded || newlyRemoved) && wasRemovedBefore !== isRemovedNow;if (node.isTarget && (!node.measuredIsRemoved && oldStateNode.measuredIsVisible || node.measuredIsRemoved && node.measuredIsVisible)) {- if (!node.isInlined && (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none')) {+ if (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none') {node.hasTransform = true;transformed.push($el);}@@ -9094,7 +9095,7 @@ class AutoLayout {if (!node.isTarget) {swapping.push($el);if (node.sizeChanged && parent && parent.isTarget && parent.sizeChanged) {- if (!node.isInlined && swapAtProps.transform) {+ if (swapAtProps.transform) {node.hasTransform = true;transformed.push($el);}@@ -9134,7 +9135,7 @@ class AutoLayout {// muteNodeTransition(newNode);- // Don't animate dimensions and positions of inlined elements+ // Don't animate positions of inlined elements (to avoid text reflow)if (!newNode.isInlined) {// Display grid can mess with the absolute positioning, so set it to block during transitionif (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.setProperty('display', 'block', 'important');@@ -9153,14 +9154,15 @@ class AutoLayout {$el.style.left = '0px';$el.style.top = '0px';}- $el.style.width = `${oldNodeState.width}px`;- $el.style.height = `${oldNodeState.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;}+ // Animate dimensions for all elements (including inlined)+ $el.style.width = `${oldNodeState.width}px`;+ $el.style.height = `${oldNodeState.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;}// Restore the scroll position if the oldState differs from the current state@@ -9181,21 +9183,19 @@ class AutoLayout {const animatedProps = {composition: 'none',};- if (!newNode.isInlined) {- if (oldNodeState.width !== newNodeState.width) {- animatedProps.width = [oldNodeState.width, newNodeState.width];- nodeHasChanged = true;- }- if (oldNodeState.height !== newNodeState.height) {- animatedProps.height = [oldNodeState.height, newNodeState.height];- nodeHasChanged = true;- }- // If the node has transforms we handle the translate animation in wappi otherwise translate and other transforms can be out of sync- // Always animate translate- if (!newNode.hasTransform) {- animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];- nodeHasChanged = true;- }+ if (oldNodeState.width !== newNodeState.width) {+ animatedProps.width = [oldNodeState.width, newNodeState.width];+ nodeHasChanged = true;+ }+ if (oldNodeState.height !== newNodeState.height) {+ animatedProps.height = [oldNodeState.height, newNodeState.height];+ nodeHasChanged = true;+ }+ // If the node has transforms we handle the translate animation in waapi otherwise translate and other transforms can be out of sync+ // And we don't animate the position of inlined elements+ if (!newNode.hasTransform && !newNode.isInlined) {+ animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];+ nodeHasChanged = true;}this.properties.forEach(prop => {const oldVal = oldNodeState[prop];@@ -9217,15 +9217,16 @@ class AutoLayout {for (let i = 0, l = swapping.length; i < l; i++) {const $el = swapping[i];const oldNode = oldState.getNode($el);+ const oldNodeProps = oldNode.properties;+ $el.style.width = `${oldNodeProps.width}px`;+ $el.style.height = `${oldNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // We don't animate the position of inlined elementsif (!oldNode.isInlined) {- const oldNodeProps = oldNode.properties;- $el.style.width = `${oldNodeProps.width}px`;- $el.style.height = `${oldNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${oldNodeProps.x}px ${oldNodeProps.y}px`;}this.properties.forEach(prop => {@@ -9240,14 +9241,15 @@ class AutoLayout {const newNode = newState.getNode($el);const newNodeProps = newNode.properties;this.timeline.call(() => {+ $el.style.width = `${newNodeProps.width}px`;+ $el.style.height = `${newNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // Don't set translate for inlined elements (to avoid text reflow)if (!newNode.isInlined) {- $el.style.width = `${newNodeProps.width}px`;- $el.style.height = `${newNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${newNodeProps.x}px ${newNodeProps.y}px`;}this.properties.forEach(prop => {@@ -9280,19 +9282,27 @@ class AutoLayout {const transformedLength = transformed.length;if (transformedLength) {- // We only need to set the transform property here since translate is alread defined in the targets loop+ // We only need to set the transform property here since translate is already defined in the targets loopfor (let i = 0; i < transformedLength; i++) {const $el = transformed[i];- $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`,+ const node = newState.getNode($el);+ // Don't set translate for inlined elements (to avoid text reflow)+ if (!node.isInlined) {+ $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`;+ }$el.style.transform = oldState.getComputedValue($el, 'transform');if (animatedSwap.includes($el)) {- const node = newState.getNode($el);node.ease = getFunctionValue(swapAtParams.ease, $el, node.index, node.total);node.duration = getFunctionValue(swapAtParams.duration, $el, node.index, node.total);}}this.transformAnimation = waapi.animate(transformed, {- translate: (/** @type {HTMLElement} */$el) => `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`,+ translate: (/** @type {HTMLElement} */$el) => {+ const node = newState.getNode($el);+ // Don't animate translate for inlined elements (to avoid text reflow)+ if (node.isInlined) return '0px 0px';+ return `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`;+ },transform: (/** @type {HTMLElement} */$el) => {const newValue = newState.getComputedValue($el, 'transform');if (!animatedSwap.includes($el)) return newValue;@@ -9301,7 +9311,7 @@ class AutoLayout {return [oldValue, getFunctionValue(swapAtProps.transform, $el, node.index, node.total), newValue]},autoplay: false,- persist: true,+ // persist: true,...timingParams,});this.timeline.sync(this.transformAnimation, 0);diff --git a/dist/bundles/anime.esm.min.js b/dist/bundles/anime.esm.min.jsindex 2f8730b4..86c9fb75 100644--- a/dist/bundles/anime.esm.min.js+++ b/dist/bundles/anime.esm.min.js@@ -1,7 +1,7 @@/*** Anime.js - ESM minified bundle- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/-const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),l=Symbol(),h=Symbol(),d=Symbol(),c=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=240,y="",_="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),x=()=>{},S=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,w=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,E=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,C=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,k=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,R=/([a-z])([A-Z])/g,D=/(\w+)(\([^)]+\)+)/g,I=/(\*=|\+=|-=)/,O=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,A={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:x,onBeforeUpdate:x,onUpdate:x,onLoop:x,onPause:x,onComplete:x,onRender:x},L={current:null,root:s},B={defaults:A,precision:4,timeScale:1,tickThreshold:200},P=t&&e.AnimeJSDevTools,F={version:"4.3.4",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(F));const M=t=>t.replace(R,"$1-$2").toLowerCase(),V=(t,e)=>0===t.indexOf(e),z=Date.now,X=Array.isArray,H=t=>t&&t.constructor===Object,U=t=>"number"==typeof t&&!isNaN(t),Y=t=>"string"==typeof t,W=t=>"function"==typeof t,q=t=>void 0===t,j=t=>q(t)||null===t,G=e=>t&&e instanceof SVGElement,Q=t=>S.test(t),J=t=>V(t,"rgb")&&")"===t[t.length-1],Z=t=>V(t,"hsl")&&")"===t[t.length-1],K=t=>Q(t)||J(t)||Z(t),tt=t=>!B.defaults.hasOwnProperty(t),et=["opacity","rotate","overflow","color"],st=(t,e)=>{if(et.includes(e))return!1;if(t.getAttribute(e)||e in t){if("scale"===e){const e=t.parentNode;return e&&"filter"===e.tagName}return!0}},it=t=>Y(t)?parseFloat(t):t,rt=Math.pow,nt=Math.sqrt,ot=Math.sin,at=Math.cos,lt=Math.abs,ht=Math.exp,dt=Math.ceil,ct=Math.floor,ut=Math.asin,pt=Math.max,mt=Math.atan2,ft=Math.PI,gt=Math.round,yt=(t,e,s)=>t<e?e:t>s?s:t,_t={},vt=(t,e)=>{if(e<0)return t;if(!e)return gt(t);let s=_t[e];return s||(s=_t[e]=10**e),gt(t*s)/s},bt=(t,e)=>X(e)?e.reduce((e,s)=>lt(s-t)<lt(e-t)?s:e):e?gt(t/e)*e:t,Tt=(t,e,s)=>t+(e-t)*s,xt=t=>t===1/0?m:t===-1/0?-m:t,St=t=>t<=p?p:xt(vt(t,11)),wt=t=>X(t)?[...t]:t,Et=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=q(r)?e[i]:r}return s},$t=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},Ct=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},Nt=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},kt=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[d];let o;for(;o=D.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!q(r)?r:V(e,"scale")?"1":V(e,"rotate")||V(e,"skew")?"0deg":"0px"},Rt=t=>{const e=w.exec(t)||E.exec(t),s=q(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},Dt=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]},It=(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),Ot=t=>{const e=$.exec(t)||C.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=q(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=vt(255*It(e,t,s+1/3),0),a=vt(255*It(e,t,s),0),l=vt(255*It(e,t,s-1/3),0)}return[o,a,l,n]},At=t=>J(t)?Rt(t):Q(t)?Dt(t):Z(t)?Ot(t):[0,0,0,1],Lt=(t,e)=>q(t)?e:t,Bt=(t,e,s,i,r)=>{let n;if(W(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!Y(t)||!V(t,_))return t;n=()=>{const s=t.match(O),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==y||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Pt=(t,e)=>t[l]?t[h]&&st(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:V(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Ft=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Mt=(t,e,s,r)=>{const n=q(s)?Pt(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?kt(t,e,r):n===i.CSS_VAR?Ft(t,e,r).trimStart():Ft(t,e,r)},Vt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,zt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Xt=(t,e)=>{if(e.t=r.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const i=!s.includes(" ")&&k.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(K(s))return e.t=r.COLOR,e.d=At(s),e;{const t=s.match(N);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split(N)||[],e}}return e.n=s,e},Ht=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=wt(t._toNumbers),e.s=wt(t._strings),e),Ut=zt(),Yt=(t,e,s,a,l)=>{const h=t.parent,c=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,_=t._loopDelay,v=t._reversed,b=t._alternate,x=t._hasChildren,S=t._delay,w=t._currentTime,E=S+m,$=e-S,C=yt(w,-S,c),N=yt($,-S,c),k=$-w,R=N>0,D=N>=c,I=c<=p,O=l===n.FORCE;let A=0,L=$,P=0;if(f>1){const e=~~(N/(m+(D?0:_)));t._currentIteration=yt(e,0,f),D&&t._currentIteration--,A=t._currentIteration%2,L=N%(m+_)||0}const F=v^(b&&A),M=t._ease;let V=D?F?0:c:F?m-L:L;M&&(V=m*M(V/m)||0);const z=(h?h.backwards:$<w)?!F:!!F;if(t._currentTime=$,t._iterationTime=V,t.backwards=z,R&&!t.began?(t.began=!0,s||h&&(z||!h.began)||t.onBegin(t)):$<=0&&(t.began=!1),s||x||!R||t._currentIteration===g||t.onLoop(t),O||l===n.AUTO&&(e>=S&&e<=E||e<=S&&C>S||e>=E&&C!==c)||V>=E&&C!==c||V<=S&&C>0||e<=C&&C===c&&u||D&&!u&&I){if(R&&(t.computeDeltaTime(C),s||t.onBeforeUpdate(t)),!x){const e=O||(z?-1*k:k)>=B.tickThreshold,n=t._offset+(h?h._offset:0)+S+V;let l,c,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,h=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,_=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==h||n<=g+(_?_._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=yt(V-m._startTime,0,h),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,y=m._tweenType,_=y===i.OBJECT,v=g===r.NUMBER,T=v&&_||0===s||1===s?-1:B.precision;let x,S;if(v)x=S=n(vt(Tt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)S=n(vt(Tt(m._fromNumber,m._toNumber,s),T)),x=`${S}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=vt(yt(n(Tt(t[0],e[0],s)),0,255),0),r=vt(yt(n(Tt(t[1],e[1],s)),0,255),0),o=vt(yt(n(Tt(t[2],e[2],s)),0,255),0),a=yt(n(vt(Tt(t[3],e[3],s),T)),0,1);if(x=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){x=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(vt(Tt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];x+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=S),a||t===o.blend)m._value=x;else{const t=m.property;l=m.target,_?l[t]=x:y===i.ATTRIBUTE?l.setAttribute(t,x):(c=l.style,y===i.TRANSFORM?(l!==u&&(u=l,p=l[d]),p[t]=x,f=1):y===i.CSS?c[t]=x:y===i.CSS_VAR&&c.setProperty(t,x)),R&&(P=1)}}if(f&&m._renderTransforms){let t=y;for(let e in p)t+=`${T[e]}${p[e]}) `;c.transform=t,f=0}m=m._next}!s&&P&&t.onRender(t)}!s&&R&&t.onUpdate(t)}return h&&I?!s&&(h.began&&!z&&$>0&&!u||z&&$<=p&&u)&&(t.onComplete(t),t.completed=!z):R&&D?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||x||(t.completed=!0,s||h&&(z||!h.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,P},Wt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Yt(t,e,s,i,r),t._hasChildren){const a=t,l=a.backwards,h=i?e:a._iterationTime,d=z();let c=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;$t(a,e=>{if(l){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Yt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}$t(a,t=>{const e=vt((h-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(d):r;c+=Yt(t,e,s,i,n),!t.completed&&u&&(u=!1)},l),!s&&c&&a.onRender(a),(u||l)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},qt={},jt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&G(e)&&t in e.style){const e=qt[t];if(e)return e;{const e=t?M(t):t;return qt[t]=e,e}}return t},Gt=t=>{if(t._hasChildren)$t(t,Gt,!0);else{const e=t;e.pause(),$t(e,t=>{const s=t.property,r=t.target;if(r[l]){const n=r.style,o=t._inlineValue,a=j(o)||o===y;if(t._tweenType===i.TRANSFORM){const e=r[d];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=y;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(M(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===y&&t.removeAttribute("style")})}})}return t};class Qt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=f/g,this._fps=g,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<p?p:s,r=f/i;i>A.frameRate&&(A.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return n.NONE;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Jt={animation:null,update:x},Zt=t=>{let e=Jt.animation;return e||(e={duration:p,computeDeltaTime:x,_offset:0,_delay:0,_head:null,_tail:null},Jt.animation=e,Jt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?wt(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Yt(e,1,1,0,n.FORCE)}),e},Kt=(()=>t?requestAnimationFrame:setImmediate)(),te=(()=>t?cancelAnimationFrame:clearImmediate)();class ee extends Qt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=A,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=z();if(this.requestTick(t)){this.computeDeltaTime(t);const e=this._speed,s=this._fps;let i=this._head;for(;i;){const r=i._next;i.paused?(Ct(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Wt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Jt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(z()),this.reqId=Kt(ie)),this}pause(){if(this.reqId)return this.paused=!0,re()}resume(){if(this.paused)return this.paused=!1,$t(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===B.timeScale?1:f)}set speed(t){this._speed=t*B.timeScale,$t(this,t=>t.speed=t._speed)}get timeUnit(){return 1===B.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(B.timeScale!==s){B.timeScale=s,B.tickThreshold=200*s;const t=e?.001:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return B.precision}set precision(t){B.precision=t}}const se=(()=>{const e=new ee(z());return t&&(F.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),ie=()=>{se._head?(se.reqId=Kt(ie),se.update()):se.reqId=0},re=()=>(te(se.reqId),se.reqId=0,se),ne={_rep:new WeakMap,_add:new Map},oe=(t,e,s="_rep")=>{const i=ne[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},ae=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,le=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},he=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;Nt(e,t,ae,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){le(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)le(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=vt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&le(i)}let o=!0;if($t(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;$t(t,t=>{t!==e&&$t(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=oe(t.target,t.property,"_add"),s=Zt(ne._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=wt(t._fromNumbers),i._number=0,i._next=null,i._prev=null,Nt(e,i),Nt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=wt(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=wt(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}Nt(e,t,null,"_prevAdd","_nextAdd")}return t},de=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=ne._rep.get(s)[i];if(Ct(r,t,"_prevRep","_nextRep"),e===o.blend){const e=ne._add,r=e.get(s);if(!r)return;const n=r[i],o=Jt.animation;Ct(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Ct(n,a,"_prevAdd","_nextAdd"),Ct(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ce=(t,e,s)=>{let r=!1;return $t(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,l=jt(s,o,a);(!l||l&&l===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Ct(e,n),de(n),r=!0)}},!0),r},ue=(t,e,s)=>{const i=e||se;let r;if(i._hasChildren){let e=0;$t(i,n=>{if(!n._hasChildren)if(r=ce(t,n,s),r&&!n._head)n.cancel(),Ct(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?ue(t,n,s):n._hasChildren=!1},!0),q(i.iterationDuration)||(i.iterationDuration=e)}else r=ce(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},pe=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),me=t=>t._cancelled?(t._hasChildren?$t(t,me):$t(t,t=>{t._composition!==o.none&&he(t,oe(t.target,t.property))}),t._cancelled=0,t):t;let fe=0;class ge extends Qt{constructor(t={},e=null,s=0){super(0),++fe;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:c,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:v}=t;L.current&&L.current.register(this);const b=e?0:se._lastTickTime,T=e?e.defaults:B.defaults,S=W(r)||q(r)?T.delay:+r,w=W(n)||q(n)?1/0:+n,E=Lt(l,T.loop),$=Lt(h,T.loopDelay);let C=!0===E||E===1/0||E<0?1/0:E+1;if(P){const s=C===1/0;if(P.register(this,t,s)&&s){const t=a?2:1,s=e?P.maxNestedInfiniteLoops:P.maxInfiniteLoops;C=Math.max(s,t)}}let N=0;e?N=s:(se.reqId||se.requestTick(z()),N=(se._lastTickTime-se._startTime)*B.timeScale),this.id=q(i)?fe:i,this.parent=e,this.duration=xt((w+$)*C-$)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||T.onBegin,this.onBeforeUpdate=_||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=w,this.iterationCount=C,this._autoplay=!e&&Lt(d,T.autoplay),this._offset=N,this._delay=S,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=x,this._running=!1,this._reversed=+Lt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Lt(a,T.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=Lt(c,T.frameRate),this._speed=Lt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return yt(vt(this._currentTime,B.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return yt(vt(this._iterationTime,B.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return yt(vt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return yt(vt(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(t){const e=this.iterationDuration;this.currentTime=e*this._currentIteration+e*t}get currentIteration(){return this._currentIteration}set currentIteration(t){this.currentTime=this.iterationDuration*yt(+t,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(t){t?this.reverse():this.play()}get speed(){return super.speed}set speed(t){super.speed=t,this.resetTime()}reset(t=!1){return me(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Wt(this,0,1,~~t,n.FORCE),pe(this),this._hasChildren&&$t(this,pe),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Wt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!q(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*se._speed);return this._startTime=z()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=p&&!this._hasChildren?Wt(this,p,0,0,n.FORCE):(this._running||(Nt(se,this),se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,se.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){me(this),this.completed=!1;const i=this.paused;return this.paused=!0,Wt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ct(m/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?$t(this,t=>t.cancel(),!0):$t(this,de),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=St(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:St(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Wt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).cancel()}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ye=t=>new ge(t,null,0).init();function _e(t){const e=Y(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function ve(e){if(j(e))return[];if(!t)return X(e)&&e.flat(1/0)||[e];if(X(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(i)){const t=_e(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!j(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=_e(e);return s?Array.from(s):[e]}function be(t){const e=ve(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=G(s);(s.nodeType||t)&&(s[l]=!0,s[h]=t,s[d]={})}}return e}const Te={deg:1,rad:180/ft,turn:360},xe={},Se=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const l=a+o+i,h=xe[l];if(q(h)||n){let r;if(o in Te)r=a*Te[o]/Te[i];else{const e=100,n=t.cloneNode(),l=t.parentNode,h=l&&l!==s?l:s.body;h.appendChild(n);const d=n.style;d.width=e+o;const c=n.offsetWidth||e;d.width=e+i;const u=c/(n.offsetWidth||e);h.removeChild(n),r=u*a}e.n=r,xe[l]=r}else e.n=h;return e.t,e.u=i,e},we=t=>t,Ee=(t=1.68)=>e=>rt(e,+t),$e={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},Ce=ft/2,Ne=2*ft,ke={[y]:Ee,Quad:Ee(2),Cubic:Ee(3),Quart:Ee(4),Quint:Ee(5),Sine:t=>1-at(t*Ce),Circ:t=>1-nt(1-t*t),Expo:t=>t?rt(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=rt(2,--s))-1)/11;);return 1/rt(4,3-s)-7.5625*rt((3*e-2)/22-t,2)},Back:(t=1.7)=>e=>(+t+1)*e*e*e-+t*e*e,Elastic:(t=1,e=.3)=>{const s=yt(+t,1,10),i=yt(+e,p,2),r=i/Ne*ut(1/s),n=Ne/i;return t=>0===t||1===t?t:-s*rt(2,-10*(1-t))*ot((1-t-r)*n)}},Re=(()=>{const t={linear:we,none:we};for(let e in $e)for(let s in ke){const i=ke[s],r=$e[e];t[e+s]=s===y||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),De={linear:we,none:we},Ie=t=>{if(De[t])return De[t];if(t.indexOf("(")<=-1){const e=$e[t]||t.includes("Back")||t.includes("Elastic")?Re[t]():Re[t];return e?De[t]=e:we}{const e=t.slice(0,-1).split("("),s=Re[e[0]];return s?De[t]=s(...e[1].split(",")):we}},Oe=["steps(","irregular(","linear(","cubicBezier("],Ae=t=>{if(Y(t))for(let e=0,s=Oe.length;e<s;e++)if(V(t,Oe[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),we;return W(t)?t:Y(t)?Ie(t):we},Le=zt(),Be=zt(),Pe={},Fe={func:null},Me={func:null},Ve=[null],ze=[null,null],Xe={to:null};let He,Ue,Ye=0,We=0;const qe=(t,e)=>{const s={};if(X(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(tt);for(let i=0,r=e.length;i<r;i++){const r=e[i],n=t.map(t=>{const e={};for(let s in t){const i=t[s];tt(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Lt(e.duration,B.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(tt(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s};class je extends ge{constructor(t,e,s,n,a=!1,l=0,h=0){super(e,s,n),++We;const d=be(t),c=d.length,u=e.keyframes,m=u?Et(qe(u,e),e):e,{id:g,delay:y,duration:_,ease:v,playbackEase:b,modifier:T,composition:x,onRender:S}=m,w=s?s.defaults:B.defaults,E=Lt(v,w.ease),$=Lt(b,w.playbackEase),C=$?Ae($):null,N=!q(E.ease),k=N?E.ease:Lt(v,C?"linear":w.ease),R=N?E.settlingDuration:Lt(_,w.duration),D=Lt(y,w.delay),I=T||w.modifier,O=q(x)&&c>=f?o.none:q(x)?w.composition:x,A=this._offset+(s?s._offset:0);N&&(E.parent=this);let L=NaN,P=NaN,F=0,M=0;for(let t=0;t<c;t++){const e=d[t],n=l||t,u=h||c;let f=NaN,g=NaN;for(let t in m)if(tt(t)){const l=Pt(e,t),h=jt(t,e,l);let d=m[t];const c=X(d);if(a&&!c&&(ze[0]=d,ze[1]=d,d=ze),c){const t=d.length,e=!H(d[0]);2===t&&e?(Xe.to=d,Ve[0]=Xe,He=Ve):t>2&&e?(He=[],d.forEach((t,e)=>{e?1===e?(ze[1]=t,He.push(ze)):He.push(t):ze[0]=t})):He=d}else Ve[0]=d,He=Ve;let y=null,_=null,v=NaN,b=0,T=0;for(let t=He.length;T<t;T++){const i=He[T];H(i)?Ue=i:(Xe.to=i,Ue=Xe),Fe.func=null,Me.func=null;const a=Bt(Ue.to,e,n,u,Fe);let d;H(a)&&!q(a.to)?(Ue=a,d=a.to):d=a;const c=Bt(Ue.from,e,n,u),m=Ue.ease||k,f=Bt(m,e,n,u),g=W(f)||Y(f)?f:m,x=!q(g)&&!q(g.ease),S=x?g.ease:g,w=x?g.settlingDuration:Bt(Lt(Ue.duration,t>1?Bt(R,e,n,u)/t:R),e,n,u),E=Bt(Lt(Ue.delay,T?0:D),e,n,u),$=Bt(Lt(Ue.composition,O),e,n,u),C=U($)?$:o[$],N=Ue.modifier||I,L=!q(c),B=!q(d),P=X(d),V=P||L&&B,z=_?b+E:E,G=vt(A+z,12);M||!L&&!P||(M=1);let Q=_;if(C!==o.none){y||(y=oe(e,h));let t=y._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=G;)if(Q=t,t=t._nextRep,t&&t._absoluteStartTime>=G)for(;t;)le(t),t=t._nextRep}if(V){Xt(P?Bt(d[0],e,n,u,Me):c,Le),Xt(P?Bt(d[1],e,n,u,Fe):d,Be);const t=Mt(e,h,l,Pe);Le.t===r.NUMBER&&(Q?Q._valueType===r.UNIT&&(Le.t=r.UNIT,Le.u=Q._unit):(Xt(t,Ut),Ut.t===r.UNIT&&(Le.t=r.UNIT,Le.u=Ut.u)))}else B?Xt(d,Be):_?Ht(_,Be):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Be),L?Xt(c,Le):_?Ht(_,Le):Xt(s&&Q&&Q.parent.parent===s?Q._value:Mt(e,h,l,Pe),Le);if(Le.o&&(Le.n=Vt(Q?Q._toNumber:Xt(Mt(e,h,l,Pe),Ut).n,Le.n,Le.o)),Be.o&&(Be.n=Vt(Le.n,Be.n,Be.o)),Le.t!==Be.t)if(Le.t===r.COMPLEX||Be.t===r.COMPLEX){const t=Le.t===r.COMPLEX?Le:Be,e=Le.t===r.COMPLEX?Be:Le;e.t=r.COMPLEX,e.s=wt(t.s),e.d=t.d.map(()=>e.n)}else if(Le.t===r.UNIT||Be.t===r.UNIT){const t=Le.t===r.UNIT?Le:Be,e=Le.t===r.UNIT?Be:Le;e.t=r.UNIT,e.u=t.u}else if(Le.t===r.COLOR||Be.t===r.COLOR){const t=Le.t===r.COLOR?Le:Be,e=Le.t===r.COLOR?Be:Le;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Le.u!==Be.u){let t=Be.u?Le:Be;t=Se(e,t,Be.u?Be.u:Le.u,!1)}if(Be.d&&Le.d&&Be.d.length!==Le.d.length){const t=Le.d.length>Be.d.length?Le:Be,e=t===Le?Be:Le;e.d=t.d.map((t,s)=>q(e.d[s])?0:e.d[s]),e.s=wt(t.s)}const J=vt(+w||p,12);let Z=Pe[h];j(Z)||(Pe[h]=null);const K={parent:this,id:Ye++,property:h,target:e,_value:null,_toFunc:Fe.func,_fromFunc:Me.func,_ease:Ae(S),_fromNumbers:wt(Le.d),_toNumbers:wt(Be.d),_strings:wt(Be.s),_fromNumber:Le.n,_toNumber:Be.n,_numbers:wt(Le.d),_number:Le.n,_unit:Be.u,_modifier:N,_currentTime:0,_startTime:z,_delay:+E,_updateDuration:J,_changeDuration:J,_absoluteStartTime:G,_tweenType:l,_valueType:Be.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&he(K,y),isNaN(v)&&(v=K._startTime),b=vt(z+J,12),_=K,F++,Nt(this,K)}(isNaN(P)||v<P)&&(P=v),(isNaN(L)||b>L)&&(L=b),l===i.TRANSFORM&&(f=F-T,g=F)}if(!isNaN(f)){let t=0;$t(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&$t(Jt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),P?($t(this,t=>{t._startTime-t._delay||(t._delay-=P),t._startTime-=P}),L-=P):P=0,L||(L=p,this.iterationCount=0),this.targets=d,this.id=q(g)?We:g,this.duration=L===p?p:xt((L+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=P,this.iterationDuration=L,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e;return $t(this,t=>{t._updateDuration=St(t._updateDuration*s),t._changeDuration=St(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return $t(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(Xt(s(),Le),Le.u!==t._unit&&t.target[l]&&Se(t.target,Le,t._unit,!0),t._fromNumbers=wt(Le.d),t._fromNumber=Le.n):e&&(Xt(Mt(t.target,t.property,t._tweenType),Ut),t._fromNumbers=wt(Ut.d),t._fromNumber=Ut.n),e&&(Xt(e(),Be),t._toNumbers=wt(Be.d),t._strings=wt(Be.s),t._toNumber=Be.o?Vt(t._fromNumber,Be.n,Be.o):Be.n))}),this.duration===p&&this.restart(),this}revert(){return super.revert(),Gt(this)}then(t){return super.then(t)}}const Ge=(t,e)=>new je(t,e,null,0,!1).init(),Qe={_head:null,_tail:null},Je=(t,e,s)=>{let i,r=Qe._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Ct(Qe,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.paused=!0,t.muteCallbacks||(t.onComplete(t),t._resolve(t))))}r=n}return i},Ze=(t,e,s,i,r)=>{const n=e.animate(i,r),o=r.delay+ +r.duration*r.iterations;n.playbackRate=t._speed,t.paused&&n.pause(),t.duration<o&&(t.duration=o,t.controlAnimation=n),t.animations.push(n),Je(e,s),Nt(Qe,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Je(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Ke(t,e,s){const i=be(t);if(!i.length)return;const[n]=i,o=Pt(n,e),a=jt(e,n,o);let l=Mt(n,a);if(q(s))return l;if(Xt(l,Ut),Ut.t===r.NUMBER||Ut.t===r.UNIT){if(!1===s)return Ut.n;{const t=Se(n,Ut,s,!1);return`${vt(t.n,B.precision)}${t.u}`}}}const ts=(t,e)=>{if(!q(e))return e.duration=p,e.composition=Lt(e.composition,o.none),new je(t,e,null,0,!0).resume()},es=(t,e,s)=>{const i=ve(t);for(let t=0,r=i.length;t<r;t++)Je(i[t],s,e&&e.controlAnimation&&e);return ue(i,e,s),i},ss=(t,e)=>{if(V(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},is=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),q(e))return s;if(U(+e))return+e;const i=e,r=t?t.labels:null,n=!j(r),o=ss(t,i),a=!q(o),l=I.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Vt(d,c,t[0])}return a?o:n?q(r[i])?s:r[i]:s};function rs(t){return xt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function ns(t,e,s,i,r,o){const a=U(t.duration)&&t.duration<=p?s-p:s;e.composition&&Wt(e,a,1,1,n.AUTO);const l=i?new je(i,t,e,a,!1,r,o):new ge(t,e,a);return e.composition&&l.init(!0),Nt(e,l),$t(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=rs(e),e}let os=0;class as extends ge{constructor(t={}){super(t,null,0),++os,this.id=q(t.id)?os:t.id,this.duration=0,this.labels={};const e=t.defaults,s=B.defaults;this.defaults=e?Et(e,s):s,this.composition=Lt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=Lt(t.playbackEase,s.playbackEase);this._ease=i?Ae(i):null,this.iterationDuration=0}add(t,e,s){const i=H(e),r=H(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(W(s)){const e=s,r=ve(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,q(a)||(s.id=a+"-"+l),ns(s,this,is(this,e(t,l,h,this)),t,l,h),l++})}else ns(i,this,is(this,s),t)}else ns(t,this,is(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(q(t)||t&&q(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return q(t)||q(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return q(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return q(t)||t&&!W(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return q(t)||t&&!Y(t)||(this.labels[t]=is(this,e)),this}remove(t,e){return ue(ve(t),this,e),this}stretch(t){const e=this.duration;if(e===St(t))return this;const s=t/e,i=this.labels;$t(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return $t(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),$t(this,t=>t.revert,!0),Gt(this)}then(t){return super.then(t)}}const ls=t=>new as(t).init();class hs{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},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!q(t)&&!q(e)){for(let t in e){const s=e[t];tt(t)?n[t]=s:V(t,"on")?r[t]=s:i[t]=s}this.callbacks=new je({v:0},r);for(let e in n){const s=n[e],r=H(s);let a={},l="+=0";if(r){const t=s.unit;Y(t)&&(l+=t)}else a.duration=s;a[e]=r?Et({to:l},s):l;const h=Et(i,a);h.composition=o.replace,h.autoplay=!1;const d=this.animations[e]=new je(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(q(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return $t(d,e=>{if(X(t))for(let s=0,i=t.length;s<i;s++)q(e._numbers[s])||(e._fromNumbers[s]=e._modifier(e._numbers[s]),e._toNumbers[s]=t[s]);else e._fromNumber=e._modifier(e._number),e._toNumber=t;q(s)||(e._ease=Ae(s)),e._currentTime=0}),q(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=x,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const ds=(t,e)=>new hs(t,e),cs=(t,e)=>(+t).toFixed(e),us=(t,e,s)=>`${t}`.padStart(e,s),ps=(t,e,s)=>`${t}`.padEnd(e,s),ms=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,fs=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),gs=t=>t*Math.PI/180,ys=t=>180*t/Math.PI,_s=(t,e,s,i)=>i?1===i?e:Tt(t,e,1-Math.exp(-i*s*.1)):t;var vs=Object.freeze({__proto__:null,clamp:yt,damp:_s,degToRad:gs,lerp:Tt,mapRange:fs,padEnd:ps,padStart:us,radToDeg:ys,round:vt,roundPad:cs,snap:bt,wrap:ms});const bs=10*f;class Ts{constructor(t={}){const e=!q(t.bounce)||!q(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=yt(Lt(t.bounce,.5),-1,1),this.pd=yt(Lt(t.duration,628),10*B.timeScale,bs*B.timeScale),this.m=yt(Lt(t.mass,1),1,bs),this.s=yt(Lt(t.stiffness,100),p,bs),this.d=yt(Lt(t.damping,10),p,bs),this.v=yt(Lt(t.velocity,0),-1e4,bs),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||x,e&&this.calculateSDFromBD(),this.compute(),this.ease=t=>{const e=t*this.settlingDuration,s=this.completed,i=this.pd;return e>=i&&!s&&(this.completed=!0,this.onComplete(this.parent)),e<i&&s&&(this.completed=!1),0===t||1===t?t:this.solve(t*this.solverDuration)}}solve(t){const{zeta:e,w0:s,wd:i,b:r}=this;let n=t;return n=e<1?ht(-n*e*s)*(1*at(i*n)+r*ot(i*n)):1===e?(1+r*n)*ht(-n*s):((1+r)*ht((-e*s+i)*n)+(1-r)*ht((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===B.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=rt(2*ft/t,2),this.bn>=0?this.d=4*(1-this.bn)*ft/t:this.d=4*ft/(t*(1+this.bn)),this.s=vt(yt(this.s,p,bs),3),this.d=vt(yt(this.d,p,300),3)}calculateBDFromSD(){const t=2*ft/nt(this.s);this.pd=t*(1===B.timeScale?f:1);const e=this.d/(2*nt(this.s));this.bn=e<=1?1-this.d*t/(4*ft):4*ft/(this.d*t)-1,this.bn=vt(yt(this.bn,-1,1),3),this.pd=vt(yt(this.pd,10*B.timeScale,bs*B.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=yt(nt(o/r),p,f),h=this.zeta=n/(2*nt(o*r));h<1?(this.wd=l*nt(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*nt(h*h-1),this.b=(h*l-a)/this.wd);let d=0,c=0,u=0;for(;c<=t&&u<=e;)lt(1-this.solve(d))<s?c++:c=0,this.solverDuration=d,d+=i,u++;this.settlingDuration=vt(this.solverDuration*f,0)*B.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=yt(Lt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=yt(Lt(t,1),10*B.timeScale,bs*B.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=yt(Lt(t,100),p,bs),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=yt(Lt(t,10),p,bs),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=yt(Lt(t,1),1,bs),this.compute()}get velocity(){return this.v}set velocity(t){this.v=yt(Lt(t,0),-1e4,bs),this.compute()}}const xs=t=>new Ts(t),Ss=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Ts(t)),ws=t=>{t.cancelable&&t.preventDefault()};class Es{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:x,remove:x}}get x(){return this.el.x||0}set x(t){this.el.x=t}get y(){return this.el.y||0}set y(t){this.el.y=t}get width(){return this.el.width||0}set width(t){this.el.width=t}get height(){return this.el.height||0}set height(t){this.el.height=t}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class $s{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const Cs=(t,e)=>t&&W(t)?t(e):t;let Ns=0;class ks{constructor(t,i={}){if(!t)return;L.current&&L.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,l=i.releaseEase,h=l&&Ae(l),d=!q(l)&&!q(l.ease),c=H(r)&&!q(r.mapTo)?r.mapTo:"translateX",u=H(n)&&!q(n.mapTo)?n.mapTo:"translateY",p=Cs(i.container,this);this.containerArray=X(p)?p:null,this.$container=p&&!this.containerArray?ve(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=H(t)?new Es(t):ve(t)[0],this.$trigger=ve(o||t)[0],this.fixed="fixed"===Ke(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?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseYSpring=d?l:xs({mass:Lt(i.releaseMass,1),stiffness:Lt(i.releaseStiffness,80),damping:Lt(i.releaseDamping,20)}),this.releaseEase=h||Re.outQuint,this.hasReleaseSpring=d,this.onGrab=i.onGrab||x,this.onDrag=i.onDrag||x,this.onRelease=i.onRelease||x,this.onUpdate=i.onUpdate||x,this.onSettle=i.onSettle||x,this.onSnap=i.onSnap||x,this.onResize=i.onResize||x,this.onAfterResize=i.onAfterResize||x,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),q(r)||!0===r)f[c]=0;else if(H(r)){const t=r,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[c]=e}else!1===r&&(f[c]=0,this.disabled[0]=1);if(q(n)||!0===n)f[u]=0;else if(H(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new hs(this.$target,f),this.xProp=c,this.yProp=u,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-m,m,m,-m],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=z(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new $s(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ge({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ge({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!q(p),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?c:u,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=mt(n,r)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ge({autoplay:!1,duration:150*B.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),H(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=z(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=vt(yt(nt(t*t+e*e)/r*o,a,l),5);const d=pt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=bt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=vt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=bt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return vt(this.animate[this.xProp](),B.precision)}set x(t){this.setX(t,!1)}get y(){return vt(this.animate[this.yProp](),B.precision)}set y(t){this.setY(t,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(fs(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(fs(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=vt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=vt(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=s-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=e.innerWidth,l=this.window[1]=e.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?yt(d,a,d):d,this.scrollView[1]=h?yt(c,l,c):c,this.updateScrollCoords();const{width:_,height:v,left:b,top:T,right:x,bottom:S}=t.getBoundingClientRect();this.dragArea[2]=vt(h?yt(_,a,a):_,0),this.dragArea[3]=vt(h?yt(v,l,l):v,0);const w=Ke(t,"overflow"),E="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&E||!$&&!E)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!X(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-_:0,c=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=vt(r.top+s-(h?0:T),0),this.targetBounds[1]=vt(r.right+e-(h?a:x),0),this.targetBounds[2]=vt(r.bottom+s-(h?l:S),0),this.targetBounds[3]=vt(r.left+e-(h?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]=-vt(r.top-(u?yt(T,0,l):T)+o-m,0),this.containerBounds[1]=-vt(r.right-(u?yt(x,0,a):x)-d+f,0),this.containerBounds[2]=-vt(r.bottom-(u?yt(S,0,l):S)-c+g,0),this.containerBounds[3]=-vt(r.left-(u?yt(b,0,a):b)+n-y,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Cs(t.container,this),o=Cs(t.containerPadding,this)||0,a=X(o)?o:[o,o,o,o],l=this.x,h=this.y,d=Cs(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=Cs(t.dragThreshold,this),p={mouse:3,touch:7};if(U(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;q(t)||(p.mouse=t),q(e)||(p.touch=e)}this.containerArray=X(n)?n:null,this.$container=n&&!this.containerArray?ve(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Lt(a,[0,0,0,0]),this.containerFriction=yt(Lt(Cs(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=yt(Lt(Cs(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Cs(H(i)&&!q(i.snap)?i.snap:t.snap,this),this.snapY=Cs(H(r)&&!q(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Lt(Cs(t.scrollSpeed,this),1.5),this.scrollThreshold=Lt(Cs(t.scrollThreshold,this),20),this.dragSpeed=Lt(Cs(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Lt(Cs(t.minVelocity,this),0),this.maxVelocity=Lt(Cs(t.maxVelocity,this),50),this.velocityMultiplier=Lt(Cs(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(yt(l,y,f),!0),this.setY(yt(h,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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?yt(d,this.window[0],d):d,p=this.useWin?yt(c,this.window[1],c):c,m=r-u,f=n-p;this.dragged&&m>0&&(this.coords[0]-=m,this.scrollView[0]=u),this.dragged&&f>0&&(this.coords[1]-=f,this.scrollView[1]=p);const g=10*this.scrollSpeed,y=this.scrollThreshold,[_,v]=this.coords,[b,T,x,S]=this.scrollBounds,w=vt(yt((v-b+t)/y,-1,0)*g,0),E=vt(yt((_-T-e)/y,0,1)*g,0),$=vt(yt((v-x-s)/y,0,1)*g,0),C=vt(yt((_-S+i)/y,-1,0)*g,0);if(w||$||C||E){const[t,e]=this.disabled;let s=l,i=h;t||(s=vt(yt(l+(C||E),0,r-o),0),this.coords[0]-=l-s),e||(i=vt(yt(h+(w||$),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*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-l,n-h),this.angle=mt(n-a,r-o);const[f,g]=this.snapped;(f!==u&&this.snapX||g!==p&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let t in this.animate.animations)this.animate.animations[t].pause();return ue([this],null,"x"),ue([this],null,"y"),ue([this],null,"progressX"),ue([this],null,"progressY"),ue([this.scroll]),ue([this.overshootCoords]),this}scrollInView(t,e=0,s=Re.inOutQuad){this.updateScrollCoords();const i=this.destX,r=this.destY,n=this.scroll,o=this.scrollBounds,a=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,i,r)){const[l,h,d,c]=o,u=vt(yt(r-l,-m,0),0),p=vt(yt(i-h,0,m),0),f=vt(yt(r-d,0,m),0),g=vt(yt(i-c,-m,0),0);new je(n,{x:vt(n.x+(g?g-e:p?p+e:0),0),y:vt(n.y+(u?u-e:f?f+e:0),0),duration:q(t)?350*B.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=ts(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=Re.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=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]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=yt(bt(i,this.snapX),u,d),a=yt(bt(r,this.snapY),h,c),l=q(t)?350*B.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Ke(this.$target,"zIndex",!1);Ns=(f>Ns?f:Ns)+1,this.targetStyles=ts(this.$target,{zIndex:Ns}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=ts(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Re.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Ke(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&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):(ws(t),this.triggerStyles||(this.triggerStyles=ts(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",ws,{passive:!1}),this.$trigger.addEventListener("touchmove",ws,{passive:!1}),this.$trigger.addEventListener("touchend",ws),(this.dragged||!this.disabled[0]&<(o)>this.dragThreshold||!this.disabled[1]&<(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[i,r,n,a,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,S=this.computeVelocity(i-l,r-h),w=this.angle=mt(r-a,i-n),E=150*S,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+at(w)*E,N=x+ot(w)*E,k=C>c?c+(C-c)*$:C<p?p+(C-p)*$:C,R=N>u?u+(N-u)*$:N<d?d+(N-d)*$:N,D=this.destX=yt(vt(bt(k,this.snapX),5),p,c),I=this.destY=yt(vt(bt(R,this.snapY),5),d,u),O=this.isOutOfBounds(this.containerBounds,C,N);let A=0,L=0,P=_,F=_,M=0;if(b.x=T,b.y=x,!t){const t=D===c?T>c?-1:1:T<p?-1:1,s=vt(T-D,0);g.velocity=e&&v?s?E*t/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=g;A=T===D?0:v?r:r-n*B.timeScale,v&&(P=i),A>M&&(M=A)}if(!e){const e=I===u?x>u?-1:1:x<d?-1:1,s=vt(x-I,0);y.velocity=t&&v?s?E*e/lt(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=y;L=x===I?0:v?r:r-n*B.timeScale,v&&(F=i),L>M&&(M=L)}if(!v&&O&&$&&(A||L)){const t=o.blend;new je(b,{x:{to:k,duration:.65*A},y:{to:R,duration:.65*L},ease:_,composition:t}).init(),new je(b,{x:{to:D,duration:A},y:{to:I,duration:L},ease:_,composition:t}).init(),this.overshootTicker.stretch(pt(A,L)).restart()}else t||this.animate[this.xProp](D,A,P),e||this.animate[this.yProp](I,L,F);this.scrollInView(M,this.scrollThreshold,_);let V=!1;D!==m&&(this.snapped[0]=D,this.snapX&&(V=!0)),I!==f&&this.snapY&&(this.snapped[1]=I,this.snapY&&(V=!0)),V&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",ws),this.$trigger.removeEventListener("touchmove",ws),this.$trigger.removeEventListener("touchend",ws),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=ts(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":ws(t)}}}const Rs=(t,e)=>new ks(t,e),Ds=(t=x)=>new ge({duration:1*B.timeScale,onComplete:t},null,0).resume(),Is=t=>{let e;return(...s)=>{let i,r,n,o;e&&(i=e.currentIteration,r=e.iterationProgress,n=e.reversed,o=e._alternate,e.revert());const a=t(...s);return a&&!W(a)&&a.revert&&(e=a),q(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||x}};class Os{constructor(t={}){L.current&&L.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||ve(i)[0]||s);const n=t.defaults,o=B.defaults,a=t.mediaQueries;if(this.defaults=n?Et(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=L.current,s=L.root,i=B.defaults;L.current=this,L.root=this.root,B.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return L.current=e,L.root=s,B.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);W(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,W(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);W(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,W(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);W(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(W(s))return s(this);const i=Is(t);let r;return this.constructorsOnce[e]=i,this.execute(()=>{r=i(this)}),r}handleEvent(t){"change"===t.type&&this.refresh()}revert(){const t=this.revertibles,e=this.revertConstructors,s=this.revertiblesOnce,i=this.revertConstructorsOnce,r=this.mediaQueryLists;let n=t.length,o=e.length,a=s.length,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const As=t=>new Os(t),Ls=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Bs=(t,e)=>t&&W(t)?t(e):t,Ps=new Map;class Fs{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ge({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;$t(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ge({autoplay:!1,frameRate:30,onUpdate:t=>{const e=t.deltaTime,s=this.prevScrollX,i=this.prevScrollY,r=this.scrollX,n=this.scrollY,o=s-r,a=i-n;this.prevScrollX=r,this.prevScrollY=n,o&&(this.backwardX=s>r),a&&(this.backwardY=i>n),this.velocity=vt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ge({autoplay:!1,duration:250*B.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ge({autoplay:!1,duration:500*B.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=vt(t?e.scrollX:s.scrollLeft,0),this.scrollY=vt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Ls()}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(){$t(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),$t(this,t=>{t.refresh(),t.onResize(t),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Ps.delete(this.element)}}const Ms=t=>{const e=t&&ve(t)[0]||s.body;let i=Ps.get(e);return i||(i=new Fs(e),Ps.set(e,i)),i},Vs=(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:l,u:h}=Xt(a,Ut);let d=l;return"%"===h?d=l/100*s:h&&(d=Se(t,Ut,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},zs=(t,e,s,i,r)=>{let n;if(Y(e)){const o=I.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=Vs(t,h[0],s,i,r),p=Vs(t,h[1],s,i,r);if(d){const e=Vt(Vs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Vt(Vs(t,"max",s),p,l);n=e>u?u:e}else n=Vt(u,p,l)}else n=Vs(t,e,s,i,r)}else n=e;return vt(n,0)},Xs=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[l]){e=i;break}}return e};let Hs=0;const Us=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Ys{constructor(t={}){L.current&&L.current.register(this);const e=Lt(t.sync,"play pause"),i=e?Ae(e):null,r=e&&("linear"===e||e===we),n=e&&!(i===we&&!r),o=e&&(U(e)||!0===e||r),a=e&&Y(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=Hs++,this.id=q(t.id)?this.index:t.id,this.container=Ms(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!l,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:x,this.onSyncLeave=l&&!h&&l[1]?l[1]:x,this.onSyncEnterForward=l&&h&&l[0]?l[0]:x,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:x,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:x,this.onSyncLeaveBackward=l&&h&&l[3]?l[3]:x,this.onEnter=t.onEnter||x,this.onLeave=t.onLeave||x,this.onEnterForward=t.onEnterForward||x,this.onLeaveForward=t.onLeaveForward||x,this.onEnterBackward=t.onEnterBackward||x,this.onLeaveBackward=t.onLeaveBackward||x,this.onUpdate=t.onUpdate||x,this.onResize=t.onResize||x,this.onSyncComplete=t.onSyncComplete||x,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Lt(t.debug,!1),this._next=null,this._prev=null,Nt(this.container,this),Ds(()=>{if(!this.reverted){if(!this.target){const e=ve(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,q(t)||q(t.persist)||(t.persist=!0),!this._params.target)){let e;q(t.targets)?$t(t,t=>{t.targets&&!e&&(e=Xs(t))}):e=Xs(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:vt(yt(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Lt(Bs(t.repeat,this),!0),this.horizontal="x"===Lt(Bs(t.axis,this),"y"),this.enter=Lt(Bs(t.enter,this),"end start"),this.leave=Lt(Bs(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),a=Us[this.index%Us.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?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,_=e?60:g,v=e?_: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)`,S=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${S("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=`${S("sticky",0,0,e?h:g,e?g:d)}`,i||(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=`${S("relative",0,0,e?c:g,e?g:u)}`,i||(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 w=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,l=(r?0:this.offset)+t,m=i%2,f=l<v,g=l>(r?e?h:d:e?c:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),x=s.createElement("div"),E=e?b?"right":"left":b?"bottom":"top",$=b?(e?_:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${w[m]}${this.thresholds[i]}`,T.style.cssText=`${S("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-${E}: 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 C=l-$+(e?1:0);T.style[e?"left":"top"]=`${C}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Ke(t.element,"position")&&(this.debugStyles=ts(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0));a&&a!==i.element&&a!==s.body;){const e="sticky"===Ke(a,"position")&&ts(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=i.scale,d=(r?l.left+i.scrollX-i.left:l.top+i.scrollY-i.top)*h,c=(r?l.width:l.height)*h,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(Y(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(H(m)){const t=m;q(t.container)||(_=t.container),q(t.target)||(g=t.target)}else U(m)&&(_=m);if(Y(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(H(f)){const t=f;q(t.container)||(v=t.container),q(t.target)||(y=t.target)}else U(f)&&(v=f);const b=zs(e,g,c),T=zs(e,y,c),x=b+d-u,S=T+d-p,w=zs(e,_,u,x,S),E=zs(e,v,u,x,S),$=b+d-w,C=T+d-E,N=C-$;this.offset=d,this.offsetStart=$,this.offsetEnd=C,this.distance=N<=0?0:N,this.thresholds=[g,y,_,v],this.coords=[b,T,w,E],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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,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(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&U(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=vt(Tt(e,g,Tt(.01,.2,i))+s,6)}}else s&&(g=s(g));m=g!==this.prevProgress,f=1===e,m&&!f&&i&&e&&o.wakeTicker.restart()}if(p){const t=n?o.scrollY:o.scrollX;p.style[n?"top":"left"]=t+10+"px"}(d&&!this.isInView||u&&!this.forceEnter&&!this.hasEntered)&&(d&&(this.isInView=!0),this.forceEnter&&this.hasEntered?d&&(this.forceEnter=!1):(p&&d&&(p.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,u&&(this.forceEnter=!0))),(d||!d&&this.isInView)&&(m=!0),m&&(r&&t.seek(t.duration*g),this.onUpdate(this)),!d&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),e&&!i&&(f=!0)),g>=1&&this.began&&!this.completed&&(e&&f||!e)&&(e&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!t||!this.repeat&&t&&t.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const t=this.container;return Ct(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const Ws=(t={})=>new Ys(t),qs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,js=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=qs(r,e,s)-t,i>0?o=r:n=r}while(lt(i)>1e-7&&++a<100);return r},Gs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?we:r=>0===r||1===r?r:qs(js(r,t,s),e,i),Qs=(t=10,e)=>{const s=e?dt:ct;return e=>s(yt(e,0,1)*t)*(1/t)},Js=(...t)=>{const e=t.length;if(!e)return we;const s=e-1,i=t[0],r=t[s],n=[0],o=[it(i)];for(let e=1;e<s;e++){const i=t[e],r=Y(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(q(l)?e/s:it(l)/100),o.push(it(a))}return o.push(it(r)),n.push(1),function(t){for(let e=1,s=n.length;e<s;e++){const s=n[e];if(t<=s){const i=n[e-1],r=o[e-1];return r+(o[e]-r)*(t-i)/(s-i)}}return o[o.length-1]}},Zs=(t=10,e=1)=>{const s=[0],i=t-1;for(let t=1;t<i;t++){const r=s[t-1],n=t/i,o=n*(1-e)+(n+((t+1)/i-n)*Math.random())*e;s.push(yt(o,r,1))}return s.push(1),Js(...s)};var Ks=Object.freeze({__proto__:null,Spring:Ts,createSpring:Ss,cubicBezier:Gs,eases:Re,irregular:Zs,linear:Js,spring:xs,steps:Qs});const ti=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(vt(t(i/e),4));return`linear(${s.join(", ")})`},ei={},si=t=>{let e=ei[t];if(e)return e;if(e="linear",Y(t)){if(V(t,"linear")||V(t,"cubic-")||V(t,"steps")||V(t,"ease"))e=t;else if(V(t,"cubicB"))e=M(t);else{const s=Ie(t);W(s)&&(e=s===we?"linear":ti(s))}ei[t]=e}else if(W(t)){const s=ti(t);s&&(e=s)}else t.ease&&(e=ti(t.ease));return e},ii=["x","y","z"],ri=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...ii],ni=(()=>[...ii,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let oi=null;const ai=(t,e,s,i,r)=>{let n=Y(e)?e:Bt(e,s,i,r);return U(n)?ri.includes(t)||V(t,"translate")?`${n}px`:V(t,"rotate")||V(t,"skew")?`${n}deg`:`${n}`:n},li=(t,e,s,i,r,n)=>{let o="0";const a=q(i)?getComputedStyle(t)[e]:ai(e,i,t,r,n);return o=q(s)?X(i)?i.map(s=>ai(e,s,t,r,n)):a:[ai(e,s,t,r,n),a],o};class hi{constructor(e,s){L.current&&L.current.register(this),j(oi)&&(!t||!q(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=V(t,"skew"),s=V(t,"scale"),i=V(t,"rotate"),r=V(t,"translate"),n=i||e,o=n?"<angle>":s?"<number>":r?"<length-percentage>":"*";try{CSS.registerProperty({name:"--"+t,syntax:o,inherits:!1,initialValue:r?"0px":n?"0deg":s?"1":"0"})}catch{}}),oi=!0):oi=!1);const i=be(e),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Lt(s.autoplay,B.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,l=s.reversed&&!0===s.reversed,h=Lt(s.loop,B.defaults.loop),c=!0===h||h===1/0?1/0:U(h)?h+1:1,u=a?l?"alternate-reverse":"alternate":l?"reverse":"normal",p=1===B.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||B.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!n||!1!==o,this.reversed=l,this.persist=Lt(s.persist,B.defaults.persist),this.autoplay=n,this._speed=Lt(s.playbackRate,B.defaults.playbackRate),this._resolve=x,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[d],n=ni.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},l=Lt(s.ease,B.defaults.ease),h=Bt(l,t,e,r),m=W(h)||Y(h)?h:l,f=l.ease&&l,g=si(m),_=(f?f.settlingDuration:Bt(Lt(s.duration,B.defaults.duration),t,e,r))*p,x=Bt(Lt(s.delay,B.defaults.delay),t,e,r)*p,S=Lt(s.composition,"replace");for(let l in s){if(!tt(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:g,duration:_,delay:x,composite:S},m=s[l],f=!!n&&(b.includes(l)?l:v.get(l)),y=f?"transform":l;let T;if(a[y]||(a[y]=o[y]),H(m)){const s=m,n=Lt(s.ease,g),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Bt(Lt(s.duration,_),t,e,r))*p,d.delay=Bt(Lt(s.delay,x),t,e,r)*p,d.composite=Lt(s.composition,S),d.easing=si(n),T=li(t,l,u,c,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=li(t,l,u,c,e,r),Ze(this,t,l,h,d),!q(u))if(f){const t=`--${f}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else T=X(m)?m.map(s=>ai(l,s,t,e,r)):ai(l,m,t,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=T,Ze(this,t,l,h,d)}if(n){let t=y;for(let e in i)t+=`${T[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=Y(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=B.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===B.timeScale?1:f);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];q(r)||r===y?s.removeProperty(M(e)):t.style[e]=r}t.getAttribute("style")===y&&t.removeAttribute("style")}),this}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const di={animate:(t,e)=>new hi(t,e),convertEase:ti};let ci=0,ui=0;const pi=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),mi=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},fi=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},gi=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,mi(s)),i&&!e.has(i)&&e.set(i,mi(i))},yi=t=>{t.forEach((t,e)=>fi(e,t)),t.clear()},_i={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},vi=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)},bi=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+ui++);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.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!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},Ti=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=pi(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;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=mi(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=mi(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,_=0,v=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();_=t.left,v=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);q(e)||(a[t]=e)}if(a.left=_,a.top=v,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=_,y=v):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=_-s-r,y=v-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=_-t-l.properties.clientLeft,y=v-e-l.properties.clientTop}else g=_-s-r,y=v-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},xi=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Si=(t,e)=>{const s=Bt(e.ease,t.$el,t.index,t.total),i=W(s)?s:e.ease,r=!q(i)&&!q(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Bt(e.duration,t.$el,t.index,t.total),t.delay=Bt(e.delay,t.$el,t.index,t.total)},wi=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},Ei=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))}},$i=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&&(fi(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(fi(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Ci=t=>{(t.measuredIsRemoved||t.hasVisibilitySwap)&&(t.$el.style.removeProperty("display"),t.$el.style.removeProperty("visibility"),t.hasVisibilitySwap&&(t.$measure.style.removeProperty("display"),t.$measure.style.removeProperty("visibility"))),t.layout.pendingRemoval.delete(t.$el)},Ni=(t,e,s)=>(e.properties={...t.properties},e.state=s,e.isTarget=t.isTarget,e.hasTransform=t.hasTransform,e.inlineTransforms=t.inlineTransforms,e.measuredIsVisible=t.measuredIsVisible,e.measuredDisplay=t.measuredDisplay,e.measuredIsRemoved=t.measuredIsRemoved,e.measuredHasDisplayNone=t.measuredHasDisplayNone,e.measuredHasVisibilityHidden=t.measuredHasVisibilityHidden,e.hasDisplayNone=t.hasDisplayNone,e.isInlined=t.isInlined,e.hasVisibilityHidden=t.hasVisibilityHidden,e);class ki{constructor(t){this.layout=t,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(t=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}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,mi(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||G(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?_i:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=pi(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=pi(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ti(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}}vi(u),u=bi(e,t,this,u)}else u=bi(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!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),Ti(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 t=this.layout,e=t.children,s=t.root,i=X(e)?e:[e],r=[],n="*"===e?s:L.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=mi(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=Y(e)?n.querySelectorAll(e):e}const l=be(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!pi(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode($i);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),fi(e,i)}return this}}function Ri(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class Di{constructor(t,e={}){L.current&&L.current.register(this);const s=Ri(e.swapAt),i=Ri(e.enterFrom),r=Ri(e.leaveTo),n=e.properties;if(e.duration=Lt(e.duration,350),e.delay=Lt(e.delay,0),e.ease=Lt(e.ease,"inOut(3.5)"),this.params=e,this.root=be(t)[0],this.id=ci++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=Et(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])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.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new ki(this),this.newState=new ki(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),yi(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>yi(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(Ei),this}animate(t={}){const e={ease:Lt(t.ease,this.params.ease),delay:Lt(t.delay,this.params.delay),duration:Lt(t.duration,this.params.duration)},s={},i=Lt(t.onComplete,this.params.onComplete),r=Lt(t.onPause,this.params.onPause);for(let e in A)"ease"!==e&&"duration"!==e&&"delay"!==e&&(q(t[e])?q(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Ci(t),Ei(t)});for(let t=0,e=S.length;t<e;t++){const e=S[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||yi(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Ci),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=Et(Et(t.swapAt||{},this.swapAtParams),e),o=Et(Et(t.enterFrom||{},this.enterFromParams),e),a=Et(Et(t.leaveTo||{},this.leaveToParams),e),[l,h]=Ri(n),[d,c]=Ri(o),[u,p]=Ri(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,_=this.entering,v=this.leaving,b=this.pendingRemoval;g.length=y.length=_.length=v.length=0,m.forEachRootNode(gi),f.record(),f.forEachRootNode(wi);const T=[],x=[],S=[],w=[],E=f.rootNode,$=E.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Ni(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Ni(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const S=b.has(e),w=a.measuredIsVisible,$=t.measuredIsVisible,C=!w&&$&&!o,N=!x&&(y||S)&&!r,k=x&&!y&&!n,R=k||x&&S&&!n;t.branchAdded=r||N,t.branchRemoved=n||R,t.branchNotRendered=o||x,x&&w&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Ni(a,t,f)),k?(t.isTarget&&(v.push(e),t.isLeaving=!0),b.add(e)):!x&&S&&b.delete(e),N&&!o||C?(xi(a,d),t.isTarget&&(_.push(e),t.isEntering=!0)):R&&!o&&xi(t,u),t===E||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,N=0,k=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==E&&i;for(;a&&!a.isTarget&&a!==E;)a=a.parentNode;const d=g.length;t===E?(t.index=0,t.total=d,Si(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:_.length,Si(t,c),C++):t.isLeaving?(t.index=a?a.index:N,t.total=a?d:v.length,N++,Si(t,p)):t.isTarget?(t.index=k++,t.total=d,Si(t,e)):(t.index=a?a.index:0,t.total=d,Si(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Bt(n[e],s,t.index,t.total),o[e]=Bt(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){t.isInlined||"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,S.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(!t.isInlined&&l.transform&&(t.hasTransform=!0,S.push(s)),w.push(s)))});const R={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=R,this.timeline=ls(s),!x.length&&!S.length&&!y.length)return yi(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==$||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===$&&"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")}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};r.isInlined||(n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e);if(!s.isInlined){const t=s.properties;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]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;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]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(w.length){const t=Ae(f.nodes.get(w[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(w,s,0)}}const D=S.length;if(D){for(let t=0;t<D;t++){const e=S[t];if(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`,e.style.transform=m.getComputedValue(e,"transform"),w.includes(e)){const t=f.getNode(e);t.ease=Bt(n.ease,e,t.index,t.total),t.duration=Bt(n.duration,e,t.index,t.total)}}this.transformAnimation=di.animate(S,{translate:t=>`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!w.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Bt(l.transform,t,i.index,i.total),e]},autoplay:!1,persist:!0,...R}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const Ii=(t,e)=>new Di(t,e),Oi=vs,Ai={},Li=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Bi=t=>(...e)=>{const s=t(...e);return new Proxy(x,{apply:(t,e,[i])=>s(i),get:(t,e)=>Bi((...t)=>{const i=Ai[e](...t);return t=>i(s(t))})})},Pi=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Bi(Li(e,s)):e)(...t);return Ai[t]||(Ai[t]=i),i},Fi=Pi("roundPad",Oi.roundPad),Mi=Pi("padStart",Oi.padStart),Vi=Pi("padEnd",Oi.padEnd),zi=Pi("wrap",Oi.wrap),Xi=Pi("mapRange",Oi.mapRange),Hi=Pi("degToRad",Oi.degToRad),Ui=Pi("radToDeg",Oi.radToDeg),Yi=Pi("snap",Oi.snap),Wi=Pi("clamp",Oi.clamp),qi=Pi("round",Oi.round),ji=Pi("lerp",Oi.lerp,1),Gi=Pi("damp",Oi.damp,1),Qi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Ji=0;const Zi=(t,e=0,s=1,i=0)=>{let r=void 0===t?Ji++: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}},Ki=t=>t[Qi(0,t.length-1)],tr=t=>{let e,s,i=t.length;for(;i;)s=Qi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},er=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!q(o),l=a&&!q(o.ease)?o.ease:a?Ae(o):null,h=e.grid,d=e.axis,c=e.total,u=q(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=X(t),_=e.use,v=it(g?t[0]:t),b=g?it(t[1]):0,T=k.exec((g?t[1]:t)+y),x=e.start||0+(g?v:0);let S=u?0:U(r)?r:0;return(t,r,o,a)=>{const[u]=be(t),y=q(c)?o:c,w=!q(_)&&(W(_)?_(u,r,y):Mt(u,_)),E=U(w)||Y(w)&&U(+w)?+w:r;if(p&&(S=(y-1)/2),m&&(S=y-1),!s.length){for(let t=0;t<y;t++){if(h){const e=p?(h[0]-1)/2:S%h[0],i=p?(h[1]-1)/2:ct(S/h[0]),r=e-t%h[0],n=i-ct(t/h[0]);let o=nt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(lt(S-t));i=pt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:lt(i-t))),f&&(s=tr(s))}const $=g?(b-v)/i:v;let C=(a?is(a,q(e.start)?a.iterationDuration:x):x)+($*vt(s[E],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var sr=Object.freeze({__proto__:null,$:be,clamp:Wi,cleanInlineStyles:Gt,createSeededRandom:Zi,damp:Gi,degToRad:Hi,get:Ke,keepTime:Is,lerp:ji,mapRange:Xi,padEnd:Vi,padStart:Mi,radToDeg:Ui,random:Qi,randomPick:Ki,remove:es,round:qi,roundPad:Fi,set:ts,shuffle:tr,snap:Yi,stagger:er,sync:Ds,wrap:zi});const ir=t=>{const e=ve(t)[0];return e&&G(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},rr=(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)},nr=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[h],o=t.getCTM(),a=0===s;return{from:0,to:r,modifier:i=>{const l=i+s*r;if("a"===e){const e=rr(t,r,l,-1,a),s=rr(t,r,l,1,a);return 180*mt(s.y-e.y,s.x-e.x)/ft}{const s=rr(t,r,l,0,a);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},or=(t,e=0)=>{const s=ir(t);if(s)return{translateX:nr(s,"x",e),translateY:nr(s,"y",e),rotate:nr(s,"a",e)}},ar=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(nt(s.a*s.a+s.b*s.b)+nt(s.c*s.c+s.d*s.d))/2)}return e},lr=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const l=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=ar(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"butt":n;a!==e&&(t.style.strokeLinecap=`${e}`,a=e)}t.setAttribute("stroke-dashoffset",`${d}`),t.setAttribute("stroke-dasharray",`${c} ${u}`)}return Reflect.apply(s,t,e)}:W(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l},hr=(t,e=0,s=0)=>ve(t).map(t=>lr(t,e,s)),dr=(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=ir(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[c];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+vt(c.x,3)+n+c.y+" ",l+=p+vt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[c]=l,[a,l]};var cr=Object.freeze({__proto__:null,createDrawable:hr,createMotionPath:or,morphTo:dr});const ur="undefined"!=typeof Intl&&Intl.Segmenter,pr=/\{value\}/g,mr=/\{i\}/g,fr=/(\s+)/,gr=/^\s+$/,yr="line",_r="word",vr="char",br="data-line";let Tr=null,xr=null,Sr=null;const wr=t=>t.isWordLike||" "===t.segment||U(+t.segment),Er=t=>t.setAttribute("aria-hidden","true"),$r=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Cr={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Nr=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Nr(e)}},kr=(t,e,s)=>{const i=t.getAttribute(br);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&gr.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&gr.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)kr(t.children[r],e,s);return s},Rr=(t,e={})=>{let s="";const i=Y(e.class)?` class="${e.class}"`:"",r=Lt(e.clone,!1),n=Lt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},Dr=(t,e,s,i,r,n,o,a,l)=>{const h=r===yr,d=r===vr,c=`_${r}_`,u=W(t)?t(s):t,p=h?"block":"inline-block";Sr.innerHTML=u.replace(pr,`<i class="${c}"></i>`).replace(mr,`${d?l:h?o:a}`);const m=Sr.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(br,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Cr[r]}`),f};class Ir{constructor(e,i={}){Tr||(Tr=ur?new ur([],{granularity:_r}):{segment:t=>{const e=[],s=t.split(fr);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!gr.test(i)})}return e}}),xr||(xr=ur?new ur([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Sr&&t&&(Sr=s.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=i,d=(e=X(e)?e[0]:e)&&e.nodeType?e:(_e(e)||[])[0],c=!0===o?{}:o,u=!0===r||q(r)?{}:r,p=!0===n?{}:n;this.debug=Lt(h,!1),this.includeSpaces=Lt(l,!1),this.accessible=Lt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=H(c)?Rr(yr,c):c,this.wordTemplate=H(u)||this.linesOnly?Rr(_r,u):u,this.charTemplate=H(p)?Rr(vr,p):p,this.$target=d,this.html=d&&d.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!W(t))return console.warn("Effect must return a function.");const e=Is(t);return this.effects.push(e),this.ready&&(this.effectsCleanups[this.effects.length-1]=e(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(t=>W(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,i=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],l=this.words,h=this.chars,d=Tr.segment(o),c=s.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=wr(t);if(!u||s&&u&&wr(u))a.push(e);else{const t=a.length-1,s=a[t];fr.test(s)||fr.test(e)?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const d=a[t+1],u=r&&d&&!d.trim(),p=o,m=i?xr.segment(p):null,f=i?s.createDocumentFragment():s.createTextNode(u?o+" ":o);if(i){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,d=s.createTextNode(a);Dr(i,h,d,f,vr,n,-1,l.length,h.length)}}e?Dr(e,l,f,c,_r,n,-1,l.length,h.length):i?c.appendChild(f):c.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(c,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,i=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==s.fonts.status,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>W(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=$r(e,_r))),o&&(l||n)&&(this.chars=$r(e,vr));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!q(d)&&s-d>.5*i&&c++,e.setAttribute(br,`${c}`);const r=e.querySelectorAll(`[${br}]`);let n=r.length;for(;n--;)r[n].setAttribute(br,`${c}`);d=s}if(l){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<c+1;t++){const s=e.cloneNode(!0);kr(s,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&i.add(e),e.removeChild(t))}),a.push(s)}i.forEach(Nr);for(let e=0,s=a.length;e<s;e++)Dr(r,this.lines,a[e],t,yr,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=$r(e,_r)),o&&(this.chars=$r(e,vr))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(l||!i)){const t=s.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach(Er),this.words.forEach(Er),this.chars.forEach(Er)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Or=(t,e)=>new Ir(t,e),Ar=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Ir(t,e));var Lr=Object.freeze({__proto__:null,TextSplitter:Ir,split:Ar,splitText:Or});export{be as $,hs as Animatable,Di as AutoLayout,ks as Draggable,je as JSAnimation,Os as Scope,Ys as ScrollObserver,Ts as Spring,Ir as TextSplitter,as as Timeline,ge as Timer,hi as WAAPIAnimation,Ge as animate,Wi as clamp,Gt as cleanInlineStyles,ds as createAnimatable,Rs as createDraggable,hr as createDrawable,Ii as createLayout,or as createMotionPath,As as createScope,Zi as createSeededRandom,Ss as createSpring,ls as createTimeline,ye as createTimer,Gs as cubicBezier,Gi as damp,Hi as degToRad,Re as eases,Ks as easings,se as engine,Ke as get,Zs as irregular,Is as keepTime,ji as lerp,Js as linear,Xi as mapRange,dr as morphTo,Ws as onScroll,Vi as padEnd,Mi as padStart,Ui as radToDeg,Qi as random,Ki as randomPick,es as remove,qi as round,Fi as roundPad,Ps as scrollContainers,ts as set,tr as shuffle,Yi as snap,Ar as split,Or as splitText,xs as spring,er as stagger,Qs as steps,cr as svg,Ds as sync,Lr as text,sr as utils,di as waapi,zi as wrap};+const t="undefined"!=typeof window,e=t?window:null,s=t?document:null,i={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},r={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},n={NONE:0,AUTO:1,FORCE:2},o={replace:0,none:1,blend:2},a=Symbol(),l=Symbol(),h=Symbol(),d=Symbol(),c=Symbol(),u=Symbol(),p=1e-11,m=1e12,f=1e3,g=240,y="",_="var(",v=(()=>{const t=new Map;return t.set("x","translateX"),t.set("y","translateY"),t.set("z","translateZ"),t})(),b=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","matrix","matrix3d","perspective"],T=b.reduce((t,e)=>({...t,[e]:e+"("}),{}),x=()=>{},S=/\)\s*[-.\d]/,w=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,E=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,$=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,C=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,N=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,k=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,R=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,D=/([a-z])([A-Z])/g,I=/(\w+)(\([^)]+\)+)/g,O=/(\*=|\+=|-=)/,A=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,L={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:g,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:f,delay:0,loopDelay:0,ease:"out(2)",composition:o.replace,modifier:t=>t,onBegin:x,onBeforeUpdate:x,onUpdate:x,onLoop:x,onPause:x,onComplete:x,onRender:x},B={current:null,root:s},P={defaults:L,precision:4,timeScale:1,tickThreshold:200},F=t&&e.AnimeJSDevTools,M={version:"4.3.5",engine:null};t&&(e.AnimeJS||(e.AnimeJS=[]),e.AnimeJS.push(M));const V=t=>t.replace(D,"$1-$2").toLowerCase(),z=(t,e)=>0===t.indexOf(e),X=Date.now,H=Array.isArray,U=t=>t&&t.constructor===Object,Y=t=>"number"==typeof t&&!isNaN(t),W=t=>"string"==typeof t,q=t=>"function"==typeof t,j=t=>void 0===t,G=t=>j(t)||null===t,Q=e=>t&&e instanceof SVGElement,J=t=>w.test(t),Z=t=>z(t,"rgb"),K=t=>z(t,"hsl"),tt=t=>J(t)||(Z(t)||K(t))&&(")"===t[t.length-1]||!S.test(t)),et=t=>!P.defaults.hasOwnProperty(t),st=["opacity","rotate","overflow","color"],it=(t,e)=>{if(st.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}},rt=t=>W(t)?parseFloat(t):t,nt=Math.pow,ot=Math.sqrt,at=Math.sin,lt=Math.cos,ht=Math.abs,dt=Math.exp,ct=Math.ceil,ut=Math.floor,pt=Math.asin,mt=Math.max,ft=Math.atan2,gt=Math.PI,yt=Math.round,_t=(t,e,s)=>t<e?e:t>s?s:t,vt={},bt=(t,e)=>{if(e<0)return t;if(!e)return yt(t);let s=vt[e];return s||(s=vt[e]=10**e),yt(t*s)/s},Tt=(t,e)=>H(e)?e.reduce((e,s)=>ht(s-t)<ht(e-t)?s:e):e?yt(t/e)*e:t,xt=(t,e,s)=>t+(e-t)*s,St=t=>t===1/0?m:t===-1/0?-m:t,wt=t=>t<=p?p:St(bt(t,11)),Et=t=>H(t)?[...t]:t,$t=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=j(r)?e[i]:r}return s},Ct=(t,e,s,i="_prev",r="_next")=>{let n=t._head,o=r;for(s&&(n=t._tail,o=i);n;){const t=n[o];e(n),n=t}},Nt=(t,e,s="_prev",i="_next")=>{const r=e[s],n=e[i];r?r[i]=n:t._head=n,n?n[s]=r:t._tail=r,e[s]=null,e[i]=null},kt=(t,e,s,i="_prev",r="_next")=>{let n=t._tail;for(;n&&s&&s(n,e);)n=n[i];const o=n?n[r]:t._head;n?n[r]=e:t._head=e,o?o[i]=e:t._tail=e,e[i]=n,e[r]=o},Rt=(t,e,s)=>{const i=t.style.transform;let r;if(i){const n=t[d];let o;for(;o=I.exec(i);){const t=o[1],i=o[2].slice(1,-1);n[t]=i,t===e&&(r=i,s&&(s[e]=i))}}return i&&!j(r)?r:z(e,"scale")?"1":z(e,"rotate")||z(e,"skew")?"0deg":"0px"},Dt=t=>{const e=E.exec(t)||$.exec(t),s=j(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]},It=t=>{const e=t.length,s=4===e||5===e;return[+("0x"+t[1]+t[s?1:2]),+("0x"+t[s?2:3]+t[s?2:4]),+("0x"+t[s?3:5]+t[s?3:6]),5===e||9===e?+(+("0x"+t[s?4:7]+t[s?4:8])/255).toFixed(3):1]},Ot=(t,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+6*(e-t)*s:s<.5?e:s<2/3?t+(e-t)*(2/3-s)*6:t),At=t=>{const e=C.exec(t)||N.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=j(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=bt(255*Ot(e,t,s+1/3),0),a=bt(255*Ot(e,t,s),0),l=bt(255*Ot(e,t,s-1/3),0)}return[o,a,l,n]},Lt=t=>Z(t)?Dt(t):J(t)?It(t):K(t)?At(t):[0,0,0,1],Bt=(t,e)=>j(t)?e:t,Pt=(t,e,s,i,r)=>{let n;if(q(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!W(t)||!z(t,_))return t;n=()=>{const s=t.match(A),i=s[1],r=s[2];let n=getComputedStyle(e)?.getPropertyValue(i);return n&&n.trim()!==y||!r||(n=r.trim()),n||0}}return r&&(r.func=n),n()},Ft=(t,e)=>t[l]?t[h]&&it(t,e)?i.ATTRIBUTE:b.includes(e)||v.get(e)?i.TRANSFORM:z(e,"--")?i.CSS_VAR:e in t.style?i.CSS:e in t?i.OBJECT:i.ATTRIBUTE:i.OBJECT,Mt=(t,e,s)=>{const i=t.style[e];i&&s&&(s[e]=i);const r=i||getComputedStyle(t[u]||t).getPropertyValue(e);return"auto"===r?"0":r},Vt=(t,e,s,r)=>{const n=j(s)?Ft(t,e):s;return n===i.OBJECT?t[e]||0:n===i.ATTRIBUTE?t.getAttribute(e):n===i.TRANSFORM?Rt(t,e,r):n===i.CSS_VAR?Mt(t,e,r).trimStart():Mt(t,e,r)},zt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,Xt=()=>({t:r.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ht=(t,e)=>{if(e.t=r.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!t)return e;const s=+t;if(isNaN(s)){let s=t;"="===s[1]&&(e.o=s[0],s=s.slice(2));const i=!s.includes(" ")&&R.exec(s);if(i)return e.t=r.UNIT,e.n=+i[1],e.u=i[2],e;if(e.o)return e.n=+s,e;if(tt(s))return e.t=r.COLOR,e.d=Lt(s),e;{const t=s.match(k);return e.t=r.COMPLEX,e.d=t?t.map(Number):[],e.s=s.split(k)||[],e}}return e.n=s,e},Ut=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=Et(t._toNumbers),e.s=Et(t._strings),e),Yt=Xt(),Wt=(t,e,s,a,l)=>{const h=t.parent,c=t.duration,u=t.completed,m=t.iterationDuration,f=t.iterationCount,g=t._currentIteration,_=t._loopDelay,v=t._reversed,b=t._alternate,x=t._hasChildren,S=t._delay,w=t._currentTime,E=S+m,$=e-S,C=_t(w,-S,c),N=_t($,-S,c),k=$-w,R=N>0,D=N>=c,I=c<=p,O=l===n.FORCE;let A=0,L=$,B=0;if(f>1){const e=~~(N/(m+(D?0:_)));t._currentIteration=_t(e,0,f),D&&t._currentIteration--,A=t._currentIteration%2,L=N%(m+_)||0}const F=v^(b&&A),M=t._ease;let V=D?F?0:c:F?m-L:L;M&&(V=m*M(V/m)||0);const z=(h?h.backwards:$<w)?!F:!!F;if(t._currentTime=$,t._iterationTime=V,t.backwards=z,R&&!t.began?(t.began=!0,s||h&&(z||!h.began)||t.onBegin(t)):$<=0&&(t.began=!1),s||x||!R||t._currentIteration===g||t.onLoop(t),O||l===n.AUTO&&(e>=S&&e<=E||e<=S&&C>S||e>=E&&C!==c)||V>=E&&C!==c||V<=S&&C>0||e<=C&&C===c&&u||D&&!u&&I){if(R&&(t.computeDeltaTime(C),s||t.onBeforeUpdate(t)),!x){const e=O||(z?-1*k:k)>=P.tickThreshold,n=t._offset+(h?h._offset:0)+S+V;let l,c,u,p,m=t._head,f=0;for(;m;){const t=m._composition,s=m._currentTime,h=m._changeDuration,g=m._absoluteStartTime+m._changeDuration,_=m._nextRep,v=m._prevRep,b=t!==o.none;if((e||(s!==h||n<=g+(_?_._delay:0))&&(0!==s||n>=m._absoluteStartTime))&&(!b||!m._isOverridden&&(!m._isOverlapped||n<=g)&&(!_||_._isOverridden||n<=_._absoluteStartTime)&&(!v||v._isOverridden||n>=v._absoluteStartTime+v._changeDuration+m._delay))){const e=m._currentTime=_t(V-m._startTime,0,h),s=m._ease(e/m._updateDuration),n=m._modifier,g=m._valueType,y=m._tweenType,_=y===i.OBJECT,v=g===r.NUMBER,T=v&&_||0===s||1===s?-1:P.precision;let x,S;if(v)x=S=n(bt(xt(m._fromNumber,m._toNumber,s),T));else if(g===r.UNIT)S=n(bt(xt(m._fromNumber,m._toNumber,s),T)),x=`${S}${m._unit}`;else if(g===r.COLOR){const t=m._fromNumbers,e=m._toNumbers,i=bt(_t(n(xt(t[0],e[0],s)),0,255),0),r=bt(_t(n(xt(t[1],e[1],s)),0,255),0),o=bt(_t(n(xt(t[2],e[2],s)),0,255),0),a=_t(n(bt(xt(t[3],e[3],s),T)),0,1);if(x=`rgba(${i},${r},${o},${a})`,b){const t=m._numbers;t[0]=i,t[1]=r,t[2]=o,t[3]=a}}else if(g===r.COMPLEX){x=m._strings[0];for(let t=0,e=m._toNumbers.length;t<e;t++){const e=n(bt(xt(m._fromNumbers[t],m._toNumbers[t],s),T)),i=m._strings[t+1];x+=`${i?e+i:e}`,b&&(m._numbers[t]=e)}}if(b&&(m._number=S),a||t===o.blend)m._value=x;else{const t=m.property;l=m.target,_?l[t]=x:y===i.ATTRIBUTE?l.setAttribute(t,x):(c=l.style,y===i.TRANSFORM?(l!==u&&(u=l,p=l[d]),p[t]=x,f=1):y===i.CSS?c[t]=x:y===i.CSS_VAR&&c.setProperty(t,x)),R&&(B=1)}}if(f&&m._renderTransforms){let t=y;for(let e in p)t+=`${T[e]}${p[e]}) `;c.transform=t,f=0}m=m._next}!s&&B&&t.onRender(t)}!s&&R&&t.onUpdate(t)}return h&&I?!s&&(h.began&&!z&&$>0&&!u||z&&$<=p&&u)&&(t.onComplete(t),t.completed=!z):R&&D?f===1/0?t._startTime+=t.duration:t._currentIteration>=f-1&&(t.paused=!0,u||x||(t.completed=!0,s||h&&(z||!h.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,B},qt=(t,e,s,i,r)=>{const o=t._currentIteration;if(Wt(t,e,s,i,r),t._hasChildren){const a=t,l=a.backwards,h=i?e:a._iterationTime,d=X();let c=0,u=!0;if(!i&&a._currentIteration!==o){const t=a.iterationDuration;Ct(a,e=>{if(l){const i=e.duration,r=e._offset+e._delay;s||!(i<=p)||r&&r+i!==t||e.onComplete(e)}else!e.completed&&!e.backwards&&e._currentTime<e.iterationDuration&&Wt(e,t,s,1,n.FORCE),e.began=!1,e.completed=!1}),s||a.onLoop(a)}Ct(a,t=>{const e=bt((h-t._offset)*t._speed,12),n=t._fps<a._fps?t.requestTick(d):r;c+=Wt(t,e,s,i,n),!t.completed&&u&&(u=!1)},l),!s&&c&&a.onRender(a),(u||l)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,s||(a.onComplete(a),a._resolve(a))))}},jt={},Gt=(t,e,s)=>{if(s===i.TRANSFORM)return v.get(t)||t;if(s===i.CSS||s===i.ATTRIBUTE&&Q(e)&&t in e.style){const e=jt[t];if(e)return e;{const e=t?V(t):t;return jt[t]=e,e}}return t},Qt=t=>{if(t._hasChildren)Ct(t,Qt,!0);else{const e=t;e.pause(),Ct(e,t=>{const s=t.property,r=t.target;if(r[l]){const n=r.style,o=t._inlineValue,a=G(o)||o===y;if(t._tweenType===i.TRANSFORM){const e=r[d];if(a?delete e[s]:e[s]=o,t._renderTransforms)if(Object.keys(e).length){let t=y;for(let s in e)t+=T[s]+e[s]+") ";n.transform=t}else n.removeProperty("transform")}else a?n.removeProperty(V(s)):n[s]=o;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===y&&t.removeAttribute("style")})}})}return t};class Jt{constructor(t=0){this.deltaTime=0,this._currentTime=t,this._lastTickTime=t,this._startTime=t,this._lastTime=t,this._scheduledTime=0,this._frameDuration=f/g,this._fps=g,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(t){const e=this._frameDuration,s=+t,i=s<p?p:s,r=f/i;i>L.frameRate&&(L.frameRate=i),this._fps=i,this._frameDuration=r,this._scheduledTime+=r-e}get speed(){return this._speed}set speed(t){const e=+t;this._speed=e<p?p:e}requestTick(t){const e=this._scheduledTime;if(this._lastTickTime=t,t<e)return n.NONE;const s=this._frameDuration,i=t-e;return this._scheduledTime+=i<s?s:i,n.AUTO}computeDeltaTime(t){const e=t-this._lastTime;return this.deltaTime=e,this._lastTime=t,e}}const Zt={animation:null,update:x},Kt=t=>{let e=Zt.animation;return e||(e={duration:p,computeDeltaTime:x,_offset:0,_delay:0,_head:null,_tail:null},Zt.animation=e,Zt.update=()=>{t.forEach(t=>{for(let e in t){const s=t[e],i=s._head;if(i){const t=i._valueType,e=t===r.COMPLEX||t===r.COLOR?Et(i._fromNumbers):null;let n=i._fromNumber,o=s._tail;for(;o&&o!==i;){if(e)for(let t=0,s=o._numbers.length;t<s;t++)e[t]+=o._numbers[t];else n+=o._number;o=o._prevAdd}i._toNumber=n,i._toNumbers=e}}}),Wt(e,1,1,0,n.FORCE)}),e},te=(()=>t?requestAnimationFrame:setImmediate)(),ee=(()=>t?cancelAnimationFrame:clearImmediate)();class se extends Jt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=L,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=X();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?(Nt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):qt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):n.AUTO),i=r}Zt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(X()),this.reqId=te(re)),this}pause(){if(this.reqId)return this.paused=!0,ne()}resume(){if(this.paused)return this.paused=!1,Ct(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===P.timeScale?1:f)}set speed(t){this._speed=t*P.timeScale,Ct(this,t=>t.speed=t._speed)}get timeUnit(){return 1===P.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(P.timeScale!==s){P.timeScale=s,P.tickThreshold=200*s;const t=e?.001:f;this.defaults.duration*=t,this._speed*=t}}get precision(){return P.precision}set precision(t){P.precision=t}}const ie=(()=>{const e=new se(X());return t&&(M.engine=e,s.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(s.hidden?e.pause():e.resume())})),e})(),re=()=>{ie._head?(ie.reqId=te(re),ie.update()):ie.reqId=0},ne=()=>(ee(ie.reqId),ie.reqId=0,ie),oe={_rep:new WeakMap,_add:new Map},ae=(t,e,s="_rep")=>{const i=oe[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},le=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,he=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=p,t._currentTime=p},de=(t,e)=>{const s=t._composition;if(s===o.replace){const s=t._absoluteStartTime;kt(e,t,le,"_prevRep","_nextRep");const i=t._prevRep;if(i){const e=i.parent,r=i._absoluteStartTime+i._changeDuration;if(t.parent.id!==e.id&&e.iterationCount>1&&r+(e.duration-e.iterationDuration)>s){he(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)he(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=bt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<p&&he(i)}let o=!0;if(Ct(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Ct(t,t=>{t!==e&&Ct(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===o.blend){const e=ae(t.target,t.property,"_add"),s=Kt(oe._add);let i=e._head;i||(i={...t},i._composition=o.replace,i._updateDuration=p,i._startTime=0,i._numbers=Et(t._fromNumbers),i._number=0,i._next=null,i._prev=null,kt(e,i),kt(s,i));const r=t._toNumber;if(t._fromNumber=i._fromNumber-r,t._toNumber=0,t._numbers=Et(t._fromNumbers),t._number=0,i._fromNumber=r,t._toNumbers){const e=Et(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}kt(e,t,null,"_prevAdd","_nextAdd")}return t},ce=t=>{const e=t._composition;if(e!==o.none){const s=t.target,i=t.property,r=oe._rep.get(s)[i];if(Nt(r,t,"_prevRep","_nextRep"),e===o.blend){const e=oe._add,r=e.get(s);if(!r)return;const n=r[i],o=Zt.animation;Nt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){Nt(n,a,"_prevAdd","_nextAdd"),Nt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},ue=(t,e,s)=>{let r=!1;return Ct(e,n=>{const o=n.target;if(t.includes(o)){const t=n.property,a=n._tweenType,l=Gt(s,o,a);(!l||l&&l===t)&&(n.parent._tail===n&&n._tweenType===i.TRANSFORM&&n._prev&&n._prev._tweenType===i.TRANSFORM&&(n._prev._renderTransforms=1),Nt(e,n),ce(n),r=!0)}},!0),r},pe=(t,e,s)=>{const i=e||ie;let r;if(i._hasChildren){let e=0;Ct(i,n=>{if(!n._hasChildren)if(r=ue(t,n,s),r&&!n._head)n.cancel(),Nt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?pe(t,n,s):n._hasChildren=!1},!0),j(i.iterationDuration)||(i.iterationDuration=e)}else r=ue(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},me=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),fe=t=>t._cancelled?(t._hasChildren?Ct(t,fe):Ct(t,t=>{t._composition!==o.none&&de(t,ae(t.target,t.property))}),t._cancelled=0,t):t;let ge=0;class ye extends Jt{constructor(t={},e=null,s=0){super(0),++ge;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:c,playbackRate:u,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:v}=t;B.current&&B.current.register(this);const b=e?0:ie._lastTickTime,T=e?e.defaults:P.defaults,S=q(r)||j(r)?T.delay:+r,w=q(n)||j(n)?1/0:+n,E=Bt(l,T.loop),$=Bt(h,T.loopDelay);let C=!0===E||E===1/0||E<0?1/0:E+1;if(F){const s=C===1/0;if(F.register(this,t,s)&&s){const t=a?2:1,s=e?F.maxNestedInfiniteLoops:F.maxInfiniteLoops;C=Math.max(s,t)}}let N=0;e?N=s:(ie.reqId||ie.requestTick(X()),N=(ie._lastTickTime-ie._startTime)*P.timeScale),this.id=j(i)?ge:i,this.parent=e,this.duration=St((w+$)*C-$)||p,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=y||T.onBegin,this.onBeforeUpdate=_||T.onBeforeUpdate,this.onUpdate=v||T.onUpdate,this.onLoop=f||T.onLoop,this.onPause=g||T.onPause,this.onComplete=m||T.onComplete,this.iterationDuration=w,this.iterationCount=C,this._autoplay=!e&&Bt(d,T.autoplay),this._offset=N,this._delay=S,this._loopDelay=$,this._iterationTime=0,this._currentIteration=0,this._resolve=x,this._running=!1,this._reversed=+Bt(o,T.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Bt(a,T.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=Bt(c,T.frameRate),this._speed=Bt(u,T.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return _t(bt(this._currentTime,P.precision),-this._delay,this.duration)}set currentTime(t){const e=this.paused;this.pause().seek(+t),e||this.resume()}get iterationCurrentTime(){return _t(bt(this._iterationTime,P.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return _t(bt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return _t(bt(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*_t(+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 fe(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,qt(this,0,1,~~t,n.FORCE),me(this),this._hasChildren&&Ct(this,me),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&qt(this,this.duration,1,~~t,n.FORCE),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!j(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*ie._speed);return this._startTime=X()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=p&&!this._hasChildren?qt(this,p,0,0,n.FORCE):(this._running||(kt(ie,this),ie._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,ie.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){fe(this),this.completed=!1;const i=this.paused;return this.paused=!0,qt(this,t+this._delay,~~e,~~s,n.AUTO),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ut(m/s):e;return this._reversed=+(!this._alternate||i%2?!t:t),e===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*i-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Ct(this,t=>t.cancel(),!0):Ct(this,ce),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=wt(t);if(e===s)return this;const i=t/e,r=t<=p;return this.duration=r?p:s,this.iterationDuration=r?p:wt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){qt(this,0,1,0,n.AUTO);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).cancel()}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const _e=t=>new ye(t,null,0).init();function ve(t){const e=W(t)?B.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function be(e){if(G(e))return[];if(!t)return H(e)&&e.flat(1/0)||[e];if(H(e)){const t=e.flat(1/0),s=[];for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!G(i)){const t=ve(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!G(i)){let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}else{let t=!1;for(let e=0,r=s.length;e<r;e++)if(s[e]===i){t=!0;break}t||s.push(i)}}}return s}const s=ve(e);return s?Array.from(s):[e]}function Te(t){const e=be(t),s=e.length;if(s)for(let t=0;t<s;t++){const s=e[t];if(!s[a]){s[a]=!0;const t=Q(s);(s.nodeType||t)&&(s[l]=!0,s[h]=t,s[d]={})}}return e}const xe={deg:1,rad:180/gt,turn:360},Se={},we=(t,e,i,n=!1)=>{const o=e.u,a=e.n;if(e.t===r.UNIT&&o===i)return e;const l=a+o+i,h=Se[l];if(j(h)||n){let r;if(o in xe)r=a*xe[o]/xe[i];else{const e=100,n=t.cloneNode(),l=t.parentNode,h=l&&l!==s?l:s.body;h.appendChild(n);const d=n.style;d.width=e+o;const c=n.offsetWidth||e;d.width=e+i;const u=c/(n.offsetWidth||e);h.removeChild(n),r=u*a}e.n=r,Se[l]=r}else e.n=h;return e.t,e.u=i,e},Ee=t=>t,$e=(t=1.68)=>e=>nt(e,+t),Ce={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},Ne=gt/2,ke=2*gt,Re={[y]:$e,Quad:$e(2),Cubic:$e(3),Quart:$e(4),Quint:$e(5),Sine:t=>1-lt(t*Ne),Circ:t=>1-ot(1-t*t),Expo:t=>t?nt(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=nt(2,--s))-1)/11;);return 1/nt(4,3-s)-7.5625*nt((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=_t(+t,1,10),i=_t(+e,p,2),r=i/ke*pt(1/s),n=ke/i;return t=>0===t||1===t?t:-s*nt(2,-10*(1-t))*at((1-t-r)*n)}},De=(()=>{const t={linear:Ee,none:Ee};for(let e in Ce)for(let s in Re){const i=Re[s],r=Ce[e];t[e+s]=s===y||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),Ie={linear:Ee,none:Ee},Oe=t=>{if(Ie[t])return Ie[t];if(t.indexOf("(")<=-1){const e=Ce[t]||t.includes("Back")||t.includes("Elastic")?De[t]():De[t];return e?Ie[t]=e:Ee}{const e=t.slice(0,-1).split("("),s=De[e[0]];return s?Ie[t]=s(...e[1].split(",")):Ee}},Ae=["steps(","irregular(","linear(","cubicBezier("],Le=t=>{if(W(t))for(let e=0,s=Ae.length;e<s;e++)if(z(t,Ae[e]))return console.warn(`String syntax for \`ease: "${t}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${t}\``),Ee;return q(t)?t:W(t)?Oe(t):Ee},Be=Xt(),Pe=Xt(),Fe={},Me={func:null},Ve={func:null},ze=[null],Xe=[null,null],He={to:null};let Ue,Ye,We=0,qe=0;const je=(t,e)=>{const s={};if(H(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(et);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];et(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=Bt(e.duration,P.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(et(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}return t});for(let t in s){const e=s[t];let i;for(let t=0,s=e.length;t<s;t++){const s=e[t],r=s.ease;s.ease=i||void 0,i=r}e[0].duration||e.shift()}}return s};class Ge extends ye{constructor(t,e,s,n,a=!1,l=0,h=0){super(e,s,n),++qe;const d=Te(t),c=d.length,u=e.keyframes,m=u?$t(je(u,e),e):e,{id:g,delay:y,duration:_,ease:v,playbackEase:b,modifier:T,composition:x,onRender:S}=m,w=s?s.defaults:P.defaults,E=Bt(v,w.ease),$=Bt(b,w.playbackEase),C=$?Le($):null,N=!j(E.ease),k=N?E.ease:Bt(v,C?"linear":w.ease),R=N?E.settlingDuration:Bt(_,w.duration),D=Bt(y,w.delay),I=T||w.modifier,O=j(x)&&c>=f?o.none:j(x)?w.composition:x,A=this._offset+(s?s._offset:0);N&&(E.parent=this);let L=NaN,B=NaN,F=0,M=0;for(let t=0;t<c;t++){const e=d[t],n=l||t,u=h||c;let f=NaN,g=NaN;for(let t in m)if(et(t)){const l=Ft(e,t),h=Gt(t,e,l);let d=m[t];const c=H(d);if(a&&!c&&(Xe[0]=d,Xe[1]=d,d=Xe),c){const t=d.length,e=!U(d[0]);2===t&&e?(He.to=d,ze[0]=He,Ue=ze):t>2&&e?(Ue=[],d.forEach((t,e)=>{e?1===e?(Xe[1]=t,Ue.push(Xe)):Ue.push(t):Xe[0]=t})):Ue=d}else ze[0]=d,Ue=ze;let y=null,_=null,v=NaN,b=0,T=0;for(let t=Ue.length;T<t;T++){const i=Ue[T];U(i)?Ye=i:(He.to=i,Ye=He),Me.func=null,Ve.func=null;const a=Pt(Ye.to,e,n,u,Me);let d;U(a)&&!j(a.to)?(Ye=a,d=a.to):d=a;const c=Pt(Ye.from,e,n,u),m=Ye.ease||k,f=Pt(m,e,n,u),g=q(f)||W(f)?f:m,x=!j(g)&&!j(g.ease),S=x?g.ease:g,w=x?g.settlingDuration:Pt(Bt(Ye.duration,t>1?Pt(R,e,n,u)/t:R),e,n,u),E=Pt(Bt(Ye.delay,T?0:D),e,n,u),$=Pt(Bt(Ye.composition,O),e,n,u),C=Y($)?$:o[$],N=Ye.modifier||I,L=!j(c),B=!j(d),P=H(d),V=P||L&&B,z=_?b+E:E,X=bt(A+z,12);M||!L&&!P||(M=1);let Q=_;if(C!==o.none){y||(y=ae(e,h));let t=y._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=X;)if(Q=t,t=t._nextRep,t&&t._absoluteStartTime>=X)for(;t;)he(t),t=t._nextRep}if(V){Ht(P?Pt(d[0],e,n,u,Ve):c,Be),Ht(P?Pt(d[1],e,n,u,Me):d,Pe);const t=Vt(e,h,l,Fe);Be.t===r.NUMBER&&(Q?Q._valueType===r.UNIT&&(Be.t=r.UNIT,Be.u=Q._unit):(Ht(t,Yt),Yt.t===r.UNIT&&(Be.t=r.UNIT,Be.u=Yt.u)))}else B?Ht(d,Pe):_?Ut(_,Pe):Ht(s&&Q&&Q.parent.parent===s?Q._value:Vt(e,h,l,Fe),Pe),L?Ht(c,Be):_?Ut(_,Be):Ht(s&&Q&&Q.parent.parent===s?Q._value:Vt(e,h,l,Fe),Be);if(Be.o&&(Be.n=zt(Q?Q._toNumber:Ht(Vt(e,h,l,Fe),Yt).n,Be.n,Be.o)),Pe.o&&(Pe.n=zt(Be.n,Pe.n,Pe.o)),Be.t!==Pe.t)if(Be.t===r.COMPLEX||Pe.t===r.COMPLEX){const t=Be.t===r.COMPLEX?Be:Pe,e=Be.t===r.COMPLEX?Pe:Be;e.t=r.COMPLEX,e.s=Et(t.s),e.d=t.d.map(()=>e.n)}else if(Be.t===r.UNIT||Pe.t===r.UNIT){const t=Be.t===r.UNIT?Be:Pe,e=Be.t===r.UNIT?Pe:Be;e.t=r.UNIT,e.u=t.u}else if(Be.t===r.COLOR||Pe.t===r.COLOR){const t=Be.t===r.COLOR?Be:Pe,e=Be.t===r.COLOR?Pe:Be;e.t=r.COLOR,e.s=t.s,e.d=[0,0,0,1]}if(Be.u!==Pe.u){let t=Pe.u?Be:Pe;t=we(e,t,Pe.u?Pe.u:Be.u,!1)}if(Pe.d&&Be.d&&Pe.d.length!==Be.d.length){const t=Be.d.length>Pe.d.length?Be:Pe,e=t===Be?Pe:Be;e.d=t.d.map((t,s)=>j(e.d[s])?0:e.d[s]),e.s=Et(t.s)}const J=bt(+w||p,12);let Z=Fe[h];G(Z)||(Fe[h]=null);const K={parent:this,id:We++,property:h,target:e,_value:null,_toFunc:Me.func,_fromFunc:Ve.func,_ease:Le(S),_fromNumbers:Et(Be.d),_toNumbers:Et(Pe.d),_strings:Et(Pe.s),_fromNumber:Be.n,_toNumber:Pe.n,_numbers:Et(Be.d),_number:Be.n,_unit:Pe.u,_modifier:N,_currentTime:0,_startTime:z,_delay:+E,_updateDuration:J,_changeDuration:J,_absoluteStartTime:X,_tweenType:l,_valueType:Pe.t,_composition:C,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};C!==o.none&&de(K,y),isNaN(v)&&(v=K._startTime),b=bt(z+J,12),_=K,F++,kt(this,K)}(isNaN(B)||v<B)&&(B=v),(isNaN(L)||b>L)&&(L=b),l===i.TRANSFORM&&(f=F-T,g=F)}if(!isNaN(f)){let t=0;Ct(this,e=>{t>=f&&t<g&&(e._renderTransforms=1,e._composition===o.blend&&Ct(Zt.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}c||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),B?(Ct(this,t=>{t._startTime-t._delay||(t._delay-=B),t._startTime-=B}),L-=B):B=0,L||(L=p,this.iterationCount=0),this.targets=d,this.id=j(g)?qe:g,this.duration=L===p?p:St((L+this._loopDelay)*this.iterationCount-this._loopDelay)||p,this.onRender=S||w.onRender,this._ease=C,this._delay=B,this.iterationDuration=L,!this._autoplay&&M&&this.onRender(this)}stretch(t){const e=this.duration;if(e===wt(t))return this;const s=t/e;return Ct(this,t=>{t._updateDuration=wt(t._updateDuration*s),t._changeDuration=wt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Ct(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(Ht(s(),Be),Be.u!==t._unit&&t.target[l]&&we(t.target,Be,t._unit,!0),t._fromNumbers=Et(Be.d),t._fromNumber=Be.n):e&&(Ht(Vt(t.target,t.property,t._tweenType),Yt),t._fromNumbers=Et(Yt.d),t._fromNumber=Yt.n),e&&(Ht(e(),Pe),t._toNumbers=Et(Pe.d),t._strings=Et(Pe.s),t._toNumber=Pe.o?zt(t._fromNumber,Pe.n,Pe.o):Pe.n))}),this.duration===p&&this.restart(),this}revert(){return super.revert(),Qt(this)}then(t){return super.then(t)}}const Qe=(t,e)=>new Ge(t,e,null,0,!1).init(),Je={_head:null,_tail:null},Ze=(t,e,s)=>{let i,r=Je._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Nt(Je,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},Ke=(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),Ze(e,s),kt(Je,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>Ze(e,s,t);return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function ts(t,e,s){const i=Te(t);if(!i.length)return;const[n]=i,o=Ft(n,e),a=Gt(e,n,o);let l=Vt(n,a);if(j(s))return l;if(Ht(l,Yt),Yt.t===r.NUMBER||Yt.t===r.UNIT){if(!1===s)return Yt.n;{const t=we(n,Yt,s,!1);return`${bt(t.n,P.precision)}${t.u}`}}}const es=(t,e)=>{if(!j(e))return e.duration=p,e.composition=Bt(e.composition,o.none),new Ge(t,e,null,0,!0).resume()},ss=(t,e,s)=>{const i=be(t);for(let t=0,r=i.length;t<r;t++)Ze(i[t],s,e&&e.controlAnimation&&e);return pe(i,e,s),i},is=(t,e)=>{if(z(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}},rs=(t,e)=>{let s=t.iterationDuration;if(s===p&&(s=0),j(e))return s;if(Y(+e))return+e;const i=e,r=t?t.labels:null,n=!G(r),o=is(t,i),a=!j(o),l=O.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return zt(d,c,t[0])}return a?o:n?j(r[i])?s:r[i]:s};function ns(t){return St((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||p}function os(t,e,s,i,r,o){const a=Y(t.duration)&&t.duration<=p?s-p:s;e.composition&&qt(e,a,1,1,n.AUTO);const l=i?new Ge(i,t,e,a,!1,r,o):new ye(t,e,a);return e.composition&&l.init(!0),kt(e,l),Ct(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=ns(e),e}let as=0;class ls extends ye{constructor(t={}){super(t,null,0),++as,this.id=j(t.id)?as:t.id,this.duration=0,this.labels={};const e=t.defaults,s=P.defaults;this.defaults=e?$t(e,s):s,this.composition=Bt(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=Bt(t.playbackEase,s.playbackEase);this._ease=i?Le(i):null,this.iterationDuration=0}add(t,e,s){const i=U(e),r=U(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(q(s)){const e=s,r=be(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,j(a)||(s.id=a+"-"+l),os(s,this,rs(this,e(t,l,h,this)),t,l,h),l++})}else os(i,this,rs(this,s),t)}else os(t,this,rs(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(j(t)||t&&j(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return j(t)||j(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return j(e)?this:(e.duration=p,e.composition=o.replace,this.add(t,e,s))}call(t,e){return j(t)||t&&!q(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return j(t)||t&&!W(t)||(this.labels[t]=rs(this,e)),this}remove(t,e){return pe(be(t),this,e),this}stretch(t){const e=this.duration;if(e===wt(t))return this;const s=t/e,i=this.labels;Ct(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Ct(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Ct(this,t=>t.revert,!0),Qt(this)}then(t){return super.then(t)}}const hs=t=>new ls(t).init();class ds{constructor(t,e){B.current&&B.current.register(this);const s=()=>{if(this.callbacks.completed)return;let t=!0;for(let e in this.animations)if(!this.animations[e].paused&&t){t=!1;break}t&&this.callbacks.complete()},i={onBegin:()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},onComplete:s,onPause:s},r={v:1,autoplay:!1},n={};if(this.targets=[],this.animations={},this.callbacks=null,!j(t)&&!j(e)){for(let t in e){const s=e[t];et(t)?n[t]=s:z(t,"on")?r[t]=s:i[t]=s}this.callbacks=new Ge({v:0},r);for(let e in n){const s=n[e],r=U(s);let a={},l="+=0";if(r){const t=s.unit;W(t)&&(l+=t)}else a.duration=s;a[e]=r?$t({to:l},s):l;const h=$t(i,a);h.composition=o.replace,h.autoplay=!1;const d=this.animations[e]=new Ge(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(j(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Ct(d,e=>{if(H(t))for(let s=0,i=t.length;s<i;s++)j(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;j(s)||(e._ease=Le(s)),e._currentTime=0}),j(e)||d.stretch(e),d.reset(!0).resume(),this}}}}revert(){for(let t in this.animations)this[t]=x,this.animations[t].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const cs=(t,e)=>new ds(t,e),us=(t,e)=>(+t).toFixed(e),ps=(t,e,s)=>`${t}`.padStart(e,s),ms=(t,e,s)=>`${t}`.padEnd(e,s),fs=(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e,gs=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i),ys=t=>t*Math.PI/180,_s=t=>180*t/Math.PI,vs=(t,e,s,i)=>i?1===i?e:xt(t,e,1-Math.exp(-i*s*.1)):t;var bs=Object.freeze({__proto__:null,clamp:_t,damp:vs,degToRad:ys,lerp:xt,mapRange:gs,padEnd:ms,padStart:ps,radToDeg:_s,round:bt,roundPad:us,snap:Tt,wrap:fs});const Ts=10*f;class xs{constructor(t={}){const e=!j(t.bounce)||!j(t.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/f,this.maxIterations=this.maxDuration/this.timeStep/f,this.bn=_t(Bt(t.bounce,.5),-1,1),this.pd=_t(Bt(t.duration,628),10*P.timeScale,Ts*P.timeScale),this.m=_t(Bt(t.mass,1),1,Ts),this.s=_t(Bt(t.stiffness,100),p,Ts),this.d=_t(Bt(t.damping,10),p,Ts),this.v=_t(Bt(t.velocity,0),-1e4,Ts),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||x,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?dt(-n*e*s)*(1*lt(i*n)+r*at(i*n)):1===e?(1+r*n)*dt(-n*s):((1+r)*dt((-e*s+i)*n)+(1-r)*dt((-e*s-i)*n))/2,1-n}calculateSDFromBD(){const t=1===P.timeScale?this.pd/f:this.pd;this.m=1,this.v=0,this.s=nt(2*gt/t,2),this.bn>=0?this.d=4*(1-this.bn)*gt/t:this.d=4*gt/(t*(1+this.bn)),this.s=bt(_t(this.s,p,Ts),3),this.d=bt(_t(this.d,p,300),3)}calculateBDFromSD(){const t=2*gt/ot(this.s);this.pd=t*(1===P.timeScale?f:1);const e=this.d/(2*ot(this.s));this.bn=e<=1?1-this.d*t/(4*gt):4*gt/(this.d*t)-1,this.bn=bt(_t(this.bn,-1,1),3),this.pd=bt(_t(this.pd,10*P.timeScale,Ts*P.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=_t(ot(o/r),p,f),h=this.zeta=n/(2*ot(o*r));h<1?(this.wd=l*ot(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*ot(h*h-1),this.b=(h*l-a)/this.wd);let d=0,c=0,u=0;for(;c<=t&&u<=e;)ht(1-this.solve(d))<s?c++:c=0,this.solverDuration=d,d+=i,u++;this.settlingDuration=bt(this.solverDuration*f,0)*P.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=_t(Bt(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=_t(Bt(t,1),10*P.timeScale,Ts*P.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=_t(Bt(t,100),p,Ts),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=_t(Bt(t,10),p,Ts),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=_t(Bt(t,1),1,Ts),this.compute()}get velocity(){return this.v}set velocity(t){this.v=_t(Bt(t,0),-1e4,Ts),this.compute()}}const Ss=t=>new xs(t),ws=t=>(console.warn("createSpring() is deprecated use spring() instead"),new xs(t)),Es=t=>{t.cancelable&&t.preventDefault()};class $s{constructor(t){this.el=t,this.zIndex=0,this.parentElement=null,this.classList={add:x,remove:x}}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 Cs{constructor(t){this.$el=t,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(t,e){return this.point.x=t,this.point.y=e,this.point.matrixTransform(this.inversedMatrix)}traverseUp(t){let e=this.$el.parentElement,i=0;for(;e&&e!==s;)t(e,i),e=e.parentElement,i++}getMatrix(){const t=new DOMMatrix;return this.traverseUp(e=>{const s=getComputedStyle(e).transform;if(s){const e=new DOMMatrix(s);t.preMultiplySelf(e)}}),t}remove(){this.traverseUp((t,e)=>{this.inlineTransforms[e]=t.style.transform,t.style.transform="none"})}revert(){this.traverseUp((t,e)=>{const s=this.inlineTransforms[e];""===s?t.style.removeProperty("transform"):t.style.transform=s})}}const Ns=(t,e)=>t&&q(t)?t(e):t;let ks=0;class Rs{constructor(t,i={}){if(!t)return;B.current&&B.current.register(this);const r=i.x,n=i.y,o=i.trigger,a=i.modifier,l=i.releaseEase,h=l&&Le(l),d=!j(l)&&!j(l.ease),c=U(r)&&!j(r.mapTo)?r.mapTo:"translateX",u=U(n)&&!j(n.mapTo)?n.mapTo:"translateY",p=Ns(i.container,this);this.containerArray=H(p)?p:null,this.$container=p&&!this.containerArray?be(p)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.$target=U(t)?new $s(t):be(t)[0],this.$trigger=be(o||t)[0],this.fixed="fixed"===ts(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?l:Ss({mass:Bt(i.releaseMass,1),stiffness:Bt(i.releaseStiffness,80),damping:Bt(i.releaseDamping,20)}),this.releaseYSpring=d?l:Ss({mass:Bt(i.releaseMass,1),stiffness:Bt(i.releaseStiffness,80),damping:Bt(i.releaseDamping,20)}),this.releaseEase=h||De.outQuint,this.hasReleaseSpring=d,this.onGrab=i.onGrab||x,this.onDrag=i.onDrag||x,this.onRelease=i.onRelease||x,this.onUpdate=i.onUpdate||x,this.onSettle=i.onSettle||x,this.onSnap=i.onSnap||x,this.onResize=i.onResize||x,this.onAfterResize=i.onAfterResize||x,this.disabled=[0,0];const f={};if(a&&(f.modifier=a),j(r)||!0===r)f[c]=0;else if(U(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(j(n)||!0===n)f[u]=0;else if(U(n)){const t=n,e={};t.modifier&&(e.modifier=t.modifier),t.composition&&(e.composition=t.composition),f[u]=e}else!1===n&&(f[u]=0,this.disabled[1]=1);this.animate=new ds(this.$target,f),this.xProp=c,this.yProp=u,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-m,m,m,-m],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=X(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new Cs(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ye({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 ye({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!j(p),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?c:u,this.animate.callbacks.onRender=()=>{const t=this.updated,e=!(this.grabbed&&t)&&this.released,s=this.x,i=this.y,r=s-this.coords[2],n=i-this.coords[3];this.deltaX=r,this.deltaY=n,this.coords[2]=s,this.coords[3]=i,t&&(r||n)&&this.onUpdate(this),e?(this.computeVelocity(r,n),this.angle=ft(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 ye({autoplay:!1,duration:150*P.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=i,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),U(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=X(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=bt(_t(ot(t*t+e*e)/r*o,a,l),5);const d=mt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=bt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=Tt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=bt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=Tt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return bt(this.animate[this.xProp](),P.precision)}set x(t){this.setX(t,!1)}get y(){return bt(this.animate[this.yProp](),P.precision)}set y(t){this.setY(t,!1)}get progressX(){return gs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(gs(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return gs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(gs(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=bt(this.useWin?e.scrollX:this.$container.scrollLeft,0),s=bt(this.useWin?e.scrollY:this.$container.scrollTop,0),[i,r,n,o]=this.containerPadding,a=this.scrollThreshold;this.scroll.x=t,this.scroll.y=s,this.scrollBounds[0]=s-this.targetBounds[0]+i-a,this.scrollBounds[1]=t-this.targetBounds[1]-r+a,this.scrollBounds[2]=s-this.targetBounds[2]-n+a,this.scrollBounds[3]=t-this.targetBounds[3]+o-a}updateBoundingValues(){const t=this.$container;if(!t)return;const i=this.x,r=this.y,n=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=e.innerWidth,l=this.window[1]=e.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?_t(d,a,d):d,this.scrollView[1]=h?_t(c,l,c):c,this.updateScrollCoords();const{width:_,height:v,left:b,top:T,right:x,bottom:S}=t.getBoundingClientRect();this.dragArea[2]=bt(h?_t(_,a,a):_,0),this.dragArea[3]=bt(h?_t(v,l,l):v,0);const w=ts(t,"overflow"),E="visible"===w,$="hidden"===w;if(this.canScroll=!u&&this.contained&&(t===s.body&&E||!$&&!E)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!H(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-_:0,c=i?this.scrollView[1]-o-v:0;this.targetBounds[0]=bt(r.top+s-(h?0:T),0),this.targetBounds[1]=bt(r.right+e-(h?a:x),0),this.targetBounds[2]=bt(r.bottom+s-(h?l:S),0),this.targetBounds[3]=bt(r.left+e-(h?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]=-bt(r.top-(u?_t(T,0,l):T)+o-m,0),this.containerBounds[1]=-bt(r.right-(u?_t(x,0,a):x)-d+f,0),this.containerBounds[2]=-bt(r.bottom-(u?_t(S,0,l):S)-c+g,0),this.containerBounds[3]=-bt(r.left-(u?_t(b,0,a):b)+n-y,0))}this.transforms.revert(),this.coords[2]=n,this.coords[3]=o,this.setX(i,!0),this.setY(r,!0)}isOutOfBounds(t,e,s){if(!this.contained)return 0;const[i,r,n,o]=t,[a,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,i=t.x,r=t.y,n=Ns(t.container,this),o=Ns(t.containerPadding,this)||0,a=H(o)?o:[o,o,o,o],l=this.x,h=this.y,d=Ns(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=Ns(t.dragThreshold,this),p={mouse:3,touch:7};if(Y(u))p.mouse=u,p.touch=u;else if(u){const{mouse:t,touch:e}=u;j(t)||(p.mouse=t),j(e)||(p.touch=e)}this.containerArray=H(n)?n:null,this.$container=n&&!this.containerArray?be(n)[0]:s.body,this.useWin=this.$container===s.body,this.$scrollContainer=this.useWin?e:this.$container,this.isFinePointer=matchMedia("(pointer:fine)").matches,this.containerPadding=Bt(a,[0,0,0,0]),this.containerFriction=_t(Bt(Ns(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=_t(Bt(Ns(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ns(U(i)&&!j(i.snap)?i.snap:t.snap,this),this.snapY=Ns(U(r)&&!j(r.snap)?r.snap:t.snap,this),this.scrollSpeed=Bt(Ns(t.scrollSpeed,this),1.5),this.scrollThreshold=Bt(Ns(t.scrollThreshold,this),20),this.dragSpeed=Bt(Ns(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=Bt(Ns(t.minVelocity,this),0),this.maxVelocity=Bt(Ns(t.maxVelocity,this),50),this.velocityMultiplier=Bt(Ns(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(_t(l,y,f),!0),this.setY(_t(h,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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?_t(d,this.window[0],d):d,p=this.useWin?_t(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,S]=this.scrollBounds,w=bt(_t((v-b+t)/y,-1,0)*g,0),E=bt(_t((_-T-e)/y,0,1)*g,0),$=bt(_t((v-x-s)/y,0,1)*g,0),C=bt(_t((_-S+i)/y,-1,0)*g,0);if(w||$||C||E){const[t,e]=this.disabled;let s=l,i=h;t||(s=bt(_t(l+(C||E),0,r-o),0),this.coords[0]-=l-s),e||(i=bt(_t(h+(w||$),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*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-l,n-h),this.angle=ft(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 pe([this],null,"x"),pe([this],null,"y"),pe([this],null,"progressX"),pe([this],null,"progressY"),pe([this.scroll]),pe([this.overshootCoords]),this}scrollInView(t,e=0,s=De.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[l,h,d,c]=o,u=bt(_t(r-l,-m,0),0),p=bt(_t(i-h,0,m),0),f=bt(_t(r-d,0,m),0),g=bt(_t(i-c,-m,0),0);new Ge(n,{x:bt(n.x+(g?g-e:p?p+e:0),0),y:bt(n.y+(u?u-e:f?f+e:0),0),duration:j(t)?350*P.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=es(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=De.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=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]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=_t(Tt(i,this.snapX),u,d),a=_t(Tt(r,this.snapY),h,c),l=j(t)?350*P.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,s)}return this}handleDown(t){const e=t.target;if(this.grabbed||"range"===e.type)return;t.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const i=t.changedTouches,r=i?i[0].clientX:t.clientX,n=i?i[0].clientY:t.clientY,{x:o,y:a}=this.transforms.normalizePoint(r,n),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=ts(this.$target,"zIndex",!1);ks=(f>ks?f:ks)+1,this.targetStyles=es(this.$target,{zIndex:ks}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=es(s.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,De.out(3)),this.onGrab(this),s.addEventListener("touchmove",this),s.addEventListener("touchend",this),s.addEventListener("touchcancel",this),s.addEventListener("mousemove",this),s.addEventListener("mouseup",this),s.addEventListener("selectstart",this)}handleMove(t){if(!this.grabbed)return;const e=t.changedTouches,s=e?e[0].clientX:t.clientX,i=e?e[0].clientY:t.clientY,{x:r,y:n}=this.transforms.normalizePoint(s,i),o=r-this.pointer[6],a=n-this.pointer[7];let l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=ts(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&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):(Es(t),this.triggerStyles||(this.triggerStyles=es(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Es,{passive:!1}),this.$trigger.addEventListener("touchmove",Es,{passive:!1}),this.$trigger.addEventListener("touchend",Es),(this.dragged||!this.disabled[0]&&ht(o)>this.dragThreshold||!this.disabled[1]&&ht(a)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=r,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[t,e]=this.disabled,[i,r,n,a,l,h]=this.pointer,[d,c,u,p]=this.containerBounds,[m,f]=this.snapped,g=this.releaseXSpring,y=this.releaseYSpring,_=this.releaseEase,v=this.hasReleaseSpring,b=this.overshootCoords,T=this.x,x=this.y,S=this.computeVelocity(i-l,r-h),w=this.angle=ft(r-a,i-n),E=150*S,$=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+lt(w)*E,N=x+at(w)*E,k=C>c?c+(C-c)*$:C<p?p+(C-p)*$:C,R=N>u?u+(N-u)*$:N<d?d+(N-d)*$:N,D=this.destX=_t(bt(Tt(k,this.snapX),5),p,c),I=this.destY=_t(bt(Tt(R,this.snapY),5),d,u),O=this.isOutOfBounds(this.containerBounds,C,N);let A=0,L=0,B=_,F=_,M=0;if(b.x=T,b.y=x,!t){const t=D===c?T>c?-1:1:T<p?-1:1,s=bt(T-D,0);g.velocity=e&&v?s?E*t/ht(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=g;A=T===D?0:v?r:r-n*P.timeScale,v&&(B=i),A>M&&(M=A)}if(!e){const e=I===u?x>u?-1:1:x<d?-1:1,s=bt(x-I,0);y.velocity=t&&v?s?E*e/ht(s):0:S;const{ease:i,settlingDuration:r,restDuration:n}=y;L=x===I?0:v?r:r-n*P.timeScale,v&&(F=i),L>M&&(M=L)}if(!v&&O&&$&&(A||L)){const t=o.blend;new Ge(b,{x:{to:k,duration:.65*A},y:{to:R,duration:.65*L},ease:_,composition:t}).init(),new Ge(b,{x:{to:D,duration:A},y:{to:I,duration:L},ease:_,composition:t}).init(),this.overshootTicker.stretch(mt(A,L)).restart()}else t||this.animate[this.xProp](D,A,B),e||this.animate[this.yProp](I,L,F);this.scrollInView(M,this.scrollThreshold,_);let V=!1;D!==m&&(this.snapped[0]=D,this.snapX&&(V=!0)),I!==f&&this.snapY&&(this.snapped[1]=I,this.snapY&&(V=!0)),V&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Es),this.$trigger.removeEventListener("touchmove",Es),this.$trigger.removeEventListener("touchend",Es),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove("is-disabled"),this.touchActionStyles=es(this.$trigger,{touchAction:this.disabled[0]?"pan-x":this.disabled[1]?"pan-y":"none"}),this.$trigger.addEventListener("touchstart",this,{passive:!0}),this.$trigger.addEventListener("mousedown",this,{passive:!0}),this.$trigger.addEventListener("mouseenter",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add("is-disabled"),this.$trigger.removeEventListener("touchstart",this),this.$trigger.removeEventListener("mousedown",this),this.$trigger.removeEventListener("mouseenter",this),s.removeEventListener("touchmove",this),s.removeEventListener("touchend",this),s.removeEventListener("touchcancel",this),s.removeEventListener("mousemove",this),s.removeEventListener("mouseup",this),s.removeEventListener("selectstart",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove("is-disabled"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":this.handleDown(t);break;case"mousemove":case"touchmove":this.handleMove(t);break;case"mouseup":case"touchend":case"touchcancel":this.handleUp();break;case"mouseenter":this.handleHover();break;case"selectstart":Es(t)}}}const Ds=(t,e)=>new Rs(t,e),Is=(t=x)=>new ye({duration:1*P.timeScale,onComplete:t},null,0).resume(),Os=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&&!q(a)&&a.revert&&(e=a),j(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||x}};class As{constructor(t={}){B.current&&B.current.register(this);const i=t.root;let r=s;i&&(r=i.current||i.nativeElement||be(i)[0]||s);const n=t.defaults,o=P.defaults,a=t.mediaQueries;if(this.defaults=n?$t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const s=e.matchMedia(a[t]);this.mediaQueryLists[t]=s,s.addEventListener("change",this)}}register(t){(this.once?this.revertiblesOnce:this.revertibles).push(t)}execute(t){let e=B.current,s=B.root,i=P.defaults;B.current=this,B.root=this.root,P.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return B.current=e,B.root=s,P.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);q(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,q(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);q(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,q(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);q(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(q(s))return s(this);const i=Os(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,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 Ls=t=>new As(t),Bs=()=>{const t=s.createElement("div");s.body.appendChild(t),t.style.height="100lvh";const e=t.offsetHeight;return s.body.removeChild(t),e},Ps=(t,e)=>t&&q(t)?t(e):t,Fs=new Map;class Ms{constructor(t){this.element=t,this.useWin=this.element===s.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ye({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Ct(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ye({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=bt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new ye({autoplay:!1,duration:250*P.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ye({autoplay:!1,duration:500*P.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?e:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const t=this.useWin,s=this.element;this.scrollX=bt(t?e.scrollX:s.scrollLeft,0),this.scrollY=bt(t?e.scrollY:s.scrollTop,0)}updateWindowBounds(){this.winWidth=e.innerWidth,this.winHeight=Bs()}updateBounds(){const t=getComputedStyle(this.element),e=this.element;let s,i;if(this.scrollWidth=e.scrollWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),this.scrollHeight=e.scrollHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom),this.updateWindowBounds(),this.useWin)s=this.winWidth,i=this.winHeight;else{const t=e.getBoundingClientRect();s=e.clientWidth,i=e.clientHeight,this.top=t.top,this.left=t.left,this.scale=t.width?s/t.width:t.height?i/t.height:1}this.width=s,this.height=i}refreshScrollObservers(){Ct(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Ct(this,t=>{t.refresh(),t.onResize(t),t._debug&&t.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(t){"scroll"===t.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?e:this.element).removeEventListener("scroll",this),Fs.delete(this.element)}}const Vs=t=>{const e=t&&be(t)[0]||s.body;let i=Fs.get(e);return i||(i=new Ms(e),Fs.set(e,i)),i},zs=(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:l,u:h}=Ht(a,Yt);let d=l;return"%"===h?d=l/100*s:h&&(d=we(t,Yt,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},Xs=(t,e,s,i,r)=>{let n;if(W(e)){const o=O.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=zs(t,h[0],s,i,r),p=zs(t,h[1],s,i,r);if(d){const e=zt(zs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=zt(zs(t,"max",s),p,l);n=e>u?u:e}else n=zt(u,p,l)}else n=zs(t,e,s,i,r)}else n=e;return bt(n,0)},Hs=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[l]){e=i;break}}return e};let Us=0;const Ys=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Ws{constructor(t={}){B.current&&B.current.register(this);const e=Bt(t.sync,"play pause"),i=e?Le(e):null,r=e&&("linear"===e||e===Ee),n=e&&!(i===Ee&&!r),o=e&&(Y(e)||!0===e||r),a=e&&W(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=Us++,this.id=j(t.id)?this.index:t.id,this.container=Vs(t.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=n||o||!!l,this.syncEase=n?i:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:x,this.onSyncLeave=l&&!h&&l[1]?l[1]:x,this.onSyncEnterForward=l&&h&&l[0]?l[0]:x,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:x,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:x,this.onSyncLeaveBackward=l&&h&&l[3]?l[3]:x,this.onEnter=t.onEnter||x,this.onLeave=t.onLeave||x,this.onEnterForward=t.onEnterForward||x,this.onLeaveForward=t.onLeaveForward||x,this.onEnterBackward=t.onEnterBackward||x,this.onLeaveBackward=t.onLeaveBackward||x,this.onUpdate=t.onUpdate||x,this.onResize=t.onResize||x,this.onSyncComplete=t.onSyncComplete||x,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=t,this._debug=Bt(t.debug,!1),this._next=null,this._prev=null,kt(this.container,this),Is(()=>{if(!this.reverted){if(!this.target){const e=be(t.target)[0];this.target=e||s.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,j(t)||j(t.persist)||(t.persist=!0),!this._params.target)){let e;j(t.targets)?Ct(t,t=>{t.targets&&!e&&(e=Hs(t))}):e=Hs(t),this.target=e||s.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const t=(this.scroll-this.offsetStart)/this.distance;return t===1/0||isNaN(t)?0:bt(_t(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=Bt(Ps(t.repeat,this),!0),this.horizontal="x"===Bt(Ps(t.axis,this),"y"),this.enter=Bt(Ps(t.enter,this),"end start"),this.leave=Bt(Ps(t.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const t=this.container,e=this.horizontal,i=t.element.querySelector(":scope > .animejs-onscroll-debug"),r=s.createElement("div"),n=s.createElement("div"),o=s.createElement("div"),a=Ys[this.index%Ys.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?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,_=e?60:g,v=e?_: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)`,S=(t,e,s,i,r)=>`position:${t};left:${e}px;top:${s}px;width:${i}px;height:${r}px;`;r.style.cssText=`${S("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=`${S("sticky",0,0,e?h:g,e?g:d)}`,i||(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=`${S("relative",0,0,e?c:g,e?g:u)}`,i||(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 w=[" enter: "," leave: "];this.coords.forEach((t,i)=>{const r=i>1,l=(r?0:this.offset)+t,m=i%2,f=l<v,g=l>(r?e?h:d:e?c:u)-v,b=(r?m&&!f:!m&&!f)||g,T=s.createElement("div"),x=s.createElement("div"),E=e?b?"right":"left":b?"bottom":"top",$=b?(e?_:y)+(r?e?-1:g?0:-2:e?-1:-2):e?1:0;x.innerHTML=`${this.id}${w[m]}${this.thresholds[i]}`,T.style.cssText=`${S("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-${E}: 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 C=l-$+(e?1:0);T.style[e?"left":"top"]=`${C}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),i||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===ts(t.element,"position")&&(this.debugStyles=es(t.element,{position:"relative "}))}updateBounds(){let t;this._debug&&this.removeDebug();const e=this.target,i=this.container,r=this.horizontal,n=this.linked;let o,a=e;for(n&&(o=n.currentTime,n.seek(0,!0));a&&a!==i.element&&a!==s.body;){const e="sticky"===ts(a,"position")&&es(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=i.scale,d=(r?l.left+i.scrollX-i.left:l.top+i.scrollY-i.top)*h,c=(r?l.width:l.height)*h,u=r?i.width:i.height,p=(r?i.scrollWidth:i.scrollHeight)-u,m=this.enter,f=this.leave;let g="start",y="end",_="end",v="start";if(W(m)){const t=m.split(" ");_=t[0],g=t.length>1?t[1]:g}else if(U(m)){const t=m;j(t.container)||(_=t.container),j(t.target)||(g=t.target)}else Y(m)&&(_=m);if(W(f)){const t=f.split(" ");v=t[0],y=t.length>1?t[1]:y}else if(U(f)){const t=f;j(t.container)||(v=t.container),j(t.target)||(y=t.target)}else Y(f)&&(v=f);const b=Xs(e,g,c),T=Xs(e,y,c),x=b+d-u,S=T+d-p,w=Xs(e,_,u,x,S),E=Xs(e,v,u,x,S),$=b+d-w,C=T+d-E,N=C-$;this.offset=d,this.offsetStart=$,this.offsetEnd=C,this.distance=N<=0?0:N,this.thresholds=[g,y,_,v],this.coords=[b,T,w,E],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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,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(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&Y(i)){if(i<1){const t=1e-4,s=e<g&&1===g?t:e>g&&!g?-t:0;g=bt(xt(e,g,xt(.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 Nt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const qs=(t={})=>new Ws(t),js=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Gs=(t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=js(r,e,s)-t,i>0?o=r:n=r}while(ht(i)>1e-7&&++a<100);return r},Qs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?Ee:r=>0===r||1===r?r:js(Gs(r,t,s),e,i),Js=(t=10,e)=>{const s=e?ct:ut;return e=>s(_t(e,0,1)*t)*(1/t)},Zs=(...t)=>{const e=t.length;if(!e)return Ee;const s=e-1,i=t[0],r=t[s],n=[0],o=[rt(i)];for(let e=1;e<s;e++){const i=t[e],r=W(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(j(l)?e/s:rt(l)/100),o.push(rt(a))}return o.push(rt(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]}},Ks=(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(_t(o,r,1))}return s.push(1),Zs(...s)};var ti=Object.freeze({__proto__:null,Spring:xs,createSpring:ws,cubicBezier:Qs,eases:De,irregular:Ks,linear:Zs,spring:Ss,steps:Js});const ei=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(bt(t(i/e),4));return`linear(${s.join(", ")})`},si={},ii=t=>{let e=si[t];if(e)return e;if(e="linear",W(t)){if(z(t,"linear")||z(t,"cubic-")||z(t,"steps")||z(t,"ease"))e=t;else if(z(t,"cubicB"))e=V(t);else{const s=Oe(t);q(s)&&(e=s===Ee?"linear":ei(s))}si[t]=e}else if(q(t)){const s=ei(t);s&&(e=s)}else t.ease&&(e=ei(t.ease));return e},ri=["x","y","z"],ni=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...ri],oi=(()=>[...ri,...b.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let ai=null;const li=(t,e,s,i,r)=>{let n=W(e)?e:Pt(e,s,i,r);return Y(n)?ni.includes(t)||z(t,"translate")?`${n}px`:z(t,"rotate")||z(t,"skew")?`${n}deg`:`${n}`:n},hi=(t,e,s,i,r,n)=>{let o="0";const a=j(i)?getComputedStyle(t)[e]:li(e,i,t,r,n);return o=j(s)?H(i)?i.map(s=>li(e,s,t,r,n)):a:[li(e,s,t,r,n),a],o};class di{constructor(e,s){B.current&&B.current.register(this),G(ai)&&(!t||!j(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(b.forEach(t=>{const e=z(t,"skew"),s=z(t,"scale"),i=z(t,"rotate"),r=z(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{}}),ai=!0):ai=!1);const i=Te(e),r=i.length;r||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");const n=Bt(s.autoplay,P.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,l=s.reversed&&!0===s.reversed,h=Bt(s.loop,P.defaults.loop),c=!0===h||h===1/0?1/0:Y(h)?h+1:1,u=a?l?"alternate-reverse":"alternate":l?"reverse":"normal",p=1===P.timeScale?1:f;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||P.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!n||!1!==o,this.reversed=l,this.persist=Bt(s.persist,P.defaults.persist),this.autoplay=n,this._speed=Bt(s.playbackRate,P.defaults.playbackRate),this._resolve=x,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[d],n=oi.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},l=Bt(s.ease,P.defaults.ease),h=Pt(l,t,e,r),m=q(h)||W(h)?h:l,f=l.ease&&l,g=ii(m),_=(f?f.settlingDuration:Pt(Bt(s.duration,P.defaults.duration),t,e,r))*p,x=Pt(Bt(s.delay,P.defaults.delay),t,e,r)*p,S=Bt(s.composition,"replace");for(let l in s){if(!et(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:g,duration:_,delay:x,composite:S},m=s[l],f=!!n&&(b.includes(l)?l:v.get(l)),y=f?"transform":l;let T;if(a[y]||(a[y]=o[y]),U(m)){const s=m,n=Bt(s.ease,g),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Pt(Bt(s.duration,_),t,e,r))*p,d.delay=Pt(Bt(s.delay,x),t,e,r)*p,d.composite=Bt(s.composition,S),d.easing=ii(n),T=hi(t,l,u,c,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=hi(t,l,u,c,e,r),Ke(this,t,l,h,d),!j(u))if(f){const t=`--${f}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else T=H(m)?m.map(s=>li(l,s,t,e,r)):li(l,m,t,e,r),f?(h[`--${f}`]=T,i[f]=T):h[l]=T,Ke(this,t,l,h,d)}if(n){let t=y;for(let e in i)t+=`${T[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=W(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=P.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===P.timeScale?1:f);this.forEach(t=>{!this.persist&&e>=this.duration&&t.play(),t.currentTime=e})}get progress(){return this.currentTime/this.duration}set progress(t){this.forEach(e=>e.currentTime=t*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach("play")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach("pause"))}alternate(){return this.reversed=!this.reversed,this.forEach("reverse"),this.paused&&this.forEach("pause"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(t,e=!1){return e&&(this.muteCallbacks=!0),t<this.duration&&(this.completed=!1),this.currentTime=t,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach("commitStyles")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach("cancel"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(t=>{"none"===t.style.transform&&t.style.removeProperty("transform")})}),this}revert(){return this.cancel().targets.forEach((t,e)=>{const s=t.style,i=this._inlineStyles[e];for(let e in i){const r=i[e];j(r)||r===y?s.removeProperty(V(e)):t.style[e]=r}t.getAttribute("style")===y&&t.removeAttribute("style")}),this}then(t=x){const e=this.then,s=()=>{this.then=null,t(this),this.then=e,this._resolve=x};return new Promise(t=>(this._resolve=()=>t(s()),this.completed&&this._resolve(),this))}}const ci={animate:(t,e)=>new di(t,e),convertEase:ei};let ui=0,pi=0;const mi=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),fi=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},gi=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},yi=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,fi(s)),i&&!e.has(i)&&e.set(i,fi(i))},_i=t=>{t.forEach((t,e)=>gi(e,t)),t.clear()},vi={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},bi=t=>{if(!t)return;const e=t.parentNode;e&&(e._head===t&&(e._head=t._next),e._tail===t&&(e._tail=t._prev),t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t._prev=null,t._next=null,t.parentNode=null)},Ti=(t,e,s,i)=>{let r=t.dataset.layoutId;r||(r=t.dataset.layoutId="node-"+pi++);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.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!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},xi=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=mi(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;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=fi(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=fi(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,_=0,v=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();_=t.left,v=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);j(e)||(a[t]=e)}if(a.left=_,a.top=v,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=_,y=v):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=_-s-r,y=v-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=_-t-l.properties.clientLeft,y=v-e-l.properties.clientTop}else g=_-s-r,y=v-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},Si=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},wi=(t,e)=>{const s=Pt(e.ease,t.$el,t.index,t.total),i=q(s)?s:e.ease,r=!j(i)&&!j(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Pt(e.duration,t.$el,t.index,t.total),t.delay=Pt(e.delay,t.$el,t.index,t.total)},Ei=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},$i=t=>{const e=t.$el.style,s=t.inlineStyles;for(let t=0,i=s.length;t<i;t+=2){const i=s[t],r=s[t+1];r&&""!==r?e[i]=r:(e[i]="",e.removeProperty(i))}},Ci=t=>{const e=t.inlineTransforms,s=t.$el.style;!t.hasTransform||!e||t.hasTransform&&"none"===s.transform||e&&"none"===e?s.removeProperty("transform"):e&&(s.transform=e);const i=t.$measure;if(t.hasTransform&&i!==t.$el){const e=i.style,s=t.measuredInlineTransform;s&&""!==s?e.transform=s:e.removeProperty("transform")}t.measuredInlineTransform=null,null!==t.inlineTransition&&(gi(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(gi(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Ni=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.layout.pendingRemoval.delete(t.$el)},ki=(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 Ri{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=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}forEach(t,e){let s=t,i=0;for(;s;)if(e(s,i++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(t){this.forEach(this.rootNode,t)}forEachNode(t){for(const e of this.rootNodes)this.forEach(e,t)}registerElement(t,e){if(!t||1!==t.nodeType)return null;this.layout.transitionMuteStore.has(t)||this.layout.transitionMuteStore.set(t,fi(t));const s=[t,e],i=this.layout.root;let r=null;for(;s.length;){const t=s.pop(),e=s.pop();if(!e||1!==e.nodeType||Q(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?vi:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=mi(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=mi(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){xi(u,e,o,n);let t=e.lastElementChild;for(;t;)s.push(t,u),t=t.previousElementSibling;r||(r=u);continue}{let i=e.lastElementChild;for(;i;)s.push(i,t),i=i.previousElementSibling;r||(r=u);continue}}bi(u),u=Ti(e,t,this,u)}else u=Ti(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!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),xi(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 t=this.layout,e=t.children,s=t.root,i=H(e)?e:[e],r=[],n="*"===e?s:B.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=fi(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=W(e)?n.querySelectorAll(e):e}const l=Te(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!mi(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(Ci);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),gi(e,i)}return this}}function Di(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class Ii{constructor(t,e={}){B.current&&B.current.register(this);const s=Di(e.swapAt),i=Di(e.enterFrom),r=Di(e.leaveTo),n=e.properties;if(e.duration=Bt(e.duration,350),e.delay=Bt(e.delay,0),e.ease=Bt(e.ease,"inOut(3.5)"),this.params=e,this.root=Te(t)[0],this.id=ui++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=$t(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])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.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Ri(this),this.newState=new Ri(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),_i(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>_i(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode($i),this}animate(t={}){const e={ease:Bt(t.ease,this.params.ease),delay:Bt(t.delay,this.params.delay),duration:Bt(t.duration,this.params.duration)},s={},i=Bt(t.onComplete,this.params.onComplete),r=Bt(t.onPause,this.params.onPause);for(let e in L)"ease"!==e&&"duration"!==e&&"delay"!==e&&(j(t[e])?j(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Ni(t),$i(t)});for(let t=0,e=S.length;t<e;t++){const e=S[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||_i(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Ni),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=$t($t(t.swapAt||{},this.swapAtParams),e),o=$t($t(t.enterFrom||{},this.enterFromParams),e),a=$t($t(t.leaveTo||{},this.leaveToParams),e),[l,h]=Di(n),[d,c]=Di(o),[u,p]=Di(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,_=this.entering,v=this.leaving,b=this.pendingRemoval;g.length=y.length=_.length=v.length=0,m.forEachRootNode(yi),f.record(),f.forEachRootNode(Ei);const T=[],x=[],S=[],w=[],E=f.rootNode,$=E.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=ki(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(ki(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const S=b.has(e),w=a.measuredIsVisible,$=t.measuredIsVisible,C=!w&&$&&!o,N=!x&&(y||S)&&!r,k=x&&!y&&!n,R=k||x&&S&&!n;t.branchAdded=r||N,t.branchRemoved=n||R,t.branchNotRendered=o||x,x&&w&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",ki(a,t,f)),k?(t.isTarget&&(v.push(e),t.isLeaving=!0),b.add(e)):!x&&S&&b.delete(e),N&&!o||C?(Si(a,d),t.isTarget&&(_.push(e),t.isEntering=!0)):R&&!o&&Si(t,u),t===E||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,N=0,k=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==E&&i;for(;a&&!a.isTarget&&a!==E;)a=a.parentNode;const d=g.length;t===E?(t.index=0,t.total=d,wi(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:_.length,wi(t,c),C++):t.isLeaving?(t.index=a?a.index:N,t.total=a?d:v.length,N++,wi(t,p)):t.isTarget?(t.index=k++,t.total=d,wi(t,e)):(t.index=a?a.index:0,t.total=d,wi(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Pt(n[e],s,t.index,t.total),o[e]=Pt(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,S.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(l.transform&&(t.hasTransform=!0,S.push(s)),w.push(s)))});const R={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=R,this.timeline=hs(s),!x.length&&!S.length&&!y.length)return _i(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==$||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===$&&"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"}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||r.isInlined||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e),i=s.properties;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",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{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",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(w.length){const t=Le(f.nodes.get(w[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(w,s,0)}}const D=S.length;if(D){for(let t=0;t<D;t++){const e=S[t],s=f.getNode(e);s.isInlined||(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`),e.style.transform=m.getComputedValue(e,"transform"),w.includes(e)&&(s.ease=Pt(n.ease,e,s.index,s.total),s.duration=Pt(n.duration,e,s.index,s.total))}this.transformAnimation=ci.animate(S,{translate:t=>f.getNode(t).isInlined?"0px 0px":`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!w.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Pt(l.transform,t,i.index,i.total),e]},autoplay:!1,...R}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const Oi=(t,e)=>new Ii(t,e),Ai=bs,Li={},Bi=(t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s),Pi=t=>(...e)=>{const s=t(...e);return new Proxy(x,{apply:(t,e,[i])=>s(i),get:(t,e)=>Pi((...t)=>{const i=Li[e](...t);return t=>i(s(t))})})},Fi=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?Pi(Bi(e,s)):e)(...t);return Li[t]||(Li[t]=i),i},Mi=Fi("roundPad",Ai.roundPad),Vi=Fi("padStart",Ai.padStart),zi=Fi("padEnd",Ai.padEnd),Xi=Fi("wrap",Ai.wrap),Hi=Fi("mapRange",Ai.mapRange),Ui=Fi("degToRad",Ai.degToRad),Yi=Fi("radToDeg",Ai.radToDeg),Wi=Fi("snap",Ai.snap),qi=Fi("clamp",Ai.clamp),ji=Fi("round",Ai.round),Gi=Fi("lerp",Ai.lerp,1),Qi=Fi("damp",Ai.damp,1),Ji=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let Zi=0;const Ki=(t,e=0,s=1,i=0)=>{let r=void 0===t?Zi++: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}},tr=t=>t[Ji(0,t.length-1)],er=t=>{let e,s,i=t.length;for(;i;)s=Ji(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},sr=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!j(o),l=a&&!j(o.ease)?o.ease:a?Le(o):null,h=e.grid,d=e.axis,c=e.total,u=j(r)||0===r||"first"===r,p="center"===r,m="last"===r,f="random"===r,g=H(t),_=e.use,v=rt(g?t[0]:t),b=g?rt(t[1]):0,T=R.exec((g?t[1]:t)+y),x=e.start||0+(g?v:0);let S=u?0:Y(r)?r:0;return(t,r,o,a)=>{const[u]=Te(t),y=j(c)?o:c,w=!j(_)&&(q(_)?_(u,r,y):Vt(u,_)),E=Y(w)||W(w)&&Y(+w)?+w:r;if(p&&(S=(y-1)/2),m&&(S=y-1),!s.length){for(let t=0;t<y;t++){if(h){const e=p?(h[0]-1)/2:S%h[0],i=p?(h[1]-1)/2:ut(S/h[0]),r=e-t%h[0],n=i-ut(t/h[0]);let o=ot(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(ht(S-t));i=mt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:ht(i-t))),f&&(s=er(s))}const $=g?(b-v)/i:v;let C=(a?rs(a,j(e.start)?a.iterationDuration:x):x)+($*bt(s[E],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var ir=Object.freeze({__proto__:null,$:Te,clamp:qi,cleanInlineStyles:Qt,createSeededRandom:Ki,damp:Qi,degToRad:Ui,get:ts,keepTime:Os,lerp:Gi,mapRange:Hi,padEnd:zi,padStart:Vi,radToDeg:Yi,random:Ji,randomPick:tr,remove:ss,round:ji,roundPad:Mi,set:es,shuffle:er,snap:Wi,stagger:sr,sync:Is,wrap:Xi});const rr=t=>{const e=be(t)[0];return e&&Q(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},nr=(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)},or=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[h],o=t.getCTM(),a=0===s;return{from:0,to:r,modifier:i=>{const l=i+s*r;if("a"===e){const e=nr(t,r,l,-1,a),s=nr(t,r,l,1,a);return 180*ft(s.y-e.y,s.x-e.x)/gt}{const s=nr(t,r,l,0,a);return"x"===e?n||!o?s.x:s.x*o.a+s.y*o.c+o.e:n||!o?s.y:s.x*o.b+s.y*o.d+o.f}}}},ar=(t,e=0)=>{const s=rr(t);if(s)return{translateX:or(s,"x",e),translateY:or(s,"y",e),rotate:or(s,"a",e)}},lr=t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(ot(s.a*s.a+s.b*s.b)+ot(s.c*s.c+s.d*s.d))/2)}return e},hr=(t,e,s)=>{const i=f,r=getComputedStyle(t),n=r.strokeLinecap,o="non-scaling-stroke"===r.vectorEffect?t:null;let a=n;const l=new Proxy(t,{get(t,e){const s=t[e];return e===u?t:"setAttribute"===e?(...e)=>{if("draw"===e[0]){const s=e[1].split(" "),r=+s[0],l=+s[1],h=lr(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"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)}:q(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l},dr=(t,e=0,s=0)=>be(t).map(t=>hr(t,e,s)),cr=(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=rr(t);if(!i)throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");if(!(i.tagName||"").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${i.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const r="path"===s.tagName,n=r?" ":",",o=s[c];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+bt(c.x,3)+n+c.y+" ",l+=p+bt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[c]=l,[a,l]};var ur=Object.freeze({__proto__:null,createDrawable:dr,createMotionPath:ar,morphTo:cr});const pr="undefined"!=typeof Intl&&Intl.Segmenter,mr=/\{value\}/g,fr=/\{i\}/g,gr=/(\s+)/,yr=/^\s+$/,_r="line",vr="word",br="char",Tr="data-line";let xr=null,Sr=null,wr=null;const Er=t=>t.isWordLike||" "===t.segment||Y(+t.segment),$r=t=>t.setAttribute("aria-hidden","true"),Cr=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Nr={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},kr=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&kr(e)}},Rr=(t,e,s)=>{const i=t.getAttribute(Tr);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&yr.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&yr.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)Rr(t.children[r],e,s);return s},Dr=(t,e={})=>{let s="";const i=W(e.class)?` class="${e.class}"`:"",r=Bt(e.clone,!1),n=Bt(e.wrap,!1),o=n?!0===n?"clip":n:!!r&&"clip";return n&&(s+=`<span${o?` style="overflow:${o};"`:""}>`),s+=`<span${i}${r?' style="position:relative;"':""} data-${t}="{i}">`,r?(s+="<span>{value}</span>",s+=`<span inert style="position:absolute;top:${"top"===r?"-100%":"bottom"===r?"100%":"0"};left:${"left"===r?"-100%":"right"===r?"100%":"0"};white-space:nowrap;">{value}</span>`):s+="{value}",s+="</span>",n&&(s+="</span>"),s},Ir=(t,e,s,i,r,n,o,a,l)=>{const h=r===_r,d=r===br,c=`_${r}_`,u=q(t)?t(s):t,p=h?"block":"inline-block";wr.innerHTML=u.replace(mr,`<i class="${c}"></i>`).replace(fr,`${d?l:h?o:a}`);const m=wr.content,f=m.firstElementChild,g=m.querySelector(`[data-${r}]`)||f,y=m.querySelectorAll(`i.${c}`),_=y.length;if(_){f.style.display=p,g.style.display=p,g.setAttribute(Tr,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=_;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Nr[r]}`),f};class Or{constructor(e,i={}){xr||(xr=pr?new pr([],{granularity:vr}):{segment:t=>{const e=[],s=t.split(gr);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!yr.test(i)})}return e}}),Sr||(Sr=pr?new pr([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!wr&&t&&(wr=s.createElement("template")),B.current&&B.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=i,d=(e=H(e)?e[0]:e)&&e.nodeType?e:(ve(e)||[])[0],c=!0===o?{}:o,u=!0===r||j(r)?{}:r,p=!0===n?{}:n;this.debug=Bt(h,!1),this.includeSpaces=Bt(l,!1),this.accessible=Bt(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=U(c)?Dr(_r,c):c,this.wordTemplate=U(u)||this.linesOnly?Dr(vr,u):u,this.charTemplate=U(p)?Dr(br,p):p,this.$target=d,this.html=d&&d.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const m=()=>this.html&&(c||u||p)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const t=d.offsetWidth;t!==this.width&&(this.width=t,m())},150)}),this.lineTemplate&&!this.ready?s.fonts.ready.then(m):m(),d?this.resizeObserver.observe(d):console.warn("No Text Splitter target found.")}addEffect(t){if(!q(t))return console.warn("Effect must return a function.");const e=Os(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=>q(t)?t(this):t.revert&&t.revert()),this.$target.innerHTML=this.html,this}splitNode(t){const e=this.wordTemplate,i=this.charTemplate,r=this.includeSpaces,n=this.debug,o=t.nodeType;if(3===o){const o=t.nodeValue;if(o.trim()){const a=[],l=this.words,h=this.chars,d=xr.segment(o),c=s.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=Er(t);if(!u||s&&u&&Er(u))a.push(e);else{const t=a.length-1,s=a[t];gr.test(s)||gr.test(e)?a.push(e):a[t]+=e}u=t}for(let t=0,o=a.length;t<o;t++){const o=a[t];if(o.trim()){const d=a[t+1],u=r&&d&&!d.trim(),p=o,m=i?Sr.segment(p):null,f=i?s.createDocumentFragment():s.createTextNode(u?o+" ":o);if(i){const t=[...m];for(let e=0,r=t.length;e<r;e++){const o=t[e],a=e===r-1&&u?o.segment+" ":o.segment,d=s.createTextNode(a);Ir(i,h,d,f,br,n,-1,l.length,h.length)}}e?Ir(e,l,f,c,vr,n,-1,l.length,h.length):i?c.appendChild(f):c.appendChild(s.createTextNode(o)),u&&t++}else{if(t&&r)continue;c.appendChild(s.createTextNode(o))}}t.parentNode.replaceChild(c,t)}}else if(1===o){const e=[...t.childNodes];for(let t=0,s=e.length;t<s;t++)this.splitNode(e[t])}}split(t=!1){const e=this.$target,i=!!this.cache&&!t,r=this.lineTemplate,n=this.wordTemplate,o=this.charTemplate,a="loading"!==s.fonts.status,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>q(t)&&t(this)),i||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(i&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Cr(e,vr))),o&&(l||n)&&(this.chars=Cr(e,br));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!j(d)&&s-d>.5*i&&c++,e.setAttribute(Tr,`${c}`);const r=e.querySelectorAll(`[${Tr}]`);let n=r.length;for(;n--;)r[n].setAttribute(Tr,`${c}`);d=s}if(l){const t=s.createDocumentFragment(),i=new Set,a=[];for(let t=0;t<c+1;t++){const s=e.cloneNode(!0);Rr(s,t,new Set).forEach(t=>{const e=t.parentNode;e&&(1===t.nodeType&&i.add(e),e.removeChild(t))}),a.push(s)}i.forEach(kr);for(let e=0,s=a.length;e<s;e++)Ir(r,this.lines,a[e],t,_r,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Cr(e,vr)),o&&(this.chars=Cr(e,br))}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&&(l||!i)){const t=s.createElement("span");t.style.cssText="position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;",t.innerHTML=this.html,e.insertBefore(t,e.firstChild),this.lines.forEach($r),this.words.forEach($r),this.chars.forEach($r)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Ar=(t,e)=>new Or(t,e),Lr=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Or(t,e));var Br=Object.freeze({__proto__:null,TextSplitter:Or,split:Lr,splitText:Ar});export{Te as $,ds as Animatable,Ii as AutoLayout,Rs as Draggable,Ge as JSAnimation,As as Scope,Ws as ScrollObserver,xs as Spring,Or as TextSplitter,ls as Timeline,ye as Timer,di as WAAPIAnimation,Qe as animate,qi as clamp,Qt as cleanInlineStyles,cs as createAnimatable,Ds as createDraggable,dr as createDrawable,Oi as createLayout,ar as createMotionPath,Ls as createScope,Ki as createSeededRandom,ws as createSpring,hs as createTimeline,_e as createTimer,Qs as cubicBezier,Qi as damp,Ui as degToRad,De as eases,ti as easings,ie as engine,ts as get,Ks as irregular,Os as keepTime,Gi as lerp,Zs as linear,Hi as mapRange,cr as morphTo,qs as onScroll,zi as padEnd,Vi as padStart,Yi as radToDeg,Ji as random,tr as randomPick,ss as remove,ji as round,Mi as roundPad,Fs as scrollContainers,es as set,er as shuffle,Wi as snap,Lr as split,Ar as splitText,Ss as spring,sr as stagger,Js as steps,ur as svg,Is as sync,Br as text,ir as utils,ci as waapi,Xi as wrap};diff --git a/dist/bundles/anime.umd.js b/dist/bundles/anime.umd.jsindex ff0d0828..d15bdce1 100644--- a/dist/bundles/anime.umd.js+++ b/dist/bundles/anime.umd.js@@ -1,6 +1,6 @@/*** Anime.js - UMD bundle- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -746,6 +746,7 @@// Regex+ const validRgbHslRgx = /\)\s*[-.\d]/;const hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;const rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;const rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;@@ -809,7 +810,7 @@const devTools = isBrowser && win.AnimeJSDevTools;- const globalVersions = { version: '4.3.4', engine: null };+ const globalVersions = { version: '4.3.5', engine: null };if (isBrowser) {if (!win.AnimeJS) win.AnimeJS = [];@@ -857,11 +858,11 @@/**@param {any} a @return {Boolean} */const isHex = a => hexTestRgx.test(a);/**@param {any} a @return {Boolean} */- const isRgb = a => stringStartsWith(a, 'rgb') && a[a.length - 1] === ')';+ const isRgb = a => stringStartsWith(a, 'rgb');/**@param {any} a @return {Boolean} */- const isHsl = a => stringStartsWith(a, 'hsl') && a[a.length - 1] === ')';- /**@param {any} a @return {Boolean} */- const isCol = a => isHex(a) || isRgb(a) || isHsl(a);+ const isHsl = a => stringStartsWith(a, 'hsl');+ /**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type+ const isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !validRgbHslRgx.test(a)));/**@param {any} a @return {Boolean} */const isKey = a => !globals.defaults.hasOwnProperty(a);@@ -3983,7 +3984,7 @@parent.animations.push(animation);removeWAAPIAnimation($el, property);addChild(WAAPIAnimationsLookups, { parent, animation, $el, property, _next: null, _prev: null });- const handleRemove = () => { removeWAAPIAnimation($el, property, parent); };+ const handleRemove = () => removeWAAPIAnimation($el, property, parent);animation.oncancel = handleRemove;animation.onremove = handleRemove;if (!parent.persist) {@@ -9084,7 +9085,7 @@// const hiddenStateChanged = (topLevelAdded || newlyRemoved) && wasRemovedBefore !== isRemovedNow;if (node.isTarget && (!node.measuredIsRemoved && oldStateNode.measuredIsVisible || node.measuredIsRemoved && node.measuredIsVisible)) {- if (!node.isInlined && (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none')) {+ if (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none') {node.hasTransform = true;transformed.push($el);}@@ -9100,7 +9101,7 @@if (!node.isTarget) {swapping.push($el);if (node.sizeChanged && parent && parent.isTarget && parent.sizeChanged) {- if (!node.isInlined && swapAtProps.transform) {+ if (swapAtProps.transform) {node.hasTransform = true;transformed.push($el);}@@ -9140,7 +9141,7 @@// muteNodeTransition(newNode);- // Don't animate dimensions and positions of inlined elements+ // Don't animate positions of inlined elements (to avoid text reflow)if (!newNode.isInlined) {// Display grid can mess with the absolute positioning, so set it to block during transitionif (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.setProperty('display', 'block', 'important');@@ -9159,14 +9160,15 @@$el.style.left = '0px';$el.style.top = '0px';}- $el.style.width = `${oldNodeState.width}px`;- $el.style.height = `${oldNodeState.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;}+ // Animate dimensions for all elements (including inlined)+ $el.style.width = `${oldNodeState.width}px`;+ $el.style.height = `${oldNodeState.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;}// Restore the scroll position if the oldState differs from the current state@@ -9187,21 +9189,19 @@const animatedProps = {composition: 'none',};- if (!newNode.isInlined) {- if (oldNodeState.width !== newNodeState.width) {- animatedProps.width = [oldNodeState.width, newNodeState.width];- nodeHasChanged = true;- }- if (oldNodeState.height !== newNodeState.height) {- animatedProps.height = [oldNodeState.height, newNodeState.height];- nodeHasChanged = true;- }- // If the node has transforms we handle the translate animation in wappi otherwise translate and other transforms can be out of sync- // Always animate translate- if (!newNode.hasTransform) {- animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];- nodeHasChanged = true;- }+ if (oldNodeState.width !== newNodeState.width) {+ animatedProps.width = [oldNodeState.width, newNodeState.width];+ nodeHasChanged = true;+ }+ if (oldNodeState.height !== newNodeState.height) {+ animatedProps.height = [oldNodeState.height, newNodeState.height];+ nodeHasChanged = true;+ }+ // If the node has transforms we handle the translate animation in waapi otherwise translate and other transforms can be out of sync+ // And we don't animate the position of inlined elements+ if (!newNode.hasTransform && !newNode.isInlined) {+ animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];+ nodeHasChanged = true;}this.properties.forEach(prop => {const oldVal = oldNodeState[prop];@@ -9223,15 +9223,16 @@for (let i = 0, l = swapping.length; i < l; i++) {const $el = swapping[i];const oldNode = oldState.getNode($el);+ const oldNodeProps = oldNode.properties;+ $el.style.width = `${oldNodeProps.width}px`;+ $el.style.height = `${oldNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // We don't animate the position of inlined elementsif (!oldNode.isInlined) {- const oldNodeProps = oldNode.properties;- $el.style.width = `${oldNodeProps.width}px`;- $el.style.height = `${oldNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${oldNodeProps.x}px ${oldNodeProps.y}px`;}this.properties.forEach(prop => {@@ -9246,14 +9247,15 @@const newNode = newState.getNode($el);const newNodeProps = newNode.properties;this.timeline.call(() => {+ $el.style.width = `${newNodeProps.width}px`;+ $el.style.height = `${newNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // Don't set translate for inlined elements (to avoid text reflow)if (!newNode.isInlined) {- $el.style.width = `${newNodeProps.width}px`;- $el.style.height = `${newNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${newNodeProps.x}px ${newNodeProps.y}px`;}this.properties.forEach(prop => {@@ -9286,19 +9288,27 @@const transformedLength = transformed.length;if (transformedLength) {- // We only need to set the transform property here since translate is alread defined in the targets loop+ // We only need to set the transform property here since translate is already defined in the targets loopfor (let i = 0; i < transformedLength; i++) {const $el = transformed[i];- $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`,+ const node = newState.getNode($el);+ // Don't set translate for inlined elements (to avoid text reflow)+ if (!node.isInlined) {+ $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`;+ }$el.style.transform = oldState.getComputedValue($el, 'transform');if (animatedSwap.includes($el)) {- const node = newState.getNode($el);node.ease = getFunctionValue(swapAtParams.ease, $el, node.index, node.total);node.duration = getFunctionValue(swapAtParams.duration, $el, node.index, node.total);}}this.transformAnimation = waapi.animate(transformed, {- translate: (/** @type {HTMLElement} */$el) => `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`,+ translate: (/** @type {HTMLElement} */$el) => {+ const node = newState.getNode($el);+ // Don't animate translate for inlined elements (to avoid text reflow)+ if (node.isInlined) return '0px 0px';+ return `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`;+ },transform: (/** @type {HTMLElement} */$el) => {const newValue = newState.getComputedValue($el, 'transform');if (!animatedSwap.includes($el)) return newValue;@@ -9307,7 +9317,7 @@return [oldValue, getFunctionValue(swapAtProps.transform, $el, node.index, node.total), newValue]},autoplay: false,- persist: true,+ // persist: true,...timingParams,});this.timeline.sync(this.transformAnimation, 0);diff --git a/dist/bundles/anime.umd.min.js b/dist/bundles/anime.umd.min.jsindex c9b4e233..dd9a4e84 100644--- a/dist/bundles/anime.umd.min.js+++ b/dist/bundles/anime.umd.min.js@@ -1,7 +1,7 @@/*** Anime.js - UMD minified bundle- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/-!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(),l=Symbol(),h=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,E=/([a-z])([A-Z])/g,C=/(\w+)(\([^)]+\)+)/g,k=/(\*=|\+=|-=)/,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},L={defaults:D,precision:4,timeScale:1,tickThreshold:200},A=e&&s.AnimeJSDevTools,R={version:"4.3.4",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(R));const B=t=>t.replace(E,"$1-$2").toLowerCase(),P=(t,e)=>0===t.indexOf(e),F=Date.now,M=Array.isArray,V=t=>t&&t.constructor===Object,O=t=>"number"==typeof t&&!isNaN(t),z=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")&&")"===t[t.length-1],j=t=>P(t,"hsl")&&")"===t[t.length-1],G=t=>!L.defaults.hasOwnProperty(t),Q=["opacity","rotate","overflow","color"],Z=t=>z(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,lt=Math.atan2,ht=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(!z(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()},Et=(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,Ct=(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},kt=(t,e,s,i)=>{const r=X(s)?Et(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[l];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?Ct(t,e,i).trimStart():Ct(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,l;if(0===i)o=a=l=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),l=pt(255*wt(e,t,s-1/3),0)}return[o,a,l,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),Lt={t:0,n:0,u:null,o:null,d:null,s:null},At=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,h=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),E=w-T,C=$>0,k=$>=a,N=a<=c,D=2===n;let I=0,A=w,R=0;if(u>1){const e=~~($/(d+(k?0:f)));t._currentIteration=ct(e,0,u),k&&t._currentIteration--,I=t._currentIteration%2,A=$%(d+f)||0}const B=g^(v&&I),P=t._ease;let F=k?B?0:a:B?d-A:A;P&&(F=d*P(F/d)||0);const M=(o?o.backwards:w<T)?!B:!!B;if(t._currentTime=w,t._iterationTime=F,t.backwards=M,C&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):w<=0&&(t.began=!1),s||_||!C||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&&h||k&&!h&&N){if(C&&(t.computeDeltaTime(S),s||t.onBeforeUpdate(t)),!_){const e=D||(M?-1*E:E)>=L.tickThreshold,n=t._offset+(o?o._offset:0)+b+F;let a,h,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:L.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):(h=a.style,3===f?(a!==d&&(d=a,c=a[l]),c[t]=b,p=1):2===f?h[t]=b:4===f&&h.setProperty(t,b)),C&&(R=1)}}if(p&&u._renderTransforms){let t=m;for(let e in c)t+=`${y[e]}${c[e]}) `;h.transform=t,p=0}u=u._next}!s&&R&&t.onRender(t)}!s&&C&&t.onUpdate(t)}return o&&N?!s&&(o.began&&!M&&w>0&&!h||M&&w<=c&&h)&&(t.onComplete(t),t.completed=!M):C&&k?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,h||_||(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(At(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,l=i?e:o._iterationTime,h=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&&At(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}bt(o,t=>{const e=pt((l-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(h):r;d+=At(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))))}},Bt={},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=Bt[t];if(e)return e;{const e=t?B(t):t;return Bt[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[l];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(B(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},Ot=(()=>e?requestAnimationFrame:setImmediate)(),zt=(()=>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=Ot(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===L.timeScale?1:p)}set speed(t){this._speed=t*L.timeScale,bt(this,t=>t.speed=t._speed)}get timeUnit(){return 1===L.timeScale?"ms":"s"}set timeUnit(t){const e="s"===t,s=e?.001:1;if(L.timeScale!==s){L.timeScale=s,L.tickThreshold=200*s;const t=e?.001:p;this.defaults.duration*=t,this._speed*=t}}get precision(){return L.precision}set precision(t){L.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=Ot(Yt),Xt.update()):Xt.reqId=0},Wt=()=>(zt(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}}}),At(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:l,loopDelay:h,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:L.defaults,w=H(r)||X(r)?x.delay:+r,S=H(n)||X(n)?1/0:+n,$=St(l,x.loop),E=St(h,x.loopDelay);let C=!0===$||$===1/0||$<0?1/0:$+1;if(A){const s=C===1/0;if(A.register(this,t,s)&&s){const t=a?2:1,s=e?A.maxNestedInfiniteLoops:A.maxInfiniteLoops;C=Math.max(s,t)}}let k=0;e?k=s:(Xt.reqId||Xt.requestTick(F()),k=(Xt._lastTickTime-Xt._startTime)*L.timeScale),this.id=X(i)?se:i,this.parent=e,this.duration=gt((S+E)*C-E)||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=C,this._autoplay=!e&&St(d,x.autoplay),this._offset=k,this._delay=w,this._loopDelay=E,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,L.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,L.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(t=0){return this.seek(this.duration,t).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=z(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[l]={})}}return e}const ae={deg:1,rad:180/ht,turn:360},le={},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,l=le[a];if(X(l)||r){let r;if(n in ae)r=o*ae[n]/ae[s];else{const e=100,a=t.cloneNode(),l=t.parentNode,h=l&&l!==i?l:i.body;h.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);h.removeChild(a),r=u*o}e.n=r,le[a]=r}else e.n=l;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=ht/2,me=2*ht,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(z(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:z(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={func:null},Ee=[null],Ce=[null,null],ke={to:null};let Ne,De,Ie=0,Le=0;class Ae extends ie{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i),++Le;const l=oe(t),h=l.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,L.defaults.duration),r=Object.keys(t).map(e=>({o:parseFloat(e)/100,p:t[e]})).sort((t,e)=>t.o-e.o);r.forEach(t=>{const e=t.o,r=t.p;for(let t in r)if(G(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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:L.defaults,w=St(y,x.ease),S=St(v,x.playbackEase),$=S?be(S):null,E=!X(w.ease),C=E?w.ease:St(y,$?"linear":x.ease),k=E?w.settlingDuration:St(g,x.duration),N=St(f,x.delay),D=_||x.modifier,I=X(b)&&h>=p?r.none:X(b)?x.composition:b,A=this._offset+(s?s._offset:0);E&&(w.parent=this);let R=NaN,B=NaN,P=0,F=0;for(let t=0;t<h;t++){const e=l[t],i=o||t,d=a||h;let p=NaN,m=NaN;for(let t in u)if(G(t)){const o=Et(e,t),a=Pt(t,e,o);let l=u[t];const h=M(l);if(n&&!h&&(Ce[0]=l,Ce[1]=l,l=Ce),h){const t=l.length,e=!V(l[0]);2===t&&e?(ke.to=l,Ee[0]=ke,Ne=Ee):t>2&&e?(Ne=[],l.forEach((t,e)=>{e?1===e?(Ce[1]=t,Ne.push(Ce)):Ne.push(t):Ce[0]=t})):Ne=l}else Ee[0]=l,Ne=Ee;let f=null,g=null,y=NaN,v=0,_=0;for(let t=Ne.length;_<t;_++){const n=Ne[_];V(n)?De=n:(ke.to=n,De=ke),Se.func=null,$e.func=null;const l=$t(De.to,e,i,d,Se);let h;V(l)&&!X(l.to)?(De=l,h=l.to):h=l;const u=$t(De.from,e,i,d),p=De.ease||C,m=$t(p,e,i,d),b=H(m)||z(m)?m:p,T=!X(b)&&!X(b.ease),x=T?b.ease:b,w=T?b.settlingDuration:$t(St(De.duration,t>1?$t(k,e,i,d)/t:k),e,i,d),S=$t(St(De.delay,_?0:N),e,i,d),$=$t(St(De.composition,I),e,i,d),E=O($)?$:r[$],L=De.modifier||D,R=!X(u),B=!X(h),W=M(h),U=W||R&&B,q=g?v+S:S,j=pt(A+q,12);F||!R&&!W||(F=1);let G=g;if(E!==r.none){f||(f=qt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=j;)if(G=t,t=t._nextRep,t&&t._absoluteStartTime>=j)for(;t;)Gt(t),t=t._nextRep}if(U){Dt(W?$t(h[0],e,i,d,$e):u,Te),Dt(W?$t(h[1],e,i,d,Se):h,xe);const t=kt(e,a,o,we);0===Te.t&&(G?1===G._valueType&&(Te.t=1,Te.u=G._unit):(Dt(t,Lt),1===Lt.t&&(Te.t=1,Te.u=Lt.u)))}else B?Dt(h,xe):g?It(g,xe):Dt(s&&G&&G.parent.parent===s?G._value:kt(e,a,o,we),xe),R?Dt(u,Te):g?It(g,Te):Dt(s&&G&&G.parent.parent===s?G._value:kt(e,a,o,we),Te);if(Te.o&&(Te.n=Nt(G?G._toNumber:Dt(kt(e,a,o,we),Lt).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=he(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 Q=pt(+w||c,12);let Z=we[a];Y(Z)||(we[a]=null);const J={parent:this,id:Ie++,property:a,target:e,_value:null,_toFunc:Se.func,_fromFunc:$e.func,_ease:be(x),_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:L,_currentTime:0,_startTime:q,_delay:+S,_updateDuration:Q,_changeDuration:Q,_absoluteStartTime:j,_tweenType:o,_valueType:xe.t,_composition:E,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};E!==r.none&&Qt(J,f),isNaN(y)&&(y=J._startTime),v=pt(q+Q,12),g=J,P++,xt(this,J)}(isNaN(B)||y<B)&&(B=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++})}}h||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),B?(bt(this,t=>{t._startTime-t._delay||(t._delay-=B),t._startTime-=B}),R-=B):B=0,R||(R=c,this.iterationCount=0),this.targets=l,this.id=X(m)?Le:m,this.duration=R===c?c:gt((R+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=T||x.onRender,this._ease=$,this._delay=B,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._toFunc,s=t._fromFunc;(e||s)&&(s?(Dt(s(),Te),Te.u!==t._unit&&t.target[o]&&he(t.target,Te,t._unit,!0),t._fromNumbers=vt(Te.d),t._fromNumber=Te.n):e&&(Dt(kt(t.target,t.property,t._tweenType),Lt),t._fromNumbers=vt(Lt.d),t._fromNumber=Lt.n),e&&(Dt(e(),xe),t._toNumbers=vt(xe.d),t._strings=vt(xe.s),t._toNumber=xe.o?Nt(t._fromNumber,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 Re={_head:null,_tail:null},Be=(t,e,s)=>{let i,r=Re._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),Tt(Re,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},Pe=(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),Be(e,s),xt(Re,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>{Be(e,s,t)};return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Fe(t,e,s){const i=oe(t);if(!i.length)return;const[r]=i,n=Et(r,e),o=Pt(e,r,n);let a=kt(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`${pt(t.n,L.precision)}${t.u}`}}}const Me=(t,e)=>{if(!X(e))return e.duration=c,e.composition=St(e.composition,r.none),new Ae(t,e,null,0,!0).resume()},Ve=(t,e,s)=>{const i=ne(t);for(let t=0,r=i.length;t<r;t++)Be(i[t],s,e&&e.controlAnimation&&e);return Kt(i,e,s),i},Oe=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),X(e))return s;if(O(+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),l=k.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h: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=O(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 He=0;class Xe extends ie{constructor(t={}){super(t,null,0),++He,this.id=X(t.id)?He:t.id,this.duration=0,this.labels={};const e=t.defaults,s=L.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 l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,X(a)||(s.id=a+"-"+l),ze(s,this,Oe(this,e(t,l,h,this)),t,l,h),l++})}else ze(i,this,Oe(this,s),t)}else ze(t,this,Oe(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 X(t)||X(t.persist)||(t.persist=!0),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&&!z(t)||(this.labels[t]=Oe(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 Ye=t=>new Xe(t).init();class We{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={},l="+=0";if(n){const t=s.unit;z(t)&&(l+=t)}else a.duration=s;a[e]=n?_t({to:l},s):l;const h=_t(i,a);h.composition=r.replace,h.autoplay=!1;const d=this.animations[e]=new Ae(t,h,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 Ue=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var qe=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:Ue,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 je=10*p;class Ge{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*L.timeScale,je*L.timeScale),this.m=ct(St(t.mass,1),1,je),this.s=ct(St(t.stiffness,100),c,je),this.d=ct(St(t.damping,10),c,je),this.v=ct(St(t.velocity,0),-1e4,je),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===L.timeScale?this.pd/p:this.pd;this.m=1,this.v=0,this.s=J(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=pt(ct(this.s,c,je),3),this.d=pt(ct(this.d,c,300),3)}calculateBDFromSD(){const t=2*ht/K(this.s);this.pd=t*(1===L.timeScale?p:1);const e=this.d/(2*K(this.s));this.bn=e<=1?1-this.d*t/(4*ht):4*ht/(this.d*t)-1,this.bn=pt(ct(this.bn,-1,1),3),this.pd=pt(ct(this.pd,10*L.timeScale,je*L.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=ct(K(o/r),c,p),h=this.zeta=n/(2*K(o*r));h<1?(this.wd=l*K(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*K(h*h-1),this.b=(h*l-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)*L.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*L.timeScale,je*L.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ct(St(t,100),c,je),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ct(St(t,10),c,je),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ct(St(t,1),1,je),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ct(St(t,0),-1e4,je),this.compute()}}const Qe=t=>new Ge(t),Ze=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Ge(t)),Je=t=>{t.cancelable&&t.preventDefault()};class Ke{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 ts{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 es=(t,e)=>t&&H(t)?t(e):t;let ss=0;class is{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,l=e.releaseEase,h=l&&be(l),d=!X(l)&&!X(l.ease),c=V(r)&&!X(r.mapTo)?r.mapTo:"translateX",p=V(n)&&!X(n.mapTo)?n.mapTo:"translateY",m=es(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 Ke(t):ne(t)[0],this.$trigger=ne(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=d?l:Qe({mass:St(e.releaseMass,1),stiffness:St(e.releaseStiffness,80),damping:St(e.releaseDamping,20)}),this.releaseYSpring=d?l:Qe({mass:St(e.releaseMass,1),stiffness:St(e.releaseStiffness,80),damping:St(e.releaseDamping,20)}),this.releaseEase=h||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 We(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 ts(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=lt(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*L.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,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=pt(ct(K(t*t+e*e)/r*o,a,l),5);const d=at(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+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](),L.precision)}set x(t){this.setX(t,!1)}get y(){return pt(this.animate[this.yProp](),L.precision)}set y(t){this.setY(t,!1)}get progressX(){return Ue(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(Ue(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ue(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(Ue(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,l=this.window[1]=s.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?ct(d,a,d):d,this.scrollView[1]=h?ct(c,l,c):c,this.updateScrollCoords();const{width:v,height:_,left:b,top:T,right:x,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=pt(h?ct(v,a,a):v,0),this.dragArea[3]=pt(h?ct(_,l,l):_,0);const S=Fe(t,"overflow"),$="visible"===S,E="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===i.body&&$||!E&&!$)&&(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?h?0:t.scrollLeft:0,o=i?h?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-(h?0:T),0),this.targetBounds[1]=pt(r.right+e-(h?a:x),0),this.targetBounds[2]=pt(r.bottom+s-(h?l:w),0),this.targetBounds[3]=pt(r.left+e-(h?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,l):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,l):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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=es(t.container,this),o=es(t.containerPadding,this)||0,a=M(o)?o:[o,o,o,o],l=this.x,h=this.y,d=es(t.cursor,this),c={onHover:"grab",onGrab:"grabbing"};if(d){const{onHover:t,onGrab:e}=d;t&&(c.onHover=t),e&&(c.onGrab=e)}const u=es(t.dragThreshold,this),p={mouse:3,touch:7};if(O(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(es(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ct(St(es(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=es(V(e)&&!X(e.snap)?e.snap:t.snap,this),this.snapY=es(V(r)&&!X(r.snap)?r.snap:t.snap,this),this.scrollSpeed=St(es(t.scrollSpeed,this),1.5),this.scrollThreshold=St(es(t.scrollThreshold,this),20),this.dragSpeed=St(es(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=St(es(t.minVelocity,this),0),this.maxVelocity=St(es(t.maxVelocity,this),50),this.velocityMultiplier=St(es(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ct(l,y,f),!0),this.setY(ct(h,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],l=this.scroll.x,h=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),E=pt(ct((_-x-s)/y,0,1)*g,0),C=pt(ct((v-w+i)/y,-1,0)*g,0);if(S||E||C||$){const[t,e]=this.disabled;let s=l,i=h;t||(s=pt(ct(l+(C||$),0,r-o),0),this.coords[0]-=l-s),e||(i=pt(ct(h+(S||E),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*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-l,n-h),this.angle=lt(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[l,h,d,c]=o,p=pt(ct(r-l,-u,0),0),m=pt(ct(i-h,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*L.timeScale:t,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=a})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Me(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,l]=this.containerPadding,h=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]+l+e,p=this.isOutOfBounds([h,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),h,c),l=X(t)?350*L.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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);ss=(f>ss?f:ss)+1,this.targetStyles=Me(this.$target,{zIndex:ss}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Me(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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Fe(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&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):(Je(t),this.triggerStyles||(this.triggerStyles=Me(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Je,{passive:!1}),this.$trigger.addEventListener("touchmove",Je,{passive:!1}),this.$trigger.addEventListener("touchend",Je),(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,l,h]=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-l,n-h),S=this.angle=lt(n-a,s-o),$=150*w,E=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+et(S)*$,k=x+tt(S)*$,N=C>c?c+(C-c)*E:C<p?p+(C-p)*E:C,D=k>u?u+(k-u)*E:k<d?d+(k-d)*E:k,I=this.destX=ct(pt(mt(N,this.snapX),5),p,c),A=this.destY=ct(pt(mt(D,this.snapY),5),d,u),R=this.isOutOfBounds(this.containerBounds,C,k);let B=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;B=T===I?0:_?r:r-n*L.timeScale,_&&(F=i),B>V&&(V=B)}if(!e){const e=A===u?x>u?-1:1:x<d?-1:1,s=pt(x-A,0);y.velocity=t&&_?s?$*e/st(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=y;P=x===A?0:_?r:r-n*L.timeScale,_&&(M=i),P>V&&(V=P)}if(!_&&R&&E&&(B||P)){const t=r.blend;new Ae(b,{x:{to:N,duration:.65*B},y:{to:D,duration:.65*P},ease:v,composition:t}).init(),new Ae(b,{x:{to:I,duration:B},y:{to:A,duration:P},ease:v,composition:t}).init(),this.overshootTicker.stretch(at(B,P)).restart()}else t||this.animate[this.xProp](I,B,F),e||this.animate[this.yProp](A,P,M);this.scrollInView(V,this.scrollThreshold,v);let O=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(O=!0)),A!==f&&this.snapY&&(this.snapped[1]=A,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Je),this.$trigger.removeEventListener("touchmove",Je),this.$trigger.removeEventListener("touchend",Je),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=Me(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":Je(t)}}}const rs=(t=v)=>new ie({duration:1*L.timeScale,onComplete:t},null,0).resume(),ns=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 os{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=L.defaults,a=t.mediaQueries;if(this.defaults=n?_t(n,o):o,this.root=r,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let t in a){const 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=L.defaults;I.current=this,I.root=this.root,L.defaults=this.defaults;const r=this.mediaQueryLists;for(let t in r)this.matches[t]=r[t].matches;const n=t(this);return I.current=e,I.root=s,L.defaults=i,n}refresh(){return this.onceIndex=0,this.execute(()=>{let t=this.revertibles.length,e=this.revertConstructors.length;for(;t--;)this.revertibles[t].revert();for(;e--;)this.revertConstructors[e](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(t=>{const e=t(this);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=ns(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,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](this);for(let t in r)r[t].removeEventListener("change",this);t.length=0,e.length=0,this.constructors.length=0,s.length=0,i.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const as=(t,e)=>t&&H(t)?t(e):t,ls=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*L.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ie({autoplay:!1,duration:500*L.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?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.onResize(t),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),ls.delete(this.element)}}const ds=(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:l,u:h}=Dt(a,Lt);let d=l;return"%"===h?d=l/100*s:h&&(d=he(t,Lt,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},cs=(t,e,s,i,r)=>{let n;if(z(e)){const o=k.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=ds(t,h[0],s,i,r),p=ds(t,h[1],s,i,r);if(d){const e=Nt(ds(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Nt(ds(t,"max",s),p,l);n=e>u?u:e}else n=Nt(u,p,l)}else n=ds(t,e,s,i,r)}else n=e;return pt(n,0)},us=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 ps=0;const ms=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class fs{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&&(O(e)||!0===e||r),a=e&&z(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=ps++,this.id=X(t.id)?this.index:t.id,this.container=(t=>{const e=t&&ne(t)[0]||i.body;let s=ls.get(e);return s||(s=new hs(e),ls.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||!!l,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:v,this.onSyncLeave=l&&!h&&l[1]?l[1]:v,this.onSyncEnterForward=l&&h&&l[0]?l[0]:v,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:v,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:v,this.onSyncLeaveBackward=l&&h&&l[3]?l[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.onResize=t.onResize||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),rs(()=>{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)||X(t.persist)||(t.persist=!0),!this._params.target)){let e;X(t.targets)?bt(t,t=>{t.targets&&!e&&(e=us(t))}):e=us(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(as(t.repeat,this),!0),this.horizontal="x"===St(as(t.axis,this),"y"),this.enter=St(as(t.enter,this),"end start"),this.leave=St(as(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=ms[this.index%ms.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?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?h: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,l=(r?0:this.offset)+t,m=s%2,f=l<_,g=l>(r?e?h: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",E=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 C=l-E+(e?1:0);T.style[e?"left":"top"]=`${C}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Fe(t.element,"position")&&(this.debugStyles=Me(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&&a!==s.element&&a!==i.body;){const e="sticky"===Fe(a,"position")&&Me(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=s.scale,d=(r?l.left+s.scrollX-s.left:l.top+s.scrollY-s.top)*h,c=(r?l.width:l.height)*h,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(z(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 O(m)&&(v=m);if(z(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 O(f)&&(_=f);const b=cs(e,g,c),T=cs(e,y,c),x=b+d-u,w=T+d-p,S=cs(e,v,u,x,w),$=cs(e,_,u,x,w),E=b+d-S,C=T+d-$,k=C-E;this.offset=d,this.offsetStart=E,this.offsetEnd=C,this.distance=k<=0?0:k,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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,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(l&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),r){const e=t.progress;if(i&&O(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 gs=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,ys=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?de:r=>0===r||1===r?r:gs(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=gs(r,e,s)-t,i>0?o=r:n=r}while(st(i)>1e-7&&++a<100);return r})(r,t,s),e,i),vs=(t=10,e)=>{const s=e?rt:nt;return e=>s(ct(e,0,1)*t)*(1/t)},_s=(...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=z(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(X(l)?e/s:Z(l)/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]}},bs=(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),_s(...s)};var Ts=Object.freeze({__proto__:null,Spring:Ge,createSpring:Ze,cubicBezier:ys,eases:ge,irregular:bs,linear:_s,spring:Qe,steps:vs});const xs=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(pt(t(i/e),4));return`linear(${s.join(", ")})`},ws={},Ss=t=>{let e=ws[t];if(e)return e;if(e="linear",z(t)){if(P(t,"linear")||P(t,"cubic-")||P(t,"steps")||P(t,"ease"))e=t;else if(P(t,"cubicB"))e=B(t);else{const s=ve(t);H(s)&&(e=s===de?"linear":xs(s))}ws[t]=e}else if(H(t)){const s=xs(t);s&&(e=s)}else t.ease&&(e=xs(t.ease));return e},$s=["x","y","z"],Es=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...$s],Cs=(()=>[...$s,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let ks=null;const Ns=(t,e,s,i,r)=>{let n=z(e)?e:$t(e,s,i,r);return O(n)?Es.includes(t)||P(t,"translate")?`${n}px`:P(t,"rotate")||P(t,"skew")?`${n}deg`:`${n}`:n},Ds=(t,e,s,i,r,n)=>{let o="0";const a=X(i)?getComputedStyle(t)[e]:Ns(e,i,t,r,n);return o=X(s)?M(i)?i.map(s=>Ns(e,s,t,r,n)):a:[Ns(e,s,t,r,n),a],o};class Is{constructor(t,s){I.current&&I.current.register(this),Y(ks)&&(!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{}}),ks=!0):ks=!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.autoplay,L.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,h=s.reversed&&!0===s.reversed,d=St(s.loop,L.defaults.loop),c=!0===d||d===1/0?1/0:O(d)?d+1:1,u=a?h?"alternate-reverse":"alternate":h?"reverse":"normal",_=1===L.timeScale?1:p;this.targets=i,this.animations=[],this.controlAnimation=null,this.onComplete=s.onComplete||L.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!n||!1!==o,this.reversed=h,this.persist=St(s.persist,L.defaults.persist),this.autoplay=n,this._speed=St(s.playbackRate,L.defaults.playbackRate),this._resolve=v,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[l],n=Cs.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},h=St(s.ease,L.defaults.ease),d=$t(h,t,e,r),p=H(d)||z(d)?d:h,v=h.ease&&h,b=Ss(p),T=(v?v.settlingDuration:$t(St(s.duration,L.defaults.duration),t,e,r))*_,x=$t(St(s.delay,L.defaults.delay),t,e,r)*_,w=St(s.composition,"replace");for(let l in s){if(!G(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:b,duration:T,delay:x,composite:w},p=s[l],m=!!n&&(g.includes(l)?l:f.get(l)),y=m?"transform":l;let v;if(a[y]||(a[y]=o[y]),V(p)){const s=p,n=St(s.ease,b),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:$t(St(s.duration,T),t,e,r))*_,d.delay=$t(St(s.delay,x),t,e,r)*_,d.composite=St(s.composition,w),d.easing=Ss(n),v=Ds(t,l,u,c,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=Ds(t,l,u,c,e,r),Pe(this,t,l,h,d),!X(u))if(m){const t=`--${m}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else v=M(p)?p.map(s=>Ns(l,s,t,e,r)):Ns(l,p,t,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=v,Pe(this,t,l,h,d)}if(n){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=z(t)?e=>e[t]():t;this.animations.forEach(e)}catch{}return this}get speed(){return this._speed}set speed(t){this._speed=+t,this.forEach(e=>e.playbackRate=t)}get currentTime(){const t=this.controlAnimation,e=L.timeScale;return this.completed?this.duration:t?+t.currentTime*(1===e?1:e):0}set currentTime(t){const e=t*(1===L.timeScale?1: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(B(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 Ls={animate:(t,e)=>new Is(t,e),convertEase:xs};let As=0,Rs=0;const Bs=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),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()},Os={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},zs=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-"+Rs++);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.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!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,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=Bs(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;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,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 g,y,v=0,_=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();v=t.left,_=t.top,b=t.width,T=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=v,a.top=_,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=v,y=_):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=v-s-r,y=_-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=v-t-l.properties.clientLeft,y=_-e-l.properties.clientTop}else g=v-s-r,y=_-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},Ys=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Ws=(t,e)=>{const s=$t(e.ease,t.$el,t.index,t.total),i=H(s)?s:e.ease,r=!X(i)&&!X(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:$t(e.duration,t.$el,t.index,t.total),t.delay=$t(e.delay,t.$el,t.index,t.total)},Us=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},qs=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))}},js=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)},Gs=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.layout.pendingRemoval.delete(t.$el)},Qs=(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 Zs{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=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}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?Os:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=Bs(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=Bs(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){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}}zs(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.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!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 t=this.layout,e=t.children,s=t.root,i=M(e)?e:[e],r=[],n="*"===e?s:I.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=Ps(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=z(e)?n.querySelectorAll(e):e}const l=oe(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!Bs(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(js);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),Fs(e,i)}return this}}function Js(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class Ks{constructor(t,e={}){I.current&&I.current.register(this);const s=Js(e.swapAt),i=Js(e.enterFrom),r=Js(e.leaveTo),n=e.properties;if(e.duration=St(e.duration,350),e.delay=St(e.delay,0),e.ease=St(e.ease,"inOut(3.5)"),this.params=e,this.root=oe(t)[0],this.id=As++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=_t(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])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.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Zs(this),this.newState=new Zs(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),Vs(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.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(qs),this}animate(t={}){const e={ease:St(t.ease,this.params.ease),delay:St(t.delay,this.params.delay),duration:St(t.duration,this.params.duration)},s={},i=St(t.onComplete,this.params.onComplete),r=St(t.onPause,this.params.onPause);for(let e in D)"ease"!==e&&"duration"!==e&&"delay"!==e&&(X(t[e])?X(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Gs(t),qs(t)});for(let t=0,e=w.length;t<e;t++){const e=w[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||Vs(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Gs),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=_t(_t(t.swapAt||{},this.swapAtParams),e),o=_t(_t(t.enterFrom||{},this.enterFromParams),e),a=_t(_t(t.leaveTo||{},this.leaveToParams),e),[l,h]=Js(n),[d,c]=Js(o),[u,p]=Js(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,v=this.entering,_=this.leaving,b=this.pendingRemoval;g.length=y.length=v.length=_.length=0,m.forEachRootNode(Ms),f.record(),f.forEachRootNode(Us);const T=[],x=[],w=[],S=[],$=f.rootNode,E=$.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Qs(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Qs(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const w=b.has(e),S=a.measuredIsVisible,E=t.measuredIsVisible,C=!S&&E&&!o,k=!x&&(y||w)&&!r,N=x&&!y&&!n,D=N||x&&w&&!n;t.branchAdded=r||k,t.branchRemoved=n||D,t.branchNotRendered=o||x,x&&S&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Qs(a,t,f)),N?(t.isTarget&&(_.push(e),t.isLeaving=!0),b.add(e)):!x&&w&&b.delete(e),k&&!o||C?(Ys(a,d),t.isTarget&&(v.push(e),t.isEntering=!0)):D&&!o&&Ys(t,u),t===$||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,k=0,N=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==$&&i;for(;a&&!a.isTarget&&a!==$;)a=a.parentNode;const d=g.length;t===$?(t.index=0,t.total=d,Ws(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:v.length,Ws(t,c),C++):t.isLeaving?(t.index=a?a.index:k,t.total=a?d:_.length,k++,Ws(t,p)):t.isTarget?(t.index=N++,t.total=d,Ws(t,e)):(t.index=a?a.index:0,t.total=d,Ws(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=$t(n[e],s,t.index,t.total),o[e]=$t(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){t.isInlined||"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,w.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(!t.isInlined&&l.transform&&(t.hasTransform=!0,w.push(s)),S.push(s)))});const I={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=I,this.timeline=Ye(s),!x.length&&!w.length&&!y.length)return Vs(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==E||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===E&&"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")}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};r.isInlined||(n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0)),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e);if(!s.isInlined){const t=s.properties;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]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;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]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(S.length){const t=be(f.nodes.get(S[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(S,s,0)}}const L=w.length;if(L){for(let t=0;t<L;t++){const e=w[t];if(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`,e.style.transform=m.getComputedValue(e,"transform"),S.includes(e)){const t=f.getNode(e);t.ease=$t(n.ease,e,t.index,t.total),t.duration=$t(n.duration,e,t.index,t.total)}}this.transformAnimation=Ls.animate(w,{translate:t=>`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!S.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,$t(l.transform,t,i.index,i.total),e]},autoplay:!1,persist:!0,...I}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const ti=qe,ei={},si=t=>(...e)=>{const s=t(...e);return new Proxy(v,{apply:(t,e,[i])=>s(i),get:(t,e)=>si((...t)=>{const i=ei[e](...t);return t=>i(s(t))})})},ii=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?si(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return ei[t]||(ei[t]=i),i},ri=ii("roundPad",ti.roundPad),ni=ii("padStart",ti.padStart),oi=ii("padEnd",ti.padEnd),ai=ii("wrap",ti.wrap),li=ii("mapRange",ti.mapRange),hi=ii("degToRad",ti.degToRad),di=ii("radToDeg",ti.radToDeg),ci=ii("snap",ti.snap),ui=ii("clamp",ti.clamp),pi=ii("round",ti.round),mi=ii("lerp",ti.lerp,1),fi=ii("damp",ti.damp,1),gi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let yi=0;const vi=(t,e=0,s=1,i=0)=>{let r=void 0===t?yi++: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}},_i=t=>t[gi(0,t.length-1)],bi=t=>{let e,s,i=t.length;for(;i;)s=gi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},Ti=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!X(o),l=a&&!X(o.ease)?o.ease:a?be(o):null,h=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:O(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):kt(u,v)),$=O(S)||z(S)&&O(+S)?+S:r;if(p&&(w=(m-1)/2),f&&(w=m-1),!s.length){for(let t=0;t<m;t++){if(h){const e=p?(h[0]-1)/2:w%h[0],i=p?(h[1]-1)/2:nt(w/h[0]),r=e-t%h[0],n=i-nt(t/h[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)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:st(i-t))),g&&(s=bi(s))}const E=y?(b-_)/i:_;let C=(a?Oe(a,X(e.start)?a.iterationDuration:x):x)+(E*pt(s[$],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var xi=Object.freeze({__proto__:null,$:oe,clamp:ui,cleanInlineStyles:Ft,createSeededRandom:vi,damp:fi,degToRad:hi,get:Fe,keepTime:ns,lerp:mi,mapRange:li,padEnd:oi,padStart:ni,radToDeg:di,random:gi,randomPick:_i,remove:Ve,round:pi,roundPad:ri,set:Me,shuffle:bi,snap:ci,stagger:Ti,sync:rs,wrap:ai});const wi=t=>{const e=ne(t)[0];return e&&W(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},Si=(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)},$i=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),l=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=Si(t,r,a,-1,l),s=Si(t,r,a,1,l);return 180*lt(s.y-e.y,s.x-e.x)/ht}{const s=Si(t,r,a,0,l);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}}}},Ei=(t,e=0)=>{const s=wi(t);if(s)return{translateX:$i(s,"x",e),translateY:$i(s,"y",e),rotate:$i(s,"a",e)}},Ci=(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 l=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],l=+s[1],h=(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*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"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"),l.setAttribute("draw",`${e} ${s}`)),l})(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=wi(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[h];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const d=e/(h-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+" ",l+=p+pt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[h]=l,[a,l]};var Ni=Object.freeze({__proto__:null,createDrawable:Ci,createMotionPath:Ei,morphTo:ki});const Di="undefined"!=typeof Intl&&Intl.Segmenter,Ii=/\{value\}/g,Li=/\{i\}/g,Ai=/(\s+)/,Ri=/^\s+$/,Bi="line",Pi="word",Fi="char",Mi="data-line";let Vi=null,Oi=null,zi=null;const Hi=t=>t.isWordLike||" "===t.segment||O(+t.segment),Xi=t=>t.setAttribute("aria-hidden","true"),Yi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Wi={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},Ui=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&Ui(e)}},qi=(t,e,s)=>{const i=t.getAttribute(Mi);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&Ri.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&Ri.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)qi(t.children[r],e,s);return s},ji=(t,e={})=>{let s="";const i=z(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},Gi=(t,e,s,i,r,n,o,a,l)=>{const h=r===Bi,d=r===Fi,c=`_${r}_`,u=H(t)?t(s):t,p=h?"block":"inline-block";zi.innerHTML=u.replace(Ii,`<i class="${c}"></i>`).replace(Li,`${d?l:h?o:a}`);const m=zi.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(Mi,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=v;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Wi[r]}`),f};class Qi{constructor(t,s={}){Vi||(Vi=Di?new Di([],{granularity:Pi}):{segment:t=>{const e=[],s=t.split(Ai);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Ri.test(i)})}return e}}),Oi||(Oi=Di?new Di([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!zi&&e&&(zi=i.createElement("template")),I.current&&I.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=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(h,!1),this.includeSpaces=St(l,!1),this.accessible=St(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=V(c)?ji(Bi,c):c,this.wordTemplate=V(u)||this.linesOnly?ji(Pi,u):u,this.charTemplate=V(p)?ji(Fi,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=ns(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=[],l=this.words,h=this.chars,d=Vi.segment(o),c=i.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=Hi(t);if(!u||s&&u&&Hi(u))a.push(e);else{const t=a.length-1,s=a[t];Ai.test(s)||Ai.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?Oi.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);Gi(s,h,d,f,Fi,n,-1,l.length,h.length)}}e?Gi(e,l,f,c,Pi,n,-1,l.length,h.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,l=r&&a;this.ready=!r||a,(l||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),l&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Yi(e,Pi))),o&&(l||n)&&(this.chars=Yi(e,Fi));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!X(d)&&s-d>.5*i&&c++,e.setAttribute(Mi,`${c}`);const r=e.querySelectorAll(`[${Mi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Mi,`${c}`);d=s}if(l){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<c+1;t++){const i=e.cloneNode(!0);qi(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(Ui);for(let e=0,s=a.length;e<s;e++)Gi(r,this.lines,a[e],t,Bi,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Yi(e,Pi)),o&&(this.chars=Yi(e,Fi))}if(this.linesOnly){const t=this.words;let e=t.length;for(;e--;){const s=t[e];s.replaceWith(s.textContent)}t.length=0}if(this.accessible&&(l||!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(Xi),this.words.forEach(Xi),this.chars.forEach(Xi)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Zi=(t,e)=>new Qi(t,e),Ji=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Qi(t,e));var Ki=Object.freeze({__proto__:null,TextSplitter:Qi,split:Ji,splitText:Zi});t.$=oe,t.Animatable=We,t.AutoLayout=Ks,t.Draggable=is,t.JSAnimation=Ae,t.Scope=os,t.ScrollObserver=fs,t.Spring=Ge,t.TextSplitter=Qi,t.Timeline=Xe,t.Timer=ie,t.WAAPIAnimation=Is,t.animate=(t,e)=>new Ae(t,e,null,0,!1).init(),t.clamp=ui,t.cleanInlineStyles=Ft,t.createAnimatable=(t,e)=>new We(t,e),t.createDraggable=(t,e)=>new is(t,e),t.createDrawable=Ci,t.createLayout=(t,e)=>new Ks(t,e),t.createMotionPath=Ei,t.createScope=t=>new os(t),t.createSeededRandom=vi,t.createSpring=Ze,t.createTimeline=Ye,t.createTimer=t=>new ie(t,null,0).init(),t.cubicBezier=ys,t.damp=fi,t.degToRad=hi,t.eases=ge,t.easings=Ts,t.engine=Xt,t.get=Fe,t.irregular=bs,t.keepTime=ns,t.lerp=mi,t.linear=_s,t.mapRange=li,t.morphTo=ki,t.onScroll=(t={})=>new fs(t),t.padEnd=oi,t.padStart=ni,t.radToDeg=di,t.random=gi,t.randomPick=_i,t.remove=Ve,t.round=pi,t.roundPad=ri,t.scrollContainers=ls,t.set=Me,t.shuffle=bi,t.snap=ci,t.split=Ji,t.splitText=Zi,t.spring=Qe,t.stagger=Ti,t.steps=vs,t.svg=Ni,t.sync=rs,t.text=Ki,t.utils=xi,t.waapi=Ls,t.wrap=ai});+!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(),l=Symbol(),h=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=()=>{},_=/\)\s*[-.\d]/,b=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,T=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,x=/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,S=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,$=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,E=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,C=/([a-z])([A-Z])/g,k=/(\w+)(\([^)]+\)+)/g,N=/(\*=|\+=|-=)/,D=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,I={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},L={current:null,root:i},A={defaults:I,precision:4,timeScale:1,tickThreshold:200},R=e&&s.AnimeJSDevTools,B={version:"4.3.5",engine:null};e&&(s.AnimeJS||(s.AnimeJS=[]),s.AnimeJS.push(B));const P=t=>t.replace(C,"$1-$2").toLowerCase(),F=(t,e)=>0===t.indexOf(e),M=Date.now,V=Array.isArray,O=t=>t&&t.constructor===Object,z=t=>"number"==typeof t&&!isNaN(t),H=t=>"string"==typeof t,X=t=>"function"==typeof t,Y=t=>void 0===t,W=t=>Y(t)||null===t,U=t=>e&&t instanceof SVGElement,q=t=>b.test(t),j=t=>F(t,"rgb"),G=t=>F(t,"hsl"),Q=t=>!A.defaults.hasOwnProperty(t),Z=["opacity","rotate","overflow","color"],J=t=>H(t)?parseFloat(t):t,K=Math.pow,tt=Math.sqrt,et=Math.sin,st=Math.cos,it=Math.abs,rt=Math.exp,nt=Math.ceil,ot=Math.floor,at=Math.asin,lt=Math.max,ht=Math.atan2,dt=Math.PI,ct=Math.round,ut=(t,e,s)=>t<e?e:t>s?s:t,pt={},mt=(t,e)=>{if(e<0)return t;if(!e)return ct(t);let s=pt[e];return s||(s=pt[e]=10**e),ct(t*s)/s},ft=(t,e)=>V(e)?e.reduce((e,s)=>it(s-t)<it(e-t)?s:e):e?ct(t/e)*e:t,gt=(t,e,s)=>t+(e-t)*s,yt=t=>t===1/0?u:t===-1/0?-u:t,vt=t=>t<=c?c:yt(mt(t,11)),_t=t=>V(t)?[...t]:t,bt=(t,e)=>{const s={...t};for(let i in e){const r=t[i];s[i]=Y(r)?e[i]:r}return s},Tt=(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}},xt=(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},wt=(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},St=(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),$t=(t,e)=>Y(t)?e:t,Et=(t,e,s,i,r)=>{let n;if(X(t))n=()=>{const r=t(e,s,i);return isNaN(+r)?r||0:+r};else{if(!H(t)||!F(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()},Ct=(t,e)=>t[o]?t[a]&&((t,e)=>{if(Z.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:F(e,"--")?4:e in t.style?2:e in t?0:1:0,kt=(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},Nt=(t,e,s,i)=>{const r=Y(s)?Ct(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[l];let o;for(;o=k.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&&!Y(r)?r:F(e,"scale")?"1":F(e,"rotate")||F(e,"skew")?"0deg":"0px"})(t,e,i):4===r?kt(t,e,i).trimStart():kt(t,e,i)},Dt=(t,e,s)=>"-"===s?t-e:"+"===s?t+e:t*e,It=(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(" ")&&E.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(q(r=s)||(j(r)||G(r))&&(")"===r[r.length-1]||!_.test(r)))return e.t=2,e.d=j(i=s)?(t=>{const e=T.exec(t)||x.exec(t),s=Y(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],s]})(i):q(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):G(i)?(t=>{const e=w.exec(t)||S.exec(t),s=+e[1]/360,i=+e[2]/100,r=+e[3]/100,n=Y(e[4])?1:+e[4];let o,a,l;if(0===i)o=a=l=r;else{const t=r<.5?r*(1+i):r+i-r*i,e=2*r-t;o=mt(255*St(e,t,s+1/3),0),a=mt(255*St(e,t,s),0),l=mt(255*St(e,t,s-1/3),0)}return[o,a,l,n]})(i):[0,0,0,1],e;{const t=s.match($);return e.t=3,e.d=t?t.map(Number):[],e.s=s.split($)||[],e}}var i,r;return e.n=s,e},Lt=(t,e)=>(e.t=t._valueType,e.n=t._toNumber,e.u=t._unit,e.o=null,e.d=_t(t._toNumbers),e.s=_t(t._strings),e),At={t:0,n:0,u:null,o:null,d:null,s:null},Rt=(t,e,s,i,n)=>{const o=t.parent,a=t.duration,h=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=ut(T,-b,a),$=ut(w,-b,a),E=w-T,C=$>0,k=$>=a,N=a<=c,D=2===n;let I=0,L=w,R=0;if(u>1){const e=~~($/(d+(k?0:f)));t._currentIteration=ut(e,0,u),k&&t._currentIteration--,I=t._currentIteration%2,L=$%(d+f)||0}const B=g^(v&&I),P=t._ease;let F=k?B?0:a:B?d-L:L;P&&(F=d*P(F/d)||0);const M=(o?o.backwards:w<T)?!B:!!B;if(t._currentTime=w,t._iterationTime=F,t.backwards=M,C&&!t.began?(t.began=!0,s||o&&(M||!o.began)||t.onBegin(t)):w<=0&&(t.began=!1),s||_||!C||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&&h||k&&!h&&N){if(C&&(t.computeDeltaTime(S),s||t.onBeforeUpdate(t)),!_){const e=D||(M?-1*E:E)>=A.tickThreshold,n=t._offset+(o?o._offset:0)+b+F;let a,h,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=ut(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(mt(gt(u._fromNumber,u._toNumber,s),v));else if(1===m)T=n(mt(gt(u._fromNumber,u._toNumber,s),v)),b=`${T}${u._unit}`;else if(2===m){const t=u._fromNumbers,e=u._toNumbers,i=mt(ut(n(gt(t[0],e[0],s)),0,255),0),r=mt(ut(n(gt(t[1],e[1],s)),0,255),0),o=mt(ut(n(gt(t[2],e[2],s)),0,255),0),a=ut(n(mt(gt(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(mt(gt(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):(h=a.style,3===f?(a!==d&&(d=a,c=a[l]),c[t]=b,p=1):2===f?h[t]=b:4===f&&h.setProperty(t,b)),C&&(R=1)}}if(p&&u._renderTransforms){let t=m;for(let e in c)t+=`${y[e]}${c[e]}) `;h.transform=t,p=0}u=u._next}!s&&R&&t.onRender(t)}!s&&C&&t.onUpdate(t)}return o&&N?!s&&(o.began&&!M&&w>0&&!h||M&&w<=c&&h)&&(t.onComplete(t),t.completed=!M):C&&k?u===1/0?t._startTime+=t.duration:t._currentIteration>=u-1&&(t.paused=!0,h||_||(t.completed=!0,s||o&&(M||!o.began)||(t.onComplete(t),t._resolve(t)))):t.completed=!1,R},Bt=(t,e,s,i,r)=>{const n=t._currentIteration;if(Rt(t,e,s,i,r),t._hasChildren){const o=t,a=o.backwards,l=i?e:o._iterationTime,h=M();let d=0,u=!0;if(!i&&o._currentIteration!==n){const t=o.iterationDuration;Tt(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&&Rt(e,t,s,1,2),e.began=!1,e.completed=!1}),s||o.onLoop(o)}Tt(o,t=>{const e=mt((l-t._offset)*t._speed,12),n=t._fps<o._fps?t.requestTick(h):r;d+=Rt(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))))}},Pt={},Ft=(t,e,s)=>{if(3===s)return f.get(t)||t;if(2===s||1===s&&U(e)&&t in e.style){const e=Pt[t];if(e)return e;{const e=t?P(t):t;return Pt[t]=e,e}}return t},Mt=t=>{if(t._hasChildren)Tt(t,Mt,!0);else{const e=t;e.pause(),Tt(e,t=>{const s=t.property,i=t.target;if(i[o]){const r=i.style,n=t._inlineValue,o=W(n)||n===m;if(3===t._tweenType){const e=i[l];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(P(s)):r[s]=n;e._tail===t&&e.targets.forEach(t=>{t.getAttribute&&t.getAttribute("style")===m&&t.removeAttribute("style")})}})}return t};class Vt{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>I.frameRate&&(I.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 Ot={animation:null,update:v},zt=(()=>e?requestAnimationFrame:setImmediate)(),Ht=(()=>e?cancelAnimationFrame:clearImmediate)();class Xt extends Vt{constructor(t){super(t),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=I,this.paused=!0,this.reqId=0}update(){const t=this._currentTime=M();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?(xt(this,i),this._hasChildren=!!this._tail,i._running=!1,i.completed&&!i._cancelled&&i.cancel()):Bt(i,(t-i._startTime)*i._speed*e,0,0,i._fps<s?i.requestTick(t):1),i=r}Ot.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(M()),this.reqId=zt(Wt)),this}pause(){if(this.reqId)return this.paused=!0,Ut()}resume(){if(this.paused)return this.paused=!1,Tt(this,t=>t.resetTime()),this.wake()}get speed(){return this._speed*(1===A.timeScale?1:p)}set speed(t){this._speed=t*A.timeScale,Tt(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 Yt=(()=>{const t=new Xt(M());return e&&(B.engine=t,i.addEventListener("visibilitychange",()=>{t.pauseOnDocumentHidden&&(i.hidden?t.pause():t.resume())})),t})(),Wt=()=>{Yt._head?(Yt.reqId=zt(Wt),Yt.update()):Yt.reqId=0},Ut=()=>(Ht(Yt.reqId),Yt.reqId=0,Yt),qt={_rep:new WeakMap,_add:new Map},jt=(t,e,s="_rep")=>{const i=qt[s];let r=i.get(t);return r||(r={},i.set(t,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Gt=(t,e)=>t._isOverridden||t._absoluteStartTime>e._absoluteStartTime,Qt=t=>{t._isOverlapped=1,t._isOverridden=1,t._changeDuration=c,t._currentTime=c},Zt=(t,e)=>{const s=t._composition;if(s===r.replace){const s=t._absoluteStartTime;wt(e,t,Gt,"_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){Qt(i);let t=i._prevRep;for(;t&&t.parent.id===e.id;)Qt(t),t=t._prevRep}const n=s-t._delay;if(r>n){const t=i._startTime,e=r-(t+i._updateDuration),s=mt(n-e-t,12);i._changeDuration=s,i._currentTime=s,i._isOverlapped=1,s<c&&Qt(i)}let o=!0;if(Tt(e,t=>{t._isOverlapped||(o=!1)}),o){const t=e.parent;if(t){let s=!0;Tt(t,t=>{t!==e&&Tt(t,t=>{t._isOverlapped||(s=!1)})}),s&&t.cancel()}else e.cancel()}}}else if(s===r.blend){const e=jt(t.target,t.property,"_add"),s=(t=>{let e=Ot.animation;return e||(e={duration:c,computeDeltaTime:v,_offset:0,_delay:0,_head:null,_tail:null},Ot.animation=e,Ot.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?_t(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}}}),Rt(e,1,1,0,2)}),e})(qt._add);let i=e._head;i||(i={...t},i._composition=r.replace,i._updateDuration=c,i._startTime=0,i._numbers=_t(t._fromNumbers),i._number=0,i._next=null,i._prev=null,wt(e,i),wt(s,i));const n=t._toNumber;if(t._fromNumber=i._fromNumber-n,t._toNumber=0,t._numbers=_t(t._fromNumbers),t._number=0,i._fromNumber=n,t._toNumbers){const e=_t(t._toNumbers);e&&e.forEach((e,s)=>{t._fromNumbers[s]=i._fromNumbers[s]-e,t._toNumbers[s]=0}),i._fromNumbers=e}wt(e,t,null,"_prevAdd","_nextAdd")}return t},Jt=t=>{const e=t._composition;if(e!==r.none){const s=t.target,i=t.property,n=qt._rep.get(s)[i];if(xt(n,t,"_prevRep","_nextRep"),e===r.blend){const e=qt._add,r=e.get(s);if(!r)return;const n=r[i],o=Ot.animation;xt(n,t,"_prevAdd","_nextAdd");const a=n._head;if(a&&a===n._tail){xt(n,a,"_prevAdd","_nextAdd"),xt(o,a);let t=!0;for(let e in r)if(r[e]._head){t=!1;break}t&&e.delete(s)}}}return t},Kt=(t,e,s)=>{let i=!1;return Tt(e,r=>{const n=r.target;if(t.includes(n)){const t=r.property,o=r._tweenType,a=Ft(s,n,o);(!a||a&&a===t)&&(r.parent._tail===r&&3===r._tweenType&&r._prev&&3===r._prev._tweenType&&(r._prev._renderTransforms=1),xt(e,r),Jt(r),i=!0)}},!0),i},te=(t,e,s)=>{const i=e||Yt;let r;if(i._hasChildren){let e=0;Tt(i,n=>{if(!n._hasChildren)if(r=Kt(t,n,s),r&&!n._head)n.cancel(),xt(i,n);else{const t=n._offset+n._delay+n.duration;t>e&&(e=t)}n._head?te(t,n,s):n._hasChildren=!1},!0),Y(i.iterationDuration)||(i.iterationDuration=e)}else r=Kt(t,i,s);r&&!i._head&&(i._hasChildren=!1,i.cancel&&i.cancel())},ee=t=>(t.paused=!0,t.began=!1,t.completed=!1,t),se=t=>t._cancelled?(t._hasChildren?Tt(t,se):Tt(t,t=>{t._composition!==r.none&&Zt(t,jt(t.target,t.property))}),t._cancelled=0,t):t;let ie=0;class re extends Vt{constructor(t={},e=null,s=0){super(0),++ie;const{id:i,delay:r,duration:n,reversed:o,alternate:a,loop:l,loopDelay:h,autoplay:d,frameRate:u,playbackRate:p,onComplete:m,onLoop:f,onPause:g,onBegin:y,onBeforeUpdate:_,onUpdate:b}=t;L.current&&L.current.register(this);const T=e?0:Yt._lastTickTime,x=e?e.defaults:A.defaults,w=X(r)||Y(r)?x.delay:+r,S=X(n)||Y(n)?1/0:+n,$=$t(l,x.loop),E=$t(h,x.loopDelay);let C=!0===$||$===1/0||$<0?1/0:$+1;if(R){const s=C===1/0;if(R.register(this,t,s)&&s){const t=a?2:1,s=e?R.maxNestedInfiniteLoops:R.maxInfiniteLoops;C=Math.max(s,t)}}let k=0;e?k=s:(Yt.reqId||Yt.requestTick(M()),k=(Yt._lastTickTime-Yt._startTime)*A.timeScale),this.id=Y(i)?ie:i,this.parent=e,this.duration=yt((S+E)*C-E)||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=C,this._autoplay=!e&&$t(d,x.autoplay),this._offset=k,this._delay=w,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=v,this._running=!1,this._reversed=+$t(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=$t(a,x.alternate),this._prev=null,this._next=null,this._lastTickTime=T,this._startTime=T,this._lastTime=T,this._fps=$t(u,x.frameRate),this._speed=$t(p,x.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(t){t?this.cancel():this.reset(!0).play()}get currentTime(){return ut(mt(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 ut(mt(this._iterationTime,A.precision),0,this.iterationDuration)}set iterationCurrentTime(t){this.currentTime=this.iterationDuration*this._currentIteration+t}get progress(){return ut(mt(this._currentTime/this.duration,10),0,1)}set progress(t){this.currentTime=this.duration*t}get iterationProgress(){return ut(mt(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*ut(+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 se(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Bt(this,0,1,~~t,2),ee(this),this._hasChildren&&Tt(this,ee),this}init(t=!1){this.fps=this._fps,this.speed=this._speed,!t&&this._hasChildren&&Bt(this,this.duration,1,~~t,2),this.reset(t);const e=this._autoplay;return!0===e?this.resume():e&&!Y(e.linked)&&e.link(this),this}resetTime(){const t=1/(this._speed*Yt._speed);return this._startTime=M()-(this._currentTime+this._delay)*t,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=c&&!this._hasChildren?Bt(this,c,0,0,2):(this._running||(wt(Yt,this),Yt._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Yt.wake()),this):this}restart(){return this.reset().resume()}seek(t,e=0,s=0){se(this),this.completed=!1;const i=this.paused;return this.paused=!0,Bt(this,t+this._delay,~~e,~~s,1),i?this:this.resume()}alternate(){const t=this._reversed,e=this.iterationCount,s=this.iterationDuration,i=e===1/0?ot(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?Tt(this,t=>t.cancel(),!0):Tt(this,Jt),this._cancelled=1,this.pause()}stretch(t){const e=this.duration,s=vt(t);if(e===s)return this;const i=t/e,r=t<=c;return this.duration=r?c:s,this.iterationDuration=r?c:vt(this.iterationDuration*i),this._offset*=i,this._delay*=i,this._loopDelay*=i,this}revert(){Bt(this,0,1,0,1);const t=this._autoplay;return t&&t.linked&&t.linked===this&&t.revert(),this.cancel()}complete(t=0){return this.seek(this.duration,t).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 ne(t){const e=H(t)?L.root.querySelectorAll(t):t;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function oe(t){if(W(t))return[];if(!e)return V(t)&&t.flat(1/0)||[t];if(V(t)){const e=t.flat(1/0),s=[];for(let t=0,i=e.length;t<i;t++){const i=e[t];if(!W(i)){const t=ne(i);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!W(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=ne(t);return s?Array.from(s):[t]}function ae(t){const e=oe(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=U(s);(s.nodeType||t)&&(s[o]=!0,s[a]=t,s[l]={})}}return e}const le={deg:1,rad:180/dt,turn:360},he={},de=(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,l=he[a];if(Y(l)||r){let r;if(n in le)r=o*le[n]/le[s];else{const e=100,a=t.cloneNode(),l=t.parentNode,h=l&&l!==i?l:i.body;h.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);h.removeChild(a),r=u*o}e.n=r,he[a]=r}else e.n=l;return e.t,e.u=s,e},ce=t=>t,ue=(t=1.68)=>e=>K(e,+t),pe={in:t=>e=>t(e),out:t=>e=>1-t(1-e),inOut:t=>e=>e<.5?t(2*e)/2:1-t(-2*e+2)/2,outIn:t=>e=>e<.5?(1-t(1-2*e))/2:(t(2*e-1)+1)/2},me=dt/2,fe=2*dt,ge={[m]:ue,Quad:ue(2),Cubic:ue(3),Quart:ue(4),Quint:ue(5),Sine:t=>1-st(t*me),Circ:t=>1-tt(1-t*t),Expo:t=>t?K(2,10*t-10):0,Bounce:t=>{let e,s=4;for(;t<((e=K(2,--s))-1)/11;);return 1/K(4,3-s)-7.5625*K((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=ut(+t,1,10),i=ut(+e,c,2),r=i/fe*at(1/s),n=fe/i;return t=>0===t||1===t?t:-s*K(2,-10*(1-t))*et((1-t-r)*n)}},ye=(()=>{const t={linear:ce,none:ce};for(let e in pe)for(let s in ge){const i=ge[s],r=pe[e];t[e+s]=s===m||"Back"===s||"Elastic"===s?(t,e)=>r(i(t,e)):r(i)}return t})(),ve={linear:ce,none:ce},_e=t=>{if(ve[t])return ve[t];if(t.indexOf("(")<=-1){const e=pe[t]||t.includes("Back")||t.includes("Elastic")?ye[t]():ye[t];return e?ve[t]=e:ce}{const e=t.slice(0,-1).split("("),s=ye[e[0]];return s?ve[t]=s(...e[1].split(",")):ce}},be=["steps(","irregular(","linear(","cubicBezier("],Te=t=>{if(H(t))for(let e=0,s=be.length;e<s;e++)if(F(t,be[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}\``),ce;return X(t)?t:H(t)?_e(t):ce},xe={t:0,n:0,u:null,o:null,d:null,s:null},we={t:0,n:0,u:null,o:null,d:null,s:null},Se={},$e={func:null},Ee={func:null},Ce=[null],ke=[null,null],Ne={to:null};let De,Ie,Le=0,Ae=0;class Re extends re{constructor(t,e,s,i,n=!1,o=0,a=0){super(e,s,i),++Ae;const l=ae(t),h=l.length,d=e.keyframes,u=d?bt(((t,e)=>{const s={};if(V(t)){const e=[].concat(...t.map(t=>Object.keys(t))).filter(Q);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];Q(s)?s===r&&(e.to=i):e[s]=i}return e});s[r]=n}}else{const i=$t(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(Q(t)){let n=s[t];n||(n=s[t]=[]);const o=e*i;let a=n.length,l=n[a-1];const h={to:r[t]};let d=0;for(let t=0;t<a;t++)d+=n[t].duration;1===a&&(h.from=l.to),r.ease&&(h.ease=r.ease),h.duration=o-(a?d:0),n.push(h)}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=$t(y,x.ease),S=$t(v,x.playbackEase),$=S?Te(S):null,E=!Y(w.ease),C=E?w.ease:$t(y,$?"linear":x.ease),k=E?w.settlingDuration:$t(g,x.duration),N=$t(f,x.delay),D=_||x.modifier,I=Y(b)&&h>=p?r.none:Y(b)?x.composition:b,L=this._offset+(s?s._offset:0);E&&(w.parent=this);let R=NaN,B=NaN,P=0,F=0;for(let t=0;t<h;t++){const e=l[t],i=o||t,d=a||h;let p=NaN,m=NaN;for(let t in u)if(Q(t)){const o=Ct(e,t),a=Ft(t,e,o);let l=u[t];const h=V(l);if(n&&!h&&(ke[0]=l,ke[1]=l,l=ke),h){const t=l.length,e=!O(l[0]);2===t&&e?(Ne.to=l,Ce[0]=Ne,De=Ce):t>2&&e?(De=[],l.forEach((t,e)=>{e?1===e?(ke[1]=t,De.push(ke)):De.push(t):ke[0]=t})):De=l}else Ce[0]=l,De=Ce;let f=null,g=null,y=NaN,v=0,_=0;for(let t=De.length;_<t;_++){const n=De[_];O(n)?Ie=n:(Ne.to=n,Ie=Ne),$e.func=null,Ee.func=null;const l=Et(Ie.to,e,i,d,$e);let h;O(l)&&!Y(l.to)?(Ie=l,h=l.to):h=l;const u=Et(Ie.from,e,i,d),p=Ie.ease||C,m=Et(p,e,i,d),b=X(m)||H(m)?m:p,T=!Y(b)&&!Y(b.ease),x=T?b.ease:b,w=T?b.settlingDuration:Et($t(Ie.duration,t>1?Et(k,e,i,d)/t:k),e,i,d),S=Et($t(Ie.delay,_?0:N),e,i,d),$=Et($t(Ie.composition,I),e,i,d),E=z($)?$:r[$],A=Ie.modifier||D,R=!Y(u),B=!Y(h),M=V(h),U=M||R&&B,q=g?v+S:S,j=mt(L+q,12);F||!R&&!M||(F=1);let G=g;if(E!==r.none){f||(f=jt(e,a));let t=f._head;for(;t&&!t._isOverridden&&t._absoluteStartTime<=j;)if(G=t,t=t._nextRep,t&&t._absoluteStartTime>=j)for(;t;)Qt(t),t=t._nextRep}if(U){It(M?Et(h[0],e,i,d,Ee):u,xe),It(M?Et(h[1],e,i,d,$e):h,we);const t=Nt(e,a,o,Se);0===xe.t&&(G?1===G._valueType&&(xe.t=1,xe.u=G._unit):(It(t,At),1===At.t&&(xe.t=1,xe.u=At.u)))}else B?It(h,we):g?Lt(g,we):It(s&&G&&G.parent.parent===s?G._value:Nt(e,a,o,Se),we),R?It(u,xe):g?Lt(g,xe):It(s&&G&&G.parent.parent===s?G._value:Nt(e,a,o,Se),xe);if(xe.o&&(xe.n=Dt(G?G._toNumber:It(Nt(e,a,o,Se),At).n,xe.n,xe.o)),we.o&&(we.n=Dt(xe.n,we.n,we.o)),xe.t!==we.t)if(3===xe.t||3===we.t){const t=3===xe.t?xe:we,e=3===xe.t?we:xe;e.t=3,e.s=_t(t.s),e.d=t.d.map(()=>e.n)}else if(1===xe.t||1===we.t){const t=1===xe.t?xe:we,e=1===xe.t?we:xe;e.t=1,e.u=t.u}else if(2===xe.t||2===we.t){const t=2===xe.t?xe:we,e=2===xe.t?we:xe;e.t=2,e.s=t.s,e.d=[0,0,0,1]}if(xe.u!==we.u){let t=we.u?xe:we;t=de(e,t,we.u?we.u:xe.u,!1)}if(we.d&&xe.d&&we.d.length!==xe.d.length){const t=xe.d.length>we.d.length?xe:we,e=t===xe?we:xe;e.d=t.d.map((t,s)=>Y(e.d[s])?0:e.d[s]),e.s=_t(t.s)}const Q=mt(+w||c,12);let Z=Se[a];W(Z)||(Se[a]=null);const J={parent:this,id:Le++,property:a,target:e,_value:null,_toFunc:$e.func,_fromFunc:Ee.func,_ease:Te(x),_fromNumbers:_t(xe.d),_toNumbers:_t(we.d),_strings:_t(we.s),_fromNumber:xe.n,_toNumber:we.n,_numbers:_t(xe.d),_number:xe.n,_unit:we.u,_modifier:A,_currentTime:0,_startTime:q,_delay:+S,_updateDuration:Q,_changeDuration:Q,_absoluteStartTime:j,_tweenType:o,_valueType:we.t,_composition:E,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Z,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};E!==r.none&&Zt(J,f),isNaN(y)&&(y=J._startTime),v=mt(q+Q,12),g=J,P++,wt(this,J)}(isNaN(B)||y<B)&&(B=y),(isNaN(R)||v>R)&&(R=v),3===o&&(p=P-_,m=P)}if(!isNaN(p)){let t=0;Tt(this,e=>{t>=p&&t<m&&(e._renderTransforms=1,e._composition===r.blend&&Tt(Ot.animation,t=>{t.id===e.id&&(t._renderTransforms=1)})),t++})}}h||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),B?(Tt(this,t=>{t._startTime-t._delay||(t._delay-=B),t._startTime-=B}),R-=B):B=0,R||(R=c,this.iterationCount=0),this.targets=l,this.id=Y(m)?Ae:m,this.duration=R===c?c:yt((R+this._loopDelay)*this.iterationCount-this._loopDelay)||c,this.onRender=T||x.onRender,this._ease=$,this._delay=B,this.iterationDuration=R,!this._autoplay&&F&&this.onRender(this)}stretch(t){const e=this.duration;if(e===vt(t))return this;const s=t/e;return Tt(this,t=>{t._updateDuration=vt(t._updateDuration*s),t._changeDuration=vt(t._changeDuration*s),t._currentTime*=s,t._startTime*=s,t._absoluteStartTime*=s}),super.stretch(t)}refresh(){return Tt(this,t=>{const e=t._toFunc,s=t._fromFunc;(e||s)&&(s?(It(s(),xe),xe.u!==t._unit&&t.target[o]&&de(t.target,xe,t._unit,!0),t._fromNumbers=_t(xe.d),t._fromNumber=xe.n):e&&(It(Nt(t.target,t.property,t._tweenType),At),t._fromNumbers=_t(At.d),t._fromNumber=At.n),e&&(It(e(),we),t._toNumbers=_t(we.d),t._strings=_t(we.s),t._toNumber=we.o?Dt(t._fromNumber,we.n,we.o):we.n))}),this.duration===c&&this.restart(),this}revert(){return super.revert(),Mt(this)}then(t){return super.then(t)}}const Be={_head:null,_tail:null},Pe=(t,e,s)=>{let i,r=Be._head;for(;r;){const n=r._next,o=r.$el===t,a=!e||r.property===e,l=!s||r.parent===s;if(o&&a&&l){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),xt(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},Fe=(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),Pe(e,s),wt(Be,{parent:t,animation:n,$el:e,property:s,_next:null,_prev:null});const a=()=>Pe(e,s,t);return n.oncancel=a,n.onremove=a,t.persist||(n.onfinish=a),n};function Me(t,e,s){const i=ae(t);if(!i.length)return;const[r]=i,n=Ct(r,e),o=Ft(e,r,n);let a=Nt(r,o);if(Y(s))return a;if(It(a,At),0===At.t||1===At.t){if(!1===s)return At.n;{const t=de(r,At,s,!1);return`${mt(t.n,A.precision)}${t.u}`}}}const Ve=(t,e)=>{if(!Y(e))return e.duration=c,e.composition=$t(e.composition,r.none),new Re(t,e,null,0,!0).resume()},Oe=(t,e,s)=>{const i=oe(t);for(let t=0,r=i.length;t<r;t++)Pe(i[t],s,e&&e.controlAnimation&&e);return te(i,e,s),i},ze=(t,e)=>{let s=t.iterationDuration;if(s===c&&(s=0),Y(e))return s;if(z(+e))return+e;const i=e,r=t?t.labels:null,n=!W(r),o=((t,e)=>{if(F(e,"<")){const s="<"===e[1],i=t._tail,r=i?i._offset+i._delay:0;return s?r:r+i.duration}})(t,i),a=!Y(o),l=N.exec(i);if(l){const t=l[0],e=i.split(t),h=n&&e[0]?r[e[0]]:s,d=a?o:n?h:s,c=+e[1];return Dt(d,c,t[0])}return a?o:n?Y(r[i])?s:r[i]:s};function He(t,e,s,i,r,n){const o=z(t.duration)&&t.duration<=c?s-c:s;e.composition&&Bt(e,o,1,1,1);const a=i?new Re(i,t,e,o,!1,r,n):new re(t,e,o);return e.composition&&a.init(!0),wt(e,a),Tt(e,t=>{const s=t._offset+t._delay+t.duration;s>e.iterationDuration&&(e.iterationDuration=s)}),e.duration=function(t){return yt((t.iterationDuration+t._loopDelay)*t.iterationCount-t._loopDelay)||c}(e),e}let Xe=0;class Ye extends re{constructor(t={}){super(t,null,0),++Xe,this.id=Y(t.id)?Xe:t.id,this.duration=0,this.labels={};const e=t.defaults,s=A.defaults;this.defaults=e?bt(e,s):s,this.composition=$t(t.composition,!0),this.onRender=t.onRender||s.onRender;const i=$t(t.playbackEase,s.playbackEase);this._ease=i?Te(i):null,this.iterationDuration=0}add(t,e,s){const i=O(e),r=O(t);if(i||r){if(this._hasChildren=!0,i){const i=e;if(X(s)){const e=s,r=oe(t),n=this.duration,o=this.iterationDuration,a=i.id;let l=0;const h=r.length;r.forEach(t=>{const s={...i};this.duration=n,this.iterationDuration=o,Y(a)||(s.id=a+"-"+l),He(s,this,ze(this,e(t,l,h,this)),t,l,h),l++})}else He(i,this,ze(this,s),t)}else He(t,this,ze(this,e));return this.composition&&this.init(!0),this}}sync(t,e){if(Y(t)||t&&Y(t.pause))return this;t.pause();const s=+(t.effect?t.effect.getTiming().duration:t.duration);return Y(t)||Y(t.persist)||(t.persist=!0),this.add(t,{currentTime:[0,s],duration:s,delay:0,ease:"linear",playbackEase:"linear"},e)}set(t,e,s){return Y(e)?this:(e.duration=c,e.composition=r.replace,this.add(t,e,s))}call(t,e){return Y(t)||t&&!X(t)?this:this.add({duration:0,delay:0,onComplete:()=>t(this)},e)}label(t,e){return Y(t)||t&&!H(t)||(this.labels[t]=ze(this,e)),this}remove(t,e){return te(oe(t),this,e),this}stretch(t){const e=this.duration;if(e===vt(t))return this;const s=t/e,i=this.labels;Tt(this,t=>t.stretch(t.duration*s));for(let t in i)i[t]*=s;return super.stretch(t)}refresh(){return Tt(this,t=>{t.refresh&&t.refresh()}),this}revert(){return super.revert(),Tt(this,t=>t.revert,!0),Mt(this)}then(t){return super.then(t)}}const We=t=>new Ye(t).init();class Ue{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,!Y(t)&&!Y(e)){for(let t in e){const s=e[t];Q(t)?o[t]=s:F(t,"on")?n[t]=s:i[t]=s}this.callbacks=new Re({v:0},n);for(let e in o){const s=o[e],n=O(s);let a={},l="+=0";if(n){const t=s.unit;H(t)&&(l+=t)}else a.duration=s;a[e]=n?bt({to:l},s):l;const h=bt(i,a);h.composition=r.replace,h.autoplay=!1;const d=this.animations[e]=new Re(t,h,null,0,!1).init();this.targets.length||this.targets.push(...d.targets),this[e]=(t,e,s)=>{const i=d._head;if(Y(t)&&i){const t=i._numbers;return t&&t.length?t:i._modifier(i._number)}return Tt(d,e=>{if(V(t))for(let s=0,i=t.length;s<i;s++)Y(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;Y(s)||(e._ease=Te(s)),e._currentTime=0}),Y(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 qe=(t,e,s,i,r)=>i+(t-e)/(s-e)*(r-i);var je=Object.freeze({__proto__:null,clamp:ut,damp:(t,e,s,i)=>i?1===i?e:gt(t,e,1-Math.exp(-i*s*.1)):t,degToRad:t=>t*Math.PI/180,lerp:gt,mapRange:qe,padEnd:(t,e,s)=>`${t}`.padEnd(e,s),padStart:(t,e,s)=>`${t}`.padStart(e,s),radToDeg:t=>180*t/Math.PI,round:mt,roundPad:(t,e)=>(+t).toFixed(e),snap:ft,wrap:(t,e,s)=>((t-e)%(s-e)+(s-e))%(s-e)+e});const Ge=10*p;class Qe{constructor(t={}){const e=!Y(t.bounce)||!Y(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=ut($t(t.bounce,.5),-1,1),this.pd=ut($t(t.duration,628),10*A.timeScale,Ge*A.timeScale),this.m=ut($t(t.mass,1),1,Ge),this.s=ut($t(t.stiffness,100),c,Ge),this.d=ut($t(t.damping,10),c,Ge),this.v=ut($t(t.velocity,0),-1e4,Ge),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?rt(-n*e*s)*(1*st(i*n)+r*et(i*n)):1===e?(1+r*n)*rt(-n*s):((1+r)*rt((-e*s+i)*n)+(1-r)*rt((-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=K(2*dt/t,2),this.bn>=0?this.d=4*(1-this.bn)*dt/t:this.d=4*dt/(t*(1+this.bn)),this.s=mt(ut(this.s,c,Ge),3),this.d=mt(ut(this.d,c,300),3)}calculateBDFromSD(){const t=2*dt/tt(this.s);this.pd=t*(1===A.timeScale?p:1);const e=this.d/(2*tt(this.s));this.bn=e<=1?1-this.d*t/(4*dt):4*dt/(this.d*t)-1,this.bn=mt(ut(this.bn,-1,1),3),this.pd=mt(ut(this.pd,10*A.timeScale,Ge*A.timeScale),3)}compute(){const{maxRestSteps:t,maxIterations:e,restThreshold:s,timeStep:i,m:r,d:n,s:o,v:a}=this,l=this.w0=ut(tt(o/r),c,p),h=this.zeta=n/(2*tt(o*r));h<1?(this.wd=l*tt(1-h*h),this.b=(h*l-a)/this.wd):1===h?(this.wd=0,this.b=-a+l):(this.wd=l*tt(h*h-1),this.b=(h*l-a)/this.wd);let d=0,u=0,m=0;for(;u<=t&&m<=e;)it(1-this.solve(d))<s?u++:u=0,this.solverDuration=d,d+=i,m++;this.settlingDuration=mt(this.solverDuration*p,0)*A.timeScale}get bounce(){return this.bn}set bounce(t){this.bn=ut($t(t,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(t){this.pd=ut($t(t,1),10*A.timeScale,Ge*A.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(t){this.s=ut($t(t,100),c,Ge),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(t){this.d=ut($t(t,10),c,Ge),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(t){this.m=ut($t(t,1),1,Ge),this.compute()}get velocity(){return this.v}set velocity(t){this.v=ut($t(t,0),-1e4,Ge),this.compute()}}const Ze=t=>new Qe(t),Je=t=>(console.warn("createSpring() is deprecated use spring() instead"),new Qe(t)),Ke=t=>{t.cancelable&&t.preventDefault()};class ts{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 es{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 ss=(t,e)=>t&&X(t)?t(e):t;let is=0;class rs{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,l=e.releaseEase,h=l&&Te(l),d=!Y(l)&&!Y(l.ease),c=O(r)&&!Y(r.mapTo)?r.mapTo:"translateX",p=O(n)&&!Y(n.mapTo)?n.mapTo:"translateY",m=ss(e.container,this);this.containerArray=V(m)?m:null,this.$container=m&&!this.containerArray?oe(m)[0]:i.body,this.useWin=this.$container===i.body,this.$scrollContainer=this.useWin?s:this.$container,this.$target=O(t)?new ts(t):oe(t)[0],this.$trigger=oe(o||t)[0],this.fixed="fixed"===Me(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?l:Ze({mass:$t(e.releaseMass,1),stiffness:$t(e.releaseStiffness,80),damping:$t(e.releaseDamping,20)}),this.releaseYSpring=d?l:Ze({mass:$t(e.releaseMass,1),stiffness:$t(e.releaseStiffness,80),damping:$t(e.releaseDamping,20)}),this.releaseEase=h||ye.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),Y(r)||!0===r)f[c]=0;else if(O(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(Y(n)||!0===n)f[p]=0;else if(O(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 Ue(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=M(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new es(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new re({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 re({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!Y(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 re({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),O(t)||this.resizeObserver.observe(this.$target)}computeVelocity(t,e){const s=this.velocityTime,i=M(),r=i-s;if(r<17)return this.velocity;this.velocityTime=i;const n=this.velocityStack,o=this.velocityMultiplier,a=this.minVelocity,l=this.maxVelocity,h=this.velocityStackIndex;n[h]=mt(ut(tt(t*t+e*e)/r*o,a,l),5);const d=lt(n[0],n[1],n[2]);return this.velocity=d,this.velocityStackIndex=(h+1)%3,d}setX(t,e=!1){if(this.disabled[0])return;const s=mt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destX=s,this.snapped[0]=ft(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(t,e=!1){if(this.disabled[1])return;const s=mt(t,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!e,this.destY=s,this.snapped[1]=ft(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return mt(this.animate[this.xProp](),A.precision)}set x(t){this.setX(t,!1)}get y(){return mt(this.animate[this.yProp](),A.precision)}set y(t){this.setY(t,!1)}get progressX(){return qe(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(t){this.setX(qe(t,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return qe(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(t){this.setY(qe(t,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const t=mt(this.useWin?s.scrollX:this.$container.scrollLeft,0),e=mt(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,l=this.window[1]=s.innerHeight,h=this.useWin,d=t.scrollWidth,c=t.scrollHeight,u=this.fixed,p=t.getBoundingClientRect(),[m,f,g,y]=this.containerPadding;this.dragArea[0]=h?0:p.left,this.dragArea[1]=h?0:p.top,this.scrollView[0]=h?ut(d,a,d):d,this.scrollView[1]=h?ut(c,l,c):c,this.updateScrollCoords();const{width:v,height:_,left:b,top:T,right:x,bottom:w}=t.getBoundingClientRect();this.dragArea[2]=mt(h?ut(v,a,a):v,0),this.dragArea[3]=mt(h?ut(_,l,l):_,0);const S=Me(t,"overflow"),$="visible"===S,E="hidden"===S;if(this.canScroll=!u&&this.contained&&(t===i.body&&$||!E&&!$)&&(d>this.dragArea[2]+y-f||c>this.dragArea[3]+m-g)&&(!this.containerArray||this.containerArray&&!V(this.containerArray)),this.contained){const e=this.scroll.x,s=this.scroll.y,i=this.canScroll,r=this.$target.getBoundingClientRect(),n=i?h?0:t.scrollLeft:0,o=i?h?0:t.scrollTop:0,d=i?this.scrollView[0]-n-v:0,c=i?this.scrollView[1]-o-_:0;this.targetBounds[0]=mt(r.top+s-(h?0:T),0),this.targetBounds[1]=mt(r.right+e-(h?a:x),0),this.targetBounds[2]=mt(r.bottom+s-(h?l:w),0),this.targetBounds[3]=mt(r.left+e-(h?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]=-mt(r.top-(u?ut(T,0,l):T)+o-m,0),this.containerBounds[1]=-mt(r.right-(u?ut(x,0,a):x)-d+f,0),this.containerBounds[2]=-mt(r.bottom-(u?ut(w,0,l):w)-c+g,0),this.containerBounds[3]=-mt(r.left-(u?ut(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,l]=this.disabled,h=!a&&e<o||!a&&e>r,d=!l&&s<i||!l&&s>n;return h&&!d?1:!h&&d?2:h&&d?3:0}refresh(){const t=this.parameters,e=t.x,r=t.y,n=ss(t.container,this),o=ss(t.containerPadding,this)||0,a=V(o)?o:[o,o,o,o],l=this.x,h=this.y,d=ss(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=ss(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;Y(t)||(p.mouse=t),Y(e)||(p.touch=e)}this.containerArray=V(n)?n:null,this.$container=n&&!this.containerArray?oe(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=$t(a,[0,0,0,0]),this.containerFriction=ut($t(ss(t.containerFriction,this),.8),0,1),this.releaseContainerFriction=ut($t(ss(t.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=ss(O(e)&&!Y(e.snap)?e.snap:t.snap,this),this.snapY=ss(O(r)&&!Y(r.snap)?r.snap:t.snap,this),this.scrollSpeed=$t(ss(t.scrollSpeed,this),1.5),this.scrollThreshold=$t(ss(t.scrollThreshold,this),20),this.dragSpeed=$t(ss(t.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?p.mouse:p.touch,this.minVelocity=$t(ss(t.minVelocity,this),0),this.maxVelocity=$t(ss(t.maxVelocity,this),50),this.velocityMultiplier=$t(ss(t.velocityMultiplier,this),1),this.cursor=!1!==d&&c,this.updateBoundingValues();const[m,f,g,y]=this.containerBounds;this.setX(ut(l,y,f),!0),this.setY(ut(h,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],l=this.scroll.x,h=this.scroll.y,d=this.$container.scrollWidth,c=this.$container.scrollHeight,u=this.useWin?ut(d,this.window[0],d):d,p=this.useWin?ut(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=mt(ut((_-b+t)/y,-1,0)*g,0),$=mt(ut((v-T-e)/y,0,1)*g,0),E=mt(ut((_-x-s)/y,0,1)*g,0),C=mt(ut((v-w+i)/y,-1,0)*g,0);if(S||E||C||$){const[t,e]=this.disabled;let s=l,i=h;t||(s=mt(ut(l+(C||$),0,r-o),0),this.coords[0]-=l-s),e||(i=mt(ut(h+(S||E),0,n-a),0),this.coords[1]-=h-i),this.useWin?this.$scrollContainer.scrollBy(-(l-s),-(h-i)):this.$scrollContainer.scrollTo(s,i)}}const[t,e,s,i]=this.containerBounds,[r,n,o,a,l,h]=this.pointer;this.coords[0]+=(r-l)*this.dragSpeed,this.coords[1]+=(n-h)*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-l,n-h),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 te([this],null,"x"),te([this],null,"y"),te([this],null,"progressX"),te([this],null,"progressY"),te([this.scroll]),te([this.overshootCoords]),this}scrollInView(t,e=0,s=ye.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[l,h,d,c]=o,p=mt(ut(r-l,-u,0),0),m=mt(ut(i-h,0,u),0),f=mt(ut(r-d,0,u),0),g=mt(ut(i-c,-u,0),0);new Re(n,{x:mt(n.x+(g?g-e:m?m+e:0),0),y:mt(n.y+(p?p-e:f?f+e:0),0),duration:Y(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=Ve(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(t,e=0,s=ye.inOutQuad){this.stop(),this.updateBoundingValues();const i=this.x,r=this.y,[n,o,a,l]=this.containerPadding,h=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]+l+e,p=this.isOutOfBounds([h,d,c,u],i,r);if(p){const[e,n]=this.disabled,o=ut(ft(i,this.snapX),u,d),a=ut(ft(r,this.snapY),h,c),l=Y(t)?350*A.timeScale:t;e||1!==p&&3!==p||this.animate[this.xProp](o,l,s),n||2!==p&&3!==p||this.animate[this.yProp](a,l,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),[l,h,d,c]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,p=this.x,m=this.y;this.coords[0]=this.coords[2]=u?p>h?h+(p-h)/u:p<c?c+(p-c)/u:p:p,this.coords[1]=this.coords[3]=u?m>d?d+(m-d)/u:m<l?l+(m-l)/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=Me(this.$target,"zIndex",!1);is=(f>is?f:is)+1,this.targetStyles=Ve(this.$target,{zIndex:is}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ve(i.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,ye.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 l=t.target,h=!1,d=!1,c=!1;for(;e&&l&&l!==this.$trigger;){const t=Me(l,"overflow-y");if("hidden"!==t&&"visible"!==t){const{scrollTop:t,scrollHeight:e,clientHeight:s}=l;if(e>s){c=!0,h=t<=3,d=t>=e-s-3;break}}l=l.parentElement}c&&(!h&&!d||h&&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):(Ke(t),this.triggerStyles||(this.triggerStyles=Ve(this.$trigger,{pointerEvents:"none"})),this.$trigger.addEventListener("touchstart",Ke,{passive:!1}),this.$trigger.addEventListener("touchmove",Ke,{passive:!1}),this.$trigger.addEventListener("touchend",Ke),(this.dragged||!this.disabled[0]&&it(o)>this.dragThreshold||!this.disabled[1]&&it(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,l,h]=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-l,n-h),S=this.angle=ht(n-a,s-o),$=150*w,E=(1-this.releaseContainerFriction)*this.dragSpeed,C=T+st(S)*$,k=x+et(S)*$,N=C>c?c+(C-c)*E:C<p?p+(C-p)*E:C,D=k>u?u+(k-u)*E:k<d?d+(k-d)*E:k,I=this.destX=ut(mt(ft(N,this.snapX),5),p,c),L=this.destY=ut(mt(ft(D,this.snapY),5),d,u),R=this.isOutOfBounds(this.containerBounds,C,k);let B=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=mt(T-I,0);g.velocity=e&&_?s?$*t/it(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=g;B=T===I?0:_?r:r-n*A.timeScale,_&&(F=i),B>V&&(V=B)}if(!e){const e=L===u?x>u?-1:1:x<d?-1:1,s=mt(x-L,0);y.velocity=t&&_?s?$*e/it(s):0:w;const{ease:i,settlingDuration:r,restDuration:n}=y;P=x===L?0:_?r:r-n*A.timeScale,_&&(M=i),P>V&&(V=P)}if(!_&&R&&E&&(B||P)){const t=r.blend;new Re(b,{x:{to:N,duration:.65*B},y:{to:D,duration:.65*P},ease:v,composition:t}).init(),new Re(b,{x:{to:I,duration:B},y:{to:L,duration:P},ease:v,composition:t}).init(),this.overshootTicker.stretch(lt(B,P)).restart()}else t||this.animate[this.xProp](I,B,F),e||this.animate[this.yProp](L,P,M);this.scrollInView(V,this.scrollThreshold,v);let O=!1;I!==m&&(this.snapped[0]=I,this.snapX&&(O=!0)),L!==f&&this.snapY&&(this.snapped[1]=L,this.snapY&&(O=!0)),O&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener("touchstart",Ke),this.$trigger.removeEventListener("touchmove",Ke),this.$trigger.removeEventListener("touchend",Ke),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=Ve(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":Ke(t)}}}const ns=(t=v)=>new re({duration:1*A.timeScale,onComplete:t},null,0).resume(),os=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&&!X(a)&&a.revert&&(e=a),Y(r)||(e.currentIteration=i,e.iterationProgress=(o&&i%2?!n:n)?1-r:r),a||v}};class as{constructor(t={}){L.current&&L.current.register(this);const e=t.root;let r=i;e&&(r=e.current||e.nativeElement||oe(e)[0]||i);const n=t.defaults,o=A.defaults,a=t.mediaQueries;if(this.defaults=n?bt(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=A.defaults;L.current=this,L.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 L.current=e,L.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);X(e)&&this.revertConstructors.push(e)})}),this}add(t,e){if(this.once=!1,X(t)){const e=t;this.constructors.push(e),this.execute(()=>{const t=e(this);X(t)&&this.revertConstructors.push(t)})}else this.methods[t]=(...t)=>this.execute(()=>e(...t));return this}addOnce(t){if(this.once=!0,X(t)){const e=this.onceIndex++;if(this.constructorsOnce[e])return this;const s=t;this.constructorsOnce[e]=s,this.execute(()=>{const t=s(this);X(t)&&this.revertConstructorsOnce.push(t)})}return this}keepTime(t){this.once=!0;const e=this.onceIndex++,s=this.constructorsOnce[e];if(X(s))return s(this);const i=os(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,l=i.length;for(;n--;)t[n].revert();for(;o--;)e[o](this);for(;a--;)s[a].revert();for(;l--;)i[l](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 ls=(t,e)=>t&&X(t)?t(e):t,hs=new Map;class ds{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 re({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Tt(this,t=>t.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new re({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=mt(e>0?Math.sqrt(o*o+a*a)/e:0,5)}}).init(),this.resizeTicker=new re({autoplay:!1,duration:250*A.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new re({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=mt(t?s.scrollX:e.scrollLeft,0),this.scrollY=mt(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(){Tt(this,t=>{t._debug&&t.removeDebug()}),this.updateBounds(),Tt(this,t=>{t.refresh(),t.onResize(t),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),hs.delete(this.element)}}const cs=(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:l,u:h}=It(a,At);let d=l;return"%"===h?d=l/100*s:h&&(d=de(t,At,"px",!0).n),o&&i<0&&(d+=i),n&&r>0&&(d+=r),d},us=(t,e,s,i,r)=>{let n;if(H(e)){const o=N.exec(e);if(o){const a=o[0],l=a[0],h=e.split(a),d="min"===h[0],c="max"===h[0],u=cs(t,h[0],s,i,r),p=cs(t,h[1],s,i,r);if(d){const e=Dt(cs(t,"min",s),p,l);n=e<u?u:e}else if(c){const e=Dt(cs(t,"max",s),p,l);n=e>u?u:e}else n=Dt(u,p,l)}else n=cs(t,e,s,i,r)}else n=e;return mt(n,0)},ps=t=>{let e;const s=t.targets;for(let t=0,i=s.length;t<i;t++){const i=s[t];if(i[o]){e=i;break}}return e};let ms=0;const fs=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class gs{constructor(t={}){L.current&&L.current.register(this);const e=$t(t.sync,"play pause"),s=e?Te(e):null,r=e&&("linear"===e||e===ce),n=e&&!(s===ce&&!r),o=e&&(z(e)||!0===e||r),a=e&&H(e)&&!n&&!o,l=a?e.split(" ").map(t=>()=>{const e=this.linked;return e&&e[t]?e[t]():null}):null,h=a&&l.length>2;this.index=ms++,this.id=Y(t.id)?this.index:t.id,this.container=(t=>{const e=t&&oe(t)[0]||i.body;let s=hs.get(e);return s||(s=new ds(e),hs.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||!!l,this.syncEase=n?s:null,this.syncSmooth=o?!0===e||r?1:e:null,this.onSyncEnter=l&&!h&&l[0]?l[0]:v,this.onSyncLeave=l&&!h&&l[1]?l[1]:v,this.onSyncEnterForward=l&&h&&l[0]?l[0]:v,this.onSyncLeaveForward=l&&h&&l[1]?l[1]:v,this.onSyncEnterBackward=l&&h&&l[2]?l[2]:v,this.onSyncLeaveBackward=l&&h&&l[3]?l[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.onResize=t.onResize||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=$t(t.debug,!1),this._next=null,this._prev=null,wt(this.container,this),ns(()=>{if(!this.reverted){if(!this.target){const e=oe(t.target)[0];this.target=e||i.body,this.refresh()}this._debug&&this.debug()}})}link(t){if(t&&(t.pause(),this.linked=t,Y(t)||Y(t.persist)||(t.persist=!0),!this._params.target)){let e;Y(t.targets)?Tt(t,t=>{t.targets&&!e&&(e=ps(t))}):e=ps(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:mt(ut(t,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const t=this._params;return this.repeat=$t(ls(t.repeat,this),!0),this.horizontal="x"===$t(ls(t.axis,this),"y"),this.enter=$t(ls(t.enter,this),"end start"),this.leave=$t(ls(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=fs[this.index%fs.length],l=t.useWin,h=l?t.winWidth:t.width,d=l?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?h: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,l=(r?0:this.offset)+t,m=s%2,f=l<_,g=l>(r?e?h: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",E=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 C=l-E+(e?1:0);T.style[e?"left":"top"]=`${C}px`,(r?n:o).appendChild(T)}),r.appendChild(n),r.appendChild(o),t.element.appendChild(r),s||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===Me(t.element,"position")&&(this.debugStyles=Ve(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&&a!==s.element&&a!==i.body;){const e="sticky"===Me(a,"position")&&Ve(a,{position:"static"});a=a.parentElement,e&&(t||(t=[]),t.push(e))}const l=e.getBoundingClientRect(),h=s.scale,d=(r?l.left+s.scrollX-s.left:l.top+s.scrollY-s.top)*h,c=(r?l.width:l.height)*h,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(H(m)){const t=m.split(" ");v=t[0],g=t.length>1?t[1]:g}else if(O(m)){const t=m;Y(t.container)||(v=t.container),Y(t.target)||(g=t.target)}else z(m)&&(v=m);if(H(f)){const t=f.split(" ");_=t[0],y=t.length>1?t[1]:y}else if(O(f)){const t=f;Y(t.container)||(_=t.container),Y(t.target)||(y=t.target)}else z(f)&&(_=f);const b=us(e,g,c),T=us(e,y,c),x=b+d-u,w=T+d-p,S=us(e,v,u,x,w),$=us(e,_,u,x,w),E=b+d-S,C=T+d-$,k=C-E;this.offset=d,this.offsetStart=E,this.offsetEnd=C,this.distance=k<=0?0:k,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,l=a<=this.offsetStart,h=a>=this.offsetEnd,d=!l&&!h,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(l&&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=mt(gt(e,g,gt(.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 xt(t,this),t._head||t.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}}const ys=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,vs=(t=.5,e=0,s=.5,i=1)=>t===e&&s===i?ce:r=>0===r||1===r?r:ys(((t,e,s)=>{let i,r,n=0,o=1,a=0;do{r=n+(o-n)/2,i=ys(r,e,s)-t,i>0?o=r:n=r}while(it(i)>1e-7&&++a<100);return r})(r,t,s),e,i),_s=(t=10,e)=>{const s=e?nt:ot;return e=>s(ut(e,0,1)*t)*(1/t)},bs=(...t)=>{const e=t.length;if(!e)return ce;const s=e-1,i=t[0],r=t[s],n=[0],o=[J(i)];for(let e=1;e<s;e++){const i=t[e],r=H(i)?i.trim().split(" "):[i],a=r[0],l=r[1];n.push(Y(l)?e/s:J(l)/100),o.push(J(a))}return o.push(J(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]}},Ts=(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(ut(o,r,1))}return s.push(1),bs(...s)};var xs=Object.freeze({__proto__:null,Spring:Qe,createSpring:Je,cubicBezier:vs,eases:ye,irregular:Ts,linear:bs,spring:Ze,steps:_s});const ws=(t,e=100)=>{const s=[];for(let i=0;i<=e;i++)s.push(mt(t(i/e),4));return`linear(${s.join(", ")})`},Ss={},$s=t=>{let e=Ss[t];if(e)return e;if(e="linear",H(t)){if(F(t,"linear")||F(t,"cubic-")||F(t,"steps")||F(t,"ease"))e=t;else if(F(t,"cubicB"))e=P(t);else{const s=_e(t);X(s)&&(e=s===ce?"linear":ws(s))}Ss[t]=e}else if(X(t)){const s=ws(t);s&&(e=s)}else t.ease&&(e=ws(t.ease));return e},Es=["x","y","z"],Cs=["perspective","width","height","margin","padding","top","right","bottom","left","borderWidth","fontSize","borderRadius",...Es],ks=(()=>[...Es,...g.filter(t=>["X","Y","Z"].some(e=>t.endsWith(e)))])();let Ns=null;const Ds=(t,e,s,i,r)=>{let n=H(e)?e:Et(e,s,i,r);return z(n)?Cs.includes(t)||F(t,"translate")?`${n}px`:F(t,"rotate")||F(t,"skew")?`${n}deg`:`${n}`:n},Is=(t,e,s,i,r,n)=>{let o="0";const a=Y(i)?getComputedStyle(t)[e]:Ds(e,i,t,r,n);return o=Y(s)?V(i)?i.map(s=>Ds(e,s,t,r,n)):a:[Ds(e,s,t,r,n),a],o};class Ls{constructor(t,s){L.current&&L.current.register(this),W(Ns)&&(!e||!Y(CSS)&&Object.hasOwnProperty.call(CSS,"registerProperty")?(g.forEach(t=>{const e=F(t,"skew"),s=F(t,"scale"),i=F(t,"rotate"),r=F(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{}}),Ns=!0):Ns=!1);const i=ae(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=$t(s.autoplay,A.defaults.autoplay),o=!(!n||!n.link)&&n,a=s.alternate&&!0===s.alternate,h=s.reversed&&!0===s.reversed,d=$t(s.loop,A.defaults.loop),c=!0===d||d===1/0?1/0:z(d)?d+1:1,u=a?h?"alternate-reverse":"alternate":h?"reverse":"normal",_=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=!n||!1!==o,this.reversed=h,this.persist=$t(s.persist,A.defaults.persist),this.autoplay=n,this._speed=$t(s.playbackRate,A.defaults.playbackRate),this._resolve=v,this._completed=0,this._inlineStyles=[],i.forEach((t,e)=>{const i=t[l],n=ks.some(t=>s.hasOwnProperty(t)),o=t.style,a=this._inlineStyles[e]={},h=$t(s.ease,A.defaults.ease),d=Et(h,t,e,r),p=X(d)||H(d)?d:h,v=h.ease&&h,b=$s(p),T=(v?v.settlingDuration:Et($t(s.duration,A.defaults.duration),t,e,r))*_,x=Et($t(s.delay,A.defaults.delay),t,e,r)*_,w=$t(s.composition,"replace");for(let l in s){if(!Q(l))continue;const h={},d={iterations:c,direction:u,fill:"both",easing:b,duration:T,delay:x,composite:w},p=s[l],m=!!n&&(g.includes(l)?l:f.get(l)),y=m?"transform":l;let v;if(a[y]||(a[y]=o[y]),O(p)){const s=p,n=$t(s.ease,b),a=n.ease&&n,c=s.to,u=s.from;if(d.duration=(a?a.settlingDuration:Et($t(s.duration,T),t,e,r))*_,d.delay=Et($t(s.delay,x),t,e,r)*_,d.composite=$t(s.composition,w),d.easing=$s(n),v=Is(t,l,u,c,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=Is(t,l,u,c,e,r),Fe(this,t,l,h,d),!Y(u))if(m){const t=`--${m}`;o.setProperty(t,h[t][0])}else o[l]=h[l][0]}else v=V(p)?p.map(s=>Ds(l,s,t,e,r)):Ds(l,p,t,e,r),m?(h[`--${m}`]=v,i[m]=v):h[l]=v,Fe(this,t,l,h,d)}if(n){let t=m;for(let e in i)t+=`${y[e]}var(--${e})) `;o.transform=t}}),o&&this.autoplay.link(this)}forEach(t){try{const e=H(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];Y(r)||r===m?s.removeProperty(P(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 As={animate:(t,e)=>new Ls(t,e),convertEase:ws};let Rs=0,Bs=0;const Ps=(t,e)=>!(!t||!e)&&(t===e||t.contains(e)),Fs=t=>{if(!t)return null;const e=t.style,s=e.transition||"";return e.setProperty("transition","none","important"),s},Ms=(t,e)=>{if(!t)return;const s=t.style;e?s.transition=e:s.removeProperty("transition")},Vs=t=>{const e=t.layout.transitionMuteStore,s=t.$el,i=t.$measure;s&&!e.has(s)&&e.set(s,Fs(s)),i&&!e.has(i)&&e.set(i,Fs(i))},Os=t=>{t.forEach((t,e)=>Ms(e,t)),t.clear()},zs={display:"none",visibility:"hidden",opacity:"0",transform:"none",position:"static"},Hs=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)},Xs=(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.ease=null,n.state=s,n.layout=s.layout,n.parentNode=e||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!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},Ys=(t,e,s,i)=>{const r=t.$el,n=t.layout.root,o=n===r,a=t.properties,l=t.state.rootNode,h=t.parentNode,d=s.transform,c=r.style.transform,u=!!h&&h.measuredIsRemoved,p=s.position;o&&(t.layout.absoluteCoords="fixed"===p||"absolute"===p),t.$measure=e,t.inlineTransforms=c,t.hasTransform=d&&"none"!==d,t.measuredIsInsideRoot=Ps(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;let m=!1,f=r.previousSibling;for(;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.previousSibling;if(f&&f.nodeType===Node.TEXT_NODE)m=!0;else{for(f=r.nextSibling;f&&(f.nodeType===Node.COMMENT_NODE||f.nodeType===Node.TEXT_NODE&&!f.textContent.trim());)f=f.nextSibling;m=null!==f&&f.nodeType===Node.TEXT_NODE}if(t.isInlined=m,t.hasTransform&&!i){const s=t.layout.transitionMuteStore;s.get(r)||(t.inlineTransition=Fs(r)),e===r?r.style.transform="none":(s.get(e)||(t.measuredInlineTransition=Fs(e)),t.measuredInlineTransform=e.style.transform,e.style.transform="none")}let g,y,v=0,_=0,b=0,T=0;if(!i){const t=e.getBoundingClientRect();v=t.left,_=t.top,b=t.width,T=t.height}for(let t in a){const e="transform"===t?d:s[t]||s.getPropertyValue&&s.getPropertyValue(t);Y(e)||(a[t]=e)}if(a.left=v,a.top=_,a.clientLeft=i?0:e.clientLeft,a.clientTop=i?0:e.clientTop,o)t.layout.absoluteCoords?(g=v,y=_):(g=0,y=0);else{const e=h||l,s=e.properties.left,i=e.properties.top,r=e.properties.clientLeft,n=e.properties.clientTop;if(t.layout.absoluteCoords)g=v-s-r,y=_-i-n;else if(e===l){const t=l.properties.left,e=l.properties.top;g=v-t-l.properties.clientLeft,y=_-e-l.properties.clientTop}else g=v-s-r,y=_-i-n}return a.x=g,a.y=y,a.width=b,a.height=T,t},Ws=(t,e)=>{if(e)for(let s in e)t.properties[s]=e[s]},Us=(t,e)=>{const s=Et(e.ease,t.$el,t.index,t.total),i=X(s)?s:e.ease,r=!Y(i)&&!Y(i.ease);t.ease=r?i.ease:i,t.duration=r?i.settlingDuration:Et(e.duration,t.$el,t.index,t.total),t.delay=Et(e.delay,t.$el,t.index,t.total)},qs=t=>{const e=t.$el.style,s=t.inlineStyles;s.length=0,t.layout.recordedProperties.forEach(t=>{s.push(t,e[t]||"")})},js=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))}},Gs=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&&(Ms(t.$el,t.inlineTransition),t.inlineTransition=null),i!==t.$el&&null!==t.measuredInlineTransition&&(Ms(i,t.measuredInlineTransition),t.measuredInlineTransition=null)},Qs=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.layout.pendingRemoval.delete(t.$el)},Zs=(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 Js{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=>{this.layout.pendingRemoval.delete(t.$el),t.$el.removeAttribute("data-layout-id"),t.$measure.removeAttribute("data-layout-id")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(t){if(t&&t.dataset)return this.nodes.get(t.dataset.layoutId)}getComputedValue(t,e){const s=this.getNode(t);if(s)return s.properties[e]}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,Fs(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||U(e))continue;const n=!!t&&t.measuredIsRemoved,o=n?zs:getComputedStyle(e),a=!!n||"none"===o.display,l=!!n||"hidden"===o.visibility,h=!a&&!l,d=e.dataset.layoutId,c=Ps(i,e);let u=d?this.nodes.get(d):null;if(u&&u.$el!==e){const a=Ps(i,u.$el),l=u.measuredIsVisible;if(a||!c&&(c||l||!h)){if(a&&!l&&h){Ys(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}}Hs(u),u=Xs(e,t,this,u)}else u=Xs(e,t,this,u);u.branchAdded=!1,u.branchRemoved=!1,u.branchNotRendered=!1,u.isTarget=!1,u.sizeChanged=!1,u.hasVisibilityHidden=l,u.hasDisplayNone=a,u.hasVisibilitySwap=l&&!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),Ys(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 t=this.layout,e=t.children,s=t.root,i=V(e)?e:[e],r=[],n="*"===e?s:L.root,o=[];let a=s.parentElement;for(;a&&1===a.nodeType;){const t=getComputedStyle(a);if(t.transform&&"none"!==t.transform){const t=a.style.transform||"",e=Fs(a);o.push(a,t,e),a.style.transform="none"}a=a.parentElement}for(let t=0,e=i.length;t<e;t++){const e=i[t];r[t]=H(e)?n.querySelectorAll(e):e}const l=ae(r);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const d=new Set;let c=0,u=this.nodes.size;this.nodes.forEach((t,e)=>{t.index=c++,t.total=u,t&&t.measuredIsInsideRoot&&d.add(e)});const p=new Set,m=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];if(e&&1===e.nodeType&&e!==s){if(!Ps(s,e)){const t=e.dataset.layoutId;if(!t||!d.has(t))continue}p.has(e)||(p.add(e),m.push(e))}}for(let t=0,e=m.length;t<e;t++)this.ensureDetachedNode(m[t],p);for(let t=0,e=l.length;t<e;t++){const e=l[t],s=this.getNode(e);if(s){let t=s;for(;t&&!t.isTarget;)t.isTarget=!0,t=t.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(Gs);for(let t=0,e=o.length;t<e;t+=3){const e=o[t],s=o[t+1],i=o[t+2];s&&""!==s?e.style.transform=s:e.style.removeProperty("transform"),Ms(e,i)}return this}}function Ks(t){const e={},s={};for(let i in t){const r=t[i];"duration"===i||"delay"===i||"ease"===i?s[i]=r:e[i]=r}return[e,s]}class ti{constructor(t,e={}){L.current&&L.current.register(this);const s=Ks(e.swapAt),i=Ks(e.enterFrom),r=Ks(e.leaveTo),n=e.properties;if(e.duration=$t(e.duration,350),e.delay=$t(e.delay,0),e.ease=$t(e.ease,"inOut(3.5)"),this.params=e,this.root=ae(t)[0],this.id=Rs++,this.children=e.children||"*",this.absoluteCoords=!1,this.swapAtParams=bt(e.swapAt||{opacity:0},{ease:"inOut(1.75)"}),this.enterFromParams=e.enterFrom||{opacity:0},this.leaveToParams=e.leaveTo||{opacity:0},this.properties=new Set(["opacity","fontSize","color","backgroundColor","borderRadius","border","filter","clipPath"]),s[0])for(let t in s[0])this.properties.add(t);if(i[0])for(let t in i[0])this.properties.add(t);if(r[0])for(let t in r[0])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.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Js(this),this.newState=new Js(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),Os(this.transitionMuteStore)}revert(){return this.root.classList.remove("is-animated"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>Os(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(js),this}animate(t={}){const e={ease:$t(t.ease,this.params.ease),delay:$t(t.delay,this.params.delay),duration:$t(t.duration,this.params.duration)},s={},i=$t(t.onComplete,this.params.onComplete),r=$t(t.onPause,this.params.onPause);for(let e in I)"ease"!==e&&"duration"!==e&&"delay"!==e&&(Y(t[e])?Y(this.params[e])||(s[e]=this.params[e]):s[e]=t[e]);s.onComplete=()=>{this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(t=>{Qs(t),js(t)});for(let t=0,e=w.length;t<e;t++){const e=w[t];e.style.transform=f.getComputedValue(e,"transform")}this.root.classList.contains("is-animated")&&(this.root.classList.remove("is-animated"),i&&i(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains("is-animated")||Os(this.transitionMuteStore)})},s.onPause=()=>{this.root.classList.contains("is-animated")&&(this.transformAnimation&&this.transformAnimation.cancel(),f.forEachRootNode(Qs),this.root.classList.remove("is-animated"),i&&i(this.timeline),r&&r(this.timeline))},s.composition=!1;const n=bt(bt(t.swapAt||{},this.swapAtParams),e),o=bt(bt(t.enterFrom||{},this.enterFromParams),e),a=bt(bt(t.leaveTo||{},this.leaveToParams),e),[l,h]=Ks(n),[d,c]=Ks(o),[u,p]=Ks(a),m=this.oldState,f=this.newState,g=this.animating,y=this.swapping,v=this.entering,_=this.leaving,b=this.pendingRemoval;g.length=y.length=v.length=_.length=0,m.forEachRootNode(Vs),f.record(),f.forEachRootNode(qs);const T=[],x=[],w=[],S=[],$=f.rootNode,E=$.$el;f.forEachRootNode(t=>{const e=t.$el,s=t.id,i=t.parentNode,r=!!i&&i.branchAdded,n=!!i&&i.branchRemoved,o=!!i&&i.branchNotRendered;let a=m.nodes.get(s);const l=!a;l?(a=Zs(t,{},m),m.nodes.set(s,a),a.measuredIsRemoved=!0):a.measuredIsRemoved&&!t.measuredIsRemoved&&(Zs(t,a,m),a.measuredIsRemoved=!0);const h=a.parentNode,c=(h?h.id:null)!==(i?i.id:null),p=a.$el!==t.$el,y=a.measuredIsRemoved,x=t.measuredIsRemoved;if(!a.measuredIsRemoved&&!x&&!l&&(c||p)){const t=a.properties.left,e=a.properties.top,s=i||f.rootNode,r=s.id?m.nodes.get(s.id):null,n=r?r.properties.left:s.properties.left,o=r?r.properties.top:s.properties.top,l=r?r.properties.clientLeft:s.properties.clientLeft,h=r?r.properties.clientTop:s.properties.clientTop;a.properties.x=t-n-l,a.properties.y=e-o-h}t.hasVisibilitySwap&&(t.hasVisibilityHidden&&(t.$el.style.visibility="visible",t.$measure.style.visibility="hidden"),t.hasDisplayNone&&(t.$el.style.display=a.measuredDisplay||t.measuredDisplay||"",t.$measure.style.visibility="hidden"));const w=b.has(e),S=a.measuredIsVisible,E=t.measuredIsVisible,C=!S&&E&&!o,k=!x&&(y||w)&&!r,N=x&&!y&&!n,D=N||x&&w&&!n;t.branchAdded=r||k,t.branchRemoved=n||D,t.branchNotRendered=o||x,x&&S&&(t.$el.style.display=a.measuredDisplay,t.$el.style.visibility="visible",Zs(a,t,f)),N?(t.isTarget&&(_.push(e),t.isLeaving=!0),b.add(e)):!x&&w&&b.delete(e),k&&!o||C?(Ws(a,d),t.isTarget&&(v.push(e),t.isEntering=!0)):D&&!o&&Ws(t,u),t===$||!t.isTarget||t.isEntering||t.isLeaving||g.push(e),T.push(e)});let C=0,k=0,N=0;f.forEachRootNode(t=>{const s=t.$el,i=t.parentNode,r=m.nodes.get(t.id),n=t.properties,o=r.properties;let a=i!==$&&i;for(;a&&!a.isTarget&&a!==$;)a=a.parentNode;const d=g.length;t===$?(t.index=0,t.total=d,Us(t,e)):t.isEntering?(t.index=a?a.index:C,t.total=a?d:v.length,Us(t,c),C++):t.isLeaving?(t.index=a?a.index:k,t.total=a?d:_.length,k++,Us(t,p)):t.isTarget?(t.index=N++,t.total=d,Us(t,e)):(t.index=a?a.index:0,t.total=d,Us(t,h)),r.index=t.index,r.total=t.total;for(let e in n)n[e]=Et(n[e],s,t.index,t.total),o[e]=Et(o[e],s,r.index,r.total);const u=Math.abs(n.width-o.width)>1,f=Math.abs(n.height-o.height)>1;if(t.sizeChanged=u||f,t.isTarget&&(!t.measuredIsRemoved&&r.measuredIsVisible||t.measuredIsRemoved&&t.measuredIsVisible)){"none"===n.transform&&"none"===o.transform||(t.hasTransform=!0,w.push(s));for(let t in n)if("transform"!==t&&n[t]!==o[t]){x.push(s);break}}t.isTarget||(y.push(s),t.sizeChanged&&i&&i.isTarget&&i.sizeChanged&&(l.transform&&(t.hasTransform=!0,w.push(s)),S.push(s)))});const D={delay:t=>f.getNode(t).delay,duration:t=>f.getNode(t).duration,ease:t=>f.getNode(t).ease};if(s.defaults=D,this.timeline=We(s),!x.length&&!w.length&&!y.length)return Os(this.transitionMuteStore),this.timeline.complete();if(T.length){this.root.classList.add("is-animated");for(let t=0,e=T.length;t<e;t++){const e=T[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties;r.isInlined||("grid"!==i.measuredDisplay&&"grid"!==r.measuredDisplay||e.style.setProperty("display","block","important"),(e!==E||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===E&&"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"}m.scrollX===window.scrollX&&m.scrollY===window.scrollY||requestAnimationFrame(()=>window.scrollTo(m.scrollX,m.scrollY));for(let t=0,e=x.length;t<e;t++){const e=x[t],s=e.dataset.layoutId,i=m.nodes.get(s),r=f.nodes.get(s),n=i.properties,o=r.properties;let a=!1;const l={composition:"none"};n.width!==o.width&&(l.width=[n.width,o.width],a=!0),n.height!==o.height&&(l.height=[n.height,o.height],a=!0),r.hasTransform||r.isInlined||(l.translate=[`${n.x}px ${n.y}px`,`${o.x}px ${o.y}px`],a=!0),this.properties.forEach(t=>{const e=n[t],s=o[t];"transform"!==t&&e!==s&&(l[t]=[e,s],a=!0)}),a&&this.timeline.add(e,l,0)}}if(y.length){for(let t=0,e=y.length;t<e;t++){const e=y[t],s=m.getNode(e),i=s.properties;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",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${m.getComputedValue(e,t)}`)})}for(let t=0,e=y.length;t<e;t++){const e=y[t],s=f.getNode(e),i=s.properties;this.timeline.call(()=>{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",s.isInlined||(e.style.translate=`${i.x}px ${i.y}px`),this.properties.forEach(t=>{"transform"!==t&&(e.style[t]=`${f.getComputedValue(e,t)}`)})},s.delay+s.duration/2)}if(S.length){const t=Te(f.nodes.get(S[0].dataset.layoutId).ease),e=e=>1-t(1-e),s={};if(l)for(let t in l)"transform"!==t&&(s[t]=[{from:e=>m.getComputedValue(e,t),to:l[t]},{from:l[t],to:e=>f.getComputedValue(e,t),ease:e}]);this.timeline.add(S,s,0)}}const L=w.length;if(L){for(let t=0;t<L;t++){const e=w[t],s=f.getNode(e);s.isInlined||(e.style.translate=`${m.getComputedValue(e,"x")}px ${m.getComputedValue(e,"y")}px`),e.style.transform=m.getComputedValue(e,"transform"),S.includes(e)&&(s.ease=Et(n.ease,e,s.index,s.total),s.duration=Et(n.duration,e,s.index,s.total))}this.transformAnimation=As.animate(w,{translate:t=>f.getNode(t).isInlined?"0px 0px":`${f.getComputedValue(t,"x")}px ${f.getComputedValue(t,"y")}px`,transform:t=>{const e=f.getComputedValue(t,"transform");if(!S.includes(t))return e;const s=m.getComputedValue(t,"transform"),i=f.getNode(t);return[s,Et(l.transform,t,i.index,i.total),e]},autoplay:!1,...D}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(t,e={}){return this.record(),t(this),this.animate(e)}}const ei=je,si={},ii=t=>(...e)=>{const s=t(...e);return new Proxy(v,{apply:(t,e,[i])=>s(i),get:(t,e)=>ii((...t)=>{const i=si[e](...t);return t=>i(s(t))})})},ri=(t,e,s=0)=>{const i=(...t)=>(t.length<e.length?ii(((t,e=0)=>(...s)=>e?e=>t(...s,e):e=>t(e,...s))(e,s)):e)(...t);return si[t]||(si[t]=i),i},ni=ri("roundPad",ei.roundPad),oi=ri("padStart",ei.padStart),ai=ri("padEnd",ei.padEnd),li=ri("wrap",ei.wrap),hi=ri("mapRange",ei.mapRange),di=ri("degToRad",ei.degToRad),ci=ri("radToDeg",ei.radToDeg),ui=ri("snap",ei.snap),pi=ri("clamp",ei.clamp),mi=ri("round",ei.round),fi=ri("lerp",ei.lerp,1),gi=ri("damp",ei.damp,1),yi=(t=0,e=1,s=0)=>{const i=10**s;return Math.floor((Math.random()*(e-t+1/i)+t)*i)/i};let vi=0;const _i=(t,e=0,s=1,i=0)=>{let r=void 0===t?vi++: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}},bi=t=>t[yi(0,t.length-1)],Ti=t=>{let e,s,i=t.length;for(;i;)s=yi(0,--i),e=t[i],t[i]=t[s],t[s]=e;return t},xi=(t,e={})=>{let s=[],i=0;const r=e.from,n=e.reversed,o=e.ease,a=!Y(o),l=a&&!Y(o.ease)?o.ease:a?Te(o):null,h=e.grid,d=e.axis,c=e.total,u=Y(r)||0===r||"first"===r,p="center"===r,f="last"===r,g="random"===r,y=V(t),v=e.use,_=J(y?t[0]:t),b=y?J(t[1]):0,T=E.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]=ae(t),m=Y(c)?o:c,S=!Y(v)&&(X(v)?v(u,r,m):Nt(u,v)),$=z(S)||H(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(h){const e=p?(h[0]-1)/2:w%h[0],i=p?(h[1]-1)/2:ot(w/h[0]),r=e-t%h[0],n=i-ot(t/h[0]);let o=tt(r*r+n*n);"x"===d&&(o=-r),"y"===d&&(o=-n),s.push(o)}else s.push(it(w-t));i=lt(...s)}l&&(s=s.map(t=>l(t/i)*i)),n&&(s=s.map(t=>d?t<0?-1*t:-t:it(i-t))),g&&(s=Ti(s))}const E=y?(b-_)/i:_;let C=(a?ze(a,Y(e.start)?a.iterationDuration:x):x)+(E*mt(s[$],2)||0);return e.modifier&&(C=e.modifier(C)),T&&(C=`${C}${T[2]}`),C}};var wi=Object.freeze({__proto__:null,$:ae,clamp:pi,cleanInlineStyles:Mt,createSeededRandom:_i,damp:gi,degToRad:di,get:Me,keepTime:os,lerp:fi,mapRange:hi,padEnd:ai,padStart:oi,radToDeg:ci,random:yi,randomPick:bi,remove:Oe,round:mi,roundPad:ni,set:Ve,shuffle:Ti,snap:ui,stagger:xi,sync:ns,wrap:li});const Si=t=>{const e=oe(t)[0];return e&&U(e)?e:console.warn(`${t} is not a valid SVGGeometryElement`)},$i=(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)},Ei=(t,e,s=0)=>i=>{const r=+t.getTotalLength(),n=i[a],o=t.getCTM(),l=0===s;return{from:0,to:r,modifier:i=>{const a=i+s*r;if("a"===e){const e=$i(t,r,a,-1,l),s=$i(t,r,a,1,l);return 180*ht(s.y-e.y,s.x-e.x)/dt}{const s=$i(t,r,a,0,l);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}}}},Ci=(t,e=0)=>{const s=Si(t);if(s)return{translateX:Ei(s,"x",e),translateY:Ei(s,"y",e),rotate:Ei(s,"a",e)}},ki=(t,e=0,s=0)=>oe(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 l=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],l=+s[1],h=(t=>{let e=1;if(t&&t.getCTM){const s=t.getCTM();s&&(e=(tt(s.a*s.a+s.b*s.b)+tt(s.c*s.c+s.d*s.d))/2)}return e})(o),d=-1e3*r*h,c=l*i*h+d,u=i*h+(0===r&&1===l||1===r&&0===l?0:10*h)-c;if("butt"!==n){const e=r===l?"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)}:X(s)?(...e)=>Reflect.apply(s,t,e):s}});return"1000"!==t.getAttribute("pathLength")&&(t.setAttribute("pathLength","1000"),l.setAttribute("draw",`${e} ${s}`)),l})(t,e,s)),Ni=(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=Si(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[h];o&&s.setAttribute(r?"d":"points",o);let a="",l="";if(e){const t=s.getTotalLength(),o=i.getTotalLength(),h=Math.max(Math.ceil(t*e),Math.ceil(o*e));for(let e=0;e<h;e++){const d=e/(h-1),c=s.getPointAtLength(t*d),u=i.getPointAtLength(o*d),p=r?0===e?"M":"L":"";a+=p+mt(c.x,3)+n+c.y+" ",l+=p+mt(u.x,3)+n+u.y+" "}}else a=s.getAttribute(r?"d":"points"),l=i.getAttribute(r?"d":"points");return s[h]=l,[a,l]};var Di=Object.freeze({__proto__:null,createDrawable:ki,createMotionPath:Ci,morphTo:Ni});const Ii="undefined"!=typeof Intl&&Intl.Segmenter,Li=/\{value\}/g,Ai=/\{i\}/g,Ri=/(\s+)/,Bi=/^\s+$/,Pi="line",Fi="word",Mi="char",Vi="data-line";let Oi=null,zi=null,Hi=null;const Xi=t=>t.isWordLike||" "===t.segment||z(+t.segment),Yi=t=>t.setAttribute("aria-hidden","true"),Wi=(t,e)=>[...t.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Ui={line:"#00D672",word:"#FF4B4B",char:"#5A87FF"},qi=t=>{if(!t.childElementCount&&!t.textContent.trim()){const e=t.parentElement;t.remove(),e&&qi(e)}},ji=(t,e,s)=>{const i=t.getAttribute(Vi);if(null!==i&&+i!==e||"BR"===t.tagName){s.add(t);const e=t.previousSibling,i=t.nextSibling;e&&3===e.nodeType&&Bi.test(e.textContent)&&s.add(e),i&&3===i.nodeType&&Bi.test(i.textContent)&&s.add(i)}let r=t.childElementCount;for(;r--;)ji(t.children[r],e,s);return s},Gi=(t,e={})=>{let s="";const i=H(e.class)?` class="${e.class}"`:"",r=$t(e.clone,!1),n=$t(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,l)=>{const h=r===Pi,d=r===Mi,c=`_${r}_`,u=X(t)?t(s):t,p=h?"block":"inline-block";Hi.innerHTML=u.replace(Li,`<i class="${c}"></i>`).replace(Ai,`${d?l:h?o:a}`);const m=Hi.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(Vi,`${o}`),h||(g.setAttribute("data-word",`${a}`),d&&g.setAttribute("data-char",`${l}`));let t=v;for(;t--;){const e=y[t],i=e.parentElement;i.style.display=p,h?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 ${Ui[r]}`),f};class Zi{constructor(t,s={}){Oi||(Oi=Ii?new Ii([],{granularity:Fi}):{segment:t=>{const e=[],s=t.split(Ri);for(let t=0,i=s.length;t<i;t++){const i=s[t];e.push({segment:i,isWordLike:!Bi.test(i)})}return e}}),zi||(zi=Ii?new Ii([],{granularity:"grapheme"}):{segment:t=>[...t].map(t=>({segment:t}))}),!Hi&&e&&(Hi=i.createElement("template")),L.current&&L.current.register(this);const{words:r,chars:n,lines:o,accessible:a,includeSpaces:l,debug:h}=s,d=(t=V(t)?t[0]:t)&&t.nodeType?t:(ne(t)||[])[0],c=!0===o?{}:o,u=!0===r||Y(r)?{}:r,p=!0===n?{}:n;this.debug=$t(h,!1),this.includeSpaces=$t(l,!1),this.accessible=$t(a,!0),this.linesOnly=c&&!u&&!p,this.lineTemplate=O(c)?Gi(Pi,c):c,this.wordTemplate=O(u)||this.linesOnly?Gi(Fi,u):u,this.charTemplate=O(p)?Gi(Mi,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(!X(t))return console.warn("Effect must return a function.");const e=os(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=>X(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=[],l=this.words,h=this.chars,d=Oi.segment(o),c=i.createDocumentFragment();let u=null;for(const t of d){const e=t.segment,s=Xi(t);if(!u||s&&u&&Xi(u))a.push(e);else{const t=a.length-1,s=a[t];Ri.test(s)||Ri.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?zi.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,h,d,f,Mi,n,-1,l.length,h.length)}}e?Qi(e,l,f,c,Fi,n,-1,l.length,h.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,l=r&&a;this.ready=!r||a,(l||t)&&this.effectsCleanups.forEach(t=>X(t)&&t(this)),s||(t&&(e.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(e),this.cache=e.innerHTML),l&&(s&&(e.innerHTML=this.cache),this.lines.length=0,n&&(this.words=Wi(e,Fi))),o&&(l||n)&&(this.chars=Wi(e,Mi));const h=this.words.length?this.words:this.chars;let d,c=0;for(let t=0,e=h.length;t<e;t++){const e=h[t],{top:s,height:i}=e.getBoundingClientRect();!Y(d)&&s-d>.5*i&&c++,e.setAttribute(Vi,`${c}`);const r=e.querySelectorAll(`[${Vi}]`);let n=r.length;for(;n--;)r[n].setAttribute(Vi,`${c}`);d=s}if(l){const t=i.createDocumentFragment(),s=new Set,a=[];for(let t=0;t<c+1;t++){const i=e.cloneNode(!0);ji(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(qi);for(let e=0,s=a.length;e<s;e++)Qi(r,this.lines,a[e],t,Pi,this.debug,e);e.innerHTML="",e.appendChild(t),n&&(this.words=Wi(e,Fi)),o&&(this.chars=Wi(e,Mi))}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&&(l||!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(Yi),this.words.forEach(Yi),this.chars.forEach(Yi)}return this.width=e.offsetWidth,(l||t)&&this.effects.forEach((t,e)=>this.effectsCleanups[e]=t(this)),this}refresh(){this.split(!0)}}const Ji=(t,e)=>new Zi(t,e),Ki=(t,e)=>(console.warn("text.split() is deprecated, import splitText() directly, or text.splitText()"),new Zi(t,e));var tr=Object.freeze({__proto__:null,TextSplitter:Zi,split:Ki,splitText:Ji});t.$=ae,t.Animatable=Ue,t.AutoLayout=ti,t.Draggable=rs,t.JSAnimation=Re,t.Scope=as,t.ScrollObserver=gs,t.Spring=Qe,t.TextSplitter=Zi,t.Timeline=Ye,t.Timer=re,t.WAAPIAnimation=Ls,t.animate=(t,e)=>new Re(t,e,null,0,!1).init(),t.clamp=pi,t.cleanInlineStyles=Mt,t.createAnimatable=(t,e)=>new Ue(t,e),t.createDraggable=(t,e)=>new rs(t,e),t.createDrawable=ki,t.createLayout=(t,e)=>new ti(t,e),t.createMotionPath=Ci,t.createScope=t=>new as(t),t.createSeededRandom=_i,t.createSpring=Je,t.createTimeline=We,t.createTimer=t=>new re(t,null,0).init(),t.cubicBezier=vs,t.damp=gi,t.degToRad=di,t.eases=ye,t.easings=xs,t.engine=Yt,t.get=Me,t.irregular=Ts,t.keepTime=os,t.lerp=fi,t.linear=bs,t.mapRange=hi,t.morphTo=Ni,t.onScroll=(t={})=>new gs(t),t.padEnd=ai,t.padStart=oi,t.radToDeg=ci,t.random=yi,t.randomPick=bi,t.remove=Oe,t.round=mi,t.roundPad=ni,t.scrollContainers=hs,t.set=Ve,t.shuffle=Ti,t.snap=ui,t.split=Ki,t.splitText=Ji,t.spring=Ze,t.stagger=xi,t.steps=_s,t.svg=Di,t.sync=ns,t.text=tr,t.utils=wi,t.waapi=As,t.wrap=li});diff --git a/dist/modules/animatable/animatable.cjs b/dist/modules/animatable/animatable.cjsindex 451fa95a..76549730 100644--- a/dist/modules/animatable/animatable.cjs+++ b/dist/modules/animatable/animatable.cjs@@ -1,6 +1,6 @@/*** Anime.js - animatable - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animatable/animatable.js b/dist/modules/animatable/animatable.jsindex 0bdca779..b7edf129 100644--- a/dist/modules/animatable/animatable.js+++ b/dist/modules/animatable/animatable.js@@ -1,6 +1,6 @@/*** Anime.js - animatable - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animatable/index.cjs b/dist/modules/animatable/index.cjsindex e8322c0b..57379d8b 100644--- a/dist/modules/animatable/index.cjs+++ b/dist/modules/animatable/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - animatable - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animatable/index.js b/dist/modules/animatable/index.jsindex 7ec71d9a..a1d2f2a3 100644--- a/dist/modules/animatable/index.js+++ b/dist/modules/animatable/index.js@@ -1,6 +1,6 @@/*** Anime.js - animatable - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/additive.cjs b/dist/modules/animation/additive.cjsindex 4752b6b4..906762bf 100644--- a/dist/modules/animation/additive.cjs+++ b/dist/modules/animation/additive.cjs@@ -1,6 +1,6 @@/*** Anime.js - animation - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/additive.js b/dist/modules/animation/additive.jsindex 9c9fa60b..52f50b1d 100644--- a/dist/modules/animation/additive.js+++ b/dist/modules/animation/additive.js@@ -1,6 +1,6 @@/*** Anime.js - animation - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/animation.cjs b/dist/modules/animation/animation.cjsindex a5abfbb4..d182c656 100644--- a/dist/modules/animation/animation.cjs+++ b/dist/modules/animation/animation.cjs@@ -1,6 +1,6 @@/*** Anime.js - animation - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/animation.js b/dist/modules/animation/animation.jsindex 545549fd..54cbc92a 100644--- a/dist/modules/animation/animation.js+++ b/dist/modules/animation/animation.js@@ -1,6 +1,6 @@/*** Anime.js - animation - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/composition.cjs b/dist/modules/animation/composition.cjsindex 60ffa656..49fb14c0 100644--- a/dist/modules/animation/composition.cjs+++ b/dist/modules/animation/composition.cjs@@ -1,6 +1,6 @@/*** Anime.js - animation - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/composition.js b/dist/modules/animation/composition.jsindex b68bd093..e53ef9bb 100644--- a/dist/modules/animation/composition.js+++ b/dist/modules/animation/composition.js@@ -1,6 +1,6 @@/*** Anime.js - animation - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/index.cjs b/dist/modules/animation/index.cjsindex 9d97af7e..b2b346ca 100644--- a/dist/modules/animation/index.cjs+++ b/dist/modules/animation/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - animation - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/animation/index.js b/dist/modules/animation/index.jsindex 4b12beac..5e188c8e 100644--- a/dist/modules/animation/index.js+++ b/dist/modules/animation/index.js@@ -1,6 +1,6 @@/*** Anime.js - animation - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/clock.cjs b/dist/modules/core/clock.cjsindex 8c1f30f3..6d93d733 100644--- a/dist/modules/core/clock.cjs+++ b/dist/modules/core/clock.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/clock.js b/dist/modules/core/clock.jsindex 1ff1d13d..1e70b880 100644--- a/dist/modules/core/clock.js+++ b/dist/modules/core/clock.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/colors.cjs b/dist/modules/core/colors.cjsindex 1ea2e844..a4eccf8a 100644--- a/dist/modules/core/colors.cjs+++ b/dist/modules/core/colors.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/colors.js b/dist/modules/core/colors.jsindex a2b22ec4..81253b2b 100644--- a/dist/modules/core/colors.js+++ b/dist/modules/core/colors.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/consts.cjs b/dist/modules/core/consts.cjsindex 5773bf4b..a1523a1d 100644--- a/dist/modules/core/consts.cjs+++ b/dist/modules/core/consts.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -111,6 +111,7 @@ const noop = () => {};// Regex+const validRgbHslRgx = /\)\s*[-.\d]/;const hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;const rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;const rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;@@ -156,6 +157,7 @@ exports.transformsFragmentStrings = transformsFragmentStrings;exports.transformsSymbol = transformsSymbol;exports.tweenTypes = tweenTypes;exports.unitsExecRgx = unitsExecRgx;+exports.validRgbHslRgx = validRgbHslRgx;exports.validTransforms = validTransforms;exports.valueTypes = valueTypes;exports.win = win;diff --git a/dist/modules/core/consts.d.ts b/dist/modules/core/consts.d.tsindex 670fcf96..ffa48c4d 100644--- a/dist/modules/core/consts.d.ts+++ b/dist/modules/core/consts.d.ts@@ -48,6 +48,7 @@ export const shortTransforms: Map<any, any>;export const validTransforms: string[];export const transformsFragmentStrings: {};export function noop(): void;+export const validRgbHslRgx: RegExp;export const hexTestRgx: RegExp;export const rgbExecRgx: RegExp;export const rgbaExecRgx: RegExp;diff --git a/dist/modules/core/consts.js b/dist/modules/core/consts.jsindex 849b8c91..e1f9f5d4 100644--- a/dist/modules/core/consts.js+++ b/dist/modules/core/consts.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -109,6 +109,7 @@ const noop = () => {};// Regex+const validRgbHslRgx = /\)\s*[-.\d]/;const hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;const rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;const rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i;@@ -123,4 +124,4 @@ const transformsExecRgx = /(\w+)(\([^)]+\)+)/g; // Match inline transforms withconst relativeValuesExecRgx = /(\*=|\+=|-=)/;const cssVariableMatchRgx = /var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/;-export { K, compositionTypes, cssVarPrefix, cssVariableMatchRgx, digitWithExponentRgx, doc, emptyString, hexTestRgx, hslExecRgx, hslaExecRgx, isBrowser, isDomSymbol, isRegisteredTargetSymbol, isSvgSymbol, lowerCaseRgx, maxFps, maxValue, minValue, morphPointsSymbol, noop, proxyTargetSymbol, relativeValuesExecRgx, rgbExecRgx, rgbaExecRgx, shortTransforms, tickModes, transformsExecRgx, transformsFragmentStrings, transformsSymbol, tweenTypes, unitsExecRgx, validTransforms, valueTypes, win };+export { K, compositionTypes, cssVarPrefix, cssVariableMatchRgx, digitWithExponentRgx, doc, emptyString, hexTestRgx, hslExecRgx, hslaExecRgx, isBrowser, isDomSymbol, isRegisteredTargetSymbol, isSvgSymbol, lowerCaseRgx, maxFps, maxValue, minValue, morphPointsSymbol, noop, proxyTargetSymbol, relativeValuesExecRgx, rgbExecRgx, rgbaExecRgx, shortTransforms, tickModes, transformsExecRgx, transformsFragmentStrings, transformsSymbol, tweenTypes, unitsExecRgx, validRgbHslRgx, validTransforms, valueTypes, win };diff --git a/dist/modules/core/globals.cjs b/dist/modules/core/globals.cjsindex f0362319..1e1bd591 100644--- a/dist/modules/core/globals.cjs+++ b/dist/modules/core/globals.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -67,7 +67,7 @@ const globals = {const devTools = consts.isBrowser && consts.win.AnimeJSDevTools;-const globalVersions = { version: '4.3.4', engine: null };+const globalVersions = { version: '4.3.5', engine: null };if (consts.isBrowser) {if (!consts.win.AnimeJS) consts.win.AnimeJS = [];diff --git a/dist/modules/core/globals.js b/dist/modules/core/globals.jsindex a35f1429..65ac22cf 100644--- a/dist/modules/core/globals.js+++ b/dist/modules/core/globals.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -65,7 +65,7 @@ const globals = {const devTools = isBrowser && win.AnimeJSDevTools;-const globalVersions = { version: '4.3.4', engine: null };+const globalVersions = { version: '4.3.5', engine: null };if (isBrowser) {if (!win.AnimeJS) win.AnimeJS = [];diff --git a/dist/modules/core/helpers.cjs b/dist/modules/core/helpers.cjsindex 09518c8e..1cd454b6 100644--- a/dist/modules/core/helpers.cjs+++ b/dist/modules/core/helpers.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -56,11 +56,11 @@ const isSvg = a => consts.isBrowser && a instanceof SVGElement;/**@param {any} a @return {Boolean} */const isHex = a => consts.hexTestRgx.test(a);/**@param {any} a @return {Boolean} */-const isRgb = a => stringStartsWith(a, 'rgb') && a[a.length - 1] === ')';+const isRgb = a => stringStartsWith(a, 'rgb');/**@param {any} a @return {Boolean} */-const isHsl = a => stringStartsWith(a, 'hsl') && a[a.length - 1] === ')';-/**@param {any} a @return {Boolean} */-const isCol = a => isHex(a) || isRgb(a) || isHsl(a);+const isHsl = a => stringStartsWith(a, 'hsl');+/**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type+const isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !consts.validRgbHslRgx.test(a)));/**@param {any} a @return {Boolean} */const isKey = a => !globals.globals.defaults.hasOwnProperty(a);diff --git a/dist/modules/core/helpers.js b/dist/modules/core/helpers.jsindex f638fb31..d0165237 100644--- a/dist/modules/core/helpers.js+++ b/dist/modules/core/helpers.js@@ -1,11 +1,11 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/-import { isBrowser, maxValue, minValue, hexTestRgx, lowerCaseRgx } from './consts.js';+import { isBrowser, maxValue, minValue, hexTestRgx, lowerCaseRgx, validRgbHslRgx } from './consts.js';import { globals } from './globals.js';/**@@ -54,11 +54,11 @@ const isSvg = a => isBrowser && a instanceof SVGElement;/**@param {any} a @return {Boolean} */const isHex = a => hexTestRgx.test(a);/**@param {any} a @return {Boolean} */-const isRgb = a => stringStartsWith(a, 'rgb') && a[a.length - 1] === ')';+const isRgb = a => stringStartsWith(a, 'rgb');/**@param {any} a @return {Boolean} */-const isHsl = a => stringStartsWith(a, 'hsl') && a[a.length - 1] === ')';-/**@param {any} a @return {Boolean} */-const isCol = a => isHex(a) || isRgb(a) || isHsl(a);+const isHsl = a => stringStartsWith(a, 'hsl');+/**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type+const isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !validRgbHslRgx.test(a)));/**@param {any} a @return {Boolean} */const isKey = a => !globals.defaults.hasOwnProperty(a);diff --git a/dist/modules/core/render.cjs b/dist/modules/core/render.cjsindex da0935ca..6c0d5bd8 100644--- a/dist/modules/core/render.cjs+++ b/dist/modules/core/render.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/render.js b/dist/modules/core/render.jsindex dc37627b..05b4f8a4 100644--- a/dist/modules/core/render.js+++ b/dist/modules/core/render.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/styles.cjs b/dist/modules/core/styles.cjsindex 5f162050..261d3995 100644--- a/dist/modules/core/styles.cjs+++ b/dist/modules/core/styles.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/styles.js b/dist/modules/core/styles.jsindex e598fc7c..03126a83 100644--- a/dist/modules/core/styles.js+++ b/dist/modules/core/styles.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/targets.cjs b/dist/modules/core/targets.cjsindex 4ce029da..8b95a28e 100644--- a/dist/modules/core/targets.cjs+++ b/dist/modules/core/targets.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/targets.js b/dist/modules/core/targets.jsindex ce322825..6d0cfede 100644--- a/dist/modules/core/targets.js+++ b/dist/modules/core/targets.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/transforms.cjs b/dist/modules/core/transforms.cjsindex 6ab53aa4..12f2f4ac 100644--- a/dist/modules/core/transforms.cjs+++ b/dist/modules/core/transforms.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/transforms.js b/dist/modules/core/transforms.jsindex a3be150f..dd7e4dcd 100644--- a/dist/modules/core/transforms.js+++ b/dist/modules/core/transforms.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/units.cjs b/dist/modules/core/units.cjsindex c3d8193a..c37b131a 100644--- a/dist/modules/core/units.cjs+++ b/dist/modules/core/units.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/units.js b/dist/modules/core/units.jsindex 84ab1dab..c8b852c0 100644--- a/dist/modules/core/units.js+++ b/dist/modules/core/units.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/values.cjs b/dist/modules/core/values.cjsindex 97459d0d..22517abc 100644--- a/dist/modules/core/values.cjs+++ b/dist/modules/core/values.cjs@@ -1,6 +1,6 @@/*** Anime.js - core - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/core/values.js b/dist/modules/core/values.jsindex 5a752758..c75e605b 100644--- a/dist/modules/core/values.js+++ b/dist/modules/core/values.js@@ -1,6 +1,6 @@/*** Anime.js - core - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/draggable/draggable.cjs b/dist/modules/draggable/draggable.cjsindex 3690733c..89b29a20 100644--- a/dist/modules/draggable/draggable.cjs+++ b/dist/modules/draggable/draggable.cjs@@ -1,6 +1,6 @@/*** Anime.js - draggable - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/draggable/draggable.js b/dist/modules/draggable/draggable.jsindex 25af96b7..84bb0102 100644--- a/dist/modules/draggable/draggable.js+++ b/dist/modules/draggable/draggable.js@@ -1,6 +1,6 @@/*** Anime.js - draggable - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/draggable/index.cjs b/dist/modules/draggable/index.cjsindex 37355ce3..c22646ff 100644--- a/dist/modules/draggable/index.cjs+++ b/dist/modules/draggable/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - draggable - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/draggable/index.js b/dist/modules/draggable/index.jsindex 75a48299..9b7e9fa4 100644--- a/dist/modules/draggable/index.js+++ b/dist/modules/draggable/index.js@@ -1,6 +1,6 @@/*** Anime.js - draggable - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/cubic-bezier/index.cjs b/dist/modules/easings/cubic-bezier/index.cjsindex d52e9392..e9895374 100644--- a/dist/modules/easings/cubic-bezier/index.cjs+++ b/dist/modules/easings/cubic-bezier/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/cubic-bezier/index.js b/dist/modules/easings/cubic-bezier/index.jsindex 6ab48a6a..cc078266 100644--- a/dist/modules/easings/cubic-bezier/index.js+++ b/dist/modules/easings/cubic-bezier/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/eases/index.cjs b/dist/modules/easings/eases/index.cjsindex 39464118..26fa0963 100644--- a/dist/modules/easings/eases/index.cjs+++ b/dist/modules/easings/eases/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/eases/index.js b/dist/modules/easings/eases/index.jsindex 38d8b651..85b1c937 100644--- a/dist/modules/easings/eases/index.js+++ b/dist/modules/easings/eases/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/eases/parser.cjs b/dist/modules/easings/eases/parser.cjsindex 957fdc8a..f29b45cb 100644--- a/dist/modules/easings/eases/parser.cjs+++ b/dist/modules/easings/eases/parser.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/eases/parser.js b/dist/modules/easings/eases/parser.jsindex a9221c32..5bf5fd89 100644--- a/dist/modules/easings/eases/parser.js+++ b/dist/modules/easings/eases/parser.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/index.cjs b/dist/modules/easings/index.cjsindex 694ba5c6..92d6aebf 100644--- a/dist/modules/easings/index.cjs+++ b/dist/modules/easings/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/index.js b/dist/modules/easings/index.jsindex ecb13a1e..819f756a 100644--- a/dist/modules/easings/index.js+++ b/dist/modules/easings/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/irregular/index.cjs b/dist/modules/easings/irregular/index.cjsindex a17d2e34..a817000c 100644--- a/dist/modules/easings/irregular/index.cjs+++ b/dist/modules/easings/irregular/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/irregular/index.js b/dist/modules/easings/irregular/index.jsindex 001536fc..d06a2f30 100644--- a/dist/modules/easings/irregular/index.js+++ b/dist/modules/easings/irregular/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/linear/index.cjs b/dist/modules/easings/linear/index.cjsindex 03506b1f..9431b34e 100644--- a/dist/modules/easings/linear/index.cjs+++ b/dist/modules/easings/linear/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/linear/index.js b/dist/modules/easings/linear/index.jsindex 49c8099e..13c24812 100644--- a/dist/modules/easings/linear/index.js+++ b/dist/modules/easings/linear/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/none.cjs b/dist/modules/easings/none.cjsindex e39f7ed0..459eeed1 100644--- a/dist/modules/easings/none.cjs+++ b/dist/modules/easings/none.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/none.js b/dist/modules/easings/none.jsindex 93f21915..6303aa7c 100644--- a/dist/modules/easings/none.js+++ b/dist/modules/easings/none.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/spring/index.cjs b/dist/modules/easings/spring/index.cjsindex c6ff389a..9d8b2ed6 100644--- a/dist/modules/easings/spring/index.cjs+++ b/dist/modules/easings/spring/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/spring/index.js b/dist/modules/easings/spring/index.jsindex b3fd5cfb..2dd67cdf 100644--- a/dist/modules/easings/spring/index.js+++ b/dist/modules/easings/spring/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/steps/index.cjs b/dist/modules/easings/steps/index.cjsindex 19685d12..58a7b380 100644--- a/dist/modules/easings/steps/index.cjs+++ b/dist/modules/easings/steps/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - easings - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/easings/steps/index.js b/dist/modules/easings/steps/index.jsindex 19b4997f..ed8d9f78 100644--- a/dist/modules/easings/steps/index.js+++ b/dist/modules/easings/steps/index.js@@ -1,6 +1,6 @@/*** Anime.js - easings - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/engine/engine.cjs b/dist/modules/engine/engine.cjsindex 347fba7d..1ec9eaff 100644--- a/dist/modules/engine/engine.cjs+++ b/dist/modules/engine/engine.cjs@@ -1,6 +1,6 @@/*** Anime.js - engine - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/engine/engine.js b/dist/modules/engine/engine.jsindex 37ab065b..736155a6 100644--- a/dist/modules/engine/engine.js+++ b/dist/modules/engine/engine.js@@ -1,6 +1,6 @@/*** Anime.js - engine - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/engine/index.cjs b/dist/modules/engine/index.cjsindex a505145d..f0df5642 100644--- a/dist/modules/engine/index.cjs+++ b/dist/modules/engine/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - engine - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/engine/index.js b/dist/modules/engine/index.jsindex f707ff42..46e8e24d 100644--- a/dist/modules/engine/index.js+++ b/dist/modules/engine/index.js@@ -1,6 +1,6 @@/*** Anime.js - engine - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/events/index.cjs b/dist/modules/events/index.cjsindex e42db7f5..bef95032 100644--- a/dist/modules/events/index.cjs+++ b/dist/modules/events/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - events - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/events/index.js b/dist/modules/events/index.jsindex 0414347b..0cf8fd27 100644--- a/dist/modules/events/index.js+++ b/dist/modules/events/index.js@@ -1,6 +1,6 @@/*** Anime.js - events - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/events/scroll.cjs b/dist/modules/events/scroll.cjsindex e3979e51..55291e8b 100644--- a/dist/modules/events/scroll.cjs+++ b/dist/modules/events/scroll.cjs@@ -1,6 +1,6 @@/*** Anime.js - events - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/events/scroll.js b/dist/modules/events/scroll.jsindex d723450a..66a6148f 100644--- a/dist/modules/events/scroll.js+++ b/dist/modules/events/scroll.js@@ -1,6 +1,6 @@/*** Anime.js - events - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/index.cjs b/dist/modules/index.cjsindex 9ef31eea..9e16fdf9 100644--- a/dist/modules/index.cjs+++ b/dist/modules/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/index.js b/dist/modules/index.jsindex a8005fe8..1255654f 100644--- a/dist/modules/index.js+++ b/dist/modules/index.js@@ -1,6 +1,6 @@/*** Anime.js - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/layout/index.cjs b/dist/modules/layout/index.cjsindex 2b4e6008..99506077 100644--- a/dist/modules/layout/index.cjs+++ b/dist/modules/layout/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - layout - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/layout/index.js b/dist/modules/layout/index.jsindex 1566c895..5c6ae5da 100644--- a/dist/modules/layout/index.js+++ b/dist/modules/layout/index.js@@ -1,6 +1,6 @@/*** Anime.js - layout - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/layout/layout.cjs b/dist/modules/layout/layout.cjsindex 584f889e..a6dbddf5 100644--- a/dist/modules/layout/layout.cjs+++ b/dist/modules/layout/layout.cjs@@ -1,6 +1,6 @@/*** Anime.js - layout - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -1309,7 +1309,7 @@ class AutoLayout {// const hiddenStateChanged = (topLevelAdded || newlyRemoved) && wasRemovedBefore !== isRemovedNow;if (node.isTarget && (!node.measuredIsRemoved && oldStateNode.measuredIsVisible || node.measuredIsRemoved && node.measuredIsVisible)) {- if (!node.isInlined && (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none')) {+ if (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none') {node.hasTransform = true;transformed.push($el);}@@ -1325,7 +1325,7 @@ class AutoLayout {if (!node.isTarget) {swapping.push($el);if (node.sizeChanged && parent && parent.isTarget && parent.sizeChanged) {- if (!node.isInlined && swapAtProps.transform) {+ if (swapAtProps.transform) {node.hasTransform = true;transformed.push($el);}@@ -1365,7 +1365,7 @@ class AutoLayout {// muteNodeTransition(newNode);- // Don't animate dimensions and positions of inlined elements+ // Don't animate positions of inlined elements (to avoid text reflow)if (!newNode.isInlined) {// Display grid can mess with the absolute positioning, so set it to block during transitionif (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.setProperty('display', 'block', 'important');@@ -1384,14 +1384,15 @@ class AutoLayout {$el.style.left = '0px';$el.style.top = '0px';}- $el.style.width = `${oldNodeState.width}px`;- $el.style.height = `${oldNodeState.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;}+ // Animate dimensions for all elements (including inlined)+ $el.style.width = `${oldNodeState.width}px`;+ $el.style.height = `${oldNodeState.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;}// Restore the scroll position if the oldState differs from the current state@@ -1412,21 +1413,19 @@ class AutoLayout {const animatedProps = {composition: 'none',};- if (!newNode.isInlined) {- if (oldNodeState.width !== newNodeState.width) {- animatedProps.width = [oldNodeState.width, newNodeState.width];- nodeHasChanged = true;- }- if (oldNodeState.height !== newNodeState.height) {- animatedProps.height = [oldNodeState.height, newNodeState.height];- nodeHasChanged = true;- }- // If the node has transforms we handle the translate animation in wappi otherwise translate and other transforms can be out of sync- // Always animate translate- if (!newNode.hasTransform) {- animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];- nodeHasChanged = true;- }+ if (oldNodeState.width !== newNodeState.width) {+ animatedProps.width = [oldNodeState.width, newNodeState.width];+ nodeHasChanged = true;+ }+ if (oldNodeState.height !== newNodeState.height) {+ animatedProps.height = [oldNodeState.height, newNodeState.height];+ nodeHasChanged = true;+ }+ // If the node has transforms we handle the translate animation in waapi otherwise translate and other transforms can be out of sync+ // And we don't animate the position of inlined elements+ if (!newNode.hasTransform && !newNode.isInlined) {+ animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];+ nodeHasChanged = true;}this.properties.forEach(prop => {const oldVal = oldNodeState[prop];@@ -1448,15 +1447,16 @@ class AutoLayout {for (let i = 0, l = swapping.length; i < l; i++) {const $el = swapping[i];const oldNode = oldState.getNode($el);+ const oldNodeProps = oldNode.properties;+ $el.style.width = `${oldNodeProps.width}px`;+ $el.style.height = `${oldNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // We don't animate the position of inlined elementsif (!oldNode.isInlined) {- const oldNodeProps = oldNode.properties;- $el.style.width = `${oldNodeProps.width}px`;- $el.style.height = `${oldNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${oldNodeProps.x}px ${oldNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1471,14 +1471,15 @@ class AutoLayout {const newNode = newState.getNode($el);const newNodeProps = newNode.properties;this.timeline.call(() => {+ $el.style.width = `${newNodeProps.width}px`;+ $el.style.height = `${newNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // Don't set translate for inlined elements (to avoid text reflow)if (!newNode.isInlined) {- $el.style.width = `${newNodeProps.width}px`;- $el.style.height = `${newNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${newNodeProps.x}px ${newNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1511,19 +1512,27 @@ class AutoLayout {const transformedLength = transformed.length;if (transformedLength) {- // We only need to set the transform property here since translate is alread defined in the targets loop+ // We only need to set the transform property here since translate is already defined in the targets loopfor (let i = 0; i < transformedLength; i++) {const $el = transformed[i];- $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`,+ const node = newState.getNode($el);+ // Don't set translate for inlined elements (to avoid text reflow)+ if (!node.isInlined) {+ $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`;+ }$el.style.transform = oldState.getComputedValue($el, 'transform');if (animatedSwap.includes($el)) {- const node = newState.getNode($el);node.ease = values.getFunctionValue(swapAtParams.ease, $el, node.index, node.total);node.duration = values.getFunctionValue(swapAtParams.duration, $el, node.index, node.total);}}this.transformAnimation = waapi.waapi.animate(transformed, {- translate: (/** @type {HTMLElement} */$el) => `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`,+ translate: (/** @type {HTMLElement} */$el) => {+ const node = newState.getNode($el);+ // Don't animate translate for inlined elements (to avoid text reflow)+ if (node.isInlined) return '0px 0px';+ return `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`;+ },transform: (/** @type {HTMLElement} */$el) => {const newValue = newState.getComputedValue($el, 'transform');if (!animatedSwap.includes($el)) return newValue;@@ -1532,7 +1541,7 @@ class AutoLayout {return [oldValue, values.getFunctionValue(swapAtProps.transform, $el, node.index, node.total), newValue]},autoplay: false,- persist: true,+ // persist: true,...timingParams,});this.timeline.sync(this.transformAnimation, 0);diff --git a/dist/modules/layout/layout.js b/dist/modules/layout/layout.jsindex 219b095c..764c5a51 100644--- a/dist/modules/layout/layout.js+++ b/dist/modules/layout/layout.js@@ -1,6 +1,6 @@/*** Anime.js - layout - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -1307,7 +1307,7 @@ class AutoLayout {// const hiddenStateChanged = (topLevelAdded || newlyRemoved) && wasRemovedBefore !== isRemovedNow;if (node.isTarget && (!node.measuredIsRemoved && oldStateNode.measuredIsVisible || node.measuredIsRemoved && node.measuredIsVisible)) {- if (!node.isInlined && (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none')) {+ if (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none') {node.hasTransform = true;transformed.push($el);}@@ -1323,7 +1323,7 @@ class AutoLayout {if (!node.isTarget) {swapping.push($el);if (node.sizeChanged && parent && parent.isTarget && parent.sizeChanged) {- if (!node.isInlined && swapAtProps.transform) {+ if (swapAtProps.transform) {node.hasTransform = true;transformed.push($el);}@@ -1363,7 +1363,7 @@ class AutoLayout {// muteNodeTransition(newNode);- // Don't animate dimensions and positions of inlined elements+ // Don't animate positions of inlined elements (to avoid text reflow)if (!newNode.isInlined) {// Display grid can mess with the absolute positioning, so set it to block during transitionif (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.setProperty('display', 'block', 'important');@@ -1382,14 +1382,15 @@ class AutoLayout {$el.style.left = '0px';$el.style.top = '0px';}- $el.style.width = `${oldNodeState.width}px`;- $el.style.height = `${oldNodeState.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;}+ // Animate dimensions for all elements (including inlined)+ $el.style.width = `${oldNodeState.width}px`;+ $el.style.height = `${oldNodeState.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;}// Restore the scroll position if the oldState differs from the current state@@ -1410,21 +1411,19 @@ class AutoLayout {const animatedProps = {composition: 'none',};- if (!newNode.isInlined) {- if (oldNodeState.width !== newNodeState.width) {- animatedProps.width = [oldNodeState.width, newNodeState.width];- nodeHasChanged = true;- }- if (oldNodeState.height !== newNodeState.height) {- animatedProps.height = [oldNodeState.height, newNodeState.height];- nodeHasChanged = true;- }- // If the node has transforms we handle the translate animation in wappi otherwise translate and other transforms can be out of sync- // Always animate translate- if (!newNode.hasTransform) {- animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];- nodeHasChanged = true;- }+ if (oldNodeState.width !== newNodeState.width) {+ animatedProps.width = [oldNodeState.width, newNodeState.width];+ nodeHasChanged = true;+ }+ if (oldNodeState.height !== newNodeState.height) {+ animatedProps.height = [oldNodeState.height, newNodeState.height];+ nodeHasChanged = true;+ }+ // If the node has transforms we handle the translate animation in waapi otherwise translate and other transforms can be out of sync+ // And we don't animate the position of inlined elements+ if (!newNode.hasTransform && !newNode.isInlined) {+ animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];+ nodeHasChanged = true;}this.properties.forEach(prop => {const oldVal = oldNodeState[prop];@@ -1446,15 +1445,16 @@ class AutoLayout {for (let i = 0, l = swapping.length; i < l; i++) {const $el = swapping[i];const oldNode = oldState.getNode($el);+ const oldNodeProps = oldNode.properties;+ $el.style.width = `${oldNodeProps.width}px`;+ $el.style.height = `${oldNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // We don't animate the position of inlined elementsif (!oldNode.isInlined) {- const oldNodeProps = oldNode.properties;- $el.style.width = `${oldNodeProps.width}px`;- $el.style.height = `${oldNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${oldNodeProps.x}px ${oldNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1469,14 +1469,15 @@ class AutoLayout {const newNode = newState.getNode($el);const newNodeProps = newNode.properties;this.timeline.call(() => {+ $el.style.width = `${newNodeProps.width}px`;+ $el.style.height = `${newNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // Don't set translate for inlined elements (to avoid text reflow)if (!newNode.isInlined) {- $el.style.width = `${newNodeProps.width}px`;- $el.style.height = `${newNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${newNodeProps.x}px ${newNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1509,19 +1510,27 @@ class AutoLayout {const transformedLength = transformed.length;if (transformedLength) {- // We only need to set the transform property here since translate is alread defined in the targets loop+ // We only need to set the transform property here since translate is already defined in the targets loopfor (let i = 0; i < transformedLength; i++) {const $el = transformed[i];- $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`,+ const node = newState.getNode($el);+ // Don't set translate for inlined elements (to avoid text reflow)+ if (!node.isInlined) {+ $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`;+ }$el.style.transform = oldState.getComputedValue($el, 'transform');if (animatedSwap.includes($el)) {- const node = newState.getNode($el);node.ease = getFunctionValue(swapAtParams.ease, $el, node.index, node.total);node.duration = getFunctionValue(swapAtParams.duration, $el, node.index, node.total);}}this.transformAnimation = waapi.animate(transformed, {- translate: (/** @type {HTMLElement} */$el) => `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`,+ translate: (/** @type {HTMLElement} */$el) => {+ const node = newState.getNode($el);+ // Don't animate translate for inlined elements (to avoid text reflow)+ if (node.isInlined) return '0px 0px';+ return `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`;+ },transform: (/** @type {HTMLElement} */$el) => {const newValue = newState.getComputedValue($el, 'transform');if (!animatedSwap.includes($el)) return newValue;@@ -1530,7 +1539,7 @@ class AutoLayout {return [oldValue, getFunctionValue(swapAtProps.transform, $el, node.index, node.total), newValue]},autoplay: false,- persist: true,+ // persist: true,...timingParams,});this.timeline.sync(this.transformAnimation, 0);diff --git a/dist/modules/scope/index.cjs b/dist/modules/scope/index.cjsindex c7e92e4b..c4c985c0 100644--- a/dist/modules/scope/index.cjs+++ b/dist/modules/scope/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - scope - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/scope/index.js b/dist/modules/scope/index.jsindex ed862188..d371adb7 100644--- a/dist/modules/scope/index.js+++ b/dist/modules/scope/index.js@@ -1,6 +1,6 @@/*** Anime.js - scope - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/scope/scope.cjs b/dist/modules/scope/scope.cjsindex fde05635..6bc77034 100644--- a/dist/modules/scope/scope.cjs+++ b/dist/modules/scope/scope.cjs@@ -1,6 +1,6 @@/*** Anime.js - scope - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/scope/scope.js b/dist/modules/scope/scope.jsindex 4d61bb8c..b517c673 100644--- a/dist/modules/scope/scope.js+++ b/dist/modules/scope/scope.js@@ -1,6 +1,6 @@/*** Anime.js - scope - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/drawable.cjs b/dist/modules/svg/drawable.cjsindex 982c260f..1d906561 100644--- a/dist/modules/svg/drawable.cjs+++ b/dist/modules/svg/drawable.cjs@@ -1,6 +1,6 @@/*** Anime.js - svg - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/drawable.js b/dist/modules/svg/drawable.jsindex aca06612..90b04cc4 100644--- a/dist/modules/svg/drawable.js+++ b/dist/modules/svg/drawable.js@@ -1,6 +1,6 @@/*** Anime.js - svg - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/helpers.cjs b/dist/modules/svg/helpers.cjsindex 886bec44..52b2b9c8 100644--- a/dist/modules/svg/helpers.cjs+++ b/dist/modules/svg/helpers.cjs@@ -1,6 +1,6 @@/*** Anime.js - svg - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/helpers.js b/dist/modules/svg/helpers.jsindex c26cdfeb..33d633ef 100644--- a/dist/modules/svg/helpers.js+++ b/dist/modules/svg/helpers.js@@ -1,6 +1,6 @@/*** Anime.js - svg - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/index.cjs b/dist/modules/svg/index.cjsindex da2b42c5..d65fb3de 100644--- a/dist/modules/svg/index.cjs+++ b/dist/modules/svg/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - svg - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/index.js b/dist/modules/svg/index.jsindex b193adde..2637e57d 100644--- a/dist/modules/svg/index.js+++ b/dist/modules/svg/index.js@@ -1,6 +1,6 @@/*** Anime.js - svg - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/morphto.cjs b/dist/modules/svg/morphto.cjsindex 3dbdb498..5d322082 100644--- a/dist/modules/svg/morphto.cjs+++ b/dist/modules/svg/morphto.cjs@@ -1,6 +1,6 @@/*** Anime.js - svg - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/morphto.js b/dist/modules/svg/morphto.jsindex 03b884e2..1f015116 100644--- a/dist/modules/svg/morphto.js+++ b/dist/modules/svg/morphto.js@@ -1,6 +1,6 @@/*** Anime.js - svg - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/motionpath.cjs b/dist/modules/svg/motionpath.cjsindex 77c39711..4d348018 100644--- a/dist/modules/svg/motionpath.cjs+++ b/dist/modules/svg/motionpath.cjs@@ -1,6 +1,6 @@/*** Anime.js - svg - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/svg/motionpath.js b/dist/modules/svg/motionpath.jsindex 706df1c9..650c43d0 100644--- a/dist/modules/svg/motionpath.js+++ b/dist/modules/svg/motionpath.js@@ -1,6 +1,6 @@/*** Anime.js - svg - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/text/index.cjs b/dist/modules/text/index.cjsindex 76aac7d9..dfa920b6 100644--- a/dist/modules/text/index.cjs+++ b/dist/modules/text/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - text - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/text/index.js b/dist/modules/text/index.jsindex 006cc92c..8d198719 100644--- a/dist/modules/text/index.js+++ b/dist/modules/text/index.js@@ -1,6 +1,6 @@/*** Anime.js - text - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/text/split.cjs b/dist/modules/text/split.cjsindex bacdb6f3..32ba7ea6 100644--- a/dist/modules/text/split.cjs+++ b/dist/modules/text/split.cjs@@ -1,6 +1,6 @@/*** Anime.js - text - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/text/split.js b/dist/modules/text/split.jsindex c3e952b1..818551c6 100644--- a/dist/modules/text/split.js+++ b/dist/modules/text/split.js@@ -1,6 +1,6 @@/*** Anime.js - text - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/index.cjs b/dist/modules/timeline/index.cjsindex ba28658e..0526f702 100644--- a/dist/modules/timeline/index.cjs+++ b/dist/modules/timeline/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - timeline - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/index.js b/dist/modules/timeline/index.jsindex 8b0513c6..f2bdc3bc 100644--- a/dist/modules/timeline/index.js+++ b/dist/modules/timeline/index.js@@ -1,6 +1,6 @@/*** Anime.js - timeline - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/position.cjs b/dist/modules/timeline/position.cjsindex c67f3e83..88df8c8c 100644--- a/dist/modules/timeline/position.cjs+++ b/dist/modules/timeline/position.cjs@@ -1,6 +1,6 @@/*** Anime.js - timeline - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/position.js b/dist/modules/timeline/position.jsindex c65ffb24..5d901a90 100644--- a/dist/modules/timeline/position.js+++ b/dist/modules/timeline/position.js@@ -1,6 +1,6 @@/*** Anime.js - timeline - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/timeline.cjs b/dist/modules/timeline/timeline.cjsindex c37c5f1a..5231b2f2 100644--- a/dist/modules/timeline/timeline.cjs+++ b/dist/modules/timeline/timeline.cjs@@ -1,6 +1,6 @@/*** Anime.js - timeline - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timeline/timeline.js b/dist/modules/timeline/timeline.jsindex dd99a4f2..600849a6 100644--- a/dist/modules/timeline/timeline.js+++ b/dist/modules/timeline/timeline.js@@ -1,6 +1,6 @@/*** Anime.js - timeline - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timer/index.cjs b/dist/modules/timer/index.cjsindex 80f1451a..4e014d8f 100644--- a/dist/modules/timer/index.cjs+++ b/dist/modules/timer/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - timer - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timer/index.js b/dist/modules/timer/index.jsindex d067d33c..36bf3d42 100644--- a/dist/modules/timer/index.js+++ b/dist/modules/timer/index.js@@ -1,6 +1,6 @@/*** Anime.js - timer - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timer/timer.cjs b/dist/modules/timer/timer.cjsindex 5f0b1f52..244b2074 100644--- a/dist/modules/timer/timer.cjs+++ b/dist/modules/timer/timer.cjs@@ -1,6 +1,6 @@/*** Anime.js - timer - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/timer/timer.js b/dist/modules/timer/timer.jsindex 164f96ed..7cc60493 100644--- a/dist/modules/timer/timer.js+++ b/dist/modules/timer/timer.js@@ -1,6 +1,6 @@/*** Anime.js - timer - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/chainable.cjs b/dist/modules/utils/chainable.cjsindex 36ee6c86..6b30923c 100644--- a/dist/modules/utils/chainable.cjs+++ b/dist/modules/utils/chainable.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/chainable.js b/dist/modules/utils/chainable.jsindex c14cc2a3..06ec5b63 100644--- a/dist/modules/utils/chainable.js+++ b/dist/modules/utils/chainable.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/index.cjs b/dist/modules/utils/index.cjsindex b2c8da9b..acaf391f 100644--- a/dist/modules/utils/index.cjs+++ b/dist/modules/utils/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/index.js b/dist/modules/utils/index.jsindex 4e780ac9..a0830b34 100644--- a/dist/modules/utils/index.js+++ b/dist/modules/utils/index.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/number.cjs b/dist/modules/utils/number.cjsindex 18efd9dc..d2223dbf 100644--- a/dist/modules/utils/number.cjs+++ b/dist/modules/utils/number.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/number.js b/dist/modules/utils/number.jsindex dc6e1a8c..676cab72 100644--- a/dist/modules/utils/number.js+++ b/dist/modules/utils/number.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/random.cjs b/dist/modules/utils/random.cjsindex c203b876..d60e8386 100644--- a/dist/modules/utils/random.cjs+++ b/dist/modules/utils/random.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/random.js b/dist/modules/utils/random.jsindex b79356ec..12532fde 100644--- a/dist/modules/utils/random.js+++ b/dist/modules/utils/random.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/stagger.cjs b/dist/modules/utils/stagger.cjsindex 3b4fcb16..c708440e 100644--- a/dist/modules/utils/stagger.cjs+++ b/dist/modules/utils/stagger.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/stagger.js b/dist/modules/utils/stagger.jsindex 0ee3564b..db38be8d 100644--- a/dist/modules/utils/stagger.js+++ b/dist/modules/utils/stagger.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/target.cjs b/dist/modules/utils/target.cjsindex 952ac86f..d3a84817 100644--- a/dist/modules/utils/target.cjs+++ b/dist/modules/utils/target.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/target.js b/dist/modules/utils/target.jsindex 07b51663..35bc0f41 100644--- a/dist/modules/utils/target.js+++ b/dist/modules/utils/target.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/time.cjs b/dist/modules/utils/time.cjsindex 9cdb6cc0..b9470bba 100644--- a/dist/modules/utils/time.cjs+++ b/dist/modules/utils/time.cjs@@ -1,6 +1,6 @@/*** Anime.js - utils - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/utils/time.js b/dist/modules/utils/time.jsindex 80a9ae1f..50689a68 100644--- a/dist/modules/utils/time.js+++ b/dist/modules/utils/time.js@@ -1,6 +1,6 @@/*** Anime.js - utils - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/waapi/composition.cjs b/dist/modules/waapi/composition.cjsindex 2f16dca6..a75d0db6 100644--- a/dist/modules/waapi/composition.cjs+++ b/dist/modules/waapi/composition.cjs@@ -1,6 +1,6 @@/*** Anime.js - waapi - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -82,7 +82,7 @@ const addWAAPIAnimation = (parent, $el, property, keyframes, params) => {parent.animations.push(animation);removeWAAPIAnimation($el, property);helpers.addChild(WAAPIAnimationsLookups, { parent, animation, $el, property, _next: null, _prev: null });- const handleRemove = () => { removeWAAPIAnimation($el, property, parent); };+ const handleRemove = () => removeWAAPIAnimation($el, property, parent);animation.oncancel = handleRemove;animation.onremove = handleRemove;if (!parent.persist) {diff --git a/dist/modules/waapi/composition.js b/dist/modules/waapi/composition.jsindex a8e0933c..9b87fc14 100644--- a/dist/modules/waapi/composition.js+++ b/dist/modules/waapi/composition.js@@ -1,6 +1,6 @@/*** Anime.js - waapi - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/@@ -80,7 +80,7 @@ const addWAAPIAnimation = (parent, $el, property, keyframes, params) => {parent.animations.push(animation);removeWAAPIAnimation($el, property);addChild(WAAPIAnimationsLookups, { parent, animation, $el, property, _next: null, _prev: null });- const handleRemove = () => { removeWAAPIAnimation($el, property, parent); };+ const handleRemove = () => removeWAAPIAnimation($el, property, parent);animation.oncancel = handleRemove;animation.onremove = handleRemove;if (!parent.persist) {diff --git a/dist/modules/waapi/index.cjs b/dist/modules/waapi/index.cjsindex 73962f4c..5e7d4b4a 100644--- a/dist/modules/waapi/index.cjs+++ b/dist/modules/waapi/index.cjs@@ -1,6 +1,6 @@/*** Anime.js - waapi - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/waapi/index.js b/dist/modules/waapi/index.jsindex a5943a2c..04ab3445 100644--- a/dist/modules/waapi/index.js+++ b/dist/modules/waapi/index.js@@ -1,6 +1,6 @@/*** Anime.js - waapi - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/waapi/waapi.cjs b/dist/modules/waapi/waapi.cjsindex 372ebfa7..6bf0f11a 100644--- a/dist/modules/waapi/waapi.cjs+++ b/dist/modules/waapi/waapi.cjs@@ -1,6 +1,6 @@/*** Anime.js - waapi - CJS- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/dist/modules/waapi/waapi.js b/dist/modules/waapi/waapi.jsindex b9afd9d0..7027993b 100644--- a/dist/modules/waapi/waapi.js+++ b/dist/modules/waapi/waapi.js@@ -1,6 +1,6 @@/*** Anime.js - waapi - ESM- * @version v4.3.4+ * @version v4.3.5* @license MIT* @copyright 2026 - Julian Garnier*/diff --git a/package.json b/package.jsonindex e64996fc..edf38419 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "animejs",- "version": "4.3.4",+ "version": "4.3.5","description": "JavaScript animation engine","homepage": "https://animejs.com","author": "Julian Garnier <[email protected]>",diff --git a/src/core/consts.js b/src/core/consts.jsindex 63ba17a6..afb7dea8 100644--- a/src/core/consts.js+++ b/src/core/consts.js@@ -102,6 +102,7 @@ export const noop = () => {};// Regex+export const validRgbHslRgx = /\)\s*[-.\d]/;export const hexTestRgx = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i;export const rgbExecRgx = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/iexport const rgbaExecRgx = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/idiff --git a/src/core/helpers.js b/src/core/helpers.jsindex 60bde892..c0d59f08 100644--- a/src/core/helpers.js+++ b/src/core/helpers.js@@ -1,5 +1,6 @@import {isBrowser,+ validRgbHslRgx,lowerCaseRgx,hexTestRgx,maxValue,@@ -56,11 +57,11 @@ export const isSvg = a => isBrowser && a instanceof SVGElement;/**@param {any} a @return {Boolean} */export const isHex = a => hexTestRgx.test(a);/**@param {any} a @return {Boolean} */-export const isRgb = a => stringStartsWith(a, 'rgb') && a[a.length - 1] === ')';+export const isRgb = a => stringStartsWith(a, 'rgb');/**@param {any} a @return {Boolean} */-export const isHsl = a => stringStartsWith(a, 'hsl') && a[a.length - 1] === ')';-/**@param {any} a @return {Boolean} */-export const isCol = a => isHex(a) || isRgb(a) || isHsl(a);+export const isHsl = a => stringStartsWith(a, 'hsl');+/**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type+export const isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !validRgbHslRgx.test(a)));/**@param {any} a @return {Boolean} */export const isKey = a => !globals.defaults.hasOwnProperty(a);diff --git a/src/layout/layout.js b/src/layout/layout.jsindex b5f4d13a..acea8f96 100644--- a/src/layout/layout.js+++ b/src/layout/layout.js@@ -1327,7 +1327,7 @@ export class AutoLayout {// const hiddenStateChanged = (topLevelAdded || newlyRemoved) && wasRemovedBefore !== isRemovedNow;if (node.isTarget && (!node.measuredIsRemoved && oldStateNode.measuredIsVisible || node.measuredIsRemoved && node.measuredIsVisible)) {- if (!node.isInlined && (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none')) {+ if (nodeProperties.transform !== 'none' || oldStateNodeProperties.transform !== 'none') {node.hasTransform = true;transformed.push($el);}@@ -1343,7 +1343,7 @@ export class AutoLayout {if (!node.isTarget) {swapping.push($el);if (node.sizeChanged && parent && parent.isTarget && parent.sizeChanged) {- if (!node.isInlined && swapAtProps.transform) {+ if (swapAtProps.transform) {node.hasTransform = true;transformed.push($el);}@@ -1383,7 +1383,7 @@ export class AutoLayout {// muteNodeTransition(newNode);- // Don't animate dimensions and positions of inlined elements+ // Don't animate positions of inlined elements (to avoid text reflow)if (!newNode.isInlined) {// Display grid can mess with the absolute positioning, so set it to block during transitionif (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.setProperty('display', 'block', 'important');@@ -1402,14 +1402,15 @@ export class AutoLayout {$el.style.left = '0px';$el.style.top = '0px';}- $el.style.width = `${oldNodeState.width}px`;- $el.style.height = `${oldNodeState.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;}+ // Animate dimensions for all elements (including inlined)+ $el.style.width = `${oldNodeState.width}px`;+ $el.style.height = `${oldNodeState.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;}// Restore the scroll position if the oldState differs from the current state@@ -1430,21 +1431,19 @@ export class AutoLayout {const animatedProps = {composition: 'none',}- if (!newNode.isInlined) {- if (oldNodeState.width !== newNodeState.width) {- animatedProps.width = [oldNodeState.width, newNodeState.width];- nodeHasChanged = true;- }- if (oldNodeState.height !== newNodeState.height) {- animatedProps.height = [oldNodeState.height, newNodeState.height];- nodeHasChanged = true;- }- // If the node has transforms we handle the translate animation in wappi otherwise translate and other transforms can be out of sync- // Always animate translate- if (!newNode.hasTransform) {- animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];- nodeHasChanged = true;- }+ if (oldNodeState.width !== newNodeState.width) {+ animatedProps.width = [oldNodeState.width, newNodeState.width];+ nodeHasChanged = true;+ }+ if (oldNodeState.height !== newNodeState.height) {+ animatedProps.height = [oldNodeState.height, newNodeState.height];+ nodeHasChanged = true;+ }+ // If the node has transforms we handle the translate animation in waapi otherwise translate and other transforms can be out of sync+ // And we don't animate the position of inlined elements+ if (!newNode.hasTransform && !newNode.isInlined) {+ animatedProps.translate = [`${oldNodeState.x}px ${oldNodeState.y}px`, `${newNodeState.x}px ${newNodeState.y}px`];+ nodeHasChanged = true;}this.properties.forEach(prop => {const oldVal = oldNodeState[prop];@@ -1466,15 +1465,16 @@ export class AutoLayout {for (let i = 0, l = swapping.length; i < l; i++) {const $el = swapping[i];const oldNode = oldState.getNode($el);+ const oldNodeProps = oldNode.properties;+ $el.style.width = `${oldNodeProps.width}px`;+ $el.style.height = `${oldNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // We don't animate the position of inlined elementsif (!oldNode.isInlined) {- const oldNodeProps = oldNode.properties;- $el.style.width = `${oldNodeProps.width}px`;- $el.style.height = `${oldNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${oldNodeProps.x}px ${oldNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1489,14 +1489,15 @@ export class AutoLayout {const newNode = newState.getNode($el);const newNodeProps = newNode.properties;this.timeline.call(() => {+ $el.style.width = `${newNodeProps.width}px`;+ $el.style.height = `${newNodeProps.height}px`;+ // Overrides user defined min and max to prevents width and height clamping+ $el.style.minWidth = `auto`;+ $el.style.minHeight = `auto`;+ $el.style.maxWidth = `none`;+ $el.style.maxHeight = `none`;+ // Don't set translate for inlined elements (to avoid text reflow)if (!newNode.isInlined) {- $el.style.width = `${newNodeProps.width}px`;- $el.style.height = `${newNodeProps.height}px`;- // Overrides user defined min and max to prevents width and height clamping- $el.style.minWidth = `auto`;- $el.style.minHeight = `auto`;- $el.style.maxWidth = `none`;- $el.style.maxHeight = `none`;$el.style.translate = `${newNodeProps.x}px ${newNodeProps.y}px`;}this.properties.forEach(prop => {@@ -1529,19 +1530,27 @@ export class AutoLayout {const transformedLength = transformed.length;if (transformedLength) {- // We only need to set the transform property here since translate is alread defined in the targets loop+ // We only need to set the transform property here since translate is already defined in the targets loopfor (let i = 0; i < transformedLength; i++) {const $el = transformed[i];- $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`,+ const node = newState.getNode($el);+ // Don't set translate for inlined elements (to avoid text reflow)+ if (!node.isInlined) {+ $el.style.translate = `${oldState.getComputedValue($el, 'x')}px ${oldState.getComputedValue($el, 'y')}px`;+ }$el.style.transform = oldState.getComputedValue($el, 'transform');if (animatedSwap.includes($el)) {- const node = newState.getNode($el);node.ease = getFunctionValue(swapAtParams.ease, $el, node.index, node.total);node.duration = getFunctionValue(swapAtParams.duration, $el, node.index, node.total);}}this.transformAnimation = waapi.animate(transformed, {- translate: (/** @type {HTMLElement} */$el) => `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`,+ translate: (/** @type {HTMLElement} */$el) => {+ const node = newState.getNode($el);+ // Don't animate translate for inlined elements (to avoid text reflow)+ if (node.isInlined) return '0px 0px';+ return `${newState.getComputedValue($el, 'x')}px ${newState.getComputedValue($el, 'y')}px`;+ },transform: (/** @type {HTMLElement} */$el) => {const newValue = newState.getComputedValue($el, 'transform');if (!animatedSwap.includes($el)) return newValue;@@ -1550,7 +1559,7 @@ export class AutoLayout {return [oldValue, getFunctionValue(swapAtProps.transform, $el, node.index, node.total), newValue]},autoplay: false,- persist: true,+ // persist: true,...timingParams,});this.timeline.sync(this.transformAnimation, 0);diff --git a/src/waapi/composition.js b/src/waapi/composition.jsindex 8193f0b0..bc6c81c1 100644--- a/src/waapi/composition.js+++ b/src/waapi/composition.js@@ -74,7 +74,7 @@ export const addWAAPIAnimation = (parent, $el, property, keyframes, params) => {parent.animations.push(animation);removeWAAPIAnimation($el, property);addChild(WAAPIAnimationsLookups, { parent, animation, $el, property, _next: null, _prev: null });- const handleRemove = () => { removeWAAPIAnimation($el, property, parent); };+ const handleRemove = () => removeWAAPIAnimation($el, property, parent);animation.oncancel = handleRemove;animation.onremove = handleRemove;if (!parent.persist) {diff --git a/tests/suites/colors.test.js b/tests/suites/colors.test.jsindex d7551833..cc85d6b1 100644--- a/tests/suites/colors.test.js+++ b/tests/suites/colors.test.js@@ -89,20 +89,60 @@ function createColorTestsByType(fromType, toType) {}}-suite('Colors', () => {+const domColorInputs = {+ rgb: {+ HEX: { input: '#FF4B4B', output: [255, 75, 75, 1] },+ RGB: { input: 'rgb(255, 168, 40)', output: [255, 168, 40, 1] },+ HSL: { input: 'hsl(44, 100%, 59%)', output: [255, 199, 46, 1] },+ },+ rgba: {+ HEXA: { input: '#FF4B4B33', output: [255, 75, 75, .2] },+ RGBA: { input: 'rgba(255, 168, 40, .2)', output: [255, 168, 40, .2] },+ HSLA: { input: 'hsla(44, 100%, 59%, .2)', output: [255, 199, 46, .2] },+ },+};++const domColorProperties = ['background', 'color', 'backgroundColor', 'borderColor'];- test('Properly apply transparency from computed styles', resolve => {+function createColorConversionFromDOMTest(property, colorType, colorName) {+ const { input, output } = domColorInputs[colorType][colorName];+ const testName = `Animate ${property} to ${colorName}`;+ return test(testName, () => {const [ targetEl ] = utils.$('#target-id');- animate(targetEl, {- backgroundColor: 'rgba(0, 0, 0, 0)',- duration: 10,- onComplete: () => {- expect(targetEl.style.backgroundColor).to.equal('rgba(0, 0, 0, 0)');- resolve();+ const animation = animate(targetEl, { [property]: input, autoplay: false });+ expect(getChildAtIndex(animation, 0)._valueType).to.equal(valueTypes.COLOR);+ expect(getChildAtIndex(animation, 0)._toNumbers).to.deep.equal(output);+ animation.seek(animation.duration);+ if (colorType === 'rgba') {+ expect(targetEl.style[property]).to.equal(`rgba(${output[0]}, ${output[1]}, ${output[2]}, ${output[3]})`);+ } else {+ expect(targetEl.style[property]).to.equal(`rgb(${output[0]}, ${output[1]}, ${output[2]})`);+ }+ });+}++function createColorConversionFromDOMTests() {+ domColorProperties.forEach(property => {+ for (let colorType in domColorInputs) {+ for (let colorName in domColorInputs[colorType]) {+ createColorConversionFromDOMTest(property, colorType, colorName);}- });+ }});+}+suite('Colors', () => {+ test('boxShadow should not be parsed as color value', () => {+ const [ targetEl ] = utils.$('#target-id');+ targetEl.style.boxShadow = `0px 0px 6px red`;+ const computedShadowA = getComputedStyle(targetEl).boxShadow;+ targetEl.style.boxShadow = `inset 0px 0px 20px yellow`;+ const computedShadowB = getComputedStyle(targetEl).boxShadow;+ // computedShadowA: 'rgb(255, 0, 0) 0px 0px 6px 0px'; computedShadowB: 'rgb(255, 255, 0) 0px 0px 20px 0px inset';+ const animation = animate(targetEl, { boxShadow: [computedShadowA, computedShadowB], autoplay: false });+ expect(getChildAtIndex(animation, 0)._valueType).to.equal(valueTypes.COMPLEX); // Fails and return valueTypes.COLOR+ });+ createColorConversionFromDOMTests();createColorTestsByType('rgb', 'rgb');createColorTestsByType('rgb', 'rgba');createColorTestsByType('rgba', 'rgb');