@wix/motion 2.0.0-rc.6 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class S{animations;options;ready;isCSS;constructor(e,n){this.animations=e,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=e[0]instanceof CSSAnimation}getProgress(){return this.animations[0]?.effect?.getComputedTiming().progress||0}async play(e){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}pause(){for(const e of this.animations)e.pause()}async reverse(e){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}progress(e){for(const n of this.animations){const{delay:i,duration:a,iterations:r}=n.effect.getTiming(),f=(Number.isFinite(a)?a:0)*(Number.isFinite(r)?r:1);n.currentTime=((i||0)+f)*e}}cancel(){for(const e of this.animations)e.cancel()}setPlaybackRate(e){for(const n of this.animations)n.playbackRate=e}async onFinish(e){try{await Promise.all(this.animations.map(i=>i.finished));const n=this.animations[0];if(n&&!this.isCSS){const i=n.effect?.target;if(i){const a=new Event("animationend");i.dispatchEvent(a)}}e()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}get finished(){return Promise.all(this.animations.map(e=>e.finished))}get playState(){return this.animations[0]?.playState}}const N=t=>t,L=t=>1-Math.cos(t*Math.PI/2),j=t=>Math.sin(t*Math.PI/2),D=t=>-(Math.cos(Math.PI*t)-1)/2,H=t=>t**2,V=t=>1-(1-t)**2,W=t=>t<.5?2*t**2:1-(-2*t+2)**2/2,K=t=>t**3,G=t=>1-(1-t)**3,J=t=>t<.5?4*t**3:1-(-2*t+2)**3/2,U=t=>t**4,B=t=>1-(1-t)**4,Q=t=>t<.5?8*t**4:1-(-2*t+2)**4/2,X=t=>t**5,Y=t=>1-(1-t)**5,Z=t=>t<.5?16*t**5:1-(-2*t+2)**5/2,tt=t=>t===0?0:2**(10*t-10),et=t=>t===1?1:1-2**(-10*t),nt=t=>t===0?0:t===1?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2,it=t=>1-Math.sqrt(1-t**2),st=t=>Math.sqrt(1-(t-1)**2),rt=t=>t<.5?(1-Math.sqrt(1-4*t**2))/2:(Math.sqrt(-(2*t-3)*(2*t-1))+1)/2,at=t=>2.70158*t**3-1.70158*t**2,ot=t=>1+2.70158*(t-1)**3+1.70158*(t-1)**2,ct=(t,e=1.70158*1.525)=>t<.5?(2*t)**2*((e+1)*2*t-e)/2:((2*t-2)**2*((e+1)*(t*2-2)+e)+2)/2,ut={linear:N,sineIn:L,sineOut:j,sineInOut:D,quadIn:H,quadOut:V,quadInOut:W,cubicIn:K,cubicOut:G,cubicInOut:J,quartIn:U,quartOut:B,quartInOut:Q,quintIn:X,quintOut:Y,quintInOut:Z,expoIn:tt,expoOut:et,expoInOut:nt,circIn:it,circOut:st,circInOut:rt,backIn:at,backOut:ot,backInOut:ct},$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function ft(t){return t==="percentage"?"%":t||"px"}function mt(t){return t?$[t]||t:$.linear}function lt(t){return t?ut[t]:void 0}class Et{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(e,n,i,a){const r=new KeyframeEffect(n,[],{...i,composite:"add"}),{timeline:f}=a;this._animation=new Animation(r,f),this._tickCbId=null,this.progress=null,this.customEffect=u=>e(r.target,u),this._finishHandler=u=>{this.effect.target?.getAnimations().find(m=>m===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const e=this.effect?.getComputedTiming().progress??null;e!==this.progress&&(this.customEffect?.(e),this.progress=e),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(e){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${e instanceof Error?e.message:e}`)}}get currentTime(){return this._animation.currentTime}set currentTime(e){this._animation.currentTime=e}get startTime(){return this._animation.startTime}set startTime(e){this._animation.startTime=e}get playbackRate(){return this._animation.playbackRate}set playbackRate(e){this._animation.playbackRate=e}get id(){return this._animation.id}set id(e){this._animation.id=e}get effect(){return this._animation.effect}set effect(e){this._animation.effect=e}get timeline(){return this._animation.timeline}set timeline(e){this._animation.timeline=e}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(e){this._animation.oncancel=e}get onfinish(){return this._animation.onfinish}set onfinish(e){this._animation.onfinish=e}get onremove(){return this._animation.onremove}set onremove(e){this._animation.onremove=e}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(e){this._animation.updatePlaybackRate(e)}addEventListener(e,n,i){this._animation.addEventListener(e,n,i)}removeEventListener(e,n,i){this._animation.removeEventListener(e,n,i)}dispatchEvent(e){return this._animation.dispatchEvent(e)}}function vt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _={exports:{}},x=_.exports,F;function _t(){return F||(F=1,(function(t){(function(e){var n=function(){},i=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(s){return setTimeout(s,16)};function a(){var s=this;s.reads=[],s.writes=[],s.raf=i.bind(e)}a.prototype={constructor:a,runTasks:function(s){for(var o;o=s.shift();)o()},measure:function(s,o){var c=o?s.bind(o):s;return this.reads.push(c),r(this),c},mutate:function(s,o){var c=o?s.bind(o):s;return this.writes.push(c),r(this),c},clear:function(s){return u(this.reads,s)||u(this.writes,s)},extend:function(s){if(typeof s!="object")throw new Error("expected object");var o=Object.create(this);return m(o,s),o.fastdom=this,o.initialize&&o.initialize(),o},catch:null};function r(s){s.scheduled||(s.scheduled=!0,s.raf(f.bind(null,s)))}function f(s){var o=s.writes,c=s.reads,d;try{n("flushing reads",c.length),s.runTasks(c),n("flushing writes",o.length),s.runTasks(o)}catch(h){d=h}if(s.scheduled=!1,(c.length||o.length)&&r(s),d)if(n("task errored",d.message),s.catch)s.catch(d);else throw d}function u(s,o){var c=s.indexOf(o);return!!~c&&!!s.splice(c,1)}function m(s,o){for(var c in o)o.hasOwnProperty(c)&&(s[c]=o[c])}var l=e.fastdom=e.fastdom||new a;t.exports=l})(typeof window<"u"?window:typeof x<"u"?x:globalThis)})(_)),_.exports}var Ot=_t();const g=vt(Ot),q={};function wt(t){Object.assign(q,t)}function kt(t){return t in q?q[t]:(console.warn(`${t} not found in registry. Please make sure to import and register the preset.`),null)}function y(t,e){return t?(e||document).getElementById(t):null}function At(t,e){return t?.matches(`[data-motion-part~="${e}"]`)?t:t?.querySelector(`[data-motion-part~="${e}"]`)}function $t(t){const e=t.alternate?"alternate":"";return t.reversed?`${e?`${e}-`:""}reverse`:e||"normal"}function A(t){return`${t.value}${ft(t.type)}`}function M(t,e,n){return`${t.name||"cover"} ${n&&t.offset.type!=="percentage"?`calc(100% + ${A(t.offset)}${e?` + ${e}`:""})`:e?`calc(${A(t.offset)} + ${e})`:A(t.offset)}`}function dt(t){return{start:M(t.startOffset,t.startOffsetAdd),end:M(t.endOffset,t.endOffsetAdd,!0)}}function ht(t){return e=>g.measure(()=>e(t))}function gt(t){return e=>g.mutate(()=>e(t))}function v(t){if(t.namedEffect){const e=t.namedEffect.type;return typeof e=="string"?kt(e):null}else if(t.keyframeEffect){const e=i=>{const{name:a,keyframes:r}=i.keyframeEffect;return[{...i,name:a,keyframes:r}]};return{web:e,style:e,getNames:i=>{const{effectId:a}=i,{name:r}=i.keyframeEffect,f=r||a;return f?[f]:[]}}}else if(t.customEffect)return e=>[{...e,keyframes:[]}];return null}function bt(t,e,n){return t.map((i,a)=>{const r={fill:i.fill,easing:mt(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:$t(i)};return T(e)?(r.duration=i.duration,r.delay=i.delay||0):window.ViewTimeline&&e?.trigger==="view-progress"?r.duration="auto":(r.duration=99.99,r.delay=.01),{effect:i,options:r,id:n&&`${n}-${a+1}`,part:i.part}})}function T(t){return!t||t.trigger!=="pointer-move"&&t.trigger!=="view-progress"}function R(t,e,n,i,a){if(t){if(T(i)&&(e.duration=e.duration||1,a?.reducedMotion))if(e.iterations===1||e.iterations==null)e={...e,duration:1};else return[];let r;return n instanceof HTMLElement&&(r={measure:ht(n),mutate:gt(n)}),t.web?t.web(e,r,a):t(e,r,a)}return[]}function P(t,e,n,i,a){const r=t instanceof HTMLElement?t:y(t,a);if(n?.trigger==="pointer-move"&&!e.keyframeEffect){let c=e;e.customEffect&&(c={...e,namedEffect:{id:"",type:"CustomMouse"}});const d=v(c),h=R(d,e,r,n,i);return typeof h!="function"?null:h(r)}const f=v(e),u=R(f,e,r,n,i);if(!u||u.length===0)return null;const m=bt(u,n,e.effectId);let l;const s=n?.trigger==="view-progress";s&&window.ViewTimeline&&(l=new ViewTimeline({subject:n.element||y(n.componentId)}));const o=m.map(({effect:c,options:d,id:h,part:I})=>{const O=I?At(r,I):r,b=new KeyframeEffect(O||null,[],d);g.mutate(()=>{"timing"in c&&b.updateTiming(c.timing),b.setKeyframes(c.keyframes)});const E=s&&l?{timeline:l}:{},p=typeof c.customEffect=="function"?new Et(c.customEffect,O||null,d,E):new Animation(b,E.timeline);if(s)if(l)g.mutate(()=>{const{start:w,end:k}=dt(c);p.rangeStart=w,p.rangeEnd=k,p.play()});else{const{startOffset:w,endOffset:k}=e;g.mutate(()=>{const C=c.startOffset||w,z=c.endOffset||k;Object.assign(p,{start:{name:C.name,offset:C.offset?.value,add:c.startOffsetAdd},end:{name:z.name,offset:z.offset?.value,add:c.endOffsetAdd}})})}return h&&(p.id=h),p});return new S(o,{...e,trigger:{...n||{}},measured:new Promise(c=>g.mutate(c))})}function qt(t,e){return t?`#${t}${e?`[data-motion-part~="${e}"]`:""}`:""}function St(t,e){const{duration:n,delay:i,iterations:a=1,fill:r,easing:f="linear",direction:u}=t.options,m=t.effect.name,l=n==="auto";return`${m} ${l?"auto":`${n}ms`}${l?" ":` ${i||1}ms `}${f}${r&&r!=="none"?` ${r}`:""} ${!a||a===1/0?"infinite":a}${u==="normal"?"":` ${u}`} ${e?"":"paused"}`}function Tt(t,e,n){return t?.style?(T(n)&&(e.duration=e.duration||1),t.style(e)):[]}function Pt(t,e,n){const i=v(e),a=Tt(i,e),r=bt(a,n,e.effectId),f=n?.trigger==="view-progress";return r.map((u,m)=>{const{start:l,end:s}=f?dt(u.effect):{};return{target:qt(t,u.part),animation:St(u,f),composition:u.options.composite,custom:u.effect.custom,name:u.effect.name,keyframes:u.effect.keyframes,id:u.id&&`${u.id}-${m+1}`,animationTimeline:f?`--${n?.id}`:"",animationRange:l||s?`${l} ${s}`:""}})}function pt(t,e,n){const i=v(e),a=t instanceof HTMLElement?t:y(t);if(i&&i.prepare&&a){const r={measure:ht(a),mutate:gt(a)};i.prepare(e,r)}n&&g.mutate(n)}function yt(t,e){const n=v(e);if(!n)return null;if(!n.style)return e.effectId&&t?It(t,e.effectId):null;const i=n.getNames(e),r=(typeof t=="string"?y(t):t)?.getAnimations(),f=r?.map(m=>m.animationName)||[],u=[];return i.forEach(m=>{f.includes(m)&&u.push(r?.find(l=>l.animationName===m))}),u?.length?new S(u):null}function It(t,e){const i=(typeof t=="string"?y(t):t)?.getAnimations().filter(a=>{const r=a.id||a.animationName;return r?r.startsWith(e):!0});return i?.length?new S(i):null}function Ct(t,e,n,i={}){const{disabled:a,allowActiveEvent:r,...f}=i,u=P(t,e,n,f);if(!u)return null;let m={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const l=n.element||y(n.componentId),{ready:s}=u;return u.animations.map(o=>({get start(){return o.start},get end(){return o.end},viewSource:l,ready:s,getProgress(){return u.getProgress()},effect(c,d){const{activeDuration:h}=o.effect.getComputedTiming(),{delay:I}=o.effect.getTiming();o.currentTime=((I||0)+(h||0))*d},disabled:a,destroy(){o.cancel()}}))}else if(n.trigger==="pointer-move"){const l=e,{centeredToTarget:s,transitionDuration:o,transitionEasing:c}=l,d=n.axis;if(l.keyframeEffect){const h=u;return h.animations?.length===0?null:{target:void 0,centeredToTarget:s,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(O,b){const E=d==="x"?b.x:b.y;this._currentProgress=E,h.progress(E)},disabled:a??!1,destroy(){h.cancel()}}}m={centeredToTarget:s,allowActiveEvent:r},e.customEffect&&o&&(m.transitionDuration=o,m.transitionEasing=lt(c)),m.target=u.target}return{...m,getProgress(){return u.getProgress()},effect(l,s,o,c){u.progress(o?{...s,v:o,active:c}:s)},disabled:a,destroy(){u.cancel()}}}function zt(t,e,n,i=!1){const a=yt(t,e);return a?(a.ready=new Promise(r=>{pt(t,e,r)}),a):P(t,e,n,{reducedMotion:i})}exports.backIn=at;exports.backInOut=ct;exports.backOut=ot;exports.circIn=it;exports.circInOut=rt;exports.circOut=st;exports.cssEasings=$;exports.cubicIn=K;exports.cubicInOut=J;exports.cubicOut=G;exports.expoIn=tt;exports.expoInOut=nt;exports.expoOut=et;exports.getAnimation=zt;exports.getCSSAnimation=Pt;exports.getCssUnits=ft;exports.getEasing=mt;exports.getElementAnimation=It;exports.getElementCSSAnimation=yt;exports.getJsEasing=lt;exports.getScrubScene=Ct;exports.getWebAnimation=P;exports.jsEasings=ut;exports.linear=N;exports.prepareAnimation=pt;exports.quadIn=H;exports.quadInOut=W;exports.quadOut=V;exports.quartIn=U;exports.quartInOut=Q;exports.quartOut=B;exports.quintIn=X;exports.quintInOut=Z;exports.quintOut=Y;exports.registerEffects=wt;exports.sineIn=L;exports.sineInOut=D;exports.sineOut=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class S{animations;options;ready;isCSS;constructor(e,n){this.animations=e,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=e[0]instanceof CSSAnimation}getProgress(){return this.animations[0]?.effect?.getComputedTiming().progress||0}async play(e){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}pause(){for(const e of this.animations)e.pause()}async reverse(e){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}progress(e){for(const n of this.animations){const{delay:i,duration:a,iterations:r}=n.effect.getTiming(),f=(Number.isFinite(a)?a:0)*(Number.isFinite(r)?r:1);n.currentTime=((i||0)+f)*e}}cancel(){for(const e of this.animations)e.cancel()}setPlaybackRate(e){for(const n of this.animations)n.playbackRate=e}async onFinish(e){try{await Promise.all(this.animations.map(i=>i.finished));const n=this.animations[0];if(n&&!this.isCSS){const i=n.effect?.target;if(i){const a=new Event("animationend");i.dispatchEvent(a)}}e()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}get finished(){return Promise.all(this.animations.map(e=>e.finished))}get playState(){return this.animations[0]?.playState}}const N=t=>t,L=t=>1-Math.cos(t*Math.PI/2),j=t=>Math.sin(t*Math.PI/2),D=t=>-(Math.cos(Math.PI*t)-1)/2,H=t=>t**2,V=t=>1-(1-t)**2,W=t=>t<.5?2*t**2:1-(-2*t+2)**2/2,K=t=>t**3,G=t=>1-(1-t)**3,J=t=>t<.5?4*t**3:1-(-2*t+2)**3/2,U=t=>t**4,B=t=>1-(1-t)**4,Q=t=>t<.5?8*t**4:1-(-2*t+2)**4/2,X=t=>t**5,Y=t=>1-(1-t)**5,Z=t=>t<.5?16*t**5:1-(-2*t+2)**5/2,tt=t=>t===0?0:2**(10*t-10),et=t=>t===1?1:1-2**(-10*t),nt=t=>t===0?0:t===1?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2,it=t=>1-Math.sqrt(1-t**2),st=t=>Math.sqrt(1-(t-1)**2),rt=t=>t<.5?(1-Math.sqrt(1-4*t**2))/2:(Math.sqrt(-(2*t-3)*(2*t-1))+1)/2,at=t=>2.70158*t**3-1.70158*t**2,ot=t=>1+2.70158*(t-1)**3+1.70158*(t-1)**2,ct=(t,e=1.70158*1.525)=>t<.5?(2*t)**2*((e+1)*2*t-e)/2:((2*t-2)**2*((e+1)*(t*2-2)+e)+2)/2,ut={linear:N,sineIn:L,sineOut:j,sineInOut:D,quadIn:H,quadOut:V,quadInOut:W,cubicIn:K,cubicOut:G,cubicInOut:J,quartIn:U,quartOut:B,quartInOut:Q,quintIn:X,quintOut:Y,quintInOut:Z,expoIn:tt,expoOut:et,expoInOut:nt,circIn:it,circOut:st,circInOut:rt,backIn:at,backOut:ot,backInOut:ct},$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function ft(t){return t==="percentage"?"%":t||"px"}function mt(t){return t?$[t]||t:$.linear}function lt(t){return t?ut[t]:void 0}class Et{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(e,n,i,a){const r=new KeyframeEffect(n,[],{...i,composite:"add"}),{timeline:f}=a;this._animation=new Animation(r,f),this._tickCbId=null,this.progress=null,this.customEffect=u=>e(r.target,u),this._finishHandler=u=>{this.effect.target?.getAnimations().find(m=>m===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const e=this.effect?.getComputedTiming().progress??null;e!==this.progress&&(this.customEffect?.(e),this.progress=e),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(e){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${e instanceof Error?e.message:e}`)}}get currentTime(){return this._animation.currentTime}set currentTime(e){this._animation.currentTime=e}get startTime(){return this._animation.startTime}set startTime(e){this._animation.startTime=e}get playbackRate(){return this._animation.playbackRate}set playbackRate(e){this._animation.playbackRate=e}get id(){return this._animation.id}set id(e){this._animation.id=e}get effect(){return this._animation.effect}set effect(e){this._animation.effect=e}get timeline(){return this._animation.timeline}set timeline(e){this._animation.timeline=e}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(e){this._animation.oncancel=e}get onfinish(){return this._animation.onfinish}set onfinish(e){this._animation.onfinish=e}get onremove(){return this._animation.onremove}set onremove(e){this._animation.onremove=e}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(e){this._animation.updatePlaybackRate(e)}addEventListener(e,n,i){this._animation.addEventListener(e,n,i)}removeEventListener(e,n,i){this._animation.removeEventListener(e,n,i)}dispatchEvent(e){return this._animation.dispatchEvent(e)}}function vt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _={exports:{}},x=_.exports,F;function _t(){return F||(F=1,(function(t){(function(e){var n=function(){},i=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(s){return setTimeout(s,16)};function a(){var s=this;s.reads=[],s.writes=[],s.raf=i.bind(e)}a.prototype={constructor:a,runTasks:function(s){for(var o;o=s.shift();)o()},measure:function(s,o){var c=o?s.bind(o):s;return this.reads.push(c),r(this),c},mutate:function(s,o){var c=o?s.bind(o):s;return this.writes.push(c),r(this),c},clear:function(s){return u(this.reads,s)||u(this.writes,s)},extend:function(s){if(typeof s!="object")throw new Error("expected object");var o=Object.create(this);return m(o,s),o.fastdom=this,o.initialize&&o.initialize(),o},catch:null};function r(s){s.scheduled||(s.scheduled=!0,s.raf(f.bind(null,s)))}function f(s){var o=s.writes,c=s.reads,d;try{n("flushing reads",c.length),s.runTasks(c),n("flushing writes",o.length),s.runTasks(o)}catch(h){d=h}if(s.scheduled=!1,(c.length||o.length)&&r(s),d)if(n("task errored",d.message),s.catch)s.catch(d);else throw d}function u(s,o){var c=s.indexOf(o);return!!~c&&!!s.splice(c,1)}function m(s,o){for(var c in o)o.hasOwnProperty(c)&&(s[c]=o[c])}var l=e.fastdom=e.fastdom||new a;t.exports=l})(typeof window<"u"?window:typeof x<"u"?x:globalThis)})(_)),_.exports}var Ot=_t();const g=vt(Ot),q={};function wt(t){Object.assign(q,t)}function kt(t){return t in q?q[t]:(console.warn(`${t} not found in registry. Please make sure to import and register the preset.`),null)}function y(t,e){return t?(e||document).getElementById(t):null}function At(t,e){return t?.matches(`[data-motion-part~="${e}"]`)?t:t?.querySelector(`[data-motion-part~="${e}"]`)}function $t(t){const e=t.alternate?"alternate":"";return t.reversed?`${e?`${e}-`:""}reverse`:e||"normal"}function A(t){return`${t.value}${ft(t.unit)}`}function M(t,e,n){return`${t.name||"cover"} ${n&&t.offset.unit!=="percentage"?`calc(100% + ${A(t.offset)}${e?` + ${e}`:""})`:e?`calc(${A(t.offset)} + ${e})`:A(t.offset)}`}function dt(t){return{start:M(t.startOffset,t.startOffsetAdd),end:M(t.endOffset,t.endOffsetAdd,!0)}}function ht(t){return e=>g.measure(()=>e(t))}function gt(t){return e=>g.mutate(()=>e(t))}function v(t){if(t.namedEffect){const e=t.namedEffect.type;return typeof e=="string"?kt(e):null}else if(t.keyframeEffect){const e=i=>{const{name:a,keyframes:r}=i.keyframeEffect;return[{...i,name:a,keyframes:r}]};return{web:e,style:e,getNames:i=>{const{effectId:a}=i,{name:r}=i.keyframeEffect,f=r||a;return f?[f]:[]}}}else if(t.customEffect)return e=>[{...e,keyframes:[]}];return null}function bt(t,e,n){return t.map((i,a)=>{const r={fill:i.fill,easing:mt(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:$t(i)};return T(e)?(r.duration=i.duration,r.delay=i.delay||0):window.ViewTimeline&&e?.trigger==="view-progress"?r.duration="auto":(r.duration=99.99,r.delay=.01),{effect:i,options:r,id:n&&`${n}-${a+1}`,part:i.part}})}function T(t){return!t||t.trigger!=="pointer-move"&&t.trigger!=="view-progress"}function R(t,e,n,i,a){if(t){if(T(i)&&(e.duration=e.duration||1,a?.reducedMotion))if(e.iterations===1||e.iterations==null)e={...e,duration:1};else return[];let r;return n instanceof HTMLElement&&(r={measure:ht(n),mutate:gt(n)}),t.web?t.web(e,r,a):t(e,r,a)}return[]}function P(t,e,n,i,a){const r=t instanceof HTMLElement?t:y(t,a);if(n?.trigger==="pointer-move"&&!e.keyframeEffect){let c=e;e.customEffect&&(c={...e,namedEffect:{id:"",type:"CustomMouse"}});const d=v(c),h=R(d,e,r,n,i);return typeof h!="function"?null:h(r)}const f=v(e),u=R(f,e,r,n,i);if(!u||u.length===0)return null;const m=bt(u,n,e.effectId);let l;const s=n?.trigger==="view-progress";s&&window.ViewTimeline&&(l=new ViewTimeline({subject:n.element||y(n.componentId)}));const o=m.map(({effect:c,options:d,id:h,part:I})=>{const O=I?At(r,I):r,b=new KeyframeEffect(O||null,[],d);g.mutate(()=>{"timing"in c&&b.updateTiming(c.timing),b.setKeyframes(c.keyframes)});const E=s&&l?{timeline:l}:{},p=typeof c.customEffect=="function"?new Et(c.customEffect,O||null,d,E):new Animation(b,E.timeline);if(s)if(l)g.mutate(()=>{const{start:w,end:k}=dt(c);p.rangeStart=w,p.rangeEnd=k,p.play()});else{const{startOffset:w,endOffset:k}=e;g.mutate(()=>{const C=c.startOffset||w,z=c.endOffset||k;Object.assign(p,{start:{name:C.name,offset:C.offset?.value,add:c.startOffsetAdd},end:{name:z.name,offset:z.offset?.value,add:c.endOffsetAdd}})})}return h&&(p.id=h),p});return new S(o,{...e,trigger:{...n||{}},measured:new Promise(c=>g.mutate(c))})}function qt(t,e){return t?`#${t}${e?`[data-motion-part~="${e}"]`:""}`:""}function St(t,e){const{duration:n,delay:i,iterations:a=1,fill:r,easing:f="linear",direction:u}=t.options,m=t.effect.name,l=n==="auto";return`${m} ${l?"auto":`${n}ms`}${l?" ":` ${i||1}ms `}${f}${r&&r!=="none"?` ${r}`:""} ${!a||a===1/0?"infinite":a}${u==="normal"?"":` ${u}`} ${e?"":"paused"}`}function Tt(t,e,n){return t?.style?(T(n)&&(e.duration=e.duration||1),t.style(e)):[]}function Pt(t,e,n){const i=v(e),a=Tt(i,e),r=bt(a,n,e.effectId),f=n?.trigger==="view-progress";return r.map((u,m)=>{const{start:l,end:s}=f?dt(u.effect):{};return{target:qt(t,u.part),animation:St(u,f),composition:u.options.composite,custom:u.effect.custom,name:u.effect.name,keyframes:u.effect.keyframes,id:u.id&&`${u.id}-${m+1}`,animationTimeline:f?`--${n?.id}`:"",animationRange:l||s?`${l} ${s}`:""}})}function pt(t,e,n){const i=v(e),a=t instanceof HTMLElement?t:y(t);if(i&&i.prepare&&a){const r={measure:ht(a),mutate:gt(a)};i.prepare(e,r)}n&&g.mutate(n)}function yt(t,e){const n=v(e);if(!n)return null;if(!n.style)return e.effectId&&t?It(t,e.effectId):null;const i=n.getNames(e),r=(typeof t=="string"?y(t):t)?.getAnimations(),f=r?.map(m=>m.animationName)||[],u=[];return i.forEach(m=>{f.includes(m)&&u.push(r?.find(l=>l.animationName===m))}),u?.length?new S(u):null}function It(t,e){const i=(typeof t=="string"?y(t):t)?.getAnimations().filter(a=>{const r=a.id||a.animationName;return r?r.startsWith(e):!0});return i?.length?new S(i):null}function Ct(t,e,n,i={}){const{disabled:a,allowActiveEvent:r,...f}=i,u=P(t,e,n,f);if(!u)return null;let m={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const l=n.element||y(n.componentId),{ready:s}=u;return u.animations.map(o=>({get start(){return o.start},get end(){return o.end},viewSource:l,ready:s,getProgress(){return u.getProgress()},effect(c,d){const{activeDuration:h}=o.effect.getComputedTiming(),{delay:I}=o.effect.getTiming();o.currentTime=((I||0)+(h||0))*d},disabled:a,destroy(){o.cancel()}}))}else if(n.trigger==="pointer-move"){const l=e,{centeredToTarget:s,transitionDuration:o,transitionEasing:c}=l,d=n.axis;if(l.keyframeEffect){const h=u;return h.animations?.length===0?null:{target:void 0,centeredToTarget:s,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(O,b){const E=d==="x"?b.x:b.y;this._currentProgress=E,h.progress(E)},disabled:a??!1,destroy(){h.cancel()}}}m={centeredToTarget:s,allowActiveEvent:r},e.customEffect&&o&&(m.transitionDuration=o,m.transitionEasing=lt(c)),m.target=u.target}return{...m,getProgress(){return u.getProgress()},effect(l,s,o,c){u.progress(o?{...s,v:o,active:c}:s)},disabled:a,destroy(){u.cancel()}}}function zt(t,e,n,i=!1){const a=yt(t,e);return a?(a.ready=new Promise(r=>{pt(t,e,r)}),a):P(t,e,n,{reducedMotion:i})}exports.backIn=at;exports.backInOut=ct;exports.backOut=ot;exports.circIn=it;exports.circInOut=rt;exports.circOut=st;exports.cssEasings=$;exports.cubicIn=K;exports.cubicInOut=J;exports.cubicOut=G;exports.expoIn=tt;exports.expoInOut=nt;exports.expoOut=et;exports.getAnimation=zt;exports.getCSSAnimation=Pt;exports.getCssUnits=ft;exports.getEasing=mt;exports.getElementAnimation=It;exports.getElementCSSAnimation=yt;exports.getJsEasing=lt;exports.getScrubScene=Ct;exports.getWebAnimation=P;exports.jsEasings=ut;exports.linear=N;exports.prepareAnimation=pt;exports.quadIn=H;exports.quadInOut=W;exports.quadOut=V;exports.quartIn=U;exports.quartInOut=Q;exports.quartOut=B;exports.quintIn=X;exports.quintInOut=Z;exports.quintOut=Y;exports.registerEffects=wt;exports.sineIn=L;exports.sineInOut=D;exports.sineOut=j;
2
2
  //# sourceMappingURL=motion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","sources":["../../src/AnimationGroup.ts","../../src/easings.ts","../../src/utils.ts","../../src/CustomAnimation.ts","../../../../node_modules/fastdom/fastdom.js","../../src/api/registry.ts","../../src/api/common.ts","../../src/api/webAnimations.ts","../../src/api/cssAnimations.ts","../../src/api/prepare.ts","../../src/motion.ts"],"sourcesContent":["import { AnimationGroupOptions, RangeOffset } from './types';\n\n/**\n * @class AnimationGroup\n *\n * A wrapper object for simulating a GroupEffect and managing multiple animations.\n * See: https://www.w3.org/TR/web-animations-2/#grouping-and-synchronization\n */\nexport class AnimationGroup {\n animations: (Animation & {\n start?: RangeOffset;\n end?: RangeOffset;\n })[];\n options?: AnimationGroupOptions;\n ready: Promise<void>;\n isCSS: boolean;\n\n constructor(animations: Animation[], options?: AnimationGroupOptions) {\n this.animations = animations;\n this.options = options;\n this.ready = options?.measured || Promise.resolve();\n this.isCSS = animations[0] instanceof CSSAnimation;\n }\n\n getProgress() {\n return this.animations[0]?.effect?.getComputedTiming().progress || 0;\n }\n\n async play(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.play();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n pause() {\n for (const animation of this.animations) {\n animation.pause();\n }\n }\n\n async reverse(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.reverse();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n progress(p: number) {\n for (const animation of this.animations) {\n const { delay, duration, iterations } = animation.effect!.getTiming();\n const time =\n (Number.isFinite(duration) ? (duration as number) : 0) *\n (Number.isFinite(iterations) ? (iterations as number) : 1);\n animation.currentTime = ((delay || 0) + time) * p;\n }\n }\n\n cancel() {\n for (const animation of this.animations) {\n animation.cancel();\n }\n }\n\n setPlaybackRate(rate: number) {\n for (const animation of this.animations) {\n animation.playbackRate = rate;\n }\n }\n\n async onFinish(callback: () => void): Promise<void> {\n try {\n await Promise.all(this.animations.map((animation) => animation.finished));\n\n const a = this.animations[0];\n\n if (a && !this.isCSS) {\n const target = (a.effect as KeyframeEffect)?.target;\n\n if (target) {\n const endEvent = new Event('animationend');\n target.dispatchEvent(endEvent);\n }\n }\n\n callback();\n } catch (_error) {\n console.warn('animation was interrupted - aborting onFinish callback - ', _error);\n }\n }\n\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n\n get playState() {\n return this.animations[0]?.playState;\n }\n}\n","/**\n * @file Easing functions as defined by Robert Penner.\n * @example A playground I made https://codepen.io/tombigel/pen/eYLLVRg\n */\n\n/**\n * Linear easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const linear = (t: number) => t;\n\n/**\n * Sine-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineIn = (t: number) => 1 - Math.cos((t * Math.PI) / 2);\n\n/**\n * Sine-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineOut = (t: number) => Math.sin((t * Math.PI) / 2);\n\n/**\n * Sine-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineInOut = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\n\n/**\n * Quadratic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadIn = (t: number) => t ** 2;\n\n/**\n * Quadratic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadOut = (t: number) => 1 - (1 - t) ** 2;\n\n/**\n * Quadratic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadInOut = (t: number) => (t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2);\n\n/**\n * Cubic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicIn = (t: number) => t ** 3;\n\n/**\n * Cubic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicOut = (t: number) => 1 - (1 - t) ** 3;\n\n/**\n * Cubic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicInOut = (t: number) => (t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2);\n\n/**\n * Quartic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartIn = (t: number) => t ** 4;\n\n/**\n * Quartic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartOut = (t: number) => 1 - (1 - t) ** 4;\n\n/**\n * Quartic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartInOut = (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2);\n\n/**\n * Quintic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintIn = (t: number) => t ** 5;\n\n/**\n * Quintic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintOut = (t: number) => 1 - (1 - t) ** 5;\n\n/**\n * Quintic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintInOut = (t: number) => (t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2);\n\n/**\n * Exponential-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoIn = (t: number) => (t === 0 ? 0 : 2 ** (10 * t - 10));\n\n/**\n * Exponential-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoOut = (t: number) => (t === 1 ? 1 : 1 - 2 ** (-10 * t));\n\n/**\n * Exponential-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoInOut = (t: number) =>\n t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2;\n\n/**\n * Circular-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circIn = (t: number) => 1 - Math.sqrt(1 - t ** 2);\n\n/**\n * Circular-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circOut = (t: number) => Math.sqrt(1 - (t - 1) ** 2);\n\n/**\n * Circular-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circInOut = (t: number) =>\n t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2;\n\n/**\n * Back-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backIn = (t: number) => 2.70158 * t ** 3 - 1.70158 * t ** 2;\n\n/**\n * Back-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backOut = (t: number) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2;\n\n/**\n * Back-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @param k - The back factor (optional, default is 1.70158 * 1.525).\n * @returns The eased value.\n */\nexport const backInOut = (t: number, k = 1.70158 * 1.525) =>\n t < 0.5\n ? ((2 * t) ** 2 * ((k + 1) * 2 * t - k)) / 2\n : ((2 * t - 2) ** 2 * ((k + 1) * (t * 2 - 2) + k) + 2) / 2;\n\nexport const jsEasings = {\n linear,\n sineIn,\n sineOut,\n sineInOut,\n quadIn,\n quadOut,\n quadInOut,\n cubicIn,\n cubicOut,\n cubicInOut,\n quartIn,\n quartOut,\n quartInOut,\n quintIn,\n quintOut,\n quintInOut,\n expoIn,\n expoOut,\n expoInOut,\n circIn,\n circOut,\n circInOut,\n backIn,\n backOut,\n backInOut,\n};\n\n/**\n * CSS cubic-bezier easings based on PostCSS Easings\n */\nexport const cssEasings = {\n linear: 'linear',\n ease: 'ease',\n easeIn: 'ease-in',\n easeOut: 'ease-out',\n easeInOut: 'ease-in-out',\n sineIn: 'cubic-bezier(0.47, 0, 0.745, 0.715)',\n sineOut: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n sineInOut: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',\n quadIn: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n quadOut: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n quadInOut: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n cubicIn: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n cubicOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n cubicInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n quartIn: 'cubic-bezier(0.895, 0.03, 0.685, 0.22)',\n quartOut: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n quartInOut: 'cubic-bezier(0.77, 0, 0.175, 1)',\n quintIn: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n quintOut: 'cubic-bezier(0.23, 1, 0.32, 1)',\n quintInOut: 'cubic-bezier(0.86, 0, 0.07, 1)',\n expoIn: 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',\n expoOut: 'cubic-bezier(0.19, 1, 0.22, 1)',\n expoInOut: 'cubic-bezier(1, 0, 0, 1)',\n circIn: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)',\n circOut: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n circInOut: 'cubic-bezier(0.785, 0.135, 0.15, 0.86)',\n backIn: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)',\n backOut: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n backInOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',\n} as const;\n","import { cssEasings, jsEasings } from './easings';\nexport function getCssUnits(type: 'percentage' | string) {\n return type === 'percentage' ? '%' : type || 'px';\n}\n\nexport function getEasing(easing?: keyof typeof cssEasings | string): string {\n return easing ? cssEasings[easing as keyof typeof cssEasings] || easing : cssEasings.linear;\n}\n\nexport function getJsEasing(\n easing?: keyof typeof jsEasings | string,\n): ((t: number) => number) | undefined {\n return easing ? jsEasings[easing as keyof typeof jsEasings] : undefined;\n}\n","/**\n * @class CustomAnimation\n *\n * A wrapper object for Animation that mimics the same interface but implements CustomEffect that runs JS code instead of KeyframeEffect.\n * The class is implemented by holding an inner Animation object instead of inheritance due to some browsers not allowing extension of built-in objects.\n */\nexport class CustomAnimation {\n _animation: Animation;\n customEffect: (progress: number | null) => void;\n progress: number | null;\n _tickCbId: number | null;\n _finishHandler: (_: any) => void;\n\n constructor(\n customEffect: (element: Element | null, progress: number | null) => void,\n target: Element | null,\n effectOptions: KeyframeEffectOptions,\n timingOptions: { timeline?: AnimationTimeline | null },\n ) {\n // overriding composite so that animation is not replaced and removed\n const effect = new KeyframeEffect(target, [], {\n ...effectOptions,\n composite: 'add',\n });\n const { timeline } = timingOptions;\n this._animation = new Animation(effect, timeline);\n\n this._tickCbId = null;\n this.progress = null;\n this.customEffect = (progress: number | null) => customEffect(effect.target, progress);\n\n // stop loop if animation is removed from the DOM after finish (does not fire 'remove' event)\n this._finishHandler = (_: any) => {\n if (\n !(this.effect as KeyframeEffect).target?.getAnimations().find((a) => a === this._animation)\n ) {\n this.cancel();\n }\n };\n this.addEventListener('finish', this._finishHandler);\n this.addEventListener('remove', this._finishHandler);\n }\n\n // private tick method for customEffect loop implementation\n private _tick() {\n try {\n const progress = this.effect?.getComputedTiming().progress ?? null;\n if (progress !== this.progress) {\n this.customEffect?.(progress);\n this.progress = progress;\n }\n this._tickCbId = requestAnimationFrame(() => {\n this._tick();\n });\n } catch (error) {\n this._tickCbId = null;\n console.error(\n `failed to run customEffect! effectId: ${this.id}, error: ${\n error instanceof Error ? error.message : error\n }`,\n );\n }\n }\n\n // Animation timing properties\n get currentTime() {\n return this._animation.currentTime;\n }\n set currentTime(time: CSSNumberish | null) {\n this._animation.currentTime = time;\n }\n get startTime() {\n return this._animation.startTime;\n }\n set startTime(time: CSSNumberish | null) {\n this._animation.startTime = time;\n }\n get playbackRate() {\n return this._animation.playbackRate;\n }\n set playbackRate(speed: number) {\n this._animation.playbackRate = speed;\n }\n\n // Animation basic properties\n get id() {\n return this._animation.id;\n }\n set id(uid: string) {\n this._animation.id = uid;\n }\n get effect() {\n return this._animation.effect;\n }\n set effect(e: AnimationEffect | null) {\n this._animation.effect = e;\n }\n get timeline() {\n return this._animation.timeline;\n }\n set timeline(tl: AnimationTimeline | null) {\n this._animation.timeline = tl;\n }\n\n // Animation readonly state properties\n get finished() {\n return this._animation.finished;\n }\n get pending() {\n return this._animation.pending;\n }\n get playState() {\n return this._animation.playState;\n }\n get ready() {\n return this._animation.ready;\n }\n get replaceState() {\n return this._animation.replaceState;\n }\n\n // Animation event handlers\n get oncancel() {\n return this._animation.oncancel;\n }\n set oncancel(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.oncancel = cb;\n }\n get onfinish() {\n return this._animation.onfinish;\n }\n set onfinish(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onfinish = cb;\n }\n get onremove() {\n return this._animation.onremove;\n }\n set onremove(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onremove = cb;\n }\n\n // CustomAnimation overridden methods\n play() {\n this._animation.play();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = requestAnimationFrame(() => this._tick());\n }\n\n pause() {\n this._animation.pause();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n cancel() {\n this.removeEventListener('finish', this._finishHandler);\n this.removeEventListener('remove', this._finishHandler);\n this._animation.cancel();\n // signaling cancelation for customEffect to handle it as desired\n this.customEffect(null);\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n commitStyles() {\n console.warn(\n 'CustomEffect animations do not support commitStyles method as they have no style to commit',\n );\n }\n\n // Animation methods without override\n finish() {\n this._animation.finish();\n }\n persist() {\n this._animation.persist();\n }\n reverse() {\n this._animation.reverse();\n }\n updatePlaybackRate(playbackRate: number) {\n this._animation.updatePlaybackRate(playbackRate);\n }\n\n // Animation events API\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.addEventListener(type, listener, options);\n }\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.removeEventListener(type, listener, options);\n }\n dispatchEvent(event: Event) {\n return this._animation.dispatchEvent(event);\n }\n}\n","!(function(win) {\n\n/**\n * FastDom\n *\n * Eliminates layout thrashing\n * by batching DOM read/write\n * interactions.\n *\n * @author Wilson Page <wilsonpage@me.com>\n * @author Kornel Lesinski <kornel.lesinski@ft.com>\n */\n\n'use strict';\n\n/**\n * Mini logger\n *\n * @return {Function}\n */\nvar debug = 0 ? console.log.bind(console, '[fastdom]') : function() {};\n\n/**\n * Normalized rAF\n *\n * @type {Function}\n */\nvar raf = win.requestAnimationFrame\n || win.webkitRequestAnimationFrame\n || win.mozRequestAnimationFrame\n || win.msRequestAnimationFrame\n || function(cb) { return setTimeout(cb, 16); };\n\n/**\n * Initialize a `FastDom`.\n *\n * @constructor\n */\nfunction FastDom() {\n var self = this;\n self.reads = [];\n self.writes = [];\n self.raf = raf.bind(win); // test hook\n debug('initialized', self);\n}\n\nFastDom.prototype = {\n constructor: FastDom,\n\n /**\n * We run this inside a try catch\n * so that if any jobs error, we\n * are able to recover and continue\n * to flush the batch until it's empty.\n *\n * @param {Array} tasks\n */\n runTasks: function(tasks) {\n debug('run tasks');\n var task; while (task = tasks.shift()) task();\n },\n\n /**\n * Adds a job to the read batch and\n * schedules a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n measure: function(fn, ctx) {\n debug('measure');\n var task = !ctx ? fn : fn.bind(ctx);\n this.reads.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Adds a job to the\n * write batch and schedules\n * a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n mutate: function(fn, ctx) {\n debug('mutate');\n var task = !ctx ? fn : fn.bind(ctx);\n this.writes.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Clears a scheduled 'read' or 'write' task.\n *\n * @param {Object} task\n * @return {Boolean} success\n * @public\n */\n clear: function(task) {\n debug('clear', task);\n return remove(this.reads, task) || remove(this.writes, task);\n },\n\n /**\n * Extend this FastDom with some\n * custom functionality.\n *\n * Because fastdom must *always* be a\n * singleton, we're actually extending\n * the fastdom instance. This means tasks\n * scheduled by an extension still enter\n * fastdom's global task queue.\n *\n * The 'super' instance can be accessed\n * from `this.fastdom`.\n *\n * @example\n *\n * var myFastdom = fastdom.extend({\n * initialize: function() {\n * // runs on creation\n * },\n *\n * // override a method\n * measure: function(fn) {\n * // do extra stuff ...\n *\n * // then call the original\n * return this.fastdom.measure(fn);\n * },\n *\n * ...\n * });\n *\n * @param {Object} props properties to mixin\n * @return {FastDom}\n */\n extend: function(props) {\n debug('extend', props);\n if (typeof props != 'object') throw new Error('expected object');\n\n var child = Object.create(this);\n mixin(child, props);\n child.fastdom = this;\n\n // run optional creation hook\n if (child.initialize) child.initialize();\n\n return child;\n },\n\n // override this with a function\n // to prevent Errors in console\n // when tasks throw\n catch: null\n};\n\n/**\n * Schedules a new read/write\n * batch if one isn't pending.\n *\n * @private\n */\nfunction scheduleFlush(fastdom) {\n if (!fastdom.scheduled) {\n fastdom.scheduled = true;\n fastdom.raf(flush.bind(null, fastdom));\n debug('flush scheduled');\n }\n}\n\n/**\n * Runs queued `read` and `write` tasks.\n *\n * Errors are caught and thrown by default.\n * If a `.catch` function has been defined\n * it is called instead.\n *\n * @private\n */\nfunction flush(fastdom) {\n debug('flush');\n\n var writes = fastdom.writes;\n var reads = fastdom.reads;\n var error;\n\n try {\n debug('flushing reads', reads.length);\n fastdom.runTasks(reads);\n debug('flushing writes', writes.length);\n fastdom.runTasks(writes);\n } catch (e) { error = e; }\n\n fastdom.scheduled = false;\n\n // If the batch errored we may still have tasks queued\n if (reads.length || writes.length) scheduleFlush(fastdom);\n\n if (error) {\n debug('task errored', error.message);\n if (fastdom.catch) fastdom.catch(error);\n else throw error;\n }\n}\n\n/**\n * Remove an item from an Array.\n *\n * @param {Array} array\n * @param {*} item\n * @return {Boolean}\n */\nfunction remove(array, item) {\n var index = array.indexOf(item);\n return !!~index && !!array.splice(index, 1);\n}\n\n/**\n * Mixin own properties of source\n * object into the target.\n *\n * @param {Object} target\n * @param {Object} source\n */\nfunction mixin(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) target[key] = source[key];\n }\n}\n\n// There should never be more than\n// one instance of `FastDom` in an app\nvar exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:line\n\n// Expose to CJS & AMD\nif ((typeof define) == 'function') define(function() { return exports; });\nelse if ((typeof module) == 'object') module.exports = exports;\n\n})( typeof window !== 'undefined' ? window : typeof this != 'undefined' ? this : globalThis);\n","import type { EffectModule } from '../types';\n\nconst registry: Record<string, EffectModule> = {};\n\nexport function registerEffects(effects: Record<string, EffectModule>) {\n Object.assign(registry, effects);\n}\n\nexport function getRegisteredEffect(name: string) {\n if (name in registry) {\n return registry[name];\n } else {\n console.warn(\n `${name} not found in registry. Please make sure to import and register the preset.`,\n );\n return null;\n }\n}\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationOptions,\n MeasureCallback,\n RangeOffset,\n TimeAnimationOptions,\n TriggerVariant,\n UnitLengthPercentage,\n} from '../types';\nimport { getCssUnits, getEasing } from '../utils';\nimport fastdom from 'fastdom';\nimport { getRegisteredEffect } from './registry';\n\nfunction getElement(id: string | null, ownerDocument?: Document): HTMLElement | null {\n return id ? (ownerDocument || document).getElementById(id) : null;\n}\n\nfunction getElementMotionPart(element: Element | null, part: string) {\n if (element?.matches(`[data-motion-part~=\"${part}\"]`)) {\n return element;\n }\n return element?.querySelector(`[data-motion-part~=\"${part}\"]`);\n}\n\nfunction getDirection(effect: AnimationData): KeyframeEffectOptions['direction'] {\n const alternate = effect.alternate ? 'alternate' : '';\n return effect.reversed\n ? (`${alternate ? `${alternate}-` : ''}reverse` as 'reverse' | 'alternate-reverse')\n : alternate || 'normal';\n}\n\nfunction getLength(length: UnitLengthPercentage): string {\n return `${length.value}${getCssUnits(length.type)}`;\n}\n\nfunction getRange(range: RangeOffset, add: string | undefined, isEnd?: boolean) {\n // according to the CSS spec if the end range is a <length> then it is calculated from the start of the named range\n // our model assumes that <length> in end range is calculated from the end of the named range\n return `${range.name || 'cover'} ${\n isEnd && range.offset!.type !== 'percentage'\n ? `calc(100% + ${getLength(range.offset!)}${add ? ` + ${add}` : ''})`\n : add\n ? `calc(${getLength(range.offset!)} + ${add})`\n : getLength(range.offset!)\n }`;\n}\n\nfunction getRanges(effect: AnimationDataForScrub) {\n return {\n start: getRange(effect.startOffset!, effect.startOffsetAdd),\n end: getRange(effect.endOffset!, effect.endOffsetAdd, true),\n };\n}\n\nfunction measure(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.measure(() => fn(target));\n}\n\nfunction mutate(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.mutate(() => fn(target));\n}\n\nfunction getNamedEffect(animation: AnimationOptions) {\n if (animation.namedEffect) {\n const effectName = animation.namedEffect.type;\n return typeof effectName === 'string' ? getRegisteredEffect(effectName) : null;\n } else if (animation.keyframeEffect) {\n const effect = (animation_: AnimationOptions) => {\n const { name, keyframes } = animation_.keyframeEffect!;\n\n return [{ ...animation_, name, keyframes }];\n };\n const getNames = (animation_: AnimationOptions) => {\n const { effectId } = animation_;\n const { name } = animation_.keyframeEffect!;\n const uid = name || effectId;\n\n return uid ? [uid] : [];\n };\n return { web: effect, style: effect, getNames };\n } else if (animation.customEffect) {\n return (animation_: AnimationOptions) => [{ ...animation_, keyframes: [] }];\n }\n return null;\n}\n\nfunction getEffectsData(\n animations: AnimationData[],\n trigger?: Partial<TriggerVariant>,\n effectId?: string,\n) {\n // process each AnimationData object into a KeyframeEffect object\n return animations.map((effect, index) => {\n // prepare the KeyframeEffectOptions object\n const effectOptions = {\n fill: effect.fill,\n easing: getEasing(effect.easing),\n iterations: effect.iterations === 0 ? Infinity : effect.iterations || 1,\n composite: effect.composite,\n direction: getDirection(effect),\n } as KeyframeEffectOptions & { rangeStart: string; rangeEnd: string };\n\n // if this is a time-based animation then set the duration and delay as time values\n if (isNotAScrubTrigger(trigger)) {\n effectOptions.duration = effect.duration as number;\n effectOptions.delay = (effect as TimeAnimationOptions).delay || 0;\n } else {\n // if ViewTimeline is supported AND this is a view-progress trigger\n if (window.ViewTimeline && trigger?.trigger === 'view-progress') {\n // set duration to 'auto'\n effectOptions.duration = 'auto';\n } else {\n // if ViewTimeline not supported then put a 100ms value in duration get a progress we can easily relate to\n // we split the duration to 99.99ms and delay of 0.01ms to get the fill-mode effect working\n effectOptions.duration = 99.99;\n effectOptions.delay = 0.01;\n }\n }\n\n return {\n effect,\n options: effectOptions,\n id: effectId && `${effectId}-${index + 1}`,\n part: effect.part,\n };\n });\n}\n\nfunction isNotAScrubTrigger(trigger?: Partial<TriggerVariant>) {\n return !trigger || (trigger.trigger !== 'pointer-move' && trigger.trigger !== 'view-progress');\n}\n\nexport {\n isNotAScrubTrigger,\n getElement,\n getElementMotionPart,\n getNamedEffect,\n getEffectsData,\n measure,\n mutate,\n getDirection,\n getLength,\n getRanges,\n};\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n MouseAnimationFactory,\n MouseAnimationInstance,\n ScrubAnimationOptions,\n TriggerVariant,\n WebAnimationEffectFactory,\n} from '../types';\nimport { CustomAnimation } from '../CustomAnimation';\nimport { AnimationGroup } from '../AnimationGroup';\nimport {\n getElement,\n getElementMotionPart,\n measure,\n mutate,\n getRanges,\n getNamedEffect,\n getEffectsData,\n isNotAScrubTrigger,\n} from './common';\nimport fastdom from 'fastdom';\n\nfunction getWebAnimationEffect(\n preset: AnimationEffectAPI<any> | WebAnimationEffectFactory<any> | null,\n animation: AnimationOptions,\n target: HTMLElement | string | null,\n trigger?: Partial<TriggerVariant>,\n options?: Record<string, any>,\n): AnimationData[] | MouseAnimationFactory {\n if (preset) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n\n if (options?.reducedMotion) {\n if (animation.iterations === 1 || animation.iterations == undefined) {\n animation = { ...animation, duration: 1 };\n } else {\n return [];\n }\n }\n }\n\n let domApi;\n if (target instanceof HTMLElement) {\n domApi = { measure: measure(target), mutate: mutate(target) };\n }\n\n return (preset as AnimationEffectAPI<any>).web\n ? (preset as AnimationEffectAPI<any>).web(animation, domApi, options)\n : (preset as WebAnimationEffectFactory<any>)(animation, domApi, options);\n }\n\n return [];\n}\n\nfunction getWebAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n options?: Record<string, any>,\n ownerDocument?: Document,\n): AnimationGroup | MouseAnimationInstance | null {\n const element = target instanceof HTMLElement ? target : getElement(target, ownerDocument);\n\n if (trigger?.trigger === 'pointer-move' && !animationOptions.keyframeEffect) {\n let effectOptions = animationOptions;\n\n if (animationOptions.customEffect) {\n effectOptions = {\n ...animationOptions,\n namedEffect: { id: '', type: 'CustomMouse' },\n };\n }\n\n // TODO: need to fix the type here, currently lying about the returned type to be WebAnimationEffectFactory instead of MouseAnimationFactoryCreate\n const mouseAnimationPreset = getNamedEffect(\n effectOptions,\n ) as WebAnimationEffectFactory<'scrub'>;\n const mouseAnimationFactory = getWebAnimationEffect(\n mouseAnimationPreset,\n animationOptions,\n element,\n trigger,\n options,\n ) as MouseAnimationFactory;\n\n if (typeof mouseAnimationFactory !== 'function') {\n return null;\n }\n\n return mouseAnimationFactory(element as HTMLElement);\n }\n\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getWebAnimationEffect(\n namedEffect,\n animationOptions,\n element,\n trigger,\n options,\n ) as AnimationData[];\n\n // Return null if animation data cannot be generated\n if (!animationsData || animationsData.length === 0) {\n return null;\n }\n\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n\n let timeline: typeof window.ViewTimeline | undefined;\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress && window.ViewTimeline) {\n // generate the timeline object\n // @ts-expect-error\n timeline = new ViewTimeline({\n subject: trigger.element || getElement(trigger.componentId!),\n });\n }\n\n // generate an Animation object for each data object\n const animations = data.map(({ effect, options: effectOptions, id, part }) => {\n const effectTarget = part ? getElementMotionPart(element, part) : element;\n\n const keyframeEffect = new KeyframeEffect(effectTarget || null, [], effectOptions);\n\n // set the keyframes for the KeyframeEffect after measurements and mutations\n fastdom.mutate(() => {\n if ('timing' in effect) {\n keyframeEffect.updateTiming(effect.timing as OptionalEffectTiming);\n }\n\n keyframeEffect.setKeyframes(effect.keyframes);\n });\n\n const timingOptions =\n isViewProgress && timeline ? { timeline: timeline as AnimationTimeline } : {};\n const animation: Animation | CustomAnimation =\n typeof effect.customEffect === 'function'\n ? (new CustomAnimation(\n effect.customEffect,\n effectTarget || null,\n effectOptions,\n timingOptions,\n ) as Animation)\n : new Animation(keyframeEffect, timingOptions.timeline);\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress) {\n if (timeline) {\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const { start, end } = getRanges(effect as AnimationDataForScrub);\n // @ts-expect-error\n animation.rangeStart = start;\n // @ts-expect-error\n animation.rangeEnd = end;\n\n animation.play();\n });\n } else {\n const { startOffset, endOffset } = animationOptions as ScrubAnimationOptions;\n\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const startOffsetToWrite = (effect as AnimationDataForScrub).startOffset || startOffset;\n const endOffsetToWrite = (effect as AnimationDataForScrub).endOffset || endOffset;\n\n Object.assign(animation, {\n start: {\n name: startOffsetToWrite!.name,\n offset: startOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.startOffsetAdd,\n },\n end: {\n name: endOffsetToWrite!.name,\n offset: endOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.endOffsetAdd,\n },\n });\n });\n }\n }\n\n if (id) {\n animation.id = id;\n }\n\n return animation;\n });\n\n // create an AnimationGroup with the generate animations\n return new AnimationGroup(animations, {\n ...animationOptions,\n trigger: { ...(trigger || ({} as Partial<TriggerVariant>)) },\n // make sure the group is ready after all animation targets are measured and mutated\n measured: new Promise((resolve) => fastdom.mutate(resolve)),\n });\n}\n\nexport { getWebAnimation };\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n TriggerVariant,\n} from '../types';\nimport { getEffectsData, getRanges, getNamedEffect, isNotAScrubTrigger } from './common';\n\nfunction getAnimationTarget(target: string | null, part: string | undefined) {\n return target ? `#${target}${part ? `[data-motion-part~=\"${part}\"]` : ''}` : '';\n}\n\nfunction getAnimationAsCSS(\n data: {\n effect: AnimationData;\n options: KeyframeEffectOptions;\n id: string | undefined;\n part: string | undefined;\n },\n isRunning?: boolean,\n) {\n const { duration, delay, iterations = 1, fill, easing = 'linear', direction } = data.options;\n const animationName = data.effect.name;\n const isAutoDuration = duration === 'auto';\n\n return `${animationName} ${isAutoDuration ? 'auto' : `${duration}ms`}${\n isAutoDuration ? ' ' : ` ${delay || 1}ms `\n }${easing}${fill && fill !== 'none' ? ` ${fill}` : ''} ${\n !iterations || iterations === Infinity ? 'infinite' : iterations\n }${direction === 'normal' ? '' : ` ${direction}`} ${isRunning ? '' : 'paused'}`;\n}\n\nfunction getCSSAnimationEffect(\n preset: AnimationEffectAPI<any> | null,\n animation: AnimationOptions,\n trigger?: Partial<TriggerVariant>,\n): AnimationData[] {\n if (preset?.style) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n }\n\n return preset.style(animation);\n }\n\n return [];\n}\n\nfunction getCSSAnimation(\n target: string | null,\n animationOptions: AnimationOptions,\n trigger?: TriggerVariant,\n) {\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getCSSAnimationEffect(namedEffect, animationOptions);\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n return data.map((item, index) => {\n const { start, end }: { start?: string; end?: string } = isViewProgress\n ? getRanges(item.effect as AnimationDataForScrub)\n : {};\n\n return {\n target: getAnimationTarget(target, item.part),\n animation: getAnimationAsCSS(item, isViewProgress),\n composition: item.options.composite,\n custom: item.effect.custom,\n name: item.effect.name,\n keyframes: item.effect.keyframes,\n id: item.id && `${item.id}-${index + 1}`,\n animationTimeline: isViewProgress ? `--${trigger?.id}` : '',\n animationRange: start || end ? `${start} ${end}` : '',\n };\n });\n}\n\nexport { getCSSAnimation, getCSSAnimationEffect, getAnimationAsCSS };\n","import type { AnimationEffectAPI, AnimationOptions, TimeAnimationOptions } from '../types';\nimport { getElement, getNamedEffect, measure, mutate } from './common';\nimport fastdom from 'fastdom';\n\nfunction prepareAnimation(\n target: HTMLElement | string | null,\n animation: AnimationOptions,\n callback?: () => void,\n) {\n const preset = getNamedEffect(animation);\n const element = target instanceof HTMLElement ? target : getElement(target);\n\n if (preset && (preset as AnimationEffectAPI<'time'>).prepare && element) {\n const domApi = { measure: measure(element), mutate: mutate(element) };\n\n (preset as AnimationEffectAPI<'time'>).prepare!(animation as TimeAnimationOptions, domApi);\n }\n\n if (callback) {\n fastdom.mutate(callback);\n }\n}\n\nexport { prepareAnimation };\n","import type {\n AnimationOptions,\n ScrubAnimationOptions,\n TriggerVariant,\n MouseAnimationInstance,\n AnimationEffectAPI,\n CustomMouseAnimationInstance,\n ScrubScrollScene,\n ScrubPointerScene,\n PointerMoveAxis,\n} from './types';\nimport { AnimationGroup } from './AnimationGroup';\nimport { getEasing, getJsEasing } from './utils';\nimport { getWebAnimation } from './api/webAnimations';\nimport { getCSSAnimation } from './api/cssAnimations';\nimport { prepareAnimation } from './api/prepare';\nimport { getElement, getNamedEffect } from './api/common';\n\nfunction getElementCSSAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n): AnimationGroup | null {\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n if (!namedEffect) {\n return null;\n }\n\n if (!namedEffect.style) {\n // if this named effect does not have a style method, attempt to get group of Web Animations\n if (animationOptions.effectId && target) {\n return getElementAnimation(target, animationOptions.effectId);\n }\n\n return null;\n }\n\n const effectNames = namedEffect.getNames(animationOptions);\n const element = typeof target === 'string' ? getElement(target) : target;\n const animations = element?.getAnimations();\n const animationNames =\n animations?.map((anim) => (anim as CSSAnimation).animationName) || ([] as string[]);\n const filteredAnimations: CSSAnimation[] = [];\n\n effectNames.forEach((name) => {\n if (animationNames.includes(name)) {\n filteredAnimations.push(\n animations?.find((anim) => (anim as CSSAnimation).animationName === name) as CSSAnimation,\n );\n }\n });\n\n return filteredAnimations?.length ? new AnimationGroup(filteredAnimations) : null;\n}\n\nfunction getElementAnimation(\n target: HTMLElement | string,\n effectId: string,\n): AnimationGroup | null {\n const element = typeof target === 'string' ? getElement(target) : target;\n // somehow get the right animations\n const animations = element?.getAnimations().filter((anim: Animation | CSSAnimation) => {\n const id = anim.id || (anim as CSSAnimation).animationName;\n // if no id/name just return all animations\n return id ? id.startsWith(effectId) : true;\n });\n\n return animations?.length ? new AnimationGroup(animations) : null;\n}\n\nfunction getScrubScene(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger: Partial<TriggerVariant> & { element?: HTMLElement },\n sceneOptions: Record<string, any> = {},\n): ScrubScrollScene[] | ScrubPointerScene | ScrubPointerScene[] | null {\n const { disabled, allowActiveEvent, ...rest } = sceneOptions;\n const animation = getWebAnimation(target, animationOptions, trigger, rest);\n\n // Return null if animation could not be created\n if (!animation) {\n return null;\n }\n\n let typeSpecificOptions = {} as Record<string, any>;\n\n if (trigger.trigger === 'view-progress' && !window.ViewTimeline) {\n // TODO(ameerf): consider doing this only for bgscrub to not affect the other scroll effects\n const viewSource = trigger.element || getElement(trigger.componentId!);\n const { ready } = animation as AnimationGroup;\n\n return (animation as AnimationGroup).animations.map((partialAnimation) => {\n return {\n /* we use getters for start and end in order to access the animation's start and end\n only when initializing the scrub scene rather than immediately */\n get start() {\n return partialAnimation.start;\n },\n get end() {\n return partialAnimation.end;\n },\n viewSource,\n ready,\n getProgress() {\n return (animation as AnimationGroup).getProgress();\n },\n effect(__: any, p: number) {\n const { activeDuration } = partialAnimation.effect!.getComputedTiming();\n const { delay } = partialAnimation.effect!.getTiming();\n\n partialAnimation.currentTime = ((delay || 0) + ((activeDuration as number) || 0)) * p;\n },\n disabled,\n destroy() {\n partialAnimation.cancel();\n },\n } as ScrubScrollScene;\n });\n } else if (trigger.trigger === 'pointer-move') {\n const scrubOptions = animationOptions as ScrubAnimationOptions;\n const { centeredToTarget, transitionDuration, transitionEasing } = scrubOptions;\n const axis = (trigger as { axis?: PointerMoveAxis }).axis;\n\n if (scrubOptions.keyframeEffect) {\n const animationGroup = animation as AnimationGroup;\n\n if (animationGroup.animations?.length === 0) {\n return null;\n }\n\n const scene: ScrubPointerScene & { _currentProgress: number } = {\n target: undefined,\n centeredToTarget,\n ready: animationGroup.ready,\n _currentProgress: 0,\n getProgress() {\n return this._currentProgress;\n },\n effect(__: any, p: { x: number; y: number }) {\n const linearProgress = axis === 'x' ? p.x : p.y;\n this._currentProgress = linearProgress;\n animationGroup.progress(linearProgress);\n },\n disabled: disabled ?? false,\n destroy() {\n animationGroup.cancel();\n },\n };\n\n return scene;\n }\n\n typeSpecificOptions = {\n centeredToTarget,\n allowActiveEvent,\n };\n\n if (animationOptions.customEffect && transitionDuration) {\n typeSpecificOptions.transitionDuration = transitionDuration;\n // TODO: refactor js easings\n typeSpecificOptions.transitionEasing = getJsEasing(transitionEasing);\n }\n typeSpecificOptions.target = (animation as MouseAnimationInstance).target;\n }\n\n return {\n ...typeSpecificOptions,\n getProgress() {\n return (animation as AnimationGroup | CustomMouseAnimationInstance).getProgress();\n },\n effect(\n __: any,\n p: number | { x: number; y: number },\n v?: { x: number; y: number },\n active?: boolean,\n ) {\n animation.progress(\n v\n ? {\n // @ts-expect-error spread error on p\n ...p,\n v,\n active,\n }\n : p,\n );\n },\n disabled,\n destroy() {\n animation.cancel();\n },\n } as ScrubPointerScene;\n}\n\nfunction getAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n reducedMotion: boolean = false,\n): AnimationGroup | MouseAnimationInstance | null {\n const animation = getElementCSSAnimation(target, animationOptions);\n\n if (animation) {\n animation.ready = new Promise((resolve) => {\n prepareAnimation(target, animationOptions, resolve);\n });\n\n return animation;\n }\n\n return getWebAnimation(target, animationOptions, trigger, { reducedMotion });\n}\n\nexport {\n getCSSAnimation,\n getWebAnimation,\n getElementCSSAnimation,\n getElementAnimation,\n getScrubScene,\n prepareAnimation,\n getAnimation,\n getEasing,\n};\n\nexport type { AnimationGroup };\n"],"names":["AnimationGroup","animations","options","callback","animation","p","delay","duration","iterations","time","rate","a","target","endEvent","_error","linear","sineIn","sineOut","sineInOut","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","expoIn","expoOut","expoInOut","circIn","circOut","circInOut","backIn","backOut","backInOut","k","jsEasings","cssEasings","getCssUnits","type","getEasing","easing","getJsEasing","CustomAnimation","customEffect","effectOptions","timingOptions","effect","timeline","progress","_","error","speed","uid","tl","cb","playbackRate","listener","event","win","debug","raf","FastDom","self","tasks","task","fn","ctx","scheduleFlush","remove","props","child","mixin","fastdom","flush","writes","reads","e","array","item","index","source","key","exports","module","this","registry","registerEffects","effects","getRegisteredEffect","name","getElement","id","ownerDocument","getElementMotionPart","element","part","getDirection","alternate","getLength","length","getRange","range","add","isEnd","getRanges","measure","mutate","getNamedEffect","effectName","animation_","keyframes","effectId","getEffectsData","trigger","isNotAScrubTrigger","getWebAnimationEffect","preset","domApi","getWebAnimation","animationOptions","mouseAnimationPreset","mouseAnimationFactory","namedEffect","animationsData","data","isViewProgress","effectTarget","keyframeEffect","start","end","startOffset","endOffset","startOffsetToWrite","endOffsetToWrite","resolve","getAnimationTarget","getAnimationAsCSS","isRunning","fill","direction","animationName","isAutoDuration","getCSSAnimationEffect","getCSSAnimation","prepareAnimation","getElementCSSAnimation","getElementAnimation","effectNames","animationNames","anim","filteredAnimations","getScrubScene","sceneOptions","disabled","allowActiveEvent","rest","typeSpecificOptions","viewSource","ready","partialAnimation","__","activeDuration","scrubOptions","centeredToTarget","transitionDuration","transitionEasing","axis","animationGroup","linearProgress","v","active","getAnimation","reducedMotion"],"mappings":"gFAQO,MAAMA,CAAe,CAC1B,WAIA,QACA,MACA,MAEA,YAAYC,EAAyBC,EAAiC,CACpE,KAAK,WAAaD,EAClB,KAAK,QAAUC,EACf,KAAK,MAAQA,GAAS,UAAY,QAAQ,QAAA,EAC1C,KAAK,MAAQD,EAAW,CAAC,YAAa,YACxC,CAEA,aAAc,CACZ,OAAO,KAAK,WAAW,CAAC,GAAG,QAAQ,kBAAA,EAAoB,UAAY,CACrE,CAEA,MAAM,KAAKE,EAAsC,CAC/C,MAAM,KAAK,MAEX,UAAWC,KAAa,KAAK,WAC3BA,EAAU,KAAA,EAKZ,MAAM,QAAQ,IAAI,KAAK,WAAW,IAAKA,GAAcA,EAAU,KAAK,CAAC,EAEjED,GACFA,EAAA,CAEJ,CAEA,OAAQ,CACN,UAAWC,KAAa,KAAK,WAC3BA,EAAU,MAAA,CAEd,CAEA,MAAM,QAAQD,EAAsC,CAClD,MAAM,KAAK,MAEX,UAAWC,KAAa,KAAK,WAC3BA,EAAU,QAAA,EAKZ,MAAM,QAAQ,IAAI,KAAK,WAAW,IAAKA,GAAcA,EAAU,KAAK,CAAC,EAEjED,GACFA,EAAA,CAEJ,CAEA,SAASE,EAAW,CAClB,UAAWD,KAAa,KAAK,WAAY,CACvC,KAAM,CAAE,MAAAE,EAAO,SAAAC,EAAU,WAAAC,GAAeJ,EAAU,OAAQ,UAAA,EACpDK,GACH,OAAO,SAASF,CAAQ,EAAKA,EAAsB,IACnD,OAAO,SAASC,CAAU,EAAKA,EAAwB,GAC1DJ,EAAU,cAAgBE,GAAS,GAAKG,GAAQJ,CAClD,CACF,CAEA,QAAS,CACP,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,EAAe,CAC7E","x_google_ignoreList":[4]}
1
+ {"version":3,"file":"motion.js","sources":["../../src/AnimationGroup.ts","../../src/easings.ts","../../src/utils.ts","../../src/CustomAnimation.ts","../../../../node_modules/fastdom/fastdom.js","../../src/api/registry.ts","../../src/api/common.ts","../../src/api/webAnimations.ts","../../src/api/cssAnimations.ts","../../src/api/prepare.ts","../../src/motion.ts"],"sourcesContent":["import { AnimationGroupOptions, RangeOffset } from './types';\n\n/**\n * @class AnimationGroup\n *\n * A wrapper object for simulating a GroupEffect and managing multiple animations.\n * See: https://www.w3.org/TR/web-animations-2/#grouping-and-synchronization\n */\nexport class AnimationGroup {\n animations: (Animation & {\n start?: RangeOffset;\n end?: RangeOffset;\n })[];\n options?: AnimationGroupOptions;\n ready: Promise<void>;\n isCSS: boolean;\n\n constructor(animations: Animation[], options?: AnimationGroupOptions) {\n this.animations = animations;\n this.options = options;\n this.ready = options?.measured || Promise.resolve();\n this.isCSS = animations[0] instanceof CSSAnimation;\n }\n\n getProgress() {\n return this.animations[0]?.effect?.getComputedTiming().progress || 0;\n }\n\n async play(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.play();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n pause() {\n for (const animation of this.animations) {\n animation.pause();\n }\n }\n\n async reverse(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.reverse();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n progress(p: number) {\n for (const animation of this.animations) {\n const { delay, duration, iterations } = animation.effect!.getTiming();\n const time =\n (Number.isFinite(duration) ? (duration as number) : 0) *\n (Number.isFinite(iterations) ? (iterations as number) : 1);\n animation.currentTime = ((delay || 0) + time) * p;\n }\n }\n\n cancel() {\n for (const animation of this.animations) {\n animation.cancel();\n }\n }\n\n setPlaybackRate(rate: number) {\n for (const animation of this.animations) {\n animation.playbackRate = rate;\n }\n }\n\n async onFinish(callback: () => void): Promise<void> {\n try {\n await Promise.all(this.animations.map((animation) => animation.finished));\n\n const a = this.animations[0];\n\n if (a && !this.isCSS) {\n const target = (a.effect as KeyframeEffect)?.target;\n\n if (target) {\n const endEvent = new Event('animationend');\n target.dispatchEvent(endEvent);\n }\n }\n\n callback();\n } catch (_error) {\n console.warn('animation was interrupted - aborting onFinish callback - ', _error);\n }\n }\n\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n\n get playState() {\n return this.animations[0]?.playState;\n }\n}\n","/**\n * @file Easing functions as defined by Robert Penner.\n * @example A playground I made https://codepen.io/tombigel/pen/eYLLVRg\n */\n\n/**\n * Linear easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const linear = (t: number) => t;\n\n/**\n * Sine-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineIn = (t: number) => 1 - Math.cos((t * Math.PI) / 2);\n\n/**\n * Sine-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineOut = (t: number) => Math.sin((t * Math.PI) / 2);\n\n/**\n * Sine-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineInOut = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\n\n/**\n * Quadratic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadIn = (t: number) => t ** 2;\n\n/**\n * Quadratic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadOut = (t: number) => 1 - (1 - t) ** 2;\n\n/**\n * Quadratic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadInOut = (t: number) => (t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2);\n\n/**\n * Cubic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicIn = (t: number) => t ** 3;\n\n/**\n * Cubic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicOut = (t: number) => 1 - (1 - t) ** 3;\n\n/**\n * Cubic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicInOut = (t: number) => (t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2);\n\n/**\n * Quartic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartIn = (t: number) => t ** 4;\n\n/**\n * Quartic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartOut = (t: number) => 1 - (1 - t) ** 4;\n\n/**\n * Quartic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartInOut = (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2);\n\n/**\n * Quintic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintIn = (t: number) => t ** 5;\n\n/**\n * Quintic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintOut = (t: number) => 1 - (1 - t) ** 5;\n\n/**\n * Quintic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintInOut = (t: number) => (t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2);\n\n/**\n * Exponential-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoIn = (t: number) => (t === 0 ? 0 : 2 ** (10 * t - 10));\n\n/**\n * Exponential-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoOut = (t: number) => (t === 1 ? 1 : 1 - 2 ** (-10 * t));\n\n/**\n * Exponential-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoInOut = (t: number) =>\n t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2;\n\n/**\n * Circular-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circIn = (t: number) => 1 - Math.sqrt(1 - t ** 2);\n\n/**\n * Circular-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circOut = (t: number) => Math.sqrt(1 - (t - 1) ** 2);\n\n/**\n * Circular-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circInOut = (t: number) =>\n t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2;\n\n/**\n * Back-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backIn = (t: number) => 2.70158 * t ** 3 - 1.70158 * t ** 2;\n\n/**\n * Back-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backOut = (t: number) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2;\n\n/**\n * Back-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @param k - The back factor (optional, default is 1.70158 * 1.525).\n * @returns The eased value.\n */\nexport const backInOut = (t: number, k = 1.70158 * 1.525) =>\n t < 0.5\n ? ((2 * t) ** 2 * ((k + 1) * 2 * t - k)) / 2\n : ((2 * t - 2) ** 2 * ((k + 1) * (t * 2 - 2) + k) + 2) / 2;\n\nexport const jsEasings = {\n linear,\n sineIn,\n sineOut,\n sineInOut,\n quadIn,\n quadOut,\n quadInOut,\n cubicIn,\n cubicOut,\n cubicInOut,\n quartIn,\n quartOut,\n quartInOut,\n quintIn,\n quintOut,\n quintInOut,\n expoIn,\n expoOut,\n expoInOut,\n circIn,\n circOut,\n circInOut,\n backIn,\n backOut,\n backInOut,\n};\n\n/**\n * CSS cubic-bezier easings based on PostCSS Easings\n */\nexport const cssEasings = {\n linear: 'linear',\n ease: 'ease',\n easeIn: 'ease-in',\n easeOut: 'ease-out',\n easeInOut: 'ease-in-out',\n sineIn: 'cubic-bezier(0.47, 0, 0.745, 0.715)',\n sineOut: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n sineInOut: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',\n quadIn: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n quadOut: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n quadInOut: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n cubicIn: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n cubicOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n cubicInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n quartIn: 'cubic-bezier(0.895, 0.03, 0.685, 0.22)',\n quartOut: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n quartInOut: 'cubic-bezier(0.77, 0, 0.175, 1)',\n quintIn: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n quintOut: 'cubic-bezier(0.23, 1, 0.32, 1)',\n quintInOut: 'cubic-bezier(0.86, 0, 0.07, 1)',\n expoIn: 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',\n expoOut: 'cubic-bezier(0.19, 1, 0.22, 1)',\n expoInOut: 'cubic-bezier(1, 0, 0, 1)',\n circIn: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)',\n circOut: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n circInOut: 'cubic-bezier(0.785, 0.135, 0.15, 0.86)',\n backIn: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)',\n backOut: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n backInOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',\n} as const;\n","import { cssEasings, jsEasings } from './easings';\nexport function getCssUnits(type: 'percentage' | string) {\n return type === 'percentage' ? '%' : type || 'px';\n}\n\nexport function getEasing(easing?: keyof typeof cssEasings | string): string {\n return easing ? cssEasings[easing as keyof typeof cssEasings] || easing : cssEasings.linear;\n}\n\nexport function getJsEasing(\n easing?: keyof typeof jsEasings | string,\n): ((t: number) => number) | undefined {\n return easing ? jsEasings[easing as keyof typeof jsEasings] : undefined;\n}\n","/**\n * @class CustomAnimation\n *\n * A wrapper object for Animation that mimics the same interface but implements CustomEffect that runs JS code instead of KeyframeEffect.\n * The class is implemented by holding an inner Animation object instead of inheritance due to some browsers not allowing extension of built-in objects.\n */\nexport class CustomAnimation {\n _animation: Animation;\n customEffect: (progress: number | null) => void;\n progress: number | null;\n _tickCbId: number | null;\n _finishHandler: (_: any) => void;\n\n constructor(\n customEffect: (element: Element | null, progress: number | null) => void,\n target: Element | null,\n effectOptions: KeyframeEffectOptions,\n timingOptions: { timeline?: AnimationTimeline | null },\n ) {\n // overriding composite so that animation is not replaced and removed\n const effect = new KeyframeEffect(target, [], {\n ...effectOptions,\n composite: 'add',\n });\n const { timeline } = timingOptions;\n this._animation = new Animation(effect, timeline);\n\n this._tickCbId = null;\n this.progress = null;\n this.customEffect = (progress: number | null) => customEffect(effect.target, progress);\n\n // stop loop if animation is removed from the DOM after finish (does not fire 'remove' event)\n this._finishHandler = (_: any) => {\n if (\n !(this.effect as KeyframeEffect).target?.getAnimations().find((a) => a === this._animation)\n ) {\n this.cancel();\n }\n };\n this.addEventListener('finish', this._finishHandler);\n this.addEventListener('remove', this._finishHandler);\n }\n\n // private tick method for customEffect loop implementation\n private _tick() {\n try {\n const progress = this.effect?.getComputedTiming().progress ?? null;\n if (progress !== this.progress) {\n this.customEffect?.(progress);\n this.progress = progress;\n }\n this._tickCbId = requestAnimationFrame(() => {\n this._tick();\n });\n } catch (error) {\n this._tickCbId = null;\n console.error(\n `failed to run customEffect! effectId: ${this.id}, error: ${\n error instanceof Error ? error.message : error\n }`,\n );\n }\n }\n\n // Animation timing properties\n get currentTime() {\n return this._animation.currentTime;\n }\n set currentTime(time: CSSNumberish | null) {\n this._animation.currentTime = time;\n }\n get startTime() {\n return this._animation.startTime;\n }\n set startTime(time: CSSNumberish | null) {\n this._animation.startTime = time;\n }\n get playbackRate() {\n return this._animation.playbackRate;\n }\n set playbackRate(speed: number) {\n this._animation.playbackRate = speed;\n }\n\n // Animation basic properties\n get id() {\n return this._animation.id;\n }\n set id(uid: string) {\n this._animation.id = uid;\n }\n get effect() {\n return this._animation.effect;\n }\n set effect(e: AnimationEffect | null) {\n this._animation.effect = e;\n }\n get timeline() {\n return this._animation.timeline;\n }\n set timeline(tl: AnimationTimeline | null) {\n this._animation.timeline = tl;\n }\n\n // Animation readonly state properties\n get finished() {\n return this._animation.finished;\n }\n get pending() {\n return this._animation.pending;\n }\n get playState() {\n return this._animation.playState;\n }\n get ready() {\n return this._animation.ready;\n }\n get replaceState() {\n return this._animation.replaceState;\n }\n\n // Animation event handlers\n get oncancel() {\n return this._animation.oncancel;\n }\n set oncancel(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.oncancel = cb;\n }\n get onfinish() {\n return this._animation.onfinish;\n }\n set onfinish(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onfinish = cb;\n }\n get onremove() {\n return this._animation.onremove;\n }\n set onremove(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onremove = cb;\n }\n\n // CustomAnimation overridden methods\n play() {\n this._animation.play();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = requestAnimationFrame(() => this._tick());\n }\n\n pause() {\n this._animation.pause();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n cancel() {\n this.removeEventListener('finish', this._finishHandler);\n this.removeEventListener('remove', this._finishHandler);\n this._animation.cancel();\n // signaling cancelation for customEffect to handle it as desired\n this.customEffect(null);\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n commitStyles() {\n console.warn(\n 'CustomEffect animations do not support commitStyles method as they have no style to commit',\n );\n }\n\n // Animation methods without override\n finish() {\n this._animation.finish();\n }\n persist() {\n this._animation.persist();\n }\n reverse() {\n this._animation.reverse();\n }\n updatePlaybackRate(playbackRate: number) {\n this._animation.updatePlaybackRate(playbackRate);\n }\n\n // Animation events API\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.addEventListener(type, listener, options);\n }\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.removeEventListener(type, listener, options);\n }\n dispatchEvent(event: Event) {\n return this._animation.dispatchEvent(event);\n }\n}\n","!(function(win) {\n\n/**\n * FastDom\n *\n * Eliminates layout thrashing\n * by batching DOM read/write\n * interactions.\n *\n * @author Wilson Page <wilsonpage@me.com>\n * @author Kornel Lesinski <kornel.lesinski@ft.com>\n */\n\n'use strict';\n\n/**\n * Mini logger\n *\n * @return {Function}\n */\nvar debug = 0 ? console.log.bind(console, '[fastdom]') : function() {};\n\n/**\n * Normalized rAF\n *\n * @type {Function}\n */\nvar raf = win.requestAnimationFrame\n || win.webkitRequestAnimationFrame\n || win.mozRequestAnimationFrame\n || win.msRequestAnimationFrame\n || function(cb) { return setTimeout(cb, 16); };\n\n/**\n * Initialize a `FastDom`.\n *\n * @constructor\n */\nfunction FastDom() {\n var self = this;\n self.reads = [];\n self.writes = [];\n self.raf = raf.bind(win); // test hook\n debug('initialized', self);\n}\n\nFastDom.prototype = {\n constructor: FastDom,\n\n /**\n * We run this inside a try catch\n * so that if any jobs error, we\n * are able to recover and continue\n * to flush the batch until it's empty.\n *\n * @param {Array} tasks\n */\n runTasks: function(tasks) {\n debug('run tasks');\n var task; while (task = tasks.shift()) task();\n },\n\n /**\n * Adds a job to the read batch and\n * schedules a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n measure: function(fn, ctx) {\n debug('measure');\n var task = !ctx ? fn : fn.bind(ctx);\n this.reads.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Adds a job to the\n * write batch and schedules\n * a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n mutate: function(fn, ctx) {\n debug('mutate');\n var task = !ctx ? fn : fn.bind(ctx);\n this.writes.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Clears a scheduled 'read' or 'write' task.\n *\n * @param {Object} task\n * @return {Boolean} success\n * @public\n */\n clear: function(task) {\n debug('clear', task);\n return remove(this.reads, task) || remove(this.writes, task);\n },\n\n /**\n * Extend this FastDom with some\n * custom functionality.\n *\n * Because fastdom must *always* be a\n * singleton, we're actually extending\n * the fastdom instance. This means tasks\n * scheduled by an extension still enter\n * fastdom's global task queue.\n *\n * The 'super' instance can be accessed\n * from `this.fastdom`.\n *\n * @example\n *\n * var myFastdom = fastdom.extend({\n * initialize: function() {\n * // runs on creation\n * },\n *\n * // override a method\n * measure: function(fn) {\n * // do extra stuff ...\n *\n * // then call the original\n * return this.fastdom.measure(fn);\n * },\n *\n * ...\n * });\n *\n * @param {Object} props properties to mixin\n * @return {FastDom}\n */\n extend: function(props) {\n debug('extend', props);\n if (typeof props != 'object') throw new Error('expected object');\n\n var child = Object.create(this);\n mixin(child, props);\n child.fastdom = this;\n\n // run optional creation hook\n if (child.initialize) child.initialize();\n\n return child;\n },\n\n // override this with a function\n // to prevent Errors in console\n // when tasks throw\n catch: null\n};\n\n/**\n * Schedules a new read/write\n * batch if one isn't pending.\n *\n * @private\n */\nfunction scheduleFlush(fastdom) {\n if (!fastdom.scheduled) {\n fastdom.scheduled = true;\n fastdom.raf(flush.bind(null, fastdom));\n debug('flush scheduled');\n }\n}\n\n/**\n * Runs queued `read` and `write` tasks.\n *\n * Errors are caught and thrown by default.\n * If a `.catch` function has been defined\n * it is called instead.\n *\n * @private\n */\nfunction flush(fastdom) {\n debug('flush');\n\n var writes = fastdom.writes;\n var reads = fastdom.reads;\n var error;\n\n try {\n debug('flushing reads', reads.length);\n fastdom.runTasks(reads);\n debug('flushing writes', writes.length);\n fastdom.runTasks(writes);\n } catch (e) { error = e; }\n\n fastdom.scheduled = false;\n\n // If the batch errored we may still have tasks queued\n if (reads.length || writes.length) scheduleFlush(fastdom);\n\n if (error) {\n debug('task errored', error.message);\n if (fastdom.catch) fastdom.catch(error);\n else throw error;\n }\n}\n\n/**\n * Remove an item from an Array.\n *\n * @param {Array} array\n * @param {*} item\n * @return {Boolean}\n */\nfunction remove(array, item) {\n var index = array.indexOf(item);\n return !!~index && !!array.splice(index, 1);\n}\n\n/**\n * Mixin own properties of source\n * object into the target.\n *\n * @param {Object} target\n * @param {Object} source\n */\nfunction mixin(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) target[key] = source[key];\n }\n}\n\n// There should never be more than\n// one instance of `FastDom` in an app\nvar exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:line\n\n// Expose to CJS & AMD\nif ((typeof define) == 'function') define(function() { return exports; });\nelse if ((typeof module) == 'object') module.exports = exports;\n\n})( typeof window !== 'undefined' ? window : typeof this != 'undefined' ? this : globalThis);\n","import type { EffectModule } from '../types';\n\nconst registry: Record<string, EffectModule> = {};\n\nexport function registerEffects(effects: Record<string, EffectModule>) {\n Object.assign(registry, effects);\n}\n\nexport function getRegisteredEffect(name: string) {\n if (name in registry) {\n return registry[name];\n } else {\n console.warn(\n `${name} not found in registry. Please make sure to import and register the preset.`,\n );\n return null;\n }\n}\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationOptions,\n MeasureCallback,\n RangeOffset,\n TimeAnimationOptions,\n TriggerVariant,\n UnitLengthPercentage,\n} from '../types';\nimport { getCssUnits, getEasing } from '../utils';\nimport fastdom from 'fastdom';\nimport { getRegisteredEffect } from './registry';\n\nfunction getElement(id: string | null, ownerDocument?: Document): HTMLElement | null {\n return id ? (ownerDocument || document).getElementById(id) : null;\n}\n\nfunction getElementMotionPart(element: Element | null, part: string) {\n if (element?.matches(`[data-motion-part~=\"${part}\"]`)) {\n return element;\n }\n return element?.querySelector(`[data-motion-part~=\"${part}\"]`);\n}\n\nfunction getDirection(effect: AnimationData): KeyframeEffectOptions['direction'] {\n const alternate = effect.alternate ? 'alternate' : '';\n return effect.reversed\n ? (`${alternate ? `${alternate}-` : ''}reverse` as 'reverse' | 'alternate-reverse')\n : alternate || 'normal';\n}\n\nfunction getLength(length: UnitLengthPercentage): string {\n return `${length.value}${getCssUnits(length.unit)}`;\n}\n\nfunction getRange(range: RangeOffset, add: string | undefined, isEnd?: boolean) {\n // according to the CSS spec if the end range is a <length> then it is calculated from the start of the named range\n // our model assumes that <length> in end range is calculated from the end of the named range\n return `${range.name || 'cover'} ${\n isEnd && range.offset!.unit !== 'percentage'\n ? `calc(100% + ${getLength(range.offset!)}${add ? ` + ${add}` : ''})`\n : add\n ? `calc(${getLength(range.offset!)} + ${add})`\n : getLength(range.offset!)\n }`;\n}\n\nfunction getRanges(effect: AnimationDataForScrub) {\n return {\n start: getRange(effect.startOffset!, effect.startOffsetAdd),\n end: getRange(effect.endOffset!, effect.endOffsetAdd, true),\n };\n}\n\nfunction measure(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.measure(() => fn(target));\n}\n\nfunction mutate(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.mutate(() => fn(target));\n}\n\nfunction getNamedEffect(animation: AnimationOptions) {\n if (animation.namedEffect) {\n const effectName = animation.namedEffect.type;\n return typeof effectName === 'string' ? getRegisteredEffect(effectName) : null;\n } else if (animation.keyframeEffect) {\n const effect = (animation_: AnimationOptions) => {\n const { name, keyframes } = animation_.keyframeEffect!;\n\n return [{ ...animation_, name, keyframes }];\n };\n const getNames = (animation_: AnimationOptions) => {\n const { effectId } = animation_;\n const { name } = animation_.keyframeEffect!;\n const uid = name || effectId;\n\n return uid ? [uid] : [];\n };\n return { web: effect, style: effect, getNames };\n } else if (animation.customEffect) {\n return (animation_: AnimationOptions) => [{ ...animation_, keyframes: [] }];\n }\n return null;\n}\n\nfunction getEffectsData(\n animations: AnimationData[],\n trigger?: Partial<TriggerVariant>,\n effectId?: string,\n) {\n // process each AnimationData object into a KeyframeEffect object\n return animations.map((effect, index) => {\n // prepare the KeyframeEffectOptions object\n const effectOptions = {\n fill: effect.fill,\n easing: getEasing(effect.easing),\n iterations: effect.iterations === 0 ? Infinity : effect.iterations || 1,\n composite: effect.composite,\n direction: getDirection(effect),\n } as KeyframeEffectOptions & { rangeStart: string; rangeEnd: string };\n\n // if this is a time-based animation then set the duration and delay as time values\n if (isNotAScrubTrigger(trigger)) {\n effectOptions.duration = effect.duration as number;\n effectOptions.delay = (effect as TimeAnimationOptions).delay || 0;\n } else {\n // if ViewTimeline is supported AND this is a view-progress trigger\n if (window.ViewTimeline && trigger?.trigger === 'view-progress') {\n // set duration to 'auto'\n effectOptions.duration = 'auto';\n } else {\n // if ViewTimeline not supported then put a 100ms value in duration get a progress we can easily relate to\n // we split the duration to 99.99ms and delay of 0.01ms to get the fill-mode effect working\n effectOptions.duration = 99.99;\n effectOptions.delay = 0.01;\n }\n }\n\n return {\n effect,\n options: effectOptions,\n id: effectId && `${effectId}-${index + 1}`,\n part: effect.part,\n };\n });\n}\n\nfunction isNotAScrubTrigger(trigger?: Partial<TriggerVariant>) {\n return !trigger || (trigger.trigger !== 'pointer-move' && trigger.trigger !== 'view-progress');\n}\n\nexport {\n isNotAScrubTrigger,\n getElement,\n getElementMotionPart,\n getNamedEffect,\n getEffectsData,\n measure,\n mutate,\n getDirection,\n getLength,\n getRanges,\n};\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n MouseAnimationFactory,\n MouseAnimationInstance,\n ScrubAnimationOptions,\n TriggerVariant,\n WebAnimationEffectFactory,\n} from '../types';\nimport { CustomAnimation } from '../CustomAnimation';\nimport { AnimationGroup } from '../AnimationGroup';\nimport {\n getElement,\n getElementMotionPart,\n measure,\n mutate,\n getRanges,\n getNamedEffect,\n getEffectsData,\n isNotAScrubTrigger,\n} from './common';\nimport fastdom from 'fastdom';\n\nfunction getWebAnimationEffect(\n preset: AnimationEffectAPI<any> | WebAnimationEffectFactory<any> | null,\n animation: AnimationOptions,\n target: HTMLElement | string | null,\n trigger?: Partial<TriggerVariant>,\n options?: Record<string, any>,\n): AnimationData[] | MouseAnimationFactory {\n if (preset) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n\n if (options?.reducedMotion) {\n if (animation.iterations === 1 || animation.iterations == undefined) {\n animation = { ...animation, duration: 1 };\n } else {\n return [];\n }\n }\n }\n\n let domApi;\n if (target instanceof HTMLElement) {\n domApi = { measure: measure(target), mutate: mutate(target) };\n }\n\n return (preset as AnimationEffectAPI<any>).web\n ? (preset as AnimationEffectAPI<any>).web(animation, domApi, options)\n : (preset as WebAnimationEffectFactory<any>)(animation, domApi, options);\n }\n\n return [];\n}\n\nfunction getWebAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n options?: Record<string, any>,\n ownerDocument?: Document,\n): AnimationGroup | MouseAnimationInstance | null {\n const element = target instanceof HTMLElement ? target : getElement(target, ownerDocument);\n\n if (trigger?.trigger === 'pointer-move' && !animationOptions.keyframeEffect) {\n let effectOptions = animationOptions;\n\n if (animationOptions.customEffect) {\n effectOptions = {\n ...animationOptions,\n namedEffect: { id: '', type: 'CustomMouse' },\n };\n }\n\n // TODO: need to fix the type here, currently lying about the returned type to be WebAnimationEffectFactory instead of MouseAnimationFactoryCreate\n const mouseAnimationPreset = getNamedEffect(\n effectOptions,\n ) as WebAnimationEffectFactory<'scrub'>;\n const mouseAnimationFactory = getWebAnimationEffect(\n mouseAnimationPreset,\n animationOptions,\n element,\n trigger,\n options,\n ) as MouseAnimationFactory;\n\n if (typeof mouseAnimationFactory !== 'function') {\n return null;\n }\n\n return mouseAnimationFactory(element as HTMLElement);\n }\n\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getWebAnimationEffect(\n namedEffect,\n animationOptions,\n element,\n trigger,\n options,\n ) as AnimationData[];\n\n // Return null if animation data cannot be generated\n if (!animationsData || animationsData.length === 0) {\n return null;\n }\n\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n\n let timeline: typeof window.ViewTimeline | undefined;\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress && window.ViewTimeline) {\n // generate the timeline object\n // @ts-expect-error\n timeline = new ViewTimeline({\n subject: trigger.element || getElement(trigger.componentId!),\n });\n }\n\n // generate an Animation object for each data object\n const animations = data.map(({ effect, options: effectOptions, id, part }) => {\n const effectTarget = part ? getElementMotionPart(element, part) : element;\n\n const keyframeEffect = new KeyframeEffect(effectTarget || null, [], effectOptions);\n\n // set the keyframes for the KeyframeEffect after measurements and mutations\n fastdom.mutate(() => {\n if ('timing' in effect) {\n keyframeEffect.updateTiming(effect.timing as OptionalEffectTiming);\n }\n\n keyframeEffect.setKeyframes(effect.keyframes);\n });\n\n const timingOptions =\n isViewProgress && timeline ? { timeline: timeline as AnimationTimeline } : {};\n const animation: Animation | CustomAnimation =\n typeof effect.customEffect === 'function'\n ? (new CustomAnimation(\n effect.customEffect,\n effectTarget || null,\n effectOptions,\n timingOptions,\n ) as Animation)\n : new Animation(keyframeEffect, timingOptions.timeline);\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress) {\n if (timeline) {\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const { start, end } = getRanges(effect as AnimationDataForScrub);\n // @ts-expect-error\n animation.rangeStart = start;\n // @ts-expect-error\n animation.rangeEnd = end;\n\n animation.play();\n });\n } else {\n const { startOffset, endOffset } = animationOptions as ScrubAnimationOptions;\n\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const startOffsetToWrite = (effect as AnimationDataForScrub).startOffset || startOffset;\n const endOffsetToWrite = (effect as AnimationDataForScrub).endOffset || endOffset;\n\n Object.assign(animation, {\n start: {\n name: startOffsetToWrite!.name,\n offset: startOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.startOffsetAdd,\n },\n end: {\n name: endOffsetToWrite!.name,\n offset: endOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.endOffsetAdd,\n },\n });\n });\n }\n }\n\n if (id) {\n animation.id = id;\n }\n\n return animation;\n });\n\n // create an AnimationGroup with the generate animations\n return new AnimationGroup(animations, {\n ...animationOptions,\n trigger: { ...(trigger || ({} as Partial<TriggerVariant>)) },\n // make sure the group is ready after all animation targets are measured and mutated\n measured: new Promise((resolve) => fastdom.mutate(resolve)),\n });\n}\n\nexport { getWebAnimation };\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n TriggerVariant,\n} from '../types';\nimport { getEffectsData, getRanges, getNamedEffect, isNotAScrubTrigger } from './common';\n\nfunction getAnimationTarget(target: string | null, part: string | undefined) {\n return target ? `#${target}${part ? `[data-motion-part~=\"${part}\"]` : ''}` : '';\n}\n\nfunction getAnimationAsCSS(\n data: {\n effect: AnimationData;\n options: KeyframeEffectOptions;\n id: string | undefined;\n part: string | undefined;\n },\n isRunning?: boolean,\n) {\n const { duration, delay, iterations = 1, fill, easing = 'linear', direction } = data.options;\n const animationName = data.effect.name;\n const isAutoDuration = duration === 'auto';\n\n return `${animationName} ${isAutoDuration ? 'auto' : `${duration}ms`}${\n isAutoDuration ? ' ' : ` ${delay || 1}ms `\n }${easing}${fill && fill !== 'none' ? ` ${fill}` : ''} ${\n !iterations || iterations === Infinity ? 'infinite' : iterations\n }${direction === 'normal' ? '' : ` ${direction}`} ${isRunning ? '' : 'paused'}`;\n}\n\nfunction getCSSAnimationEffect(\n preset: AnimationEffectAPI<any> | null,\n animation: AnimationOptions,\n trigger?: Partial<TriggerVariant>,\n): AnimationData[] {\n if (preset?.style) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n }\n\n return preset.style(animation);\n }\n\n return [];\n}\n\nfunction getCSSAnimation(\n target: string | null,\n animationOptions: AnimationOptions,\n trigger?: TriggerVariant,\n) {\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getCSSAnimationEffect(namedEffect, animationOptions);\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n return data.map((item, index) => {\n const { start, end }: { start?: string; end?: string } = isViewProgress\n ? getRanges(item.effect as AnimationDataForScrub)\n : {};\n\n return {\n target: getAnimationTarget(target, item.part),\n animation: getAnimationAsCSS(item, isViewProgress),\n composition: item.options.composite,\n custom: item.effect.custom,\n name: item.effect.name,\n keyframes: item.effect.keyframes,\n id: item.id && `${item.id}-${index + 1}`,\n animationTimeline: isViewProgress ? `--${trigger?.id}` : '',\n animationRange: start || end ? `${start} ${end}` : '',\n };\n });\n}\n\nexport { getCSSAnimation, getCSSAnimationEffect, getAnimationAsCSS };\n","import type { AnimationEffectAPI, AnimationOptions, TimeAnimationOptions } from '../types';\nimport { getElement, getNamedEffect, measure, mutate } from './common';\nimport fastdom from 'fastdom';\n\nfunction prepareAnimation(\n target: HTMLElement | string | null,\n animation: AnimationOptions,\n callback?: () => void,\n) {\n const preset = getNamedEffect(animation);\n const element = target instanceof HTMLElement ? target : getElement(target);\n\n if (preset && (preset as AnimationEffectAPI<'time'>).prepare && element) {\n const domApi = { measure: measure(element), mutate: mutate(element) };\n\n (preset as AnimationEffectAPI<'time'>).prepare!(animation as TimeAnimationOptions, domApi);\n }\n\n if (callback) {\n fastdom.mutate(callback);\n }\n}\n\nexport { prepareAnimation };\n","import type {\n AnimationOptions,\n ScrubAnimationOptions,\n TriggerVariant,\n MouseAnimationInstance,\n AnimationEffectAPI,\n CustomMouseAnimationInstance,\n ScrubScrollScene,\n ScrubPointerScene,\n PointerMoveAxis,\n} from './types';\nimport { AnimationGroup } from './AnimationGroup';\nimport { getEasing, getJsEasing } from './utils';\nimport { getWebAnimation } from './api/webAnimations';\nimport { getCSSAnimation } from './api/cssAnimations';\nimport { prepareAnimation } from './api/prepare';\nimport { getElement, getNamedEffect } from './api/common';\n\nfunction getElementCSSAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n): AnimationGroup | null {\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n if (!namedEffect) {\n return null;\n }\n\n if (!namedEffect.style) {\n // if this named effect does not have a style method, attempt to get group of Web Animations\n if (animationOptions.effectId && target) {\n return getElementAnimation(target, animationOptions.effectId);\n }\n\n return null;\n }\n\n const effectNames = namedEffect.getNames(animationOptions);\n const element = typeof target === 'string' ? getElement(target) : target;\n const animations = element?.getAnimations();\n const animationNames =\n animations?.map((anim) => (anim as CSSAnimation).animationName) || ([] as string[]);\n const filteredAnimations: CSSAnimation[] = [];\n\n effectNames.forEach((name) => {\n if (animationNames.includes(name)) {\n filteredAnimations.push(\n animations?.find((anim) => (anim as CSSAnimation).animationName === name) as CSSAnimation,\n );\n }\n });\n\n return filteredAnimations?.length ? new AnimationGroup(filteredAnimations) : null;\n}\n\nfunction getElementAnimation(\n target: HTMLElement | string,\n effectId: string,\n): AnimationGroup | null {\n const element = typeof target === 'string' ? getElement(target) : target;\n // somehow get the right animations\n const animations = element?.getAnimations().filter((anim: Animation | CSSAnimation) => {\n const id = anim.id || (anim as CSSAnimation).animationName;\n // if no id/name just return all animations\n return id ? id.startsWith(effectId) : true;\n });\n\n return animations?.length ? new AnimationGroup(animations) : null;\n}\n\nfunction getScrubScene(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger: Partial<TriggerVariant> & { element?: HTMLElement },\n sceneOptions: Record<string, any> = {},\n): ScrubScrollScene[] | ScrubPointerScene | ScrubPointerScene[] | null {\n const { disabled, allowActiveEvent, ...rest } = sceneOptions;\n const animation = getWebAnimation(target, animationOptions, trigger, rest);\n\n // Return null if animation could not be created\n if (!animation) {\n return null;\n }\n\n let typeSpecificOptions = {} as Record<string, any>;\n\n if (trigger.trigger === 'view-progress' && !window.ViewTimeline) {\n // TODO(ameerf): consider doing this only for bgscrub to not affect the other scroll effects\n const viewSource = trigger.element || getElement(trigger.componentId!);\n const { ready } = animation as AnimationGroup;\n\n return (animation as AnimationGroup).animations.map((partialAnimation) => {\n return {\n /* we use getters for start and end in order to access the animation's start and end\n only when initializing the scrub scene rather than immediately */\n get start() {\n return partialAnimation.start;\n },\n get end() {\n return partialAnimation.end;\n },\n viewSource,\n ready,\n getProgress() {\n return (animation as AnimationGroup).getProgress();\n },\n effect(__: any, p: number) {\n const { activeDuration } = partialAnimation.effect!.getComputedTiming();\n const { delay } = partialAnimation.effect!.getTiming();\n\n partialAnimation.currentTime = ((delay || 0) + ((activeDuration as number) || 0)) * p;\n },\n disabled,\n destroy() {\n partialAnimation.cancel();\n },\n } as ScrubScrollScene;\n });\n } else if (trigger.trigger === 'pointer-move') {\n const scrubOptions = animationOptions as ScrubAnimationOptions;\n const { centeredToTarget, transitionDuration, transitionEasing } = scrubOptions;\n const axis = (trigger as { axis?: PointerMoveAxis }).axis;\n\n if (scrubOptions.keyframeEffect) {\n const animationGroup = animation as AnimationGroup;\n\n if (animationGroup.animations?.length === 0) {\n return null;\n }\n\n const scene: ScrubPointerScene & { _currentProgress: number } = {\n target: undefined,\n centeredToTarget,\n ready: animationGroup.ready,\n _currentProgress: 0,\n getProgress() {\n return this._currentProgress;\n },\n effect(__: any, p: { x: number; y: number }) {\n const linearProgress = axis === 'x' ? p.x : p.y;\n this._currentProgress = linearProgress;\n animationGroup.progress(linearProgress);\n },\n disabled: disabled ?? false,\n destroy() {\n animationGroup.cancel();\n },\n };\n\n return scene;\n }\n\n typeSpecificOptions = {\n centeredToTarget,\n allowActiveEvent,\n };\n\n if (animationOptions.customEffect && transitionDuration) {\n typeSpecificOptions.transitionDuration = transitionDuration;\n // TODO: refactor js easings\n typeSpecificOptions.transitionEasing = getJsEasing(transitionEasing);\n }\n typeSpecificOptions.target = (animation as MouseAnimationInstance).target;\n }\n\n return {\n ...typeSpecificOptions,\n getProgress() {\n return (animation as AnimationGroup | CustomMouseAnimationInstance).getProgress();\n },\n effect(\n __: any,\n p: number | { x: number; y: number },\n v?: { x: number; y: number },\n active?: boolean,\n ) {\n animation.progress(\n v\n ? {\n // @ts-expect-error spread error on p\n ...p,\n v,\n active,\n }\n : p,\n );\n },\n disabled,\n destroy() {\n animation.cancel();\n },\n } as ScrubPointerScene;\n}\n\nfunction getAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n reducedMotion: boolean = false,\n): AnimationGroup | MouseAnimationInstance | null {\n const animation = getElementCSSAnimation(target, animationOptions);\n\n if (animation) {\n animation.ready = new Promise((resolve) => {\n prepareAnimation(target, animationOptions, resolve);\n });\n\n return animation;\n }\n\n return getWebAnimation(target, animationOptions, trigger, { reducedMotion });\n}\n\nexport {\n getCSSAnimation,\n getWebAnimation,\n getElementCSSAnimation,\n getElementAnimation,\n getScrubScene,\n prepareAnimation,\n getAnimation,\n getEasing,\n};\n\nexport type { AnimationGroup };\n"],"names":["AnimationGroup","animations","options","callback","animation","p","delay","duration","iterations","time","rate","a","target","endEvent","_error","linear","sineIn","sineOut","sineInOut","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","expoIn","expoOut","expoInOut","circIn","circOut","circInOut","backIn","backOut","backInOut","k","jsEasings","cssEasings","getCssUnits","type","getEasing","easing","getJsEasing","CustomAnimation","customEffect","effectOptions","timingOptions","effect","timeline","progress","_","error","speed","uid","tl","cb","playbackRate","listener","event","win","debug","raf","FastDom","self","tasks","task","fn","ctx","scheduleFlush","remove","props","child","mixin","fastdom","flush","writes","reads","e","array","item","index","source","key","exports","module","this","registry","registerEffects","effects","getRegisteredEffect","name","getElement","id","ownerDocument","getElementMotionPart","element","part","getDirection","alternate","getLength","length","getRange","range","add","isEnd","getRanges","measure","mutate","getNamedEffect","effectName","animation_","keyframes","effectId","getEffectsData","trigger","isNotAScrubTrigger","getWebAnimationEffect","preset","domApi","getWebAnimation","animationOptions","mouseAnimationPreset","mouseAnimationFactory","namedEffect","animationsData","data","isViewProgress","effectTarget","keyframeEffect","start","end","startOffset","endOffset","startOffsetToWrite","endOffsetToWrite","resolve","getAnimationTarget","getAnimationAsCSS","isRunning","fill","direction","animationName","isAutoDuration","getCSSAnimationEffect","getCSSAnimation","prepareAnimation","getElementCSSAnimation","getElementAnimation","effectNames","animationNames","anim","filteredAnimations","getScrubScene","sceneOptions","disabled","allowActiveEvent","rest","typeSpecificOptions","viewSource","ready","partialAnimation","__","activeDuration","scrubOptions","centeredToTarget","transitionDuration","transitionEasing","axis","animationGroup","linearProgress","v","active","getAnimation","reducedMotion"],"mappings":"gFAQO,MAAMA,CAAe,CAC1B,WAIA,QACA,MACA,MAEA,YAAYC,EAAyBC,EAAiC,CACpE,KAAK,WAAaD,EAClB,KAAK,QAAUC,EACf,KAAK,MAAQA,GAAS,UAAY,QAAQ,QAAA,EAC1C,KAAK,MAAQD,EAAW,CAAC,YAAa,YACxC,CAEA,aAAc,CACZ,OAAO,KAAK,WAAW,CAAC,GAAG,QAAQ,kBAAA,EAAoB,UAAY,CACrE,CAEA,MAAM,KAAKE,EAAsC,CAC/C,MAAM,KAAK,MAEX,UAAWC,KAAa,KAAK,WAC3BA,EAAU,KAAA,EAKZ,MAAM,QAAQ,IAAI,KAAK,WAAW,IAAKA,GAAcA,EAAU,KAAK,CAAC,EAEjED,GACFA,EAAA,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AqC,MACrE,CAEA,MAAO,CACL,GAAG8J,EACH,aAAc,CACZ,OAAQ9J,EAA4D,YAAA,CACtE,EACA,OACEkK,EACAjK,EACA0K,EACAC,EACA,CACA5K,EAAU,SACR2K,EACI,CAEE,GAAG1K,EACH,EAAA0K,EACA,OAAAC,CAAA,EAEF3K,CAAA,CAER,EACA,SAAA0J,EACA,SAAU,CACR3J,EAAU,OAAA,CACZ,CAAA,CAEJ,CAEA,SAAS6K,GACPrK,EACAiH,EACAN,EACA2D,EAAyB,GACuB,CAChD,MAAM9K,EAAYmJ,GAAuB3I,EAAQiH,CAAgB,EAEjE,OAAIzH,GACFA,EAAU,MAAQ,IAAI,QAASwI,GAAY,CACzCU,GAAiB1I,EAAQiH,EAAkBe,CAAO,CACpD,CAAC,EAEMxI,GAGFwH,EAAgBhH,EAAQiH,EAAkBN,EAAS,CAAE,cAAA2D,EAAe,CAC7E","x_google_ignoreList":[4]}
package/dist/es/motion.js CHANGED
@@ -125,10 +125,10 @@ function he(e) {
125
125
  function ge(e) {
126
126
  return e ? z[e] || e : z.linear;
127
127
  }
128
- function pe(e) {
128
+ function be(e) {
129
129
  return e ? de[e] : void 0;
130
130
  }
131
- class be {
131
+ class pe {
132
132
  _animation;
133
133
  customEffect;
134
134
  progress;
@@ -423,10 +423,10 @@ function we(e) {
423
423
  return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
424
424
  }
425
425
  function O(e) {
426
- return `${e.value}${he(e.type)}`;
426
+ return `${e.value}${he(e.unit)}`;
427
427
  }
428
428
  function F(e, t, n) {
429
- return `${e.name || "cover"} ${n && e.offset.type !== "percentage" ? `calc(100% + ${O(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${O(e.offset)} + ${t})` : O(e.offset)}`;
429
+ return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${O(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${O(e.offset)} + ${t})` : O(e.offset)}`;
430
430
  }
431
431
  function R(e) {
432
432
  return {
@@ -524,27 +524,27 @@ function j(e, t, n, i, a) {
524
524
  subject: n.element || y(n.componentId)
525
525
  }));
526
526
  const o = m.map(({ effect: c, options: d, id: h, part: v }) => {
527
- const w = v ? Ie(r, v) : r, p = new KeyframeEffect(w || null, [], d);
527
+ const w = v ? Ie(r, v) : r, b = new KeyframeEffect(w || null, [], d);
528
528
  g.mutate(() => {
529
- "timing" in c && p.updateTiming(c.timing), p.setKeyframes(c.keyframes);
529
+ "timing" in c && b.updateTiming(c.timing), b.setKeyframes(c.keyframes);
530
530
  });
531
- const _ = s && l ? { timeline: l } : {}, b = typeof c.customEffect == "function" ? new be(
531
+ const _ = s && l ? { timeline: l } : {}, p = typeof c.customEffect == "function" ? new pe(
532
532
  c.customEffect,
533
533
  w || null,
534
534
  d,
535
535
  _
536
- ) : new Animation(p, _.timeline);
536
+ ) : new Animation(b, _.timeline);
537
537
  if (s)
538
538
  if (l)
539
539
  g.mutate(() => {
540
540
  const { start: $, end: k } = R(c);
541
- b.rangeStart = $, b.rangeEnd = k, b.play();
541
+ p.rangeStart = $, p.rangeEnd = k, p.play();
542
542
  });
543
543
  else {
544
544
  const { startOffset: $, endOffset: k } = t;
545
545
  g.mutate(() => {
546
546
  const S = c.startOffset || $, P = c.endOffset || k;
547
- Object.assign(b, {
547
+ Object.assign(p, {
548
548
  start: {
549
549
  name: S.name,
550
550
  offset: S.offset?.value,
@@ -558,7 +558,7 @@ function j(e, t, n, i, a) {
558
558
  });
559
559
  });
560
560
  }
561
- return h && (b.id = h), b;
561
+ return h && (p.id = h), p;
562
562
  });
563
563
  return new A(o, {
564
564
  ...t,
@@ -664,8 +664,8 @@ function ze(e, t, n, i = {}) {
664
664
  getProgress() {
665
665
  return this._currentProgress;
666
666
  },
667
- effect(w, p) {
668
- const _ = d === "x" ? p.x : p.y;
667
+ effect(w, b) {
668
+ const _ = d === "x" ? b.x : b.y;
669
669
  this._currentProgress = _, h.progress(_);
670
670
  },
671
671
  disabled: a ?? !1,
@@ -677,7 +677,7 @@ function ze(e, t, n, i = {}) {
677
677
  m = {
678
678
  centeredToTarget: s,
679
679
  allowActiveEvent: r
680
- }, t.customEffect && o && (m.transitionDuration = o, m.transitionEasing = pe(c)), m.target = u.target;
680
+ }, t.customEffect && o && (m.transitionDuration = o, m.transitionEasing = be(c)), m.target = u.target;
681
681
  }
682
682
  return {
683
683
  ...m,
@@ -726,7 +726,7 @@ export {
726
726
  ge as getEasing,
727
727
  qe as getElementAnimation,
728
728
  Ae as getElementCSSAnimation,
729
- pe as getJsEasing,
729
+ be as getJsEasing,
730
730
  ze as getScrubScene,
731
731
  j as getWebAnimation,
732
732
  de as jsEasings,
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","sources":["../../src/AnimationGroup.ts","../../src/easings.ts","../../src/utils.ts","../../src/CustomAnimation.ts","../../../../node_modules/fastdom/fastdom.js","../../src/api/registry.ts","../../src/api/common.ts","../../src/api/webAnimations.ts","../../src/api/cssAnimations.ts","../../src/api/prepare.ts","../../src/motion.ts"],"sourcesContent":["import { AnimationGroupOptions, RangeOffset } from './types';\n\n/**\n * @class AnimationGroup\n *\n * A wrapper object for simulating a GroupEffect and managing multiple animations.\n * See: https://www.w3.org/TR/web-animations-2/#grouping-and-synchronization\n */\nexport class AnimationGroup {\n animations: (Animation & {\n start?: RangeOffset;\n end?: RangeOffset;\n })[];\n options?: AnimationGroupOptions;\n ready: Promise<void>;\n isCSS: boolean;\n\n constructor(animations: Animation[], options?: AnimationGroupOptions) {\n this.animations = animations;\n this.options = options;\n this.ready = options?.measured || Promise.resolve();\n this.isCSS = animations[0] instanceof CSSAnimation;\n }\n\n getProgress() {\n return this.animations[0]?.effect?.getComputedTiming().progress || 0;\n }\n\n async play(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.play();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n pause() {\n for (const animation of this.animations) {\n animation.pause();\n }\n }\n\n async reverse(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.reverse();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n progress(p: number) {\n for (const animation of this.animations) {\n const { delay, duration, iterations } = animation.effect!.getTiming();\n const time =\n (Number.isFinite(duration) ? (duration as number) : 0) *\n (Number.isFinite(iterations) ? (iterations as number) : 1);\n animation.currentTime = ((delay || 0) + time) * p;\n }\n }\n\n cancel() {\n for (const animation of this.animations) {\n animation.cancel();\n }\n }\n\n setPlaybackRate(rate: number) {\n for (const animation of this.animations) {\n animation.playbackRate = rate;\n }\n }\n\n async onFinish(callback: () => void): Promise<void> {\n try {\n await Promise.all(this.animations.map((animation) => animation.finished));\n\n const a = this.animations[0];\n\n if (a && !this.isCSS) {\n const target = (a.effect as KeyframeEffect)?.target;\n\n if (target) {\n const endEvent = new Event('animationend');\n target.dispatchEvent(endEvent);\n }\n }\n\n callback();\n } catch (_error) {\n console.warn('animation was interrupted - aborting onFinish callback - ', _error);\n }\n }\n\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n\n get playState() {\n return this.animations[0]?.playState;\n }\n}\n","/**\n * @file Easing functions as defined by Robert Penner.\n * @example A playground I made https://codepen.io/tombigel/pen/eYLLVRg\n */\n\n/**\n * Linear easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const linear = (t: number) => t;\n\n/**\n * Sine-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineIn = (t: number) => 1 - Math.cos((t * Math.PI) / 2);\n\n/**\n * Sine-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineOut = (t: number) => Math.sin((t * Math.PI) / 2);\n\n/**\n * Sine-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineInOut = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\n\n/**\n * Quadratic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadIn = (t: number) => t ** 2;\n\n/**\n * Quadratic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadOut = (t: number) => 1 - (1 - t) ** 2;\n\n/**\n * Quadratic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadInOut = (t: number) => (t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2);\n\n/**\n * Cubic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicIn = (t: number) => t ** 3;\n\n/**\n * Cubic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicOut = (t: number) => 1 - (1 - t) ** 3;\n\n/**\n * Cubic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicInOut = (t: number) => (t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2);\n\n/**\n * Quartic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartIn = (t: number) => t ** 4;\n\n/**\n * Quartic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartOut = (t: number) => 1 - (1 - t) ** 4;\n\n/**\n * Quartic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartInOut = (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2);\n\n/**\n * Quintic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintIn = (t: number) => t ** 5;\n\n/**\n * Quintic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintOut = (t: number) => 1 - (1 - t) ** 5;\n\n/**\n * Quintic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintInOut = (t: number) => (t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2);\n\n/**\n * Exponential-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoIn = (t: number) => (t === 0 ? 0 : 2 ** (10 * t - 10));\n\n/**\n * Exponential-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoOut = (t: number) => (t === 1 ? 1 : 1 - 2 ** (-10 * t));\n\n/**\n * Exponential-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoInOut = (t: number) =>\n t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2;\n\n/**\n * Circular-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circIn = (t: number) => 1 - Math.sqrt(1 - t ** 2);\n\n/**\n * Circular-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circOut = (t: number) => Math.sqrt(1 - (t - 1) ** 2);\n\n/**\n * Circular-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circInOut = (t: number) =>\n t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2;\n\n/**\n * Back-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backIn = (t: number) => 2.70158 * t ** 3 - 1.70158 * t ** 2;\n\n/**\n * Back-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backOut = (t: number) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2;\n\n/**\n * Back-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @param k - The back factor (optional, default is 1.70158 * 1.525).\n * @returns The eased value.\n */\nexport const backInOut = (t: number, k = 1.70158 * 1.525) =>\n t < 0.5\n ? ((2 * t) ** 2 * ((k + 1) * 2 * t - k)) / 2\n : ((2 * t - 2) ** 2 * ((k + 1) * (t * 2 - 2) + k) + 2) / 2;\n\nexport const jsEasings = {\n linear,\n sineIn,\n sineOut,\n sineInOut,\n quadIn,\n quadOut,\n quadInOut,\n cubicIn,\n cubicOut,\n cubicInOut,\n quartIn,\n quartOut,\n quartInOut,\n quintIn,\n quintOut,\n quintInOut,\n expoIn,\n expoOut,\n expoInOut,\n circIn,\n circOut,\n circInOut,\n backIn,\n backOut,\n backInOut,\n};\n\n/**\n * CSS cubic-bezier easings based on PostCSS Easings\n */\nexport const cssEasings = {\n linear: 'linear',\n ease: 'ease',\n easeIn: 'ease-in',\n easeOut: 'ease-out',\n easeInOut: 'ease-in-out',\n sineIn: 'cubic-bezier(0.47, 0, 0.745, 0.715)',\n sineOut: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n sineInOut: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',\n quadIn: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n quadOut: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n quadInOut: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n cubicIn: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n cubicOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n cubicInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n quartIn: 'cubic-bezier(0.895, 0.03, 0.685, 0.22)',\n quartOut: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n quartInOut: 'cubic-bezier(0.77, 0, 0.175, 1)',\n quintIn: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n quintOut: 'cubic-bezier(0.23, 1, 0.32, 1)',\n quintInOut: 'cubic-bezier(0.86, 0, 0.07, 1)',\n expoIn: 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',\n expoOut: 'cubic-bezier(0.19, 1, 0.22, 1)',\n expoInOut: 'cubic-bezier(1, 0, 0, 1)',\n circIn: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)',\n circOut: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n circInOut: 'cubic-bezier(0.785, 0.135, 0.15, 0.86)',\n backIn: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)',\n backOut: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n backInOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',\n} as const;\n","import { cssEasings, jsEasings } from './easings';\nexport function getCssUnits(type: 'percentage' | string) {\n return type === 'percentage' ? '%' : type || 'px';\n}\n\nexport function getEasing(easing?: keyof typeof cssEasings | string): string {\n return easing ? cssEasings[easing as keyof typeof cssEasings] || easing : cssEasings.linear;\n}\n\nexport function getJsEasing(\n easing?: keyof typeof jsEasings | string,\n): ((t: number) => number) | undefined {\n return easing ? jsEasings[easing as keyof typeof jsEasings] : undefined;\n}\n","/**\n * @class CustomAnimation\n *\n * A wrapper object for Animation that mimics the same interface but implements CustomEffect that runs JS code instead of KeyframeEffect.\n * The class is implemented by holding an inner Animation object instead of inheritance due to some browsers not allowing extension of built-in objects.\n */\nexport class CustomAnimation {\n _animation: Animation;\n customEffect: (progress: number | null) => void;\n progress: number | null;\n _tickCbId: number | null;\n _finishHandler: (_: any) => void;\n\n constructor(\n customEffect: (element: Element | null, progress: number | null) => void,\n target: Element | null,\n effectOptions: KeyframeEffectOptions,\n timingOptions: { timeline?: AnimationTimeline | null },\n ) {\n // overriding composite so that animation is not replaced and removed\n const effect = new KeyframeEffect(target, [], {\n ...effectOptions,\n composite: 'add',\n });\n const { timeline } = timingOptions;\n this._animation = new Animation(effect, timeline);\n\n this._tickCbId = null;\n this.progress = null;\n this.customEffect = (progress: number | null) => customEffect(effect.target, progress);\n\n // stop loop if animation is removed from the DOM after finish (does not fire 'remove' event)\n this._finishHandler = (_: any) => {\n if (\n !(this.effect as KeyframeEffect).target?.getAnimations().find((a) => a === this._animation)\n ) {\n this.cancel();\n }\n };\n this.addEventListener('finish', this._finishHandler);\n this.addEventListener('remove', this._finishHandler);\n }\n\n // private tick method for customEffect loop implementation\n private _tick() {\n try {\n const progress = this.effect?.getComputedTiming().progress ?? null;\n if (progress !== this.progress) {\n this.customEffect?.(progress);\n this.progress = progress;\n }\n this._tickCbId = requestAnimationFrame(() => {\n this._tick();\n });\n } catch (error) {\n this._tickCbId = null;\n console.error(\n `failed to run customEffect! effectId: ${this.id}, error: ${\n error instanceof Error ? error.message : error\n }`,\n );\n }\n }\n\n // Animation timing properties\n get currentTime() {\n return this._animation.currentTime;\n }\n set currentTime(time: CSSNumberish | null) {\n this._animation.currentTime = time;\n }\n get startTime() {\n return this._animation.startTime;\n }\n set startTime(time: CSSNumberish | null) {\n this._animation.startTime = time;\n }\n get playbackRate() {\n return this._animation.playbackRate;\n }\n set playbackRate(speed: number) {\n this._animation.playbackRate = speed;\n }\n\n // Animation basic properties\n get id() {\n return this._animation.id;\n }\n set id(uid: string) {\n this._animation.id = uid;\n }\n get effect() {\n return this._animation.effect;\n }\n set effect(e: AnimationEffect | null) {\n this._animation.effect = e;\n }\n get timeline() {\n return this._animation.timeline;\n }\n set timeline(tl: AnimationTimeline | null) {\n this._animation.timeline = tl;\n }\n\n // Animation readonly state properties\n get finished() {\n return this._animation.finished;\n }\n get pending() {\n return this._animation.pending;\n }\n get playState() {\n return this._animation.playState;\n }\n get ready() {\n return this._animation.ready;\n }\n get replaceState() {\n return this._animation.replaceState;\n }\n\n // Animation event handlers\n get oncancel() {\n return this._animation.oncancel;\n }\n set oncancel(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.oncancel = cb;\n }\n get onfinish() {\n return this._animation.onfinish;\n }\n set onfinish(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onfinish = cb;\n }\n get onremove() {\n return this._animation.onremove;\n }\n set onremove(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onremove = cb;\n }\n\n // CustomAnimation overridden methods\n play() {\n this._animation.play();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = requestAnimationFrame(() => this._tick());\n }\n\n pause() {\n this._animation.pause();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n cancel() {\n this.removeEventListener('finish', this._finishHandler);\n this.removeEventListener('remove', this._finishHandler);\n this._animation.cancel();\n // signaling cancelation for customEffect to handle it as desired\n this.customEffect(null);\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n commitStyles() {\n console.warn(\n 'CustomEffect animations do not support commitStyles method as they have no style to commit',\n );\n }\n\n // Animation methods without override\n finish() {\n this._animation.finish();\n }\n persist() {\n this._animation.persist();\n }\n reverse() {\n this._animation.reverse();\n }\n updatePlaybackRate(playbackRate: number) {\n this._animation.updatePlaybackRate(playbackRate);\n }\n\n // Animation events API\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.addEventListener(type, listener, options);\n }\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.removeEventListener(type, listener, options);\n }\n dispatchEvent(event: Event) {\n return this._animation.dispatchEvent(event);\n }\n}\n","!(function(win) {\n\n/**\n * FastDom\n *\n * Eliminates layout thrashing\n * by batching DOM read/write\n * interactions.\n *\n * @author Wilson Page <wilsonpage@me.com>\n * @author Kornel Lesinski <kornel.lesinski@ft.com>\n */\n\n'use strict';\n\n/**\n * Mini logger\n *\n * @return {Function}\n */\nvar debug = 0 ? console.log.bind(console, '[fastdom]') : function() {};\n\n/**\n * Normalized rAF\n *\n * @type {Function}\n */\nvar raf = win.requestAnimationFrame\n || win.webkitRequestAnimationFrame\n || win.mozRequestAnimationFrame\n || win.msRequestAnimationFrame\n || function(cb) { return setTimeout(cb, 16); };\n\n/**\n * Initialize a `FastDom`.\n *\n * @constructor\n */\nfunction FastDom() {\n var self = this;\n self.reads = [];\n self.writes = [];\n self.raf = raf.bind(win); // test hook\n debug('initialized', self);\n}\n\nFastDom.prototype = {\n constructor: FastDom,\n\n /**\n * We run this inside a try catch\n * so that if any jobs error, we\n * are able to recover and continue\n * to flush the batch until it's empty.\n *\n * @param {Array} tasks\n */\n runTasks: function(tasks) {\n debug('run tasks');\n var task; while (task = tasks.shift()) task();\n },\n\n /**\n * Adds a job to the read batch and\n * schedules a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n measure: function(fn, ctx) {\n debug('measure');\n var task = !ctx ? fn : fn.bind(ctx);\n this.reads.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Adds a job to the\n * write batch and schedules\n * a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n mutate: function(fn, ctx) {\n debug('mutate');\n var task = !ctx ? fn : fn.bind(ctx);\n this.writes.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Clears a scheduled 'read' or 'write' task.\n *\n * @param {Object} task\n * @return {Boolean} success\n * @public\n */\n clear: function(task) {\n debug('clear', task);\n return remove(this.reads, task) || remove(this.writes, task);\n },\n\n /**\n * Extend this FastDom with some\n * custom functionality.\n *\n * Because fastdom must *always* be a\n * singleton, we're actually extending\n * the fastdom instance. This means tasks\n * scheduled by an extension still enter\n * fastdom's global task queue.\n *\n * The 'super' instance can be accessed\n * from `this.fastdom`.\n *\n * @example\n *\n * var myFastdom = fastdom.extend({\n * initialize: function() {\n * // runs on creation\n * },\n *\n * // override a method\n * measure: function(fn) {\n * // do extra stuff ...\n *\n * // then call the original\n * return this.fastdom.measure(fn);\n * },\n *\n * ...\n * });\n *\n * @param {Object} props properties to mixin\n * @return {FastDom}\n */\n extend: function(props) {\n debug('extend', props);\n if (typeof props != 'object') throw new Error('expected object');\n\n var child = Object.create(this);\n mixin(child, props);\n child.fastdom = this;\n\n // run optional creation hook\n if (child.initialize) child.initialize();\n\n return child;\n },\n\n // override this with a function\n // to prevent Errors in console\n // when tasks throw\n catch: null\n};\n\n/**\n * Schedules a new read/write\n * batch if one isn't pending.\n *\n * @private\n */\nfunction scheduleFlush(fastdom) {\n if (!fastdom.scheduled) {\n fastdom.scheduled = true;\n fastdom.raf(flush.bind(null, fastdom));\n debug('flush scheduled');\n }\n}\n\n/**\n * Runs queued `read` and `write` tasks.\n *\n * Errors are caught and thrown by default.\n * If a `.catch` function has been defined\n * it is called instead.\n *\n * @private\n */\nfunction flush(fastdom) {\n debug('flush');\n\n var writes = fastdom.writes;\n var reads = fastdom.reads;\n var error;\n\n try {\n debug('flushing reads', reads.length);\n fastdom.runTasks(reads);\n debug('flushing writes', writes.length);\n fastdom.runTasks(writes);\n } catch (e) { error = e; }\n\n fastdom.scheduled = false;\n\n // If the batch errored we may still have tasks queued\n if (reads.length || writes.length) scheduleFlush(fastdom);\n\n if (error) {\n debug('task errored', error.message);\n if (fastdom.catch) fastdom.catch(error);\n else throw error;\n }\n}\n\n/**\n * Remove an item from an Array.\n *\n * @param {Array} array\n * @param {*} item\n * @return {Boolean}\n */\nfunction remove(array, item) {\n var index = array.indexOf(item);\n return !!~index && !!array.splice(index, 1);\n}\n\n/**\n * Mixin own properties of source\n * object into the target.\n *\n * @param {Object} target\n * @param {Object} source\n */\nfunction mixin(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) target[key] = source[key];\n }\n}\n\n// There should never be more than\n// one instance of `FastDom` in an app\nvar exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:line\n\n// Expose to CJS & AMD\nif ((typeof define) == 'function') define(function() { return exports; });\nelse if ((typeof module) == 'object') module.exports = exports;\n\n})( typeof window !== 'undefined' ? window : typeof this != 'undefined' ? this : globalThis);\n","import type { EffectModule } from '../types';\n\nconst registry: Record<string, EffectModule> = {};\n\nexport function registerEffects(effects: Record<string, EffectModule>) {\n Object.assign(registry, effects);\n}\n\nexport function getRegisteredEffect(name: string) {\n if (name in registry) {\n return registry[name];\n } else {\n console.warn(\n `${name} not found in registry. Please make sure to import and register the preset.`,\n );\n return null;\n }\n}\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationOptions,\n MeasureCallback,\n RangeOffset,\n TimeAnimationOptions,\n TriggerVariant,\n UnitLengthPercentage,\n} from '../types';\nimport { getCssUnits, getEasing } from '../utils';\nimport fastdom from 'fastdom';\nimport { getRegisteredEffect } from './registry';\n\nfunction getElement(id: string | null, ownerDocument?: Document): HTMLElement | null {\n return id ? (ownerDocument || document).getElementById(id) : null;\n}\n\nfunction getElementMotionPart(element: Element | null, part: string) {\n if (element?.matches(`[data-motion-part~=\"${part}\"]`)) {\n return element;\n }\n return element?.querySelector(`[data-motion-part~=\"${part}\"]`);\n}\n\nfunction getDirection(effect: AnimationData): KeyframeEffectOptions['direction'] {\n const alternate = effect.alternate ? 'alternate' : '';\n return effect.reversed\n ? (`${alternate ? `${alternate}-` : ''}reverse` as 'reverse' | 'alternate-reverse')\n : alternate || 'normal';\n}\n\nfunction getLength(length: UnitLengthPercentage): string {\n return `${length.value}${getCssUnits(length.type)}`;\n}\n\nfunction getRange(range: RangeOffset, add: string | undefined, isEnd?: boolean) {\n // according to the CSS spec if the end range is a <length> then it is calculated from the start of the named range\n // our model assumes that <length> in end range is calculated from the end of the named range\n return `${range.name || 'cover'} ${\n isEnd && range.offset!.type !== 'percentage'\n ? `calc(100% + ${getLength(range.offset!)}${add ? ` + ${add}` : ''})`\n : add\n ? `calc(${getLength(range.offset!)} + ${add})`\n : getLength(range.offset!)\n }`;\n}\n\nfunction getRanges(effect: AnimationDataForScrub) {\n return {\n start: getRange(effect.startOffset!, effect.startOffsetAdd),\n end: getRange(effect.endOffset!, effect.endOffsetAdd, true),\n };\n}\n\nfunction measure(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.measure(() => fn(target));\n}\n\nfunction mutate(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.mutate(() => fn(target));\n}\n\nfunction getNamedEffect(animation: AnimationOptions) {\n if (animation.namedEffect) {\n const effectName = animation.namedEffect.type;\n return typeof effectName === 'string' ? getRegisteredEffect(effectName) : null;\n } else if (animation.keyframeEffect) {\n const effect = (animation_: AnimationOptions) => {\n const { name, keyframes } = animation_.keyframeEffect!;\n\n return [{ ...animation_, name, keyframes }];\n };\n const getNames = (animation_: AnimationOptions) => {\n const { effectId } = animation_;\n const { name } = animation_.keyframeEffect!;\n const uid = name || effectId;\n\n return uid ? [uid] : [];\n };\n return { web: effect, style: effect, getNames };\n } else if (animation.customEffect) {\n return (animation_: AnimationOptions) => [{ ...animation_, keyframes: [] }];\n }\n return null;\n}\n\nfunction getEffectsData(\n animations: AnimationData[],\n trigger?: Partial<TriggerVariant>,\n effectId?: string,\n) {\n // process each AnimationData object into a KeyframeEffect object\n return animations.map((effect, index) => {\n // prepare the KeyframeEffectOptions object\n const effectOptions = {\n fill: effect.fill,\n easing: getEasing(effect.easing),\n iterations: effect.iterations === 0 ? Infinity : effect.iterations || 1,\n composite: effect.composite,\n direction: getDirection(effect),\n } as KeyframeEffectOptions & { rangeStart: string; rangeEnd: string };\n\n // if this is a time-based animation then set the duration and delay as time values\n if (isNotAScrubTrigger(trigger)) {\n effectOptions.duration = effect.duration as number;\n effectOptions.delay = (effect as TimeAnimationOptions).delay || 0;\n } else {\n // if ViewTimeline is supported AND this is a view-progress trigger\n if (window.ViewTimeline && trigger?.trigger === 'view-progress') {\n // set duration to 'auto'\n effectOptions.duration = 'auto';\n } else {\n // if ViewTimeline not supported then put a 100ms value in duration get a progress we can easily relate to\n // we split the duration to 99.99ms and delay of 0.01ms to get the fill-mode effect working\n effectOptions.duration = 99.99;\n effectOptions.delay = 0.01;\n }\n }\n\n return {\n effect,\n options: effectOptions,\n id: effectId && `${effectId}-${index + 1}`,\n part: effect.part,\n };\n });\n}\n\nfunction isNotAScrubTrigger(trigger?: Partial<TriggerVariant>) {\n return !trigger || (trigger.trigger !== 'pointer-move' && trigger.trigger !== 'view-progress');\n}\n\nexport {\n isNotAScrubTrigger,\n getElement,\n getElementMotionPart,\n getNamedEffect,\n getEffectsData,\n measure,\n mutate,\n getDirection,\n getLength,\n getRanges,\n};\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n MouseAnimationFactory,\n MouseAnimationInstance,\n ScrubAnimationOptions,\n TriggerVariant,\n WebAnimationEffectFactory,\n} from '../types';\nimport { CustomAnimation } from '../CustomAnimation';\nimport { AnimationGroup } from '../AnimationGroup';\nimport {\n getElement,\n getElementMotionPart,\n measure,\n mutate,\n getRanges,\n getNamedEffect,\n getEffectsData,\n isNotAScrubTrigger,\n} from './common';\nimport fastdom from 'fastdom';\n\nfunction getWebAnimationEffect(\n preset: AnimationEffectAPI<any> | WebAnimationEffectFactory<any> | null,\n animation: AnimationOptions,\n target: HTMLElement | string | null,\n trigger?: Partial<TriggerVariant>,\n options?: Record<string, any>,\n): AnimationData[] | MouseAnimationFactory {\n if (preset) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n\n if (options?.reducedMotion) {\n if (animation.iterations === 1 || animation.iterations == undefined) {\n animation = { ...animation, duration: 1 };\n } else {\n return [];\n }\n }\n }\n\n let domApi;\n if (target instanceof HTMLElement) {\n domApi = { measure: measure(target), mutate: mutate(target) };\n }\n\n return (preset as AnimationEffectAPI<any>).web\n ? (preset as AnimationEffectAPI<any>).web(animation, domApi, options)\n : (preset as WebAnimationEffectFactory<any>)(animation, domApi, options);\n }\n\n return [];\n}\n\nfunction getWebAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n options?: Record<string, any>,\n ownerDocument?: Document,\n): AnimationGroup | MouseAnimationInstance | null {\n const element = target instanceof HTMLElement ? target : getElement(target, ownerDocument);\n\n if (trigger?.trigger === 'pointer-move' && !animationOptions.keyframeEffect) {\n let effectOptions = animationOptions;\n\n if (animationOptions.customEffect) {\n effectOptions = {\n ...animationOptions,\n namedEffect: { id: '', type: 'CustomMouse' },\n };\n }\n\n // TODO: need to fix the type here, currently lying about the returned type to be WebAnimationEffectFactory instead of MouseAnimationFactoryCreate\n const mouseAnimationPreset = getNamedEffect(\n effectOptions,\n ) as WebAnimationEffectFactory<'scrub'>;\n const mouseAnimationFactory = getWebAnimationEffect(\n mouseAnimationPreset,\n animationOptions,\n element,\n trigger,\n options,\n ) as MouseAnimationFactory;\n\n if (typeof mouseAnimationFactory !== 'function') {\n return null;\n }\n\n return mouseAnimationFactory(element as HTMLElement);\n }\n\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getWebAnimationEffect(\n namedEffect,\n animationOptions,\n element,\n trigger,\n options,\n ) as AnimationData[];\n\n // Return null if animation data cannot be generated\n if (!animationsData || animationsData.length === 0) {\n return null;\n }\n\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n\n let timeline: typeof window.ViewTimeline | undefined;\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress && window.ViewTimeline) {\n // generate the timeline object\n // @ts-expect-error\n timeline = new ViewTimeline({\n subject: trigger.element || getElement(trigger.componentId!),\n });\n }\n\n // generate an Animation object for each data object\n const animations = data.map(({ effect, options: effectOptions, id, part }) => {\n const effectTarget = part ? getElementMotionPart(element, part) : element;\n\n const keyframeEffect = new KeyframeEffect(effectTarget || null, [], effectOptions);\n\n // set the keyframes for the KeyframeEffect after measurements and mutations\n fastdom.mutate(() => {\n if ('timing' in effect) {\n keyframeEffect.updateTiming(effect.timing as OptionalEffectTiming);\n }\n\n keyframeEffect.setKeyframes(effect.keyframes);\n });\n\n const timingOptions =\n isViewProgress && timeline ? { timeline: timeline as AnimationTimeline } : {};\n const animation: Animation | CustomAnimation =\n typeof effect.customEffect === 'function'\n ? (new CustomAnimation(\n effect.customEffect,\n effectTarget || null,\n effectOptions,\n timingOptions,\n ) as Animation)\n : new Animation(keyframeEffect, timingOptions.timeline);\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress) {\n if (timeline) {\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const { start, end } = getRanges(effect as AnimationDataForScrub);\n // @ts-expect-error\n animation.rangeStart = start;\n // @ts-expect-error\n animation.rangeEnd = end;\n\n animation.play();\n });\n } else {\n const { startOffset, endOffset } = animationOptions as ScrubAnimationOptions;\n\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const startOffsetToWrite = (effect as AnimationDataForScrub).startOffset || startOffset;\n const endOffsetToWrite = (effect as AnimationDataForScrub).endOffset || endOffset;\n\n Object.assign(animation, {\n start: {\n name: startOffsetToWrite!.name,\n offset: startOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.startOffsetAdd,\n },\n end: {\n name: endOffsetToWrite!.name,\n offset: endOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.endOffsetAdd,\n },\n });\n });\n }\n }\n\n if (id) {\n animation.id = id;\n }\n\n return animation;\n });\n\n // create an AnimationGroup with the generate animations\n return new AnimationGroup(animations, {\n ...animationOptions,\n trigger: { ...(trigger || ({} as Partial<TriggerVariant>)) },\n // make sure the group is ready after all animation targets are measured and mutated\n measured: new Promise((resolve) => fastdom.mutate(resolve)),\n });\n}\n\nexport { getWebAnimation };\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n TriggerVariant,\n} from '../types';\nimport { getEffectsData, getRanges, getNamedEffect, isNotAScrubTrigger } from './common';\n\nfunction getAnimationTarget(target: string | null, part: string | undefined) {\n return target ? `#${target}${part ? `[data-motion-part~=\"${part}\"]` : ''}` : '';\n}\n\nfunction getAnimationAsCSS(\n data: {\n effect: AnimationData;\n options: KeyframeEffectOptions;\n id: string | undefined;\n part: string | undefined;\n },\n isRunning?: boolean,\n) {\n const { duration, delay, iterations = 1, fill, easing = 'linear', direction } = data.options;\n const animationName = data.effect.name;\n const isAutoDuration = duration === 'auto';\n\n return `${animationName} ${isAutoDuration ? 'auto' : `${duration}ms`}${\n isAutoDuration ? ' ' : ` ${delay || 1}ms `\n }${easing}${fill && fill !== 'none' ? ` ${fill}` : ''} ${\n !iterations || iterations === Infinity ? 'infinite' : iterations\n }${direction === 'normal' ? '' : ` ${direction}`} ${isRunning ? '' : 'paused'}`;\n}\n\nfunction getCSSAnimationEffect(\n preset: AnimationEffectAPI<any> | null,\n animation: AnimationOptions,\n trigger?: Partial<TriggerVariant>,\n): AnimationData[] {\n if (preset?.style) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n }\n\n return preset.style(animation);\n }\n\n return [];\n}\n\nfunction getCSSAnimation(\n target: string | null,\n animationOptions: AnimationOptions,\n trigger?: TriggerVariant,\n) {\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getCSSAnimationEffect(namedEffect, animationOptions);\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n return data.map((item, index) => {\n const { start, end }: { start?: string; end?: string } = isViewProgress\n ? getRanges(item.effect as AnimationDataForScrub)\n : {};\n\n return {\n target: getAnimationTarget(target, item.part),\n animation: getAnimationAsCSS(item, isViewProgress),\n composition: item.options.composite,\n custom: item.effect.custom,\n name: item.effect.name,\n keyframes: item.effect.keyframes,\n id: item.id && `${item.id}-${index + 1}`,\n animationTimeline: isViewProgress ? `--${trigger?.id}` : '',\n animationRange: start || end ? `${start} ${end}` : '',\n };\n });\n}\n\nexport { getCSSAnimation, getCSSAnimationEffect, getAnimationAsCSS };\n","import type { AnimationEffectAPI, AnimationOptions, TimeAnimationOptions } from '../types';\nimport { getElement, getNamedEffect, measure, mutate } from './common';\nimport fastdom from 'fastdom';\n\nfunction prepareAnimation(\n target: HTMLElement | string | null,\n animation: AnimationOptions,\n callback?: () => void,\n) {\n const preset = getNamedEffect(animation);\n const element = target instanceof HTMLElement ? target : getElement(target);\n\n if (preset && (preset as AnimationEffectAPI<'time'>).prepare && element) {\n const domApi = { measure: measure(element), mutate: mutate(element) };\n\n (preset as AnimationEffectAPI<'time'>).prepare!(animation as TimeAnimationOptions, domApi);\n }\n\n if (callback) {\n fastdom.mutate(callback);\n }\n}\n\nexport { prepareAnimation };\n","import type {\n AnimationOptions,\n ScrubAnimationOptions,\n TriggerVariant,\n MouseAnimationInstance,\n AnimationEffectAPI,\n CustomMouseAnimationInstance,\n ScrubScrollScene,\n ScrubPointerScene,\n PointerMoveAxis,\n} from './types';\nimport { AnimationGroup } from './AnimationGroup';\nimport { getEasing, getJsEasing } from './utils';\nimport { getWebAnimation } from './api/webAnimations';\nimport { getCSSAnimation } from './api/cssAnimations';\nimport { prepareAnimation } from './api/prepare';\nimport { getElement, getNamedEffect } from './api/common';\n\nfunction getElementCSSAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n): AnimationGroup | null {\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n if (!namedEffect) {\n return null;\n }\n\n if (!namedEffect.style) {\n // if this named effect does not have a style method, attempt to get group of Web Animations\n if (animationOptions.effectId && target) {\n return getElementAnimation(target, animationOptions.effectId);\n }\n\n return null;\n }\n\n const effectNames = namedEffect.getNames(animationOptions);\n const element = typeof target === 'string' ? getElement(target) : target;\n const animations = element?.getAnimations();\n const animationNames =\n animations?.map((anim) => (anim as CSSAnimation).animationName) || ([] as string[]);\n const filteredAnimations: CSSAnimation[] = [];\n\n effectNames.forEach((name) => {\n if (animationNames.includes(name)) {\n filteredAnimations.push(\n animations?.find((anim) => (anim as CSSAnimation).animationName === name) as CSSAnimation,\n );\n }\n });\n\n return filteredAnimations?.length ? new AnimationGroup(filteredAnimations) : null;\n}\n\nfunction getElementAnimation(\n target: HTMLElement | string,\n effectId: string,\n): AnimationGroup | null {\n const element = typeof target === 'string' ? getElement(target) : target;\n // somehow get the right animations\n const animations = element?.getAnimations().filter((anim: Animation | CSSAnimation) => {\n const id = anim.id || (anim as CSSAnimation).animationName;\n // if no id/name just return all animations\n return id ? id.startsWith(effectId) : true;\n });\n\n return animations?.length ? new AnimationGroup(animations) : null;\n}\n\nfunction getScrubScene(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger: Partial<TriggerVariant> & { element?: HTMLElement },\n sceneOptions: Record<string, any> = {},\n): ScrubScrollScene[] | ScrubPointerScene | ScrubPointerScene[] | null {\n const { disabled, allowActiveEvent, ...rest } = sceneOptions;\n const animation = getWebAnimation(target, animationOptions, trigger, rest);\n\n // Return null if animation could not be created\n if (!animation) {\n return null;\n }\n\n let typeSpecificOptions = {} as Record<string, any>;\n\n if (trigger.trigger === 'view-progress' && !window.ViewTimeline) {\n // TODO(ameerf): consider doing this only for bgscrub to not affect the other scroll effects\n const viewSource = trigger.element || getElement(trigger.componentId!);\n const { ready } = animation as AnimationGroup;\n\n return (animation as AnimationGroup).animations.map((partialAnimation) => {\n return {\n /* we use getters for start and end in order to access the animation's start and end\n only when initializing the scrub scene rather than immediately */\n get start() {\n return partialAnimation.start;\n },\n get end() {\n return partialAnimation.end;\n },\n viewSource,\n ready,\n getProgress() {\n return (animation as AnimationGroup).getProgress();\n },\n effect(__: any, p: number) {\n const { activeDuration } = partialAnimation.effect!.getComputedTiming();\n const { delay } = partialAnimation.effect!.getTiming();\n\n partialAnimation.currentTime = ((delay || 0) + ((activeDuration as number) || 0)) * p;\n },\n disabled,\n destroy() {\n partialAnimation.cancel();\n },\n } as ScrubScrollScene;\n });\n } else if (trigger.trigger === 'pointer-move') {\n const scrubOptions = animationOptions as ScrubAnimationOptions;\n const { centeredToTarget, transitionDuration, transitionEasing } = scrubOptions;\n const axis = (trigger as { axis?: PointerMoveAxis }).axis;\n\n if (scrubOptions.keyframeEffect) {\n const animationGroup = animation as AnimationGroup;\n\n if (animationGroup.animations?.length === 0) {\n return null;\n }\n\n const scene: ScrubPointerScene & { _currentProgress: number } = {\n target: undefined,\n centeredToTarget,\n ready: animationGroup.ready,\n _currentProgress: 0,\n getProgress() {\n return this._currentProgress;\n },\n effect(__: any, p: { x: number; y: number }) {\n const linearProgress = axis === 'x' ? p.x : p.y;\n this._currentProgress = linearProgress;\n animationGroup.progress(linearProgress);\n },\n disabled: disabled ?? false,\n destroy() {\n animationGroup.cancel();\n },\n };\n\n return scene;\n }\n\n typeSpecificOptions = {\n centeredToTarget,\n allowActiveEvent,\n };\n\n if (animationOptions.customEffect && transitionDuration) {\n typeSpecificOptions.transitionDuration = transitionDuration;\n // TODO: refactor js easings\n typeSpecificOptions.transitionEasing = getJsEasing(transitionEasing);\n }\n typeSpecificOptions.target = (animation as MouseAnimationInstance).target;\n }\n\n return {\n ...typeSpecificOptions,\n getProgress() {\n return (animation as AnimationGroup | CustomMouseAnimationInstance).getProgress();\n },\n effect(\n __: any,\n p: number | { x: number; y: number },\n v?: { x: number; y: number },\n active?: boolean,\n ) {\n animation.progress(\n v\n ? {\n // @ts-expect-error spread error on p\n ...p,\n v,\n active,\n }\n : p,\n );\n },\n disabled,\n destroy() {\n animation.cancel();\n },\n } as ScrubPointerScene;\n}\n\nfunction getAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n reducedMotion: boolean = false,\n): AnimationGroup | MouseAnimationInstance | null {\n const animation = getElementCSSAnimation(target, animationOptions);\n\n if (animation) {\n animation.ready = new Promise((resolve) => {\n prepareAnimation(target, animationOptions, resolve);\n });\n\n return animation;\n }\n\n return getWebAnimation(target, animationOptions, trigger, { reducedMotion });\n}\n\nexport {\n getCSSAnimation,\n getWebAnimation,\n getElementCSSAnimation,\n getElementAnimation,\n getScrubScene,\n prepareAnimation,\n getAnimation,\n getEasing,\n};\n\nexport type { AnimationGroup };\n"],"names":["AnimationGroup","animations","options","callback","animation","p","delay","duration","iterations","time","rate","a","target","endEvent","_error","linear","t","sineIn","sineOut","sineInOut","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","expoIn","expoOut","expoInOut","circIn","circOut","circInOut","backIn","backOut","backInOut","k","jsEasings","cssEasings","getCssUnits","type","getEasing","easing","getJsEasing","CustomAnimation","customEffect","effectOptions","timingOptions","effect","timeline","progress","_","error","speed","uid","e","tl","cb","playbackRate","listener","event","win","debug","raf","FastDom","self","tasks","task","fn","ctx","scheduleFlush","remove","props","child","mixin","fastdom","flush","writes","reads","array","item","index","source","key","exports","module","this","registry","registerEffects","effects","getRegisteredEffect","name","getElement","id","ownerDocument","getElementMotionPart","element","part","getDirection","alternate","getLength","length","getRange","range","add","isEnd","getRanges","measure","mutate","getNamedEffect","effectName","animation_","keyframes","effectId","getEffectsData","trigger","isNotAScrubTrigger","getWebAnimationEffect","preset","domApi","getWebAnimation","animationOptions","mouseAnimationPreset","mouseAnimationFactory","namedEffect","animationsData","data","isViewProgress","effectTarget","keyframeEffect","start","end","startOffset","endOffset","startOffsetToWrite","endOffsetToWrite","resolve","getAnimationTarget","getAnimationAsCSS","isRunning","fill","direction","animationName","isAutoDuration","getCSSAnimationEffect","getCSSAnimation","prepareAnimation","getElementCSSAnimation","getElementAnimation","effectNames","animationNames","anim","filteredAnimations","getScrubScene","sceneOptions","disabled","allowActiveEvent","rest","typeSpecificOptions","viewSource","ready","partialAnimation","__","activeDuration","scrubOptions","centeredToTarget","transitionDuration","transitionEasing","axis","animationGroup","linearProgress","v","active","getAnimation","reducedMotion"],"mappings":"AAQO,MAAMA,EAAe;AAAA,EAC1B;AAAA,EAIA;AAAA,EACA;AAA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AA,IACZ;AAAA,EAAA;AAEJ;AAEA,SAAS8K,GACPtK,GACAkH,GACAN,GACA2D,IAAyB,IACuB;AAChD,QAAM/K,IAAYoJ,GAAuB5I,GAAQkH,CAAgB;AAEjE,SAAI1H,KACFA,EAAU,QAAQ,IAAI,QAAQ,CAACyI,MAAY;AACzC,IAAAU,GAAiB3I,GAAQkH,GAAkBe,CAAO;AAAA,EACpD,CAAC,GAEMzI,KAGFyH,EAAgBjH,GAAQkH,GAAkBN,GAAS,EAAE,eAAA2D,GAAe;AAC7E;","x_google_ignoreList":[4]}
1
+ {"version":3,"file":"motion.js","sources":["../../src/AnimationGroup.ts","../../src/easings.ts","../../src/utils.ts","../../src/CustomAnimation.ts","../../../../node_modules/fastdom/fastdom.js","../../src/api/registry.ts","../../src/api/common.ts","../../src/api/webAnimations.ts","../../src/api/cssAnimations.ts","../../src/api/prepare.ts","../../src/motion.ts"],"sourcesContent":["import { AnimationGroupOptions, RangeOffset } from './types';\n\n/**\n * @class AnimationGroup\n *\n * A wrapper object for simulating a GroupEffect and managing multiple animations.\n * See: https://www.w3.org/TR/web-animations-2/#grouping-and-synchronization\n */\nexport class AnimationGroup {\n animations: (Animation & {\n start?: RangeOffset;\n end?: RangeOffset;\n })[];\n options?: AnimationGroupOptions;\n ready: Promise<void>;\n isCSS: boolean;\n\n constructor(animations: Animation[], options?: AnimationGroupOptions) {\n this.animations = animations;\n this.options = options;\n this.ready = options?.measured || Promise.resolve();\n this.isCSS = animations[0] instanceof CSSAnimation;\n }\n\n getProgress() {\n return this.animations[0]?.effect?.getComputedTiming().progress || 0;\n }\n\n async play(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.play();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n pause() {\n for (const animation of this.animations) {\n animation.pause();\n }\n }\n\n async reverse(callback?: () => void): Promise<void> {\n await this.ready;\n\n for (const animation of this.animations) {\n animation.reverse();\n }\n\n // TODO: Wait for all animations to be ready, using allSettled to handle rejections gracefully\n // await Promise.allSettled(\n await Promise.all(this.animations.map((animation) => animation.ready));\n\n if (callback) {\n callback();\n }\n }\n\n progress(p: number) {\n for (const animation of this.animations) {\n const { delay, duration, iterations } = animation.effect!.getTiming();\n const time =\n (Number.isFinite(duration) ? (duration as number) : 0) *\n (Number.isFinite(iterations) ? (iterations as number) : 1);\n animation.currentTime = ((delay || 0) + time) * p;\n }\n }\n\n cancel() {\n for (const animation of this.animations) {\n animation.cancel();\n }\n }\n\n setPlaybackRate(rate: number) {\n for (const animation of this.animations) {\n animation.playbackRate = rate;\n }\n }\n\n async onFinish(callback: () => void): Promise<void> {\n try {\n await Promise.all(this.animations.map((animation) => animation.finished));\n\n const a = this.animations[0];\n\n if (a && !this.isCSS) {\n const target = (a.effect as KeyframeEffect)?.target;\n\n if (target) {\n const endEvent = new Event('animationend');\n target.dispatchEvent(endEvent);\n }\n }\n\n callback();\n } catch (_error) {\n console.warn('animation was interrupted - aborting onFinish callback - ', _error);\n }\n }\n\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n\n get playState() {\n return this.animations[0]?.playState;\n }\n}\n","/**\n * @file Easing functions as defined by Robert Penner.\n * @example A playground I made https://codepen.io/tombigel/pen/eYLLVRg\n */\n\n/**\n * Linear easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const linear = (t: number) => t;\n\n/**\n * Sine-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineIn = (t: number) => 1 - Math.cos((t * Math.PI) / 2);\n\n/**\n * Sine-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineOut = (t: number) => Math.sin((t * Math.PI) / 2);\n\n/**\n * Sine-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const sineInOut = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\n\n/**\n * Quadratic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadIn = (t: number) => t ** 2;\n\n/**\n * Quadratic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadOut = (t: number) => 1 - (1 - t) ** 2;\n\n/**\n * Quadratic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quadInOut = (t: number) => (t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2);\n\n/**\n * Cubic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicIn = (t: number) => t ** 3;\n\n/**\n * Cubic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicOut = (t: number) => 1 - (1 - t) ** 3;\n\n/**\n * Cubic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const cubicInOut = (t: number) => (t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2);\n\n/**\n * Quartic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartIn = (t: number) => t ** 4;\n\n/**\n * Quartic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartOut = (t: number) => 1 - (1 - t) ** 4;\n\n/**\n * Quartic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quartInOut = (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2);\n\n/**\n * Quintic-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintIn = (t: number) => t ** 5;\n\n/**\n * Quintic-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintOut = (t: number) => 1 - (1 - t) ** 5;\n\n/**\n * Quintic-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const quintInOut = (t: number) => (t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2);\n\n/**\n * Exponential-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoIn = (t: number) => (t === 0 ? 0 : 2 ** (10 * t - 10));\n\n/**\n * Exponential-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoOut = (t: number) => (t === 1 ? 1 : 1 - 2 ** (-10 * t));\n\n/**\n * Exponential-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const expoInOut = (t: number) =>\n t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2;\n\n/**\n * Circular-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circIn = (t: number) => 1 - Math.sqrt(1 - t ** 2);\n\n/**\n * Circular-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circOut = (t: number) => Math.sqrt(1 - (t - 1) ** 2);\n\n/**\n * Circular-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const circInOut = (t: number) =>\n t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2;\n\n/**\n * Back-in easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backIn = (t: number) => 2.70158 * t ** 3 - 1.70158 * t ** 2;\n\n/**\n * Back-out easing function.\n * @param t - The time value (between 0 and 1).\n * @returns The eased value.\n */\nexport const backOut = (t: number) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2;\n\n/**\n * Back-in-out easing function.\n * @param t - The time value (between 0 and 1).\n * @param k - The back factor (optional, default is 1.70158 * 1.525).\n * @returns The eased value.\n */\nexport const backInOut = (t: number, k = 1.70158 * 1.525) =>\n t < 0.5\n ? ((2 * t) ** 2 * ((k + 1) * 2 * t - k)) / 2\n : ((2 * t - 2) ** 2 * ((k + 1) * (t * 2 - 2) + k) + 2) / 2;\n\nexport const jsEasings = {\n linear,\n sineIn,\n sineOut,\n sineInOut,\n quadIn,\n quadOut,\n quadInOut,\n cubicIn,\n cubicOut,\n cubicInOut,\n quartIn,\n quartOut,\n quartInOut,\n quintIn,\n quintOut,\n quintInOut,\n expoIn,\n expoOut,\n expoInOut,\n circIn,\n circOut,\n circInOut,\n backIn,\n backOut,\n backInOut,\n};\n\n/**\n * CSS cubic-bezier easings based on PostCSS Easings\n */\nexport const cssEasings = {\n linear: 'linear',\n ease: 'ease',\n easeIn: 'ease-in',\n easeOut: 'ease-out',\n easeInOut: 'ease-in-out',\n sineIn: 'cubic-bezier(0.47, 0, 0.745, 0.715)',\n sineOut: 'cubic-bezier(0.39, 0.575, 0.565, 1)',\n sineInOut: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',\n quadIn: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n quadOut: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n quadInOut: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n cubicIn: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n cubicOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n cubicInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n quartIn: 'cubic-bezier(0.895, 0.03, 0.685, 0.22)',\n quartOut: 'cubic-bezier(0.165, 0.84, 0.44, 1)',\n quartInOut: 'cubic-bezier(0.77, 0, 0.175, 1)',\n quintIn: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n quintOut: 'cubic-bezier(0.23, 1, 0.32, 1)',\n quintInOut: 'cubic-bezier(0.86, 0, 0.07, 1)',\n expoIn: 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',\n expoOut: 'cubic-bezier(0.19, 1, 0.22, 1)',\n expoInOut: 'cubic-bezier(1, 0, 0, 1)',\n circIn: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)',\n circOut: 'cubic-bezier(0.075, 0.82, 0.165, 1)',\n circInOut: 'cubic-bezier(0.785, 0.135, 0.15, 0.86)',\n backIn: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)',\n backOut: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n backInOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',\n} as const;\n","import { cssEasings, jsEasings } from './easings';\nexport function getCssUnits(type: 'percentage' | string) {\n return type === 'percentage' ? '%' : type || 'px';\n}\n\nexport function getEasing(easing?: keyof typeof cssEasings | string): string {\n return easing ? cssEasings[easing as keyof typeof cssEasings] || easing : cssEasings.linear;\n}\n\nexport function getJsEasing(\n easing?: keyof typeof jsEasings | string,\n): ((t: number) => number) | undefined {\n return easing ? jsEasings[easing as keyof typeof jsEasings] : undefined;\n}\n","/**\n * @class CustomAnimation\n *\n * A wrapper object for Animation that mimics the same interface but implements CustomEffect that runs JS code instead of KeyframeEffect.\n * The class is implemented by holding an inner Animation object instead of inheritance due to some browsers not allowing extension of built-in objects.\n */\nexport class CustomAnimation {\n _animation: Animation;\n customEffect: (progress: number | null) => void;\n progress: number | null;\n _tickCbId: number | null;\n _finishHandler: (_: any) => void;\n\n constructor(\n customEffect: (element: Element | null, progress: number | null) => void,\n target: Element | null,\n effectOptions: KeyframeEffectOptions,\n timingOptions: { timeline?: AnimationTimeline | null },\n ) {\n // overriding composite so that animation is not replaced and removed\n const effect = new KeyframeEffect(target, [], {\n ...effectOptions,\n composite: 'add',\n });\n const { timeline } = timingOptions;\n this._animation = new Animation(effect, timeline);\n\n this._tickCbId = null;\n this.progress = null;\n this.customEffect = (progress: number | null) => customEffect(effect.target, progress);\n\n // stop loop if animation is removed from the DOM after finish (does not fire 'remove' event)\n this._finishHandler = (_: any) => {\n if (\n !(this.effect as KeyframeEffect).target?.getAnimations().find((a) => a === this._animation)\n ) {\n this.cancel();\n }\n };\n this.addEventListener('finish', this._finishHandler);\n this.addEventListener('remove', this._finishHandler);\n }\n\n // private tick method for customEffect loop implementation\n private _tick() {\n try {\n const progress = this.effect?.getComputedTiming().progress ?? null;\n if (progress !== this.progress) {\n this.customEffect?.(progress);\n this.progress = progress;\n }\n this._tickCbId = requestAnimationFrame(() => {\n this._tick();\n });\n } catch (error) {\n this._tickCbId = null;\n console.error(\n `failed to run customEffect! effectId: ${this.id}, error: ${\n error instanceof Error ? error.message : error\n }`,\n );\n }\n }\n\n // Animation timing properties\n get currentTime() {\n return this._animation.currentTime;\n }\n set currentTime(time: CSSNumberish | null) {\n this._animation.currentTime = time;\n }\n get startTime() {\n return this._animation.startTime;\n }\n set startTime(time: CSSNumberish | null) {\n this._animation.startTime = time;\n }\n get playbackRate() {\n return this._animation.playbackRate;\n }\n set playbackRate(speed: number) {\n this._animation.playbackRate = speed;\n }\n\n // Animation basic properties\n get id() {\n return this._animation.id;\n }\n set id(uid: string) {\n this._animation.id = uid;\n }\n get effect() {\n return this._animation.effect;\n }\n set effect(e: AnimationEffect | null) {\n this._animation.effect = e;\n }\n get timeline() {\n return this._animation.timeline;\n }\n set timeline(tl: AnimationTimeline | null) {\n this._animation.timeline = tl;\n }\n\n // Animation readonly state properties\n get finished() {\n return this._animation.finished;\n }\n get pending() {\n return this._animation.pending;\n }\n get playState() {\n return this._animation.playState;\n }\n get ready() {\n return this._animation.ready;\n }\n get replaceState() {\n return this._animation.replaceState;\n }\n\n // Animation event handlers\n get oncancel() {\n return this._animation.oncancel;\n }\n set oncancel(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.oncancel = cb;\n }\n get onfinish() {\n return this._animation.onfinish;\n }\n set onfinish(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onfinish = cb;\n }\n get onremove() {\n return this._animation.onremove;\n }\n set onremove(cb: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null) {\n this._animation.onremove = cb;\n }\n\n // CustomAnimation overridden methods\n play() {\n this._animation.play();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = requestAnimationFrame(() => this._tick());\n }\n\n pause() {\n this._animation.pause();\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n cancel() {\n this.removeEventListener('finish', this._finishHandler);\n this.removeEventListener('remove', this._finishHandler);\n this._animation.cancel();\n // signaling cancelation for customEffect to handle it as desired\n this.customEffect(null);\n cancelAnimationFrame(this._tickCbId!);\n this._tickCbId = null;\n }\n\n commitStyles() {\n console.warn(\n 'CustomEffect animations do not support commitStyles method as they have no style to commit',\n );\n }\n\n // Animation methods without override\n finish() {\n this._animation.finish();\n }\n persist() {\n this._animation.persist();\n }\n reverse() {\n this._animation.reverse();\n }\n updatePlaybackRate(playbackRate: number) {\n this._animation.updatePlaybackRate(playbackRate);\n }\n\n // Animation events API\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.addEventListener(type, listener, options);\n }\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) {\n this._animation.removeEventListener(type, listener, options);\n }\n dispatchEvent(event: Event) {\n return this._animation.dispatchEvent(event);\n }\n}\n","!(function(win) {\n\n/**\n * FastDom\n *\n * Eliminates layout thrashing\n * by batching DOM read/write\n * interactions.\n *\n * @author Wilson Page <wilsonpage@me.com>\n * @author Kornel Lesinski <kornel.lesinski@ft.com>\n */\n\n'use strict';\n\n/**\n * Mini logger\n *\n * @return {Function}\n */\nvar debug = 0 ? console.log.bind(console, '[fastdom]') : function() {};\n\n/**\n * Normalized rAF\n *\n * @type {Function}\n */\nvar raf = win.requestAnimationFrame\n || win.webkitRequestAnimationFrame\n || win.mozRequestAnimationFrame\n || win.msRequestAnimationFrame\n || function(cb) { return setTimeout(cb, 16); };\n\n/**\n * Initialize a `FastDom`.\n *\n * @constructor\n */\nfunction FastDom() {\n var self = this;\n self.reads = [];\n self.writes = [];\n self.raf = raf.bind(win); // test hook\n debug('initialized', self);\n}\n\nFastDom.prototype = {\n constructor: FastDom,\n\n /**\n * We run this inside a try catch\n * so that if any jobs error, we\n * are able to recover and continue\n * to flush the batch until it's empty.\n *\n * @param {Array} tasks\n */\n runTasks: function(tasks) {\n debug('run tasks');\n var task; while (task = tasks.shift()) task();\n },\n\n /**\n * Adds a job to the read batch and\n * schedules a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n measure: function(fn, ctx) {\n debug('measure');\n var task = !ctx ? fn : fn.bind(ctx);\n this.reads.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Adds a job to the\n * write batch and schedules\n * a new frame if need be.\n *\n * @param {Function} fn\n * @param {Object} ctx the context to be bound to `fn` (optional).\n * @public\n */\n mutate: function(fn, ctx) {\n debug('mutate');\n var task = !ctx ? fn : fn.bind(ctx);\n this.writes.push(task);\n scheduleFlush(this);\n return task;\n },\n\n /**\n * Clears a scheduled 'read' or 'write' task.\n *\n * @param {Object} task\n * @return {Boolean} success\n * @public\n */\n clear: function(task) {\n debug('clear', task);\n return remove(this.reads, task) || remove(this.writes, task);\n },\n\n /**\n * Extend this FastDom with some\n * custom functionality.\n *\n * Because fastdom must *always* be a\n * singleton, we're actually extending\n * the fastdom instance. This means tasks\n * scheduled by an extension still enter\n * fastdom's global task queue.\n *\n * The 'super' instance can be accessed\n * from `this.fastdom`.\n *\n * @example\n *\n * var myFastdom = fastdom.extend({\n * initialize: function() {\n * // runs on creation\n * },\n *\n * // override a method\n * measure: function(fn) {\n * // do extra stuff ...\n *\n * // then call the original\n * return this.fastdom.measure(fn);\n * },\n *\n * ...\n * });\n *\n * @param {Object} props properties to mixin\n * @return {FastDom}\n */\n extend: function(props) {\n debug('extend', props);\n if (typeof props != 'object') throw new Error('expected object');\n\n var child = Object.create(this);\n mixin(child, props);\n child.fastdom = this;\n\n // run optional creation hook\n if (child.initialize) child.initialize();\n\n return child;\n },\n\n // override this with a function\n // to prevent Errors in console\n // when tasks throw\n catch: null\n};\n\n/**\n * Schedules a new read/write\n * batch if one isn't pending.\n *\n * @private\n */\nfunction scheduleFlush(fastdom) {\n if (!fastdom.scheduled) {\n fastdom.scheduled = true;\n fastdom.raf(flush.bind(null, fastdom));\n debug('flush scheduled');\n }\n}\n\n/**\n * Runs queued `read` and `write` tasks.\n *\n * Errors are caught and thrown by default.\n * If a `.catch` function has been defined\n * it is called instead.\n *\n * @private\n */\nfunction flush(fastdom) {\n debug('flush');\n\n var writes = fastdom.writes;\n var reads = fastdom.reads;\n var error;\n\n try {\n debug('flushing reads', reads.length);\n fastdom.runTasks(reads);\n debug('flushing writes', writes.length);\n fastdom.runTasks(writes);\n } catch (e) { error = e; }\n\n fastdom.scheduled = false;\n\n // If the batch errored we may still have tasks queued\n if (reads.length || writes.length) scheduleFlush(fastdom);\n\n if (error) {\n debug('task errored', error.message);\n if (fastdom.catch) fastdom.catch(error);\n else throw error;\n }\n}\n\n/**\n * Remove an item from an Array.\n *\n * @param {Array} array\n * @param {*} item\n * @return {Boolean}\n */\nfunction remove(array, item) {\n var index = array.indexOf(item);\n return !!~index && !!array.splice(index, 1);\n}\n\n/**\n * Mixin own properties of source\n * object into the target.\n *\n * @param {Object} target\n * @param {Object} source\n */\nfunction mixin(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) target[key] = source[key];\n }\n}\n\n// There should never be more than\n// one instance of `FastDom` in an app\nvar exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:line\n\n// Expose to CJS & AMD\nif ((typeof define) == 'function') define(function() { return exports; });\nelse if ((typeof module) == 'object') module.exports = exports;\n\n})( typeof window !== 'undefined' ? window : typeof this != 'undefined' ? this : globalThis);\n","import type { EffectModule } from '../types';\n\nconst registry: Record<string, EffectModule> = {};\n\nexport function registerEffects(effects: Record<string, EffectModule>) {\n Object.assign(registry, effects);\n}\n\nexport function getRegisteredEffect(name: string) {\n if (name in registry) {\n return registry[name];\n } else {\n console.warn(\n `${name} not found in registry. Please make sure to import and register the preset.`,\n );\n return null;\n }\n}\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationOptions,\n MeasureCallback,\n RangeOffset,\n TimeAnimationOptions,\n TriggerVariant,\n UnitLengthPercentage,\n} from '../types';\nimport { getCssUnits, getEasing } from '../utils';\nimport fastdom from 'fastdom';\nimport { getRegisteredEffect } from './registry';\n\nfunction getElement(id: string | null, ownerDocument?: Document): HTMLElement | null {\n return id ? (ownerDocument || document).getElementById(id) : null;\n}\n\nfunction getElementMotionPart(element: Element | null, part: string) {\n if (element?.matches(`[data-motion-part~=\"${part}\"]`)) {\n return element;\n }\n return element?.querySelector(`[data-motion-part~=\"${part}\"]`);\n}\n\nfunction getDirection(effect: AnimationData): KeyframeEffectOptions['direction'] {\n const alternate = effect.alternate ? 'alternate' : '';\n return effect.reversed\n ? (`${alternate ? `${alternate}-` : ''}reverse` as 'reverse' | 'alternate-reverse')\n : alternate || 'normal';\n}\n\nfunction getLength(length: UnitLengthPercentage): string {\n return `${length.value}${getCssUnits(length.unit)}`;\n}\n\nfunction getRange(range: RangeOffset, add: string | undefined, isEnd?: boolean) {\n // according to the CSS spec if the end range is a <length> then it is calculated from the start of the named range\n // our model assumes that <length> in end range is calculated from the end of the named range\n return `${range.name || 'cover'} ${\n isEnd && range.offset!.unit !== 'percentage'\n ? `calc(100% + ${getLength(range.offset!)}${add ? ` + ${add}` : ''})`\n : add\n ? `calc(${getLength(range.offset!)} + ${add})`\n : getLength(range.offset!)\n }`;\n}\n\nfunction getRanges(effect: AnimationDataForScrub) {\n return {\n start: getRange(effect.startOffset!, effect.startOffsetAdd),\n end: getRange(effect.endOffset!, effect.endOffsetAdd, true),\n };\n}\n\nfunction measure(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.measure(() => fn(target));\n}\n\nfunction mutate(target: HTMLElement | null): MeasureCallback {\n return (fn) => fastdom.mutate(() => fn(target));\n}\n\nfunction getNamedEffect(animation: AnimationOptions) {\n if (animation.namedEffect) {\n const effectName = animation.namedEffect.type;\n return typeof effectName === 'string' ? getRegisteredEffect(effectName) : null;\n } else if (animation.keyframeEffect) {\n const effect = (animation_: AnimationOptions) => {\n const { name, keyframes } = animation_.keyframeEffect!;\n\n return [{ ...animation_, name, keyframes }];\n };\n const getNames = (animation_: AnimationOptions) => {\n const { effectId } = animation_;\n const { name } = animation_.keyframeEffect!;\n const uid = name || effectId;\n\n return uid ? [uid] : [];\n };\n return { web: effect, style: effect, getNames };\n } else if (animation.customEffect) {\n return (animation_: AnimationOptions) => [{ ...animation_, keyframes: [] }];\n }\n return null;\n}\n\nfunction getEffectsData(\n animations: AnimationData[],\n trigger?: Partial<TriggerVariant>,\n effectId?: string,\n) {\n // process each AnimationData object into a KeyframeEffect object\n return animations.map((effect, index) => {\n // prepare the KeyframeEffectOptions object\n const effectOptions = {\n fill: effect.fill,\n easing: getEasing(effect.easing),\n iterations: effect.iterations === 0 ? Infinity : effect.iterations || 1,\n composite: effect.composite,\n direction: getDirection(effect),\n } as KeyframeEffectOptions & { rangeStart: string; rangeEnd: string };\n\n // if this is a time-based animation then set the duration and delay as time values\n if (isNotAScrubTrigger(trigger)) {\n effectOptions.duration = effect.duration as number;\n effectOptions.delay = (effect as TimeAnimationOptions).delay || 0;\n } else {\n // if ViewTimeline is supported AND this is a view-progress trigger\n if (window.ViewTimeline && trigger?.trigger === 'view-progress') {\n // set duration to 'auto'\n effectOptions.duration = 'auto';\n } else {\n // if ViewTimeline not supported then put a 100ms value in duration get a progress we can easily relate to\n // we split the duration to 99.99ms and delay of 0.01ms to get the fill-mode effect working\n effectOptions.duration = 99.99;\n effectOptions.delay = 0.01;\n }\n }\n\n return {\n effect,\n options: effectOptions,\n id: effectId && `${effectId}-${index + 1}`,\n part: effect.part,\n };\n });\n}\n\nfunction isNotAScrubTrigger(trigger?: Partial<TriggerVariant>) {\n return !trigger || (trigger.trigger !== 'pointer-move' && trigger.trigger !== 'view-progress');\n}\n\nexport {\n isNotAScrubTrigger,\n getElement,\n getElementMotionPart,\n getNamedEffect,\n getEffectsData,\n measure,\n mutate,\n getDirection,\n getLength,\n getRanges,\n};\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n MouseAnimationFactory,\n MouseAnimationInstance,\n ScrubAnimationOptions,\n TriggerVariant,\n WebAnimationEffectFactory,\n} from '../types';\nimport { CustomAnimation } from '../CustomAnimation';\nimport { AnimationGroup } from '../AnimationGroup';\nimport {\n getElement,\n getElementMotionPart,\n measure,\n mutate,\n getRanges,\n getNamedEffect,\n getEffectsData,\n isNotAScrubTrigger,\n} from './common';\nimport fastdom from 'fastdom';\n\nfunction getWebAnimationEffect(\n preset: AnimationEffectAPI<any> | WebAnimationEffectFactory<any> | null,\n animation: AnimationOptions,\n target: HTMLElement | string | null,\n trigger?: Partial<TriggerVariant>,\n options?: Record<string, any>,\n): AnimationData[] | MouseAnimationFactory {\n if (preset) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n\n if (options?.reducedMotion) {\n if (animation.iterations === 1 || animation.iterations == undefined) {\n animation = { ...animation, duration: 1 };\n } else {\n return [];\n }\n }\n }\n\n let domApi;\n if (target instanceof HTMLElement) {\n domApi = { measure: measure(target), mutate: mutate(target) };\n }\n\n return (preset as AnimationEffectAPI<any>).web\n ? (preset as AnimationEffectAPI<any>).web(animation, domApi, options)\n : (preset as WebAnimationEffectFactory<any>)(animation, domApi, options);\n }\n\n return [];\n}\n\nfunction getWebAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n options?: Record<string, any>,\n ownerDocument?: Document,\n): AnimationGroup | MouseAnimationInstance | null {\n const element = target instanceof HTMLElement ? target : getElement(target, ownerDocument);\n\n if (trigger?.trigger === 'pointer-move' && !animationOptions.keyframeEffect) {\n let effectOptions = animationOptions;\n\n if (animationOptions.customEffect) {\n effectOptions = {\n ...animationOptions,\n namedEffect: { id: '', type: 'CustomMouse' },\n };\n }\n\n // TODO: need to fix the type here, currently lying about the returned type to be WebAnimationEffectFactory instead of MouseAnimationFactoryCreate\n const mouseAnimationPreset = getNamedEffect(\n effectOptions,\n ) as WebAnimationEffectFactory<'scrub'>;\n const mouseAnimationFactory = getWebAnimationEffect(\n mouseAnimationPreset,\n animationOptions,\n element,\n trigger,\n options,\n ) as MouseAnimationFactory;\n\n if (typeof mouseAnimationFactory !== 'function') {\n return null;\n }\n\n return mouseAnimationFactory(element as HTMLElement);\n }\n\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getWebAnimationEffect(\n namedEffect,\n animationOptions,\n element,\n trigger,\n options,\n ) as AnimationData[];\n\n // Return null if animation data cannot be generated\n if (!animationsData || animationsData.length === 0) {\n return null;\n }\n\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n\n let timeline: typeof window.ViewTimeline | undefined;\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress && window.ViewTimeline) {\n // generate the timeline object\n // @ts-expect-error\n timeline = new ViewTimeline({\n subject: trigger.element || getElement(trigger.componentId!),\n });\n }\n\n // generate an Animation object for each data object\n const animations = data.map(({ effect, options: effectOptions, id, part }) => {\n const effectTarget = part ? getElementMotionPart(element, part) : element;\n\n const keyframeEffect = new KeyframeEffect(effectTarget || null, [], effectOptions);\n\n // set the keyframes for the KeyframeEffect after measurements and mutations\n fastdom.mutate(() => {\n if ('timing' in effect) {\n keyframeEffect.updateTiming(effect.timing as OptionalEffectTiming);\n }\n\n keyframeEffect.setKeyframes(effect.keyframes);\n });\n\n const timingOptions =\n isViewProgress && timeline ? { timeline: timeline as AnimationTimeline } : {};\n const animation: Animation | CustomAnimation =\n typeof effect.customEffect === 'function'\n ? (new CustomAnimation(\n effect.customEffect,\n effectTarget || null,\n effectOptions,\n timingOptions,\n ) as Animation)\n : new Animation(keyframeEffect, timingOptions.timeline);\n\n // if this is a ScrubAnimation with view-progress trigger and the browser supports the ViewTimeline API\n if (isViewProgress) {\n if (timeline) {\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const { start, end } = getRanges(effect as AnimationDataForScrub);\n // @ts-expect-error\n animation.rangeStart = start;\n // @ts-expect-error\n animation.rangeEnd = end;\n\n animation.play();\n });\n } else {\n const { startOffset, endOffset } = animationOptions as ScrubAnimationOptions;\n\n // set the ranges for the animation after measurements and mutations\n fastdom.mutate(() => {\n const startOffsetToWrite = (effect as AnimationDataForScrub).startOffset || startOffset;\n const endOffsetToWrite = (effect as AnimationDataForScrub).endOffset || endOffset;\n\n Object.assign(animation, {\n start: {\n name: startOffsetToWrite!.name,\n offset: startOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.startOffsetAdd,\n },\n end: {\n name: endOffsetToWrite!.name,\n offset: endOffsetToWrite!.offset?.value,\n add: (effect as AnimationDataForScrub)!.endOffsetAdd,\n },\n });\n });\n }\n }\n\n if (id) {\n animation.id = id;\n }\n\n return animation;\n });\n\n // create an AnimationGroup with the generate animations\n return new AnimationGroup(animations, {\n ...animationOptions,\n trigger: { ...(trigger || ({} as Partial<TriggerVariant>)) },\n // make sure the group is ready after all animation targets are measured and mutated\n measured: new Promise((resolve) => fastdom.mutate(resolve)),\n });\n}\n\nexport { getWebAnimation };\n","import type {\n AnimationData,\n AnimationDataForScrub,\n AnimationEffectAPI,\n AnimationOptions,\n TriggerVariant,\n} from '../types';\nimport { getEffectsData, getRanges, getNamedEffect, isNotAScrubTrigger } from './common';\n\nfunction getAnimationTarget(target: string | null, part: string | undefined) {\n return target ? `#${target}${part ? `[data-motion-part~=\"${part}\"]` : ''}` : '';\n}\n\nfunction getAnimationAsCSS(\n data: {\n effect: AnimationData;\n options: KeyframeEffectOptions;\n id: string | undefined;\n part: string | undefined;\n },\n isRunning?: boolean,\n) {\n const { duration, delay, iterations = 1, fill, easing = 'linear', direction } = data.options;\n const animationName = data.effect.name;\n const isAutoDuration = duration === 'auto';\n\n return `${animationName} ${isAutoDuration ? 'auto' : `${duration}ms`}${\n isAutoDuration ? ' ' : ` ${delay || 1}ms `\n }${easing}${fill && fill !== 'none' ? ` ${fill}` : ''} ${\n !iterations || iterations === Infinity ? 'infinite' : iterations\n }${direction === 'normal' ? '' : ` ${direction}`} ${isRunning ? '' : 'paused'}`;\n}\n\nfunction getCSSAnimationEffect(\n preset: AnimationEffectAPI<any> | null,\n animation: AnimationOptions,\n trigger?: Partial<TriggerVariant>,\n): AnimationData[] {\n if (preset?.style) {\n // validate duration is a number over 0\n if (isNotAScrubTrigger(trigger)) {\n animation.duration = animation.duration || 1;\n }\n\n return preset.style(animation);\n }\n\n return [];\n}\n\nfunction getCSSAnimation(\n target: string | null,\n animationOptions: AnimationOptions,\n trigger?: TriggerVariant,\n) {\n // get the preset for the given animation options\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n const animationsData = getCSSAnimationEffect(namedEffect, animationOptions);\n const data = getEffectsData(animationsData, trigger, animationOptions.effectId);\n const isViewProgress = trigger?.trigger === 'view-progress';\n\n return data.map((item, index) => {\n const { start, end }: { start?: string; end?: string } = isViewProgress\n ? getRanges(item.effect as AnimationDataForScrub)\n : {};\n\n return {\n target: getAnimationTarget(target, item.part),\n animation: getAnimationAsCSS(item, isViewProgress),\n composition: item.options.composite,\n custom: item.effect.custom,\n name: item.effect.name,\n keyframes: item.effect.keyframes,\n id: item.id && `${item.id}-${index + 1}`,\n animationTimeline: isViewProgress ? `--${trigger?.id}` : '',\n animationRange: start || end ? `${start} ${end}` : '',\n };\n });\n}\n\nexport { getCSSAnimation, getCSSAnimationEffect, getAnimationAsCSS };\n","import type { AnimationEffectAPI, AnimationOptions, TimeAnimationOptions } from '../types';\nimport { getElement, getNamedEffect, measure, mutate } from './common';\nimport fastdom from 'fastdom';\n\nfunction prepareAnimation(\n target: HTMLElement | string | null,\n animation: AnimationOptions,\n callback?: () => void,\n) {\n const preset = getNamedEffect(animation);\n const element = target instanceof HTMLElement ? target : getElement(target);\n\n if (preset && (preset as AnimationEffectAPI<'time'>).prepare && element) {\n const domApi = { measure: measure(element), mutate: mutate(element) };\n\n (preset as AnimationEffectAPI<'time'>).prepare!(animation as TimeAnimationOptions, domApi);\n }\n\n if (callback) {\n fastdom.mutate(callback);\n }\n}\n\nexport { prepareAnimation };\n","import type {\n AnimationOptions,\n ScrubAnimationOptions,\n TriggerVariant,\n MouseAnimationInstance,\n AnimationEffectAPI,\n CustomMouseAnimationInstance,\n ScrubScrollScene,\n ScrubPointerScene,\n PointerMoveAxis,\n} from './types';\nimport { AnimationGroup } from './AnimationGroup';\nimport { getEasing, getJsEasing } from './utils';\nimport { getWebAnimation } from './api/webAnimations';\nimport { getCSSAnimation } from './api/cssAnimations';\nimport { prepareAnimation } from './api/prepare';\nimport { getElement, getNamedEffect } from './api/common';\n\nfunction getElementCSSAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n): AnimationGroup | null {\n const namedEffect = getNamedEffect(animationOptions) as AnimationEffectAPI<any> | null;\n\n if (!namedEffect) {\n return null;\n }\n\n if (!namedEffect.style) {\n // if this named effect does not have a style method, attempt to get group of Web Animations\n if (animationOptions.effectId && target) {\n return getElementAnimation(target, animationOptions.effectId);\n }\n\n return null;\n }\n\n const effectNames = namedEffect.getNames(animationOptions);\n const element = typeof target === 'string' ? getElement(target) : target;\n const animations = element?.getAnimations();\n const animationNames =\n animations?.map((anim) => (anim as CSSAnimation).animationName) || ([] as string[]);\n const filteredAnimations: CSSAnimation[] = [];\n\n effectNames.forEach((name) => {\n if (animationNames.includes(name)) {\n filteredAnimations.push(\n animations?.find((anim) => (anim as CSSAnimation).animationName === name) as CSSAnimation,\n );\n }\n });\n\n return filteredAnimations?.length ? new AnimationGroup(filteredAnimations) : null;\n}\n\nfunction getElementAnimation(\n target: HTMLElement | string,\n effectId: string,\n): AnimationGroup | null {\n const element = typeof target === 'string' ? getElement(target) : target;\n // somehow get the right animations\n const animations = element?.getAnimations().filter((anim: Animation | CSSAnimation) => {\n const id = anim.id || (anim as CSSAnimation).animationName;\n // if no id/name just return all animations\n return id ? id.startsWith(effectId) : true;\n });\n\n return animations?.length ? new AnimationGroup(animations) : null;\n}\n\nfunction getScrubScene(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger: Partial<TriggerVariant> & { element?: HTMLElement },\n sceneOptions: Record<string, any> = {},\n): ScrubScrollScene[] | ScrubPointerScene | ScrubPointerScene[] | null {\n const { disabled, allowActiveEvent, ...rest } = sceneOptions;\n const animation = getWebAnimation(target, animationOptions, trigger, rest);\n\n // Return null if animation could not be created\n if (!animation) {\n return null;\n }\n\n let typeSpecificOptions = {} as Record<string, any>;\n\n if (trigger.trigger === 'view-progress' && !window.ViewTimeline) {\n // TODO(ameerf): consider doing this only for bgscrub to not affect the other scroll effects\n const viewSource = trigger.element || getElement(trigger.componentId!);\n const { ready } = animation as AnimationGroup;\n\n return (animation as AnimationGroup).animations.map((partialAnimation) => {\n return {\n /* we use getters for start and end in order to access the animation's start and end\n only when initializing the scrub scene rather than immediately */\n get start() {\n return partialAnimation.start;\n },\n get end() {\n return partialAnimation.end;\n },\n viewSource,\n ready,\n getProgress() {\n return (animation as AnimationGroup).getProgress();\n },\n effect(__: any, p: number) {\n const { activeDuration } = partialAnimation.effect!.getComputedTiming();\n const { delay } = partialAnimation.effect!.getTiming();\n\n partialAnimation.currentTime = ((delay || 0) + ((activeDuration as number) || 0)) * p;\n },\n disabled,\n destroy() {\n partialAnimation.cancel();\n },\n } as ScrubScrollScene;\n });\n } else if (trigger.trigger === 'pointer-move') {\n const scrubOptions = animationOptions as ScrubAnimationOptions;\n const { centeredToTarget, transitionDuration, transitionEasing } = scrubOptions;\n const axis = (trigger as { axis?: PointerMoveAxis }).axis;\n\n if (scrubOptions.keyframeEffect) {\n const animationGroup = animation as AnimationGroup;\n\n if (animationGroup.animations?.length === 0) {\n return null;\n }\n\n const scene: ScrubPointerScene & { _currentProgress: number } = {\n target: undefined,\n centeredToTarget,\n ready: animationGroup.ready,\n _currentProgress: 0,\n getProgress() {\n return this._currentProgress;\n },\n effect(__: any, p: { x: number; y: number }) {\n const linearProgress = axis === 'x' ? p.x : p.y;\n this._currentProgress = linearProgress;\n animationGroup.progress(linearProgress);\n },\n disabled: disabled ?? false,\n destroy() {\n animationGroup.cancel();\n },\n };\n\n return scene;\n }\n\n typeSpecificOptions = {\n centeredToTarget,\n allowActiveEvent,\n };\n\n if (animationOptions.customEffect && transitionDuration) {\n typeSpecificOptions.transitionDuration = transitionDuration;\n // TODO: refactor js easings\n typeSpecificOptions.transitionEasing = getJsEasing(transitionEasing);\n }\n typeSpecificOptions.target = (animation as MouseAnimationInstance).target;\n }\n\n return {\n ...typeSpecificOptions,\n getProgress() {\n return (animation as AnimationGroup | CustomMouseAnimationInstance).getProgress();\n },\n effect(\n __: any,\n p: number | { x: number; y: number },\n v?: { x: number; y: number },\n active?: boolean,\n ) {\n animation.progress(\n v\n ? {\n // @ts-expect-error spread error on p\n ...p,\n v,\n active,\n }\n : p,\n );\n },\n disabled,\n destroy() {\n animation.cancel();\n },\n } as ScrubPointerScene;\n}\n\nfunction getAnimation(\n target: HTMLElement | string | null,\n animationOptions: AnimationOptions,\n trigger?: Partial<TriggerVariant> & { element?: HTMLElement },\n reducedMotion: boolean = false,\n): AnimationGroup | MouseAnimationInstance | null {\n const animation = getElementCSSAnimation(target, animationOptions);\n\n if (animation) {\n animation.ready = new Promise((resolve) => {\n prepareAnimation(target, animationOptions, resolve);\n });\n\n return animation;\n }\n\n return getWebAnimation(target, animationOptions, trigger, { reducedMotion });\n}\n\nexport {\n getCSSAnimation,\n getWebAnimation,\n getElementCSSAnimation,\n getElementAnimation,\n getScrubScene,\n prepareAnimation,\n getAnimation,\n getEasing,\n};\n\nexport type { AnimationGroup };\n"],"names":["AnimationGroup","animations","options","callback","animation","p","delay","duration","iterations","time","rate","a","target","endEvent","_error","linear","t","sineIn","sineOut","sineInOut","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","expoIn","expoOut","expoInOut","circIn","circOut","circInOut","backIn","backOut","backInOut","k","jsEasings","cssEasings","getCssUnits","type","getEasing","easing","getJsEasing","CustomAnimation","customEffect","effectOptions","timingOptions","effect","timeline","progress","_","error","speed","uid","e","tl","cb","playbackRate","listener","event","win","debug","raf","FastDom","self","tasks","task","fn","ctx","scheduleFlush","remove","props","child","mixin","fastdom","flush","writes","reads","array","item","index","source","key","exports","module","this","registry","registerEffects","effects","getRegisteredEffect","name","getElement","id","ownerDocument","getElementMotionPart","element","part","getDirection","alternate","getLength","length","getRange","range","add","isEnd","getRanges","measure","mutate","getNamedEffect","effectName","animation_","keyframes","effectId","getEffectsData","trigger","isNotAScrubTrigger","getWebAnimationEffect","preset","domApi","getWebAnimation","animationOptions","mouseAnimationPreset","mouseAnimationFactory","namedEffect","animationsData","data","isViewProgress","effectTarget","keyframeEffect","start","end","startOffset","endOffset","startOffsetToWrite","endOffsetToWrite","resolve","getAnimationTarget","getAnimationAsCSS","isRunning","fill","direction","animationName","isAutoDuration","getCSSAnimationEffect","getCSSAnimation","prepareAnimation","getElementCSSAnimation","getElementAnimation","effectNames","animationNames","anim","filteredAnimations","getScrubScene","sceneOptions","disabled","allowActiveEvent","rest","typeSpecificOptions","viewSource","ready","partialAnimation","__","activeDuration","scrubOptions","centeredToTarget","transitionDuration","transitionEasing","axis","animationGroup","linearProgress","v","active","getAnimation","reducedMotion"],"mappings":"AAQO,MAAMA,EAAe;AAAA,EAC1B;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAYC,GAAyBC,GAAiC;AACpE,SAAK,aAAaD,GAClB,KAAK,UAAU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AAyB,IACuB;AAChD,QAAM/K,IAAYoJ,GAAuB5I,GAAQkH,CAAgB;AAEjE,SAAI1H,KACFA,EAAU,QAAQ,IAAI,QAAQ,CAACyI,MAAY;AACzC,IAAAU,GAAiB3I,GAAQkH,GAAkBe,CAAO;AAAA,EACpD,CAAC,GAEMzI,KAGFyH,EAAgBjH,GAAQkH,GAAkBN,GAAS,EAAE,eAAA2D,GAAe;AAC7E;","x_google_ignoreList":[4]}
@@ -1 +1 @@
1
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/external-types.d.ts","../../../node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/tasks.d-C7UxawJ9.d.ts","../../../node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/traces.d.402V_yFI.d.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/@vitest/snapshot/dist/environment.d-DHdQ1Csl.d.ts","../../../node_modules/@vitest/snapshot/dist/rawSnapshot.d-lFsMJFUd.d.ts","../../../node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/config.d.Cy95HiCx.d.ts","../../../node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/vitest/dist/chunks/rpc.d.RH3apGEf.d.ts","../../../node_modules/vitest/dist/chunks/worker.d.Dyxm8DEL.d.ts","../../../node_modules/vitest/dist/chunks/browser.d.ChKACdzH.d.ts","../../../node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/tinybench/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/vitest/dist/chunks/global.d.B15mdLcR.d.ts","../../../node_modules/vitest/dist/chunks/suite.d.BJWk38HB.d.ts","../../../node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/expect-type/dist/utils.d.ts","../../../node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/expect-type/dist/branding.d.ts","../../../node_modules/expect-type/dist/messages.d.ts","../../../node_modules/expect-type/dist/index.d.ts","../../../node_modules/vitest/dist/index.d.ts","../../../node_modules/vitest/globals.d.ts","../src/test-types.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../src/types.ts","../src/AnimationGroup.ts","../src/CustomAnimation.ts","../src/easings.ts","../src/utils.ts","../../../node_modules/fastdom/fastdom.d.ts","../src/api/registry.ts","../src/api/common.ts","../src/api/webAnimations.ts","../src/api/cssAnimations.ts","../src/api/prepare.ts","../src/motion.ts","../src/index.ts","../../../node_modules/@types/aria-query/index.d.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/estree-jsx/index.d.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../../../node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[126],[126,127,128,129,130],[126,128],[89,90],[132],[134,135],[136],[110],[107,108,109],[62,66,69,71,86,87,88,91,96],[66,67,69,70],[66],[66,67,69],[66,67],[61,78,79],[61,78],[61,68],[61],[63],[61,62,63,64,65],[99,100],[99,100,101,102],[99,101],[99],[73],[73,74,75,76],[75],[71,93,94,96],[71,72,84,96],[61,69,71,80,96],[77],[61,71,80,83,92,95,96],[71,72,77,80,96],[71,93,94,95,96],[71,77,81,82,83,96],[61,66,69,71,72,77,80,81,82,83,84,85,86,92,93,94,95,96,97,98,103],[104],[111,112],[111],[111,112,116,117,118],[111,112,119],[111,112,117,119],[111,112,113,114,117,119],[111,112,115,116,118,123],[111,112,113,116,119,120,121,122],[105],[111,115]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc947627f070ce2adfc2cb7bfabd0a4bf1157b2942daf83f4f2dced2eaacd8b","impliedFormat":1},{"version":"acfb723d81eda39156251aed414c553294870bf53062429ebfcfba8a68cb4753","impliedFormat":99},{"version":"fa69a90381c2f85889722a911a732a5ee3596dc3acecda8a9aa2fa89b9615d8d","impliedFormat":99},{"version":"b5ce343886d23392be9c8280e9f24a87f1d7d3667f6672c2fe4aa61fa4ece7d4","impliedFormat":99},{"version":"57e9e1b0911874c62d743af24b5d56032759846533641d550b12a45ff404bf07","impliedFormat":99},{"version":"b0857bb28fd5236ace84280f79a25093f919fd0eff13e47cc26ea03de60a7294","impliedFormat":99},{"version":"5e43e0824f10cd8c48e7a8c5c673638488925a12c31f0f9e0957965c290eb14c","impliedFormat":99},{"version":"854cd3a3375ffc4e7a92b2168dd065d7ff2614b43341038a65cca865a44c00c5","impliedFormat":99},{"version":"ef13c73d6157a32933c612d476c1524dd674cf5b9a88571d7d6a0d147544d529","impliedFormat":99},{"version":"3b0a56d056d81a011e484b9c05d5e430711aaecd561a788bad1d0498aad782c7","impliedFormat":99},{"version":"2f863ee9b873a65d9c3338ea7aaddbdb41a9673f062f06983d712bd01c25dc6b","impliedFormat":99},{"version":"67aa128c2bc170b93794f191feffc65a4b33e878db211cfcb7658c4b72f7a1f5","impliedFormat":99},{"version":"ac3d263474022e9a14c43f588f485d549641d839b159ecc971978b90f34bdf6b","impliedFormat":99},{"version":"a7ca8df4f2931bef2aa4118078584d84a0b16539598eaadf7dce9104dfaa381c","impliedFormat":1},{"version":"10073cdcf56982064c5337787cc59b79586131e1b28c106ede5bff362f912b70","impliedFormat":99},{"version":"72950913f4900b680f44d8cab6dd1ea0311698fc1eefb014eb9cdfc37ac4a734","impliedFormat":1},{"version":"36977c14a7f7bfc8c0426ae4343875689949fb699f3f84ecbe5b300ebf9a2c55","impliedFormat":1},{"version":"ff0a83c9a0489a627e264ffcb63f2264b935b20a502afa3a018848139e3d8575","impliedFormat":99},{"version":"324ac98294dab54fbd580c7d0e707d94506d7b2c3d5efe981a8495f02cf9ad96","impliedFormat":99},{"version":"9ec72eb493ff209b470467e24264116b6a8616484bca438091433a545dfba17e","impliedFormat":99},{"version":"c35b8117804c639c53c87f2c23e0c786df61d552e513bd5179f5b88e29964838","impliedFormat":99},{"version":"c609331c6ed4ad4af54e101088c6a4dcb48f8db7b0b97e44a6efeb130f4331bd","impliedFormat":99},{"version":"bcbd3becd08b4515225880abea0dbfbbf0d1181ce3af8f18f72f61edbe4febfb","impliedFormat":99},{"version":"67acaedb46832d66c15f1b09fb7b6a0b7f41bdbf8eaa586ec70459b3e8896eb9","impliedFormat":99},{"version":"4535ab977ee871e956eb7bebe2db5de79f5d5ec7dfbbf1d35e08f4a2d6630dac","impliedFormat":99},{"version":"b79b5ed99f26ffb2f8ae4bdcc4b34a9542197dc3fa96cfb425c2a81e618cff28","impliedFormat":99},{"version":"31fd7c12f6e27154efb52a916b872509a771880f3b20f2dfd045785c13aa813f","impliedFormat":99},{"version":"b481de4ab5379bd481ca12fc0b255cdc47341629a22c240a89cdb4e209522be2","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"4e258d11c899cb9ff36b4b5c53df59cf4a5ccae9a9931529686e77431e0a3518","affectsGlobalScope":true,"impliedFormat":99},{"version":"a5ae67a67f786ffe92d34b55467a40fb50fb0093e92388cadce6168fa42690fd","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"6987dfb4b0c4e02112cc4e548e7a77b3d9ddfeffa8c8a2db13ceac361a4567d9","impliedFormat":99},{"version":"a534e61c2f06a147d97aebad720db97dffd8066b7142212e46bcbcdcb640b81a","impliedFormat":99},{"version":"ddf569d04470a4d629090d43a16735185001f3fcf0ae036ead99f2ceab62be48","impliedFormat":99},{"version":"b413fbc6658fe2774f8bf9a15cf4c53e586fc38a2d5256b3b9647da242c14389","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"53c448183c7177c83d3eb0b40824cf8952721a6584cf22052adc24f778986732","impliedFormat":99},{"version":"0a5bc32362b0559b9bcf0a6a83136c4442dbbd0edecd671538a5e03454b6dff0","affectsGlobalScope":true,"impliedFormat":99},{"version":"378885a4719497698facdf5f16941c8061bfeffd2e7197f1975ada30f90fcbf1","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"1209ab96ad4f3688afc05e41d23e8bc03f70618bdbaed5e5da617376a8a345da","signature":"efb24a7e90242942e5c62fc983fddf1034cdd41df32500ca0351088eae74245c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b5cebf090739b3c7252449c9cff8da6dce4762393559ce0a131264e6b735a77","signature":"881c0aa1e20c91e65b653ddc5a29d5237ce3541ebe31eff386ba52b90d651c42","impliedFormat":1},{"version":"e4b0446daac1715086dc2942eeab4e506dc2181fc39dfa851f253b0d20c54ae2","signature":"1fd1f31e774e2f5250997100897e8a56323a1d35e427bc17859b75c0c0b1729d","impliedFormat":1},{"version":"18422378b40e283846648bb0f5beb1993cf12ba557abab8339c199169db37888","signature":"14611ab925e5787ea4cc9289422cee96a5e7ecf012f2c4d5272a47a6ffc7592c","impliedFormat":1},{"version":"92c029c9e162eebbe9fb3ab57a5661b58e666da33bf57ec36e5c3459a4da349a","signature":"166f8381cd4e655a9b76a29fa77c965ce1a54081b5383376b63ae4ab67aa017b","impliedFormat":1},{"version":"0021fffc42233d659de1469140b99ad163c3e030bf96681d1010b35c40fe0704","impliedFormat":1},{"version":"f1a7cebddf64d2210597735fc9bd3a4715a7b8796edcb45725eea6641e2110a0","signature":"96c21e3a9998db4f8928f1f68660092a291c7298e1e13843d58c968aaa45e093","impliedFormat":1},{"version":"ff19f4d61ee886be975ab52b13c3eca79ab0f7b59598a492c6a1d70c5a816f5e","signature":"11362bb1099b4db7567fc469b5dd0d57e12913c1c3b4630e56652872feb8f224","impliedFormat":1},{"version":"b084fdae0bea4c15cb20abfe1e2661be8d8aabc5e168510cc263549aae5489bb","signature":"cdaece4a30b7e5603e1e9b762f60b47c5a47d1396767f64c299b0a7523ef17ca","impliedFormat":1},{"version":"8bb46867f837c5f6dfbe992d2960834b4489bb2a36522713923e888f44f1c6f0","signature":"aba63c2265691f594a456e324d2305262283fcd441a88861a92502240aa4b3a6","impliedFormat":1},{"version":"01b7dafb68a00c39ada14fb0baf2a0e0383caac7cae3d0ae85072462c2e9e7be","signature":"e36f6128e267027b803044df43f3371c48ce5edc4b530573d6090fc7178ab236","impliedFormat":1},{"version":"db54041f41a437c5be8d5a0c0d4e6c51def49588bb65d48010fa8b5db22811d1","signature":"8ce02860a20541a6ffaee34fc8a3efafd1fb708c6a4603233cc572860e07340c","impliedFormat":1},{"version":"0c8f234b5f11814cd03a7aa44d6bab260c66640066f276a71f879e5db55f9733","impliedFormat":1},{"version":"ae77d81a5541a8abb938a0efedf9ac4bea36fb3a24cc28cfa11c598863aba571","impliedFormat":1},{"version":"511a5f4f77165dc1b73ceae1e28b4a8f78f3443d8e18a1fd43bfafd2b0133bbe","impliedFormat":1},{"version":"b6d03c9cfe2cf0ba4c673c209fcd7c46c815b2619fd2aad59fc4229aaef2ed43","impliedFormat":1},{"version":"95aba78013d782537cc5e23868e736bec5d377b918990e28ed56110e3ae8b958","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"13b77ab19ef7aadd86a1e54f2f08ea23a6d74e102909e3c00d31f231ed040f62","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"5d08a179b846f5ee674624b349ebebe2121c455e3a265dc93da4e8d9e89722b4","impliedFormat":1},{"version":"89121c1bf2990f5219bfd802a3e7fc557de447c62058d6af68d6b6348d64499a","impliedFormat":1},{"version":"79b4369233a12c6fa4a07301ecb7085802c98f3a77cf9ab97eee27e1656f82e6","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"d4a22007b481fe2a2e6bfd3a42c00cd62d41edb36d30fc4697df2692e9891fc8","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[60,106,[112,116],[118,124]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./types","declarationMap":true,"emitDeclarationOnly":true,"jsx":4,"module":199,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./es","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9},"referencedMap":[[128,1],[131,2],[127,1],[129,3],[130,1],[91,4],[133,5],[135,6],[137,7],[139,7],[140,8],[110,9],[111,8],[92,10],[71,11],[67,12],[70,13],[93,14],[80,15],[79,16],[69,17],[62,18],[64,19],[66,20],[68,18],[101,21],[103,22],[102,23],[100,24],[74,25],[77,26],[75,25],[76,27],[95,28],[85,29],[81,30],[82,12],[98,31],[96,32],[83,33],[97,34],[84,35],[104,36],[105,37],[113,38],[114,39],[119,40],[121,41],[122,42],[118,38],[120,43],[115,39],[124,44],[123,45],[106,46],[112,39],[116,47]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.9.3"}
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/external-types.d.ts","../../../node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/tasks.d-C7UxawJ9.d.ts","../../../node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/traces.d.402V_yFI.d.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/@vitest/snapshot/dist/environment.d-DHdQ1Csl.d.ts","../../../node_modules/@vitest/snapshot/dist/rawSnapshot.d-lFsMJFUd.d.ts","../../../node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/config.d.Cy95HiCx.d.ts","../../../node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/vitest/dist/chunks/rpc.d.RH3apGEf.d.ts","../../../node_modules/vitest/dist/chunks/worker.d.Dyxm8DEL.d.ts","../../../node_modules/vitest/dist/chunks/browser.d.ChKACdzH.d.ts","../../../node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/tinybench/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/vitest/dist/chunks/global.d.B15mdLcR.d.ts","../../../node_modules/vitest/dist/chunks/suite.d.BJWk38HB.d.ts","../../../node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/expect-type/dist/utils.d.ts","../../../node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/expect-type/dist/branding.d.ts","../../../node_modules/expect-type/dist/messages.d.ts","../../../node_modules/expect-type/dist/index.d.ts","../../../node_modules/vitest/dist/index.d.ts","../../../node_modules/vitest/globals.d.ts","../src/test-types.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../src/types.ts","../src/AnimationGroup.ts","../src/CustomAnimation.ts","../src/easings.ts","../src/utils.ts","../../../node_modules/fastdom/fastdom.d.ts","../src/api/registry.ts","../src/api/common.ts","../src/api/webAnimations.ts","../src/api/cssAnimations.ts","../src/api/prepare.ts","../src/motion.ts","../src/index.ts","../../../node_modules/@types/aria-query/index.d.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/estree-jsx/index.d.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../../../node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[126],[126,127,128,129,130],[126,128],[89,90],[132],[134,135],[136],[110],[107,108,109],[62,66,69,71,86,87,88,91,96],[66,67,69,70],[66],[66,67,69],[66,67],[61,78,79],[61,78],[61,68],[61],[63],[61,62,63,64,65],[99,100],[99,100,101,102],[99,101],[99],[73],[73,74,75,76],[75],[71,93,94,96],[71,72,84,96],[61,69,71,80,96],[77],[61,71,80,83,92,95,96],[71,72,77,80,96],[71,93,94,95,96],[71,77,81,82,83,96],[61,66,69,71,72,77,80,81,82,83,84,85,86,92,93,94,95,96,97,98,103],[104],[111,112],[111],[111,112,116,117,118],[111,112,119],[111,112,117,119],[111,112,113,114,117,119],[111,112,115,116,118,123],[111,112,113,116,119,120,121,122],[105],[111,115]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc947627f070ce2adfc2cb7bfabd0a4bf1157b2942daf83f4f2dced2eaacd8b","impliedFormat":1},{"version":"acfb723d81eda39156251aed414c553294870bf53062429ebfcfba8a68cb4753","impliedFormat":99},{"version":"fa69a90381c2f85889722a911a732a5ee3596dc3acecda8a9aa2fa89b9615d8d","impliedFormat":99},{"version":"b5ce343886d23392be9c8280e9f24a87f1d7d3667f6672c2fe4aa61fa4ece7d4","impliedFormat":99},{"version":"57e9e1b0911874c62d743af24b5d56032759846533641d550b12a45ff404bf07","impliedFormat":99},{"version":"b0857bb28fd5236ace84280f79a25093f919fd0eff13e47cc26ea03de60a7294","impliedFormat":99},{"version":"5e43e0824f10cd8c48e7a8c5c673638488925a12c31f0f9e0957965c290eb14c","impliedFormat":99},{"version":"854cd3a3375ffc4e7a92b2168dd065d7ff2614b43341038a65cca865a44c00c5","impliedFormat":99},{"version":"ef13c73d6157a32933c612d476c1524dd674cf5b9a88571d7d6a0d147544d529","impliedFormat":99},{"version":"3b0a56d056d81a011e484b9c05d5e430711aaecd561a788bad1d0498aad782c7","impliedFormat":99},{"version":"2f863ee9b873a65d9c3338ea7aaddbdb41a9673f062f06983d712bd01c25dc6b","impliedFormat":99},{"version":"67aa128c2bc170b93794f191feffc65a4b33e878db211cfcb7658c4b72f7a1f5","impliedFormat":99},{"version":"ac3d263474022e9a14c43f588f485d549641d839b159ecc971978b90f34bdf6b","impliedFormat":99},{"version":"a7ca8df4f2931bef2aa4118078584d84a0b16539598eaadf7dce9104dfaa381c","impliedFormat":1},{"version":"10073cdcf56982064c5337787cc59b79586131e1b28c106ede5bff362f912b70","impliedFormat":99},{"version":"72950913f4900b680f44d8cab6dd1ea0311698fc1eefb014eb9cdfc37ac4a734","impliedFormat":1},{"version":"36977c14a7f7bfc8c0426ae4343875689949fb699f3f84ecbe5b300ebf9a2c55","impliedFormat":1},{"version":"ff0a83c9a0489a627e264ffcb63f2264b935b20a502afa3a018848139e3d8575","impliedFormat":99},{"version":"324ac98294dab54fbd580c7d0e707d94506d7b2c3d5efe981a8495f02cf9ad96","impliedFormat":99},{"version":"9ec72eb493ff209b470467e24264116b6a8616484bca438091433a545dfba17e","impliedFormat":99},{"version":"c35b8117804c639c53c87f2c23e0c786df61d552e513bd5179f5b88e29964838","impliedFormat":99},{"version":"c609331c6ed4ad4af54e101088c6a4dcb48f8db7b0b97e44a6efeb130f4331bd","impliedFormat":99},{"version":"bcbd3becd08b4515225880abea0dbfbbf0d1181ce3af8f18f72f61edbe4febfb","impliedFormat":99},{"version":"67acaedb46832d66c15f1b09fb7b6a0b7f41bdbf8eaa586ec70459b3e8896eb9","impliedFormat":99},{"version":"4535ab977ee871e956eb7bebe2db5de79f5d5ec7dfbbf1d35e08f4a2d6630dac","impliedFormat":99},{"version":"b79b5ed99f26ffb2f8ae4bdcc4b34a9542197dc3fa96cfb425c2a81e618cff28","impliedFormat":99},{"version":"31fd7c12f6e27154efb52a916b872509a771880f3b20f2dfd045785c13aa813f","impliedFormat":99},{"version":"b481de4ab5379bd481ca12fc0b255cdc47341629a22c240a89cdb4e209522be2","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"4e258d11c899cb9ff36b4b5c53df59cf4a5ccae9a9931529686e77431e0a3518","affectsGlobalScope":true,"impliedFormat":99},{"version":"a5ae67a67f786ffe92d34b55467a40fb50fb0093e92388cadce6168fa42690fd","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"6987dfb4b0c4e02112cc4e548e7a77b3d9ddfeffa8c8a2db13ceac361a4567d9","impliedFormat":99},{"version":"a534e61c2f06a147d97aebad720db97dffd8066b7142212e46bcbcdcb640b81a","impliedFormat":99},{"version":"ddf569d04470a4d629090d43a16735185001f3fcf0ae036ead99f2ceab62be48","impliedFormat":99},{"version":"b413fbc6658fe2774f8bf9a15cf4c53e586fc38a2d5256b3b9647da242c14389","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"53c448183c7177c83d3eb0b40824cf8952721a6584cf22052adc24f778986732","impliedFormat":99},{"version":"0a5bc32362b0559b9bcf0a6a83136c4442dbbd0edecd671538a5e03454b6dff0","affectsGlobalScope":true,"impliedFormat":99},{"version":"378885a4719497698facdf5f16941c8061bfeffd2e7197f1975ada30f90fcbf1","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"2aa1a93e88bc708866985d85fd2e7fd9a885fdce01885e22266226bbf2b9e898","signature":"65c9d05e68219860ab5307c440cce65af318ad4a93ffdcd4d08f04ace1a9c43f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b5cebf090739b3c7252449c9cff8da6dce4762393559ce0a131264e6b735a77","signature":"881c0aa1e20c91e65b653ddc5a29d5237ce3541ebe31eff386ba52b90d651c42","impliedFormat":1},{"version":"e4b0446daac1715086dc2942eeab4e506dc2181fc39dfa851f253b0d20c54ae2","signature":"1fd1f31e774e2f5250997100897e8a56323a1d35e427bc17859b75c0c0b1729d","impliedFormat":1},{"version":"18422378b40e283846648bb0f5beb1993cf12ba557abab8339c199169db37888","signature":"14611ab925e5787ea4cc9289422cee96a5e7ecf012f2c4d5272a47a6ffc7592c","impliedFormat":1},{"version":"92c029c9e162eebbe9fb3ab57a5661b58e666da33bf57ec36e5c3459a4da349a","signature":"166f8381cd4e655a9b76a29fa77c965ce1a54081b5383376b63ae4ab67aa017b","impliedFormat":1},{"version":"0021fffc42233d659de1469140b99ad163c3e030bf96681d1010b35c40fe0704","impliedFormat":1},{"version":"f1a7cebddf64d2210597735fc9bd3a4715a7b8796edcb45725eea6641e2110a0","signature":"96c21e3a9998db4f8928f1f68660092a291c7298e1e13843d58c968aaa45e093","impliedFormat":1},{"version":"dfde43fd6b2759082f7ccbe8bf2762750c99b6f1db192f470423b922434093db","signature":"11362bb1099b4db7567fc469b5dd0d57e12913c1c3b4630e56652872feb8f224","impliedFormat":1},{"version":"b084fdae0bea4c15cb20abfe1e2661be8d8aabc5e168510cc263549aae5489bb","signature":"cdaece4a30b7e5603e1e9b762f60b47c5a47d1396767f64c299b0a7523ef17ca","impliedFormat":1},{"version":"8bb46867f837c5f6dfbe992d2960834b4489bb2a36522713923e888f44f1c6f0","signature":"aba63c2265691f594a456e324d2305262283fcd441a88861a92502240aa4b3a6","impliedFormat":1},{"version":"01b7dafb68a00c39ada14fb0baf2a0e0383caac7cae3d0ae85072462c2e9e7be","signature":"e36f6128e267027b803044df43f3371c48ce5edc4b530573d6090fc7178ab236","impliedFormat":1},{"version":"db54041f41a437c5be8d5a0c0d4e6c51def49588bb65d48010fa8b5db22811d1","signature":"8ce02860a20541a6ffaee34fc8a3efafd1fb708c6a4603233cc572860e07340c","impliedFormat":1},{"version":"0c8f234b5f11814cd03a7aa44d6bab260c66640066f276a71f879e5db55f9733","impliedFormat":1},{"version":"ae77d81a5541a8abb938a0efedf9ac4bea36fb3a24cc28cfa11c598863aba571","impliedFormat":1},{"version":"511a5f4f77165dc1b73ceae1e28b4a8f78f3443d8e18a1fd43bfafd2b0133bbe","impliedFormat":1},{"version":"b6d03c9cfe2cf0ba4c673c209fcd7c46c815b2619fd2aad59fc4229aaef2ed43","impliedFormat":1},{"version":"95aba78013d782537cc5e23868e736bec5d377b918990e28ed56110e3ae8b958","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"13b77ab19ef7aadd86a1e54f2f08ea23a6d74e102909e3c00d31f231ed040f62","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"5d08a179b846f5ee674624b349ebebe2121c455e3a265dc93da4e8d9e89722b4","impliedFormat":1},{"version":"89121c1bf2990f5219bfd802a3e7fc557de447c62058d6af68d6b6348d64499a","impliedFormat":1},{"version":"79b4369233a12c6fa4a07301ecb7085802c98f3a77cf9ab97eee27e1656f82e6","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"d4a22007b481fe2a2e6bfd3a42c00cd62d41edb36d30fc4697df2692e9891fc8","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[60,106,[112,116],[118,124]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./types","declarationMap":true,"emitDeclarationOnly":true,"jsx":4,"module":199,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./es","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9},"referencedMap":[[128,1],[131,2],[127,1],[129,3],[130,1],[91,4],[133,5],[135,6],[137,7],[139,7],[140,8],[110,9],[111,8],[92,10],[71,11],[67,12],[70,13],[93,14],[80,15],[79,16],[69,17],[62,18],[64,19],[66,20],[68,18],[101,21],[103,22],[102,23],[100,24],[74,25],[77,26],[75,25],[76,27],[95,28],[85,29],[81,30],[82,12],[98,31],[96,32],[83,33],[97,34],[84,35],[104,36],[105,37],[113,38],[114,39],[119,40],[121,41],[122,42],[118,38],[120,43],[115,39],[124,44],[123,45],[106,46],[112,39],[116,47]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.9.3"}
@@ -1,11 +1,11 @@
1
1
  type LengthUnit = 'px' | 'em' | 'rem' | 'vh' | 'vw' | 'vmin' | 'vmax';
2
2
  export declare type Length = {
3
3
  value: number;
4
- type: LengthUnit;
4
+ unit: LengthUnit;
5
5
  };
6
6
  export declare type Percentage = {
7
7
  value: number;
8
- type: 'percentage';
8
+ unit: 'percentage';
9
9
  };
10
10
  export declare type LengthPercentage = Length | Percentage;
11
11
  export declare type UnitLengthPercentage = LengthPercentage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/motion",
3
- "version": "2.0.0-rc.6",
3
+ "version": "3.0.0",
4
4
  "description": "High-performance animation toolkit for the web, powering Wix motion presets and tooling.",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/motion.js",
@@ -62,6 +62,5 @@
62
62
  "typescript": "^5.9.3",
63
63
  "vite": "^7.2.2",
64
64
  "vitest": "^4.0.14"
65
- },
66
- "stableVersion": "2.0.0"
65
+ }
67
66
  }