motion-v 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.js +3722 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/src/components/AnimatePresence.d.ts +51 -0
- package/dist/src/components/Motion.d.ts +29 -0
- package/dist/src/components/Primitive.d.ts +39 -0
- package/dist/src/components/Slot.d.ts +5 -0
- package/dist/src/components/context.d.ts +7 -0
- package/dist/src/components/presence.d.ts +7 -0
- package/dist/src/components/renderSlotFragments.d.ts +2 -0
- package/dist/src/components/usePrimitiveElement.d.ts +5 -0
- package/dist/src/components/utils.d.ts +3 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/shared/index.d.ts +0 -0
- package/dist/src/state/event.d.ts +6 -0
- package/dist/src/state/features/events.d.ts +6 -0
- package/dist/src/state/features/feature.d.ts +15 -0
- package/dist/src/state/features/gestures/base.d.ts +10 -0
- package/dist/src/state/features/gestures/hover.d.ts +10 -0
- package/dist/src/state/features/gestures/in-view.d.ts +8 -0
- package/dist/src/state/features/gestures/index.d.ts +4 -0
- package/dist/src/state/features/gestures/press.d.ts +8 -0
- package/dist/src/state/features/gestures/types.d.ts +9 -0
- package/dist/src/state/features/index.d.ts +3 -0
- package/dist/src/state/index.d.ts +1 -0
- package/dist/src/state/motion-state.d.ts +31 -0
- package/dist/src/state/schedule.d.ts +3 -0
- package/dist/src/state/style.d.ts +6 -0
- package/dist/src/state/transform.d.ts +25 -0
- package/dist/src/state/types.d.ts +56 -0
- package/dist/src/state/utils.d.ts +16 -0
- package/dist/src/types/index.d.ts +14 -0
- package/dist/src/utils/createContext.d.ts +8 -0
- package/dist/src/utils/events.d.ts +2 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(d,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],v):(d=typeof globalThis<"u"?globalThis:d||self,v(d["motion-vue"]={},d.vue))})(this,function(d,v){"use strict";function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function Re(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Be{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>Re(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Nt(e,t){return t?e*(1e3/t):0}const Le=new Set;function vt(e,t,n){e||Le.has(t)||(console.warn(t),Le.add(t))}const ks={skipAnimations:!1,useManualTiming:!1},B=e=>e;function Gs(e){let t=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const m=f&&s?t:n;return c&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[t,n]=[n,t],n.clear(),t.forEach(a),s=!1,i&&(i=!1,l.process(u))}};return l}const st=["read","resolveKeyframes","update","preRender","render","postRender"],zs=40;function js(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=st.reduce((y,b)=>(y[b]=Gs(r),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:h}=o,m=()=>{const y=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,zs),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(m))},g=()=>{n=!0,s=!0,i.isProcessing||e(m)};return{schedule:st.reduce((y,b)=>{const A=o[b];return y[b]=(E,V=!1,x=!1)=>(n||g(),A.schedule(E,V,x)),y},{}),cancel:y=>{for(let b=0;b<st.length;b++)o[st[b]].cancel(y)},state:i,steps:o}}const{schedule:P,cancel:L,state:q,steps:Us}=js(typeof requestAnimationFrame<"u"?requestAnimationFrame:B,!0);let bt;function Hs(){bt=void 0}const N={now:()=>(bt===void 0&&N.set(q.isProcessing||ks.useManualTiming?q.timestamp:performance.now()),bt),set:e=>{bt=e,queueMicrotask(Hs)}},Ne=30,qs=e=>!isNaN(parseFloat(e));class $e{constructor(t,n={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=N.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=N.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qs(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Be);const s=this.events[t].add(n);return t==="change"?()=>{s(),P.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ne)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ne);return Nt(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Y(e,t){return new $e(e,t)}function wt(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ke=wt(()=>window.ScrollTimeline!==void 0);class $t{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(i=>Ke()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const O=e=>e*1e3,R=e=>e/1e3,Ys=5;function We(e,t,n){const s=Math.max(t-Ys,0);return Nt(n-e(s),t-s)}d.warning=B,d.invariant=B,process.env.NODE_ENV!=="production"&&(d.warning=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},d.invariant=(e,t)=>{if(!e)throw new Error(t)});const W=(e,t,n)=>n>t?t:n<e?e:n,Kt=.001,Xs=.01,_e=10,Zs=.05,Qs=1;function Js({duration:e=800,bounce:t=.25,velocity:n=0,mass:s=1}){let i,r;d.warning(e<=O(_e),"Spring duration must be 10 seconds or less");let o=1-t;o=W(Zs,Qs,o),e=W(Xs,_e,R(e)),o<1?(i=u=>{const c=u*o,f=c*e,h=c-n,m=Wt(u,o),g=Math.exp(-f);return Kt-h/m*g},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),S=Wt(Math.pow(u,2),o);return(-i(u)+Kt>0?-1:1)*((h-m)*g)/S}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Kt+c*f},r=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=ei(i,r,a);if(e=O(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const ti=12;function ei(e,t,n){let s=n;for(let i=1;i<ti;i++)s=s-e(s)/t(s);return s}function Wt(e,t){return e*Math.sqrt(1-t*t)}const ni=["duration","bounce"],si=["stiffness","damping","mass"];function ke(e,t){return t.some(n=>e[n]!==void 0)}function ii(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ke(e,si)&&ke(e,ni)){const n=Js(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Tt({keyframes:e,restDelta:t,restSpeed:n,...s}){const i=e[0],r=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:h}=ii({...s,velocity:-R(s.velocity||0)}),m=f||0,g=l/(2*Math.sqrt(a*u)),S=r-i,T=R(Math.sqrt(a/u)),y=Math.abs(S)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let b;if(g<1){const A=Wt(T,g);b=E=>{const V=Math.exp(-g*T*E);return r-V*((m+g*T*S)/A*Math.sin(A*E)+S*Math.cos(A*E))}}else if(g===1)b=A=>r-Math.exp(-T*A)*(S+(m+T*S)*A);else{const A=T*Math.sqrt(g*g-1);b=E=>{const V=Math.exp(-g*T*E),x=Math.min(A*E,300);return r-V*((m+g*T*S)*Math.sinh(x)+A*S*Math.cosh(x))/A}}return{calculatedDuration:h&&c||null,next:A=>{const E=b(A);if(h)o.done=A>=c;else{let V=0;g<1&&(V=A===0?O(m):We(b,A,E));const x=Math.abs(V)<=n,D=Math.abs(r-E)<=t;o.done=x&&D}return o.value=o.done?r:E,o}}}const _t=2e4;function Ge(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<_t;)t+=n,s=e.next(t);return t>=_t?1/0:t}function ze(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(Ge(s),_t);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:R(i)}}const it=(e,t,n)=>e+(t-e)*n,X=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};function je(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=X(0,t,s);e.push(it(n,1,i))}}function kt(e){const t=[0];return je(t,e.length-1),t}const F=e=>!!(e&&e.getVelocity);function St(e,t,n){var s;if(typeof e=="string"){let i=document;t&&(d.invariant(!!t.current,"Scope provided, but no element detected."),i=t.current),n?((s=n[e])!==null&&s!==void 0||(n[e]=i.querySelectorAll(e)),e=n[e]):e=i.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function Gt(e){return typeof e=="object"&&!Array.isArray(e)}function Ue(e,t,n,s){return typeof e=="string"&&Gt(t)?St(e,n,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function rt(e){return typeof e=="function"}function He(e,t,n,s){var i;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(i=s.get(t))!==null&&i!==void 0?i:e}const qe=(e,t,n)=>{const s=t-e;return((n-e)%s+s)%s+e},Ye=e=>Array.isArray(e)&&typeof e[0]!="number";function ri(e,t){return Ye(e)?e[qe(0,e.length,t)]:e}function oi(e,t,n){for(let s=0;s<e.length;s++){const i=e[s];i.at>t&&i.at<n&&(Re(e,i),s--)}}function ai(e,t,n,s,i,r){oi(e,i,r);for(let o=0;o<t.length;o++)e.push({value:t[o],at:it(i,r,s[o]),easing:ri(n,o)})}function li(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const ui="easeInOut";function ci(e,{defaultTransition:t={},...n}={},s,i){const r=t.duration||.3,o=new Map,a=new Map,l={},u=new Map;let c=0,f=0,h=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){u.set(g,f);continue}else if(!Array.isArray(g)){u.set(g.name,He(f,g.at,c,u));continue}let[S,T,y={}]=g;y.at!==void 0&&(f=He(f,y.at,c,u));let b=0;const A=(E,V,x,D=0,w=0)=>{const M=fi(E),{delay:I=0,times:H=kt(M),type:Ie="keyframes",...Ja}=V;let{ease:Fs=t.ease||"easeOut",duration:K}=V;const Ds=typeof I=="function"?I(D,w):I,Is=M.length,Rs=rt(Ie)?Ie:i==null?void 0:i[Ie];if(Is<=2&&Rs){let $s=100;if(Is===2&&pi(M)){const tl=M[1]-M[0];$s=Math.abs(tl)}const Ks={...Ja};K!==void 0&&(Ks.duration=O(K));const Ws=ze(Ks,$s,Rs);Fs=Ws.ease,K=Ws.duration}K??(K=r);const Bs=f+Ds,Ls=Bs+K;H.length===1&&H[0]===0&&(H[1]=1);const Ns=H.length-M.length;Ns>0&&je(H,Ns),M.length===1&&M.unshift(null),ai(x,M,Fs,H,Bs,Ls),b=Math.max(Ds+K,b),h=Math.max(Ls,h)};if(F(S)){const E=Xe(S,a);A(T,y,Ze("default",E))}else{const E=Ue(S,T,s,l),V=E.length;for(let x=0;x<V;x++){T=T,y=y;const D=E[x],w=Xe(D,a);for(const M in T)A(T[M],hi(y,M),Ze(M,w),x,V)}}c=f,f+=b}return a.forEach((m,g)=>{for(const S in m){const T=m[S];T.sort(li);const y=[],b=[],A=[];for(let V=0;V<T.length;V++){const{at:x,value:D,easing:w}=T[V];y.push(D),b.push(X(0,h,x)),A.push(w||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),A.unshift(ui)),b[b.length-1]!==1&&(b.push(1),y.push(null)),o.has(g)||o.set(g,{keyframes:{},transition:{}});const E=o.get(g);E.keyframes[S]=y,E.transition[S]={...t,duration:h,ease:A,times:b,...n}}}),o}function Xe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ze(e,t){return t[e]||(t[e]=[]),t[e]}function fi(e){return Array.isArray(e)?e:[e]}function hi(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const di=e=>typeof e=="number",pi=e=>e.every(di),$=new WeakMap,ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],z=new Set(ot),mi={type:"spring",stiffness:500,damping:25,restSpeed:10},gi=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yi={type:"keyframes",duration:.8},vi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bi=(e,{keyframes:t})=>t.length>2?yi:z.has(e)?e.startsWith("scale")?gi(t[1]):mi:vi;function zt(e,t){return e?e[t]||e.default||e:void 0}const wi=e=>e!==null;function at(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(wi),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const Qe=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ti=1e-7,Si=12;function Vi(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Qe(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Ti&&++a<Si);return o}function Z(e,t,n,s){if(e===t&&n===s)return B;const i=r=>Vi(r,0,1,e,n);return r=>r===0||r===1?r:Qe(i(r),t,s)}const jt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ut=e=>t=>1-e(1-t),Ht=Z(.33,1.53,.69,.99),Vt=Ut(Ht),qt=jt(Vt),Yt=e=>(e*=2)<1?.5*Vt(e):.5*(2-Math.pow(2,-10*(e-1))),At=e=>1-Math.sin(Math.acos(e)),Je=Ut(At),Xt=jt(At),tn=e=>/^0[^.\s]+$/u.test(e);function Ai(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tn(e):!0}const en=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),nn=e=>t=>typeof t=="string"&&t.startsWith(e),sn=nn("--"),Ei=nn("var(--"),Zt=e=>Ei(e)?Mi.test(e.split("/*")[0].trim()):!1,Mi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pi(e){const t=xi.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Ci=4;function rn(e,t,n=1){d.invariant(n<=Ci,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[s,i]=Pi(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return en(o)?parseFloat(o):o}return Zt(i)?rn(i,t,n+1):i}const Q={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lt={...Q,transform:e=>W(0,1,e)},Et={...Q,default:1},ut=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_=ut("deg"),J=ut("%"),p=ut("px"),Oi=ut("vh"),Fi=ut("vw"),on={...J,parse:e=>J.parse(e)/100,transform:e=>J.transform(e*100)},Di=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),an=e=>e===Q||e===p,ln=(e,t)=>parseFloat(e.split(", ")[t]),un=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return ln(i[1],t);{const r=s.match(/^matrix\((.+)\)$/u);return r?ln(r[1],e):0}},Ii=new Set(["x","y","z"]),Ri=ot.filter(e=>!Ii.has(e));function Bi(e){const t=[];return Ri.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const tt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:un(4,13),y:un(5,14)};tt.translateX=tt.x,tt.translateY=tt.y;const cn=e=>t=>t.test(e),fn=[Q,p,J,_,Fi,Oi,{test:e=>e==="auto",parse:e=>e}],hn=e=>fn.find(cn(e)),j=new Set;let Qt=!1,Jt=!1;function dn(){if(Jt){const e=Array.from(j).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Bi(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Jt=!1,Qt=!1,j.forEach(e=>e.complete()),j.clear()}function pn(){j.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Jt=!0)})}function Li(){pn(),dn()}class te{constructor(t,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(j.add(this),Qt||(Qt=!0,P.read(pn),P.resolveKeyframes(dn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;for(let r=0;r<t.length;r++)if(t[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),j.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,j.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ct=e=>Math.round(e*1e5)/1e5,ee=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ni(e){return e==null}const $i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ne=(e,t)=>n=>!!(typeof n=="string"&&$i.test(n)&&n.startsWith(e)||t&&!Ni(n)&&Object.prototype.hasOwnProperty.call(n,t)),mn=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ee);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ki=e=>W(0,255,e),se={...Q,transform:e=>Math.round(Ki(e))},U={test:ne("rgb","red"),parse:mn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+se.transform(e)+", "+se.transform(t)+", "+se.transform(n)+", "+ct(lt.transform(s))+")"};function Wi(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ie={test:ne("#"),parse:Wi,transform:U.transform},et={test:ne("hsl","hue"),parse:mn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+J.transform(ct(t))+", "+J.transform(ct(n))+", "+ct(lt.transform(s))+")"},C={test:e=>U.test(e)||ie.test(e)||et.test(e),parse:e=>U.test(e)?U.parse(e):et.test(e)?et.parse(e):ie.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?U.transform(e):et.transform(e)},_i=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ki(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ee))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_i))===null||n===void 0?void 0:n.length)||0)>0}const gn="number",yn="color",Gi="var",zi="var(",vn="${}",ji=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ft(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(ji,l=>(C.test(l)?(s.color.push(r),i.push(yn),n.push(C.parse(l))):l.startsWith(zi)?(s.var.push(r),i.push(Gi),n.push(l)):(s.number.push(r),i.push(gn),n.push(parseFloat(l))),++r,vn)).split(vn);return{values:n,split:a,indexes:s,types:i}}function bn(e){return ft(e).values}function wn(e){const{split:t,types:n}=ft(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===gn?r+=ct(i[o]):a===yn?r+=C.transform(i[o]):r+=i[o]}return r}}const Ui=e=>typeof e=="number"?0:e;function Hi(e){const t=bn(e);return wn(e)(t.map(Ui))}const nt={test:ki,parse:bn,createTransformer:wn,getAnimatableNone:Hi},qi=new Set(["brightness","contrast","saturate","opacity"]);function Yi(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(ee)||[];if(!s)return e;const i=n.replace(s,"");let r=qi.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const Xi=/\b([a-z-]*)\(.*?\)/gu,re={...nt,getAnimatableNone:e=>{const t=e.match(Xi);return t?t.map(Yi).join(" "):e}},oe={borderWidth:p,borderTopWidth:p,borderRightWidth:p,borderBottomWidth:p,borderLeftWidth:p,borderRadius:p,radius:p,borderTopLeftRadius:p,borderTopRightRadius:p,borderBottomRightRadius:p,borderBottomLeftRadius:p,width:p,maxWidth:p,height:p,maxHeight:p,top:p,right:p,bottom:p,left:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,backgroundPositionX:p,backgroundPositionY:p},Zi={rotate:_,rotateX:_,rotateY:_,rotateZ:_,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:_,skewX:_,skewY:_,distance:p,translateX:p,translateY:p,translateZ:p,x:p,y:p,z:p,perspective:p,transformPerspective:p,opacity:lt,originX:on,originY:on,originZ:p},Tn={...Q,transform:Math.round},ae={...oe,...Zi,zIndex:Tn,size:p,fillOpacity:lt,strokeOpacity:lt,numOctaves:Tn},Qi={...ae,color:C,backgroundColor:C,outlineColor:C,fill:C,stroke:C,borderColor:C,borderTopColor:C,borderRightColor:C,borderBottomColor:C,borderLeftColor:C,filter:re,WebkitFilter:re},le=e=>Qi[e];function Sn(e,t){let n=le(e);return n!==re&&(n=nt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ji=new Set(["auto","none","0"]);function tr(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Ji.has(r)&&ft(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Sn(n,i)}class Vn extends te{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Zt(u))){const c=rn(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Di.has(s)||t.length!==2)return;const[i,r]=t,o=hn(i),a=hn(r);if(o!==a)if(an(o)&&an(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)Ai(t[i])&&s.push(i);s.length&&tr(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tt[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=tt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const An=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nt.test(e)||e==="0")&&!e.startsWith("url("));function er(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function nr(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=An(i,t),a=An(r,t);return d.warning(o===a,`You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:er(e)||(n==="spring"||rt(n))&&s}const sr=40;class En{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=N.now(),this.options={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>sr?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Li(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=N.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!nr(t,s,i,r))if(o)this.options.duration=0;else{l==null||l(at(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function ue({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],h={done:!1,value:f},m=w=>a!==void 0&&w<a||l!==void 0&&w>l,g=w=>a===void 0?l:l===void 0||Math.abs(a-w)<Math.abs(l-w)?a:l;let S=n*t;const T=f+S,y=o===void 0?T:o(T);y!==T&&(S=y-f);const b=w=>-S*Math.exp(-w/s),A=w=>y+b(w),E=w=>{const M=b(w),I=A(w);h.done=Math.abs(M)<=u,h.value=h.done?y:I};let V,x;const D=w=>{m(h.value)&&(V=w,x=Tt({keyframes:[h.value,g(h.value)],velocity:We(A,w,h.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return D(0),{calculatedDuration:null,next:w=>{let M=!1;return!x&&V===void 0&&(M=!0,E(w),D(w)),V!==void 0&&w>=V?x.next(w-V):(!M&&E(w),h)}}}const Mn=Z(.42,0,1,1),xn=Z(0,0,.58,1),ce=Z(.42,0,.58,1),fe=e=>Array.isArray(e)&&typeof e[0]=="number",Pn={linear:B,easeIn:Mn,easeInOut:ce,easeOut:xn,circIn:At,circInOut:Xt,circOut:Je,backIn:Vt,backInOut:qt,backOut:Ht,anticipate:Yt},he=e=>{if(fe(e)){d.invariant(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,s,i]=e;return Z(t,n,s,i)}else if(typeof e=="string")return d.invariant(Pn[e]!==void 0,`Invalid easing type '${e}'`),Pn[e];return e},ir=(e,t)=>n=>t(e(n)),Mt=(...e)=>e.reduce(ir);function de(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rr({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=de(l,a,e+1/3),r=de(l,a,e),o=de(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function xt(e,t){return n=>n>0?t:e}const pe=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},or=[ie,U,et],ar=e=>or.find(t=>t.test(e));function Cn(e){const t=ar(e);if(d.warning(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===et&&(n=rr(n)),n}const On=(e,t)=>{const n=Cn(e),s=Cn(t);if(!n||!s)return xt(e,t);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=it(n.alpha,s.alpha,r),U.transform(i))},me=new Set(["none","hidden"]);function lr(e,t){return me.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ur(e,t){return n=>it(e,t,n)}function ge(e){return typeof e=="number"?ur:typeof e=="string"?Zt(e)?xt:C.test(e)?On:hr:Array.isArray(e)?Fn:typeof e=="object"?C.test(e)?On:cr:xt}function Fn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>ge(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=ge(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fr(e,t){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],a=e.indexes[o][i[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const hr=(e,t)=>{const n=nt.createTransformer(t),s=ft(e),i=ft(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?me.has(e)&&!i.values.length||me.has(t)&&!s.values.length?lr(e,t):Mt(Fn(fr(s,i),i.values),n):(d.warning(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),xt(e,t))};function ye(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):ge(e)(e,t)}function dr(e,t,n){const s=[],i=n||ye,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||B:t;a=Mt(l,a)}s.push(a)}return s}function Pt(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(d.invariant(r===t.length,"Both input and output ranges must be the same length"),r===1)return()=>t[0];if(r===2&&e[0]===e[1])return()=>t[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=dr(t,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const f=X(e[c],e[c+1],u);return o[c](f)};return n?u=>l(W(e[0],e[r-1],u)):l}function pr(e,t){return e.map(n=>n*t)}function mr(e,t){return e.map(()=>t||ce).splice(0,e.length-1)}function ht({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Ye(s)?s.map(he):he(s),r={done:!1,value:t[0]},o=pr(n&&n.length===t.length?n:kt(t),e),a=Pt(o,t,{ease:Array.isArray(i)?i:mr(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const gr=e=>{const t=({timestamp:n})=>e(n);return{start:()=>P.update(t,!0),stop:()=>L(t),now:()=>q.isProcessing?q.timestamp:N.now()}},yr={decay:ue,inertia:ue,tween:ht,keyframes:ht,spring:Tt},vr=e=>e/100;class ve extends En{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||te,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=rt(n)?n:yr[n]||ht;let l,u;a!==ht&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&d.invariant(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Mt(vr,ye(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});r==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Ge(c));const{calculatedDuration:f}=c,h=f+i,m=h*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:w}=this.options;return{done:!0,value:w[w.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=s;if(this.startTime===null)return r.next(0);const{delay:h,repeat:m,repeatType:g,repeatDelay:S,onUpdate:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let A=this.currentTime,E=r;if(m){const w=Math.min(this.currentTime,c)/f;let M=Math.floor(w),I=w%1;!I&&w>=1&&(I=1),I===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(g==="reverse"?(I=1-I,S&&(I-=S/f)):g==="mirror"&&(E=o)),A=W(0,1,I)*f}const V=b?{done:!1,value:l[0]}:E.next(A);a&&(V.value=a(V.value));let{done:x}=V;!b&&u!==null&&(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&x);return D&&i!==void 0&&(V.value=at(l,this.options,i)),T&&T(V.value),D&&this.finish(),V}get duration(){const{resolved:t}=this;return t?R(t.calculatedDuration):0}get time(){return R(this.currentTime)}set time(t){t=O(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=R(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=gr,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const br=new Set(["opacity","clipPath","filter","transform"]),wr=10,Tr=(e,t)=>{let n="";const s=Math.max(Math.round(t/wr),2);for(let i=0;i<s;i++)n+=e(X(0,s-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`},Sr={linearEasing:void 0};function Vr(e,t){const n=wt(e);return()=>{var s;return(s=Sr[t])!==null&&s!==void 0?s:n()}}const dt=Vr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function Dn(e){return!!(typeof e=="function"&&dt()||!e||typeof e=="string"&&(e in be||dt())||fe(e)||Array.isArray(e)&&e.every(Dn))}const pt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,be={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pt([0,.65,.55,1]),circOut:pt([.55,0,1,.45]),backIn:pt([.31,.01,.66,-.59]),backOut:pt([.33,1.53,.69,.99])};function In(e,t){if(e)return typeof e=="function"&&dt()?Tr(e,t):fe(e)?pt(e):Array.isArray(e)?e.map(n=>In(n,t)||be.easeOut):be[e]}function Rn(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=In(a,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function Ct(e,t){e.timeline=t,e.onfinish=null}const Bn=wt(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ot=10,Ar=2e4;function Er(e){return rt(e.type)||e.type==="spring"||!Dn(e.ease)}function Mr(e,t){const n=new ve({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const i=[];let r=0;for(;!s.done&&r<Ar;)s=n.sample(r),i.push(s.value),r+=Ot;return{times:void 0,keyframes:i,duration:r-Ot,ease:"linear"}}const Ln={anticipate:Yt,backInOut:qt,circInOut:Xt};function xr(e){return e in Ln}class Nn extends En{constructor(t){super(t);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Vn(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(t,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(typeof o=="string"&&dt()&&xr(o)&&(o=Ln[o]),Er(this.options)){const{onComplete:h,onUpdate:m,motionValue:g,element:S,...T}=this.options,y=Mr(t,T);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,r=y.times,o=y.ease,a="keyframes"}const f=Rn(l.owner.current,u,t,{...this.options,duration:i,times:r,ease:o});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(Ct(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;l.set(at(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:r,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return R(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return R(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=O(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return B;const{animation:s}=n;Ct(s,t)}return B}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:h,...m}=this.options,g=new ve({...m,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),S=O(this.time);u.setWithVelocity(g.sample(S-Ot).value,g.sample(S).value,Ot)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;return Bn()&&s&&br.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}function Pr({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $n=(e,t,n,s={},i,r)=>o=>{const a=zt(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-O(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};Pr(a)||(c={...c,...bi(e,c)}),c.duration&&(c.duration=O(c.duration)),c.repeatDelay&&(c.repeatDelay=O(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!r&&t.get()!==void 0){const h=at(c.keyframes,a);if(h!==void 0)return P.update(()=>{c.onUpdate(h),c.onComplete()}),new $t([])}return!r&&Nn.supports(c)?new Nn(c):new ve(c)},Cr=e=>Array.isArray(e),Or=e=>Cr(e)?e[e.length-1]||0:e;function Kn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Wn(e,t,n,s){if(typeof t=="function"){const[i,r]=Kn(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=Kn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Fr(e,t,n){const s=e.getProps();return Wn(s,t,s.custom,e)}function Dr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Y(n))}function Ir(e,t){const n=Fr(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Or(r[o]);Dr(e,o,a)}}const we=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Rr="data-"+we("framerAppearId");function Br(e){return e.props[Rr]}function Lr(e){return!!(F(e)&&e.add)}function Nr(e,t){const n=e.getValue("willChange");if(Lr(n))return n.add(t)}function $r({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Kr(e,t,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;s&&(o=s);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const h=e.getValue(f,(r=e.latestValues[f])!==null&&r!==void 0?r:null),m=l[f];if(m===void 0||c&&$r(c,f))continue;const g={delay:n,...zt(o||{},f)};let S=!1;if(window.MotionHandoffAnimation){const y=Br(e);if(y){const b=window.MotionHandoffAnimation(y,f,P);b!==null&&(g.startTime=b,S=!0)}}Nr(e,f),h.start($n(f,h,m,e.shouldReduceMotion&&z.has(f)?{type:!1}:g,e,S));const T=h.animation;T&&u.push(T)}return a&&Promise.all(u).then(()=>{P.update(()=>{a&&Ir(e,a)})}),u}function Wr(e){return e instanceof SVGElement&&e.tagName!=="svg"}const _r={};function kr(e,{layout:t,layoutId:n}){return z.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_r[e]||e==="opacity")}function _n(e,t,n){var s;const{style:i}=e,r={};for(const o in i)(F(i[o])||t.style&&F(t.style[o])||kr(o,e)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Gr(e,t,n){const s=_n(e,t,n);for(const i in e)if(F(e[i])||F(t[i])){const r=ot.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const zr=typeof window<"u",Te={current:null},kn={current:!1};function jr(){if(kn.current=!0,!!zr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Te.current=e.matches;e.addListener(t),t()}else Te.current=!1}function Ur(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Hr(e){return typeof e=="string"||Array.isArray(e)}const qr=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Gn(e){return Ur(e.animate)||qr.some(t=>Hr(e[t]))}function Yr(e){return!!(Gn(e)||e.variants)}function Xr(e,t,n){for(const s in t){const i=t[s],r=n[s];if(F(i))e.addValue(s,i),process.env.NODE_ENV==="development"&&vt(i.version==="11.11.11",`Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);else if(F(r))e.addValue(s,Y(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Y(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const zn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Se={};for(const e in zn)Se[e]={isEnabled:t=>zn[e].some(n=>!!t[n])};const Zr=[...fn,C,nt],Qr=e=>Zr.find(cn(e)),jn=()=>({min:0,max:0}),Ve=()=>({x:jn(),y:jn()}),Un=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hn{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=te,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=N.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,P.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Gn(n),this.isVariantNode=Yr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const m=f[h];l[h]!==void 0&&F(m)&&m.set(l[h],!1)}}mount(t){this.current=t,$.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),kn.current||jr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Te.current,process.env.NODE_ENV!=="production"&&vt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$.delete(this.current),this.projection&&this.projection.unmount(),L(this.notifyUpdate),L(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=z.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&P.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Se){const n=Se[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ve()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Un.length;s++){const i=Un[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Xr(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Y(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(en(i)||tn(i))?i=parseFloat(i):!Qr(i)&&nt.test(n)&&(i=Sn(t,n)),this.setBaseTarget(t,F(i)?i.get():i)),F(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Wn(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!F(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Be),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class qn extends Hn{constructor(){super(...arguments),this.KeyframeResolver=Vn}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}}const Yn=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Jr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},to=ot.length;function eo(e,t,n){let s="",i=!0;for(let r=0;r<to;r++){const o=ot[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Yn(a,ae[o]);if(!l){i=!1;const c=Jr[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Xn(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(z.has(l)){o=!0;continue}else if(sn(l)){i[l]=u;continue}else{const c=Yn(u,ae[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=eo(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function Zn(e,t,n){return typeof e=="string"?e:p.transform(t+n*e)}function no(e,t,n){const s=Zn(t,e.x,e.width),i=Zn(n,e.y,e.height);return`${s} ${i}`}const so={offset:"stroke-dashoffset",array:"stroke-dasharray"},io={offset:"strokeDashoffset",array:"strokeDasharray"};function ro(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?so:io;e[r.offset]=p.transform(-s);const o=p.transform(t),a=p.transform(n);e[r.array]=`${o} ${a}`}function oo(e,{attrX:t,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,f){if(Xn(e,u,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:g}=e;h.transform&&(g&&(m.transform=h.transform),delete h.transform),g&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=no(g,i!==void 0?i:.5,r!==void 0?r:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),o!==void 0&&ro(h,o,a,l,!1)}const Qn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jn(e,{style:t,vars:n},s,i){Object.assign(e.style,t,i&&i.getProjectionStyles(s));for(const r in n)e.style.setProperty(r,n[r])}function ao(e,t,n,s){Jn(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Qn.has(i)?i:we(i),t.attrs[i])}const lo=e=>typeof e=="string"&&e.toLowerCase()==="svg";class uo extends qn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(z.has(n)){const s=le(n);return s&&s.default||0}return n=Qn.has(n)?n:we(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Gr(t,n,s)}build(t,n,s){oo(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,i){ao(t,n,s,i)}mount(t){this.isSVGTag=lo(t.tagName),super.mount(t)}}function co({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function fo(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ho(e,t){return co(fo(e.getBoundingClientRect(),t))}function po(e){return window.getComputedStyle(e)}class mo extends qn{constructor(){super(...arguments),this.type="html",this.renderInstance=Jn}readValueFromInstance(t,n){if(z.has(n)){const s=le(n);return s&&s.default||0}else{const s=po(t),i=(sn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ho(t,n)}build(t,n,s){Xn(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return _n(t,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;F(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function go(e,t){return e in t}class yo extends Hn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(go(n,t)){const s=t[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ve()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function ts(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Wr(e)?new uo(t):new mo(t);n.mount(e),$.set(e,n)}function vo(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new yo(t);n.mount(e),$.set(e,n)}function bo(e,t,n){const s=F(e)?e:Y(e);return s.start($n("",s,t,n)),s.animation}function wo(e,t){return F(e)||typeof e=="number"||typeof e=="string"&&!Gt(t)}function es(e,t,n,s){const i=[];if(wo(e,t))i.push(bo(e,Gt(t)&&t.default||t,n&&(n.default||n)));else{const r=Ue(e,t,s),o=r.length;d.invariant(!!o,"No valid elements provided.");for(let a=0;a<o;a++){const l=r[a],u=l instanceof Element?ts:vo;$.has(l)||u(l);const c=$.get(l),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(a,o)),i.push(...Kr(c,{...t,transition:f},{}))}}return i}function To(e,t,n){const s=[];return ci(e,t,n,{spring:Tt}).forEach(({keyframes:r,transition:o},a)=>{s.push(...es(a,r,o))}),s}function So(e){return Array.isArray(e)&&Array.isArray(e[0])}function ns(e){function t(n,s,i){let r=[];So(n)?r=To(n,s,e):r=es(n,s,i,e);const o=new $t(r);return e&&e.animations.push(o),o}return t}const ss=ns();function Vo(e,t,n){e.style.setProperty(`--${t}`,n)}function Ao(e,t,n){e.style[t]=n}const Eo=wt(()=>{try{document.createElement("div").animate({opacity:[1]})}catch{return!1}return!0}),Ft=new WeakMap;function Mo(e,t,n){for(let s=0;s<t.length;s++)t[s]===null&&(t[s]=s===0?n():t[s-1]),typeof t[s]=="number"&&oe[e]&&(t[s]=oe[e].transform(t[s]));!Eo()&&t.length<2&&t.unshift(n())}const is="easeOut";function rs(e){const t=Ft.get(e)||new Map;return Ft.set(e,t),Ft.get(e)}class xo{constructor(t,n,s,i){const r=n.startsWith("--");this.setValue=r?Vo:Ao,this.options=i,this.updateFinishedPromise(),d.invariant(typeof i.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);const o=rs(t).get(n);o&&o.stop();const a=()=>n.startsWith("--")?t.style.getPropertyValue(n):window.getComputedStyle(t)[n];if(Array.isArray(s)||(s=[s]),Mo(n,s,a),rt(i.type)){const u=ze(i,100,i.type);i.ease=dt()?u.ease:is,i.duration=O(u.duration),i.type="keyframes"}else i.ease=i.ease||is;this.removeAnimation=()=>{var u;return(u=Ft.get(t))===null||u===void 0?void 0:u.delete(n)};const l=()=>{this.setValue(t,n,at(s,this.options)),this.cancel(),this.resolveFinishedPromise()};Bn()?(this.animation=Rn(t,n,s,i),i.autoplay===!1&&this.animation.pause(),this.animation.onfinish=l,this.pendingTimeline&&Ct(this.animation,this.pendingTimeline),rs(t).set(n,this)):l()}get duration(){return R(this.options.duration||300)}get time(){var t;return this.animation?R(((t=this.animation)===null||t===void 0?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=O(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}play(){this.state==="finished"&&this.updateFinishedPromise(),this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){!this.animation||this.state==="idle"||this.state==="finished"||(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}complete(){this.animation&&this.animation.finish()}cancel(){this.removeAnimation();try{this.animation&&this.animation.cancel()}catch{}}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}attachTimeline(t){return this.animation?Ct(this.animation,t):this.pendingTimeline=t,B}}function Po(e,t,n,s){const i=St(e,s),r=i.length;d.invariant(!!r,"No valid element provided.");const o=[];for(let a=0;a<r;a++){const l=i[a],u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,r));for(const c in t){const f=t[c],h={...zt(n,c)};h.duration=h.duration?O(h.duration):h.duration,h.delay=O(h.delay||0),o.push(new xo(l,c,f,h))}}return o}const Co=(e=>{function t(n,s,i){return new $t(Po(n,s,i,e))}return t})(),Dt=new WeakMap;let k;function Oo(e,t){if(t){const{inlineSize:n,blockSize:s}=t[0];return{width:n,height:s}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function Fo({target:e,contentRect:t,borderBoxSize:n}){var s;(s=Dt.get(e))===null||s===void 0||s.forEach(i=>{i({target:e,contentSize:t,get size(){return Oo(e,n)}})})}function Do(e){e.forEach(Fo)}function Io(){typeof ResizeObserver>"u"||(k=new ResizeObserver(Do))}function Ro(e,t){k||Io();const n=St(e);return n.forEach(s=>{let i=Dt.get(s);i||(i=new Set,Dt.set(s,i)),i.add(t),k==null||k.observe(s)}),()=>{n.forEach(s=>{const i=Dt.get(s);i==null||i.delete(t),i!=null&&i.size||k==null||k.unobserve(s)})}}const It=new Set;let mt;function Bo(){mt=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};It.forEach(n=>n(t))},window.addEventListener("resize",mt)}function Lo(e){return It.add(e),mt||Bo(),()=>{It.delete(e),!It.size&&mt&&(mt=void 0)}}function No(e,t){return typeof e=="function"?Lo(e):Ro(e,t)}const $o=50,os=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Ko=()=>({time:0,x:os(),y:os()}),Wo={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function as(e,t,n,s){const i=n[t],{length:r,position:o}=Wo[t],a=i.current,l=n.time;i.current=e[`scroll${o}`],i.scrollLength=e[`scroll${r}`]-e[`client${r}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=X(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>$o?0:Nt(i.current-a,u)}function _o(e,t,n){as(e,"x",t,n),as(e,"y",t,n),t.time=n}function ko(e,t){const n={x:0,y:0};let s=e;for(;s&&s!==t;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const r=s.getBoundingClientRect();n.x+=i.left-r.left,n.y+=i.top-r.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:r}=s.getBBox();n.x+=i,n.y+=r;let o=null,a=s.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=s.parentNode;s=o}else break;return n}const Go={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ae={start:0,center:.5,end:1};function ls(e,t,n=0){let s=0;if(e in Ae&&(e=Ae[e]),typeof e=="string"){const i=parseFloat(e);e.endsWith("px")?s=i:e.endsWith("%")?e=i/100:e.endsWith("vw")?s=i/100*document.documentElement.clientWidth:e.endsWith("vh")?s=i/100*document.documentElement.clientHeight:e=i}return typeof e=="number"&&(s=t*e),n+s}const zo=[0,0];function jo(e,t,n,s){let i=Array.isArray(e)?e:zo,r=0,o=0;return typeof e=="number"?i=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?i=e.split(" "):i=[e,Ae[e]?e:"0"]),r=ls(i[0],n,s),o=ls(i[1],t),r-o}const Uo={x:0,y:0};function Ho(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function qo(e,t,n){const{offset:s=Go.All}=n,{target:i=e,axis:r="y"}=n,o=r==="y"?"height":"width",a=i!==e?ko(i,e):Uo,l=i===e?{width:e.scrollWidth,height:e.scrollHeight}:Ho(i),u={width:e.clientWidth,height:e.clientHeight};t[r].offset.length=0;let c=!t[r].interpolate;const f=s.length;for(let h=0;h<f;h++){const m=jo(s[h],u[o],l[o],a[r]);!c&&m!==t[r].interpolatorOffsets[h]&&(c=!0),t[r].offset[h]=m}c&&(t[r].interpolate=Pt(t[r].offset,kt(s)),t[r].interpolatorOffsets=[...t[r].offset]),t[r].progress=t[r].interpolate(t[r].current)}function Yo(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&vt(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function Xo(e,t,n,s={}){return{measure:()=>Yo(e,s.target,n),update:i=>{_o(e,n,i),(s.offset||s.target)&&qo(e,n,s)},notify:()=>t(n)}}const gt=new WeakMap,us=new WeakMap,Ee=new WeakMap,cs=e=>e===document.documentElement?window:e;function Rt(e,{container:t=document.documentElement,...n}={}){let s=Ee.get(t);s||(s=new Set,Ee.set(t,s));const i=Ko(),r=Xo(t,e,i,n);if(s.add(r),!gt.has(t)){const a=()=>{for(const h of s)h.measure()},l=()=>{for(const h of s)h.update(q.timestamp)},u=()=>{for(const h of s)h.notify()},c=()=>{P.read(a,!1,!0),P.read(l,!1,!0),P.update(u,!1,!0)};gt.set(t,c);const f=cs(t);window.addEventListener("resize",c,{passive:!0}),t!==document.documentElement&&us.set(t,No(t,c)),f.addEventListener("scroll",c,{passive:!0})}const o=gt.get(t);return P.read(o,!1,!0),()=>{var a;L(o);const l=Ee.get(t);if(!l||(l.delete(r),l.size))return;const u=gt.get(t);gt.delete(t),u&&(cs(t).removeEventListener("scroll",u),(a=us.get(t))===null||a===void 0||a(),window.removeEventListener("resize",u))}}function fs(e,t){let n;const s=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return P.update(s,!0),()=>L(s)}function Zo({source:e,container:t,axis:n="y"}){e&&(t=e);const s={value:0},i=Rt(r=>{s.value=r[n].progress*100},{container:t,axis:n});return{currentTime:s,cancel:i}}const Me=new Map;function hs({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Me.has(t)||Me.set(t,{});const s=Me.get(t);return s[n]||(s[n]=Ke()?new ScrollTimeline({source:t,axis:n}):Zo({source:t,axis:n})),s[n]}function Qo(e){return e.length===2}function ds(e){return e&&(e.target||e.offset)}function Jo(e,t){return Qo(e)||ds(t)?Rt(n=>{e(n[t.axis].progress,n)},t):fs(e,hs(t))}function ta(e,t){if(ds(t))return e.pause(),Rt(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=hs(t);return e.attachTimeline(n,s=>(s.pause(),fs(i=>{s.time=s.duration*i},n)))}}function ea(e,{axis:t="y",...n}={}){const s={axis:t,...n};return typeof e=="function"?Jo(e,s):ta(e,s)}const na={some:0,all:1};function ps(e,t,{root:n,margin:s,amount:i="some"}={}){const r=St(e),o=new WeakMap,a=u=>{u.forEach(c=>{const f=o.get(c.target);if(c.isIntersecting!==!!f)if(c.isIntersecting){const h=t(c);typeof h=="function"?o.set(c.target,h):l.unobserve(c.target)}else f&&(f(c),o.delete(c.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:na[i]});return r.forEach(u=>l.observe(u)),()=>l.disconnect()}function sa(e,t="end"){return n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const s=n*e,i=t==="end"?Math.floor(s):Math.ceil(s);return W(0,1,i/e)}}function ia(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function ra(e=.1,{startDelay:t=0,from:n=0,ease:s}={}){return(i,r)=>{const o=typeof n=="number"?n:ia(n,r),a=Math.abs(o-i);let l=e*a;if(s){const u=r*e;l=he(s)(l/u)*u}return t+l}}const oa=e=>e&&typeof e=="object"&&e.mix,aa=e=>oa(e)?e.mix:void 0;function la(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],i=e[1+n],r=e[2+n],o=e[3+n],a=Pt(i,r,{mixer:aa(r[0]),...o});return t?a(s):a}function ua(e,t){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=t&&(L(s),e(r-t))};return P.read(s,!0),()=>L(s)}function ca(e,t){return ua(e,O(t))}const xe=(e,t)=>Math.abs(e-t);function fa(e,t){const n=xe(e.x,t.x),s=xe(e.y,t.y);return Math.sqrt(n**2+s**2)}const ha=P,da=st.reduce((e,t)=>(e[t]=n=>L(n),e),{});function pa(e){return typeof e=="function"?e():v.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ms=e=>typeof e<"u";function ma(e){var t;const n=pa(e);return(t=n==null?void 0:n.$el)!=null?t:n}function ga(){const e=v.ref(),t=v.computed(()=>{var n,s;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:ma(e)});return{primitiveElement:e,currentElement:t}}function Pe(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,s=Symbol(n);return[o=>{const a=v.inject(s,o);if(a||a===null)return a;throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(v.provide(s,o),o)]}const[ya,va]=Pe("Motion"),[ba,rl]=Pe("AnimatePresenceContext");function gs(e,t){if(typeof e=="object")return e;if(e&&t)return t[e]}function wa(e,t){return typeof e!=typeof t?!0:Array.isArray(e)&&Array.isArray(t)?!Ta(e,t):e!==t}function Ta(e,t){const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function Sa(e,t){!e.includes(t)&&e.push(t)}function Va(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Aa(e,t){return e[t]?{...e,...e[t]}:{...e}}function ys(e){return e==null?void 0:e.startsWith("--")}function Ea(){}const Ma=e=>e;function xa(e){return typeof e=="number"}const vs={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>`${e}deg`},Pa={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>`${e}px`},rotate:vs,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:Ma},skew:vs},Ca=["translate","scale","rotate","skew"],Oa=["","X","Y","Z"],Ce=new Map,Bt=["x","y","z"];Ca.forEach(e=>{Oa.forEach(t=>{Bt.push(e+t),Ce.set(e+t,Pa[e])})});const Fa=new Set(Bt),Da=e=>Fa.has(e),bs={x:"translateX",y:"translateY",z:"translateZ"};function Ia([e],[t]){return Bt.indexOf(e)-Bt.indexOf(t)}function Ra(e,[t,n]){return`${e} ${t}(${n})`}function Ba(e){return e.sort(Ia).reduce(Ra,"").trim()}const La={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},ws={get:(e,t)=>{let n=ys(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&n!=="0"){const s=Ce.get(t);s&&(n=s.initialValue)}return n},set:(e,t,n)=>{ys(t)?e.style.setProperty(t,n):e.style[t]=n}};function Oe(e){var s;const t={},n=[];for(let i in e){const r=e[i];Da(i)&&i in bs&&(i=bs[i]);let o=Array.isArray(r)?r[0]:r;const a=Ce.get(i);a?(o=xa(r)?(s=a.toDefaultUnit)==null?void 0:s.call(a,r):r,n.push([i,o])):t[i]=o}return n.length&&(t.transform=Ba(n)),t}function Ts(e){return e?e.flatMap(t=>t.type===v.Fragment?Ts(t.children):[t]):[]}const Na=v.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var l,u;if(!n.default)return null;const s=Ts(n.default()),i=s.findIndex(c=>c.type!==v.Comment);if(i===-1)return s;const r=s[i];(l=r.props)==null||delete l.ref;const o=r.props?v.mergeProps(t,r.props):t;t.class&&((u=r.props)!=null&&u.class)&&delete r.props.class;const a=v.cloneVNode(r,o);for(const c in o)c.startsWith("on")&&(a.props||(a.props={}),a.props[c]=o[c]);return s.length===1?a:(s[i]=a,s)}}}),$a=v.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const s=e.asChild?"template":e.as;return typeof s=="string"&&["area","img","input"].includes(s)?()=>v.h(s,t):s!=="template"?()=>v.h(e.as,t,{default:n.default}):()=>v.h(Na,t,{default:n.default})}}),Ka=["path","rect","circle","ellipse","line","polyline","polygon","text","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","pattern","image","tspan","textPath"];function Ss(e){return Ka.includes(e)}var Vs=function(){};process.env.NODE_ENV!=="production"&&(Vs=function(e,t){if(!e)throw new Error(t)});class As{constructor(t){this.state=t}update(){}}class Wa{constructor(t){this.features=[],this.features=[new _a(t),new ka(t),new Ga(t),new za(t)]}mount(){this.features.forEach(t=>t.mount())}unmount(){this.features.forEach(t=>t.unmount())}update(){this.features.forEach(t=>t.update())}}function yt(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:n}}))}class Fe extends As{updateGestureSubscriptions(){const t=this.isActive();t&&!this.removeGestureSubscriptions?this.removeGestureSubscriptions=this.subscribeEvents():!t&&this.removeGestureSubscriptions&&(this.removeGestureSubscriptions(),this.removeGestureSubscriptions=void 0)}unmount(){var t;(t=this.removeGestureSubscriptions)==null||t.call(this)}}function Es(e,t,n){return s=>{s.pointerType&&s.pointerType!=="mouse"||(n(),yt(e,t,s))}}class _a extends Fe{isActive(){return!!this.state.getOptions().hover}constructor(t){super(t),this.subscribeEvents=()=>{const n=this.state.getElement(),s=Es(n,"hoverstart",()=>{this.state.setActive("hover",!0)}),i=Es(n,"hoverend",()=>{this.state.setActive("hover",!1)});return n.addEventListener("pointerenter",s),n.addEventListener("pointerleave",i),()=>{n.removeEventListener("pointerenter",s),n.removeEventListener("pointerleave",i)}}}mount(){this.updateGestureSubscriptions()}update(){this.updateGestureSubscriptions()}}class ka extends Fe{isActive(){return!!this.state.getOptions().press}constructor(t){super(t),this.subscribeEvents=()=>{const n=this.state.getElement(),s=r=>{this.state.setActive("press",!1),yt(n,"pressend",r),window.removeEventListener("pointerup",s)},i=r=>{this.state.setActive("press",!0),yt(n,"pressstart",r),window.addEventListener("pointerup",s)};return n.addEventListener("pointerdown",i),()=>{n.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",s)}}}mount(){this.updateGestureSubscriptions()}update(){this.updateGestureSubscriptions()}}class Ga extends Fe{isActive(){return!!this.state.getOptions().inView}constructor(t){super(t),this.subscribeEvents=()=>{var r;const n=this.state.getElement(),{once:s,...i}=((r=this.state.getOptions())==null?void 0:r.inViewOptions)||{};return ps(n,o=>{if(this.state.setActive("inView",!0),yt(n,"viewenter",o),!s)return a=>{this.state.setActive("inView",!1),yt(n,"viewleave",a)}},i)}}mount(){this.updateGestureSubscriptions()}update(){this.updateGestureSubscriptions()}}class za extends As{constructor(){super(...arguments),this.handlers={}}mount(){const t=this.state.getElement();t&&(this.handlers.motionstart=n=>{var i,r;const s=n.detail.target;(r=(i=this.state.getOptions()).onMotionStart)==null||r.call(i,s)},this.handlers.motioncomplete=n=>{var i,r;const s=n.detail.target;(r=(i=this.state.getOptions()).onMotionComplete)==null||r.call(i,s)},this.handlers.hoverstart=n=>{var i,r;const s=n.detail;(r=(i=this.state.getOptions()).onHoverStart)==null||r.call(i,s)},this.handlers.hoverend=n=>{var i,r;const s=n.detail;(r=(i=this.state.getOptions()).onHoverEnd)==null||r.call(i,s)},this.handlers.pressstart=n=>{var i,r;const s=n.detail;(r=(i=this.state.getOptions()).onPressStart)==null||r.call(i,s)},this.handlers.pressend=n=>{var i,r;const s=n.detail;(r=(i=this.state.getOptions()).onPressEnd)==null||r.call(i,s)},this.handlers.viewenter=n=>{var i,r;const s=n.detail.target;(r=(i=this.state.getOptions()).onViewEnter)==null||r.call(i,s)},this.handlers.viewleave=n=>{var i,r;const s=n.detail.target;(r=(i=this.state.getOptions()).onViewLeave)==null||r.call(i,s)},Object.entries(this.handlers).forEach(([n,s])=>{t.addEventListener(n,s)}))}unmount(){const t=this.state.getElement();t&&Object.entries(this.handlers).forEach(([n,s])=>{s&&(t.removeEventListener(n,s),delete this.handlers[n])})}}let G;const Ms=e=>e.next(),ja=e=>e.animateUpdates();function Ua(){if(!G)return;const e=G.sort(qa).map(ja);e.forEach(Ms),e.forEach(Ms),G=void 0}function xs(e){G?Sa(G,e):(G=[e],requestAnimationFrame(Ua))}function Ha(e){G&&Va(G,e)}function qa(e,t){return e.getDepth()-t.getDepth()}function Ps(e,t,n){return new CustomEvent(e,{detail:{target:t,isExit:n}})}const Cs=["initial","animate","inView","hover","press","exit"],Lt=new WeakMap;class Ya{constructor(t,n){this.element=null,this.context={},this.activeStates={initial:!0,animate:!0},this.options=t,this.parent=n,this.depth=(n==null?void 0:n.depth)+1||0,this.initContext();const s=t.initial===!1?"animate":"initial";this.featureManager=new Wa(this),this.initTarget(s)}initContext(){var t;for(const n of Cs)this.context[n]=typeof this.options[n]=="string"?this.options[n]:(t=this.parent)==null?void 0:t.context[n]}initTarget(t){this.baseTarget=gs(this.options[t]||this.context[t],this.options.variants)||{},this.target={...this.baseTarget}}get initial(){return ms(this.options.initial)?this.options.initial:this.context.initial}mount(t){var s;Vs(!!t,"Animation state must be mounted with valid Element"),this.element=t,Lt.set(t,this),$.get(t)||ts(t);const n=$.get(t);if(n.update(this.options,(s=this.parent)==null?void 0:s.context),typeof this.initial=="object")for(const i in this.initial)n.setStaticValue(i,this.initial[i]);else if(typeof this.initial=="string"&&this.options.variants)for(const i in this.options.variants[this.initial])n.setStaticValue(i,this.options.variants[this.initial][i]);this.featureManager.mount()}unmount(){var t;Lt.delete(this.element),Ha(this),(t=$.get(this.element))==null||t.unmount(),this.featureManager.unmount()}update(t){this.options=t,this.featureManager.update(),xs(this)}setActive(t,n){this.element&&(this.activeStates[t]=n,xs(this))}*animateUpdates(){const t=this.target;this.target={};const n={};for(const l of Cs){if(!this.activeStates[l])continue;const u=gs(ms(this.options[l])?this.options[l]:this.context[l],this.options.variants);if(!u)continue;const c={...t,...u};for(const f in c)f!=="transition"&&(this.target[f]=u[f],n[f]=Aa(u.transition??this.options.transition??{},f))}const s=new Set([...Object.keys(this.target),...Object.keys(t)]),i=[];s.forEach(l=>{var u;this.target[l]===void 0&&(this.target[l]=this.baseTarget[l]),wa(t[l],this.target[l])&&((u=this.baseTarget)[l]??(u[l]=ws.get(this.element,l)),i.push(()=>ss(this.element,{[l]:this.target[l]==="none"?La[l]:this.target[l]},n[l]||{})))}),yield;const r=i.map(l=>l()).filter(Boolean);if(!r.length)return;const o=this.target;this.element.dispatchEvent(Ps("motionstart",o));const a=this.activeStates.exit;Promise.all(r).then(()=>{this.element.dispatchEvent(Ps("motioncomplete",{...o},a))}).catch(Ea)}isMounted(){return!!this.element}getDepth(){return this.depth}getOptions(){return this.options}getElement(){return this.element}getTarget(){return this.target}}const Xa=v.defineComponent({__name:"Motion",props:v.mergeDefaults({as:{},asChild:{type:Boolean},style:{},hover:{},press:{},inView:{},inViewOptions:{},initial:{type:[String,Object,Boolean]},animate:{},exit:{},variants:{},transition:{},onMotionStart:{type:Function},onMotionComplete:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},onPressStart:{type:Function},onPressEnd:{type:Function},onViewEnter:{type:Function},onViewLeave:{type:Function}},{as:"div",asChild:!1,initial:void 0,animate:void 0,hover:void 0,inView:void 0}),setup(e){const t=e,{initial:n}=ba({initial:v.ref(void 0)}),s=ya(null),i=new Ya({...t},s);va(i);const{primitiveElement:r,currentElement:o}=ga();v.onMounted(()=>{i.mount(o.value),i.update({...t,style:{...t.style,...Oe(i.getTarget())},initial:n.value===!1?n.value:t.initial===!0?void 0:t.initial})}),v.onUnmounted(()=>{});let a=!1;v.onUpdated(()=>{if(!a&&o.value){a=!0;const c=Oe(i.getTarget());for(const f in c)ws.set(o.value,f,c[f])}i.update({...t,initial:n.value===!1?n.value:t.initial===!0?void 0:t.initial})});function l(){if(!i.isMounted()&&Ss(t.as))return i.getTarget()}function u(){return Ss(t.as)||i.isMounted()?t.style:{...t.style,...Oe(i.getTarget())}}return(c,f)=>(v.openBlock(),v.createBlock(v.unref($a),v.mergeProps({ref_key:"primitiveElement",ref:r,as:c.as,"as-child":c.asChild},l(),{style:u()}),{default:v.withCtx(()=>[v.renderSlot(c.$slots,"default")]),_:3},16,["as","as-child","style"]))}}),De=new WeakMap;function Os(e){const t=De.get(e);t&&e.removeEventListener("motioncomplete",t),De.delete(e)}const[ol,Za]=Pe("AnimatePresenceContext"),Qa=v.defineComponent({name:"AnimatePresence",inheritAttrs:!1,__name:"AnimatePresence",props:{mode:{default:"sync"},initial:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},as:{}},setup(e){const t=e,{initial:n}=v.toRefs(t);Za({initial:n});function s(r){const o=Lt.get(r);o&&(Os(r),o.setActive("exit",!1))}function i(r,o){const a=Lt.get(r);if(!a)return o();a.setActive("exit",!0),Os(r);function l(u){var c;(c=u==null?void 0:u.detail)!=null&&c.isExit&&o()}De.set(r,l),r.addEventListener("motioncomplete",l)}return(r,o)=>(v.openBlock(),v.createBlock(v.resolveDynamicComponent(r.multiple?v.TransitionGroup:v.Transition),v.mergeProps({tag:r.multiple?r.as:void 0,css:!1,mode:r.mode==="wait"?"out-in":void 0},r.$attrs,{onEnter:s,onLeave:i}),{default:v.withCtx(()=>[v.renderSlot(r.$slots,"default")]),_:3},16,["tag","mode"]))}});d.AnimatePresence=Qa,d.Motion=Xa,d.MotionValue=$e,d.animate=ss,d.animateMini=Co,d.anticipate=Yt,d.backIn=Vt,d.backInOut=qt,d.backOut=Ht,d.cancelFrame=L,d.cancelSync=da,d.circIn=At,d.circInOut=Xt,d.circOut=Je,d.clamp=W,d.createScopedAnimate=ns,d.cubicBezier=Z,d.delay=ca,d.distance=xe,d.distance2D=fa,d.easeIn=Mn,d.easeInOut=ce,d.easeOut=xn,d.frame=P,d.frameData=q,d.frameSteps=Us,d.inView=ps,d.inertia=ue,d.interpolate=Pt,d.keyframes=ht,d.mirrorEasing=jt,d.mix=ye,d.motionValue=Y,d.pipe=Mt,d.progress=X,d.reverseEasing=Ut,d.scroll=ea,d.scrollInfo=Rt,d.spring=Tt,d.stagger=ra,d.steps=sa,d.sync=ha,d.transform=la,d.wrap=qe,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface AnimatePresenceProps {
|
|
2
|
+
mode?: 'wait' | 'popLayout' | 'sync';
|
|
3
|
+
initial?: boolean;
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
as?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AnimatePresenceProps>, {
|
|
16
|
+
mode: string;
|
|
17
|
+
initial: boolean;
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AnimatePresenceProps>, {
|
|
20
|
+
mode: string;
|
|
21
|
+
initial: boolean;
|
|
22
|
+
multiple: boolean;
|
|
23
|
+
}>>>, {
|
|
24
|
+
mode: "wait" | "popLayout" | "sync";
|
|
25
|
+
initial: boolean;
|
|
26
|
+
multiple: boolean;
|
|
27
|
+
}, {}>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithDefaults<P, D> = {
|
|
31
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
32
|
+
default: D[K];
|
|
33
|
+
}> : P[K];
|
|
34
|
+
};
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToOption<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_PrettifyLocal<T> = {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} & {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Options } from '../state/types';
|
|
2
|
+
import { CSSProperties, IntrinsicElementAttributes } from 'vue';
|
|
3
|
+
export interface MotionProps<T extends ElementType = 'div'> extends Options {
|
|
4
|
+
as?: T;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
hover?: Options['hover'];
|
|
8
|
+
press?: Options['press'];
|
|
9
|
+
inView?: Options['inView'];
|
|
10
|
+
inViewOptions?: Options['inViewOptions'];
|
|
11
|
+
}
|
|
12
|
+
type ElementType = keyof IntrinsicElementAttributes;
|
|
13
|
+
declare const _default: <T extends ElementType = "div">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
14
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{}>>, never>, never> & (MotionProps<T> & Omit<IntrinsicElementAttributes[T], "asChild" | "as" | keyof Options>)> & import('vue').PublicProps;
|
|
15
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
emit: {};
|
|
21
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}> & {
|
|
24
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} & {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Component, IntrinsicElementAttributes, PropType } from 'vue';
|
|
2
|
+
export type AsTag = keyof IntrinsicElementAttributes | ({} & string);
|
|
3
|
+
export interface PrimitiveProps {
|
|
4
|
+
/**
|
|
5
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
6
|
+
*
|
|
7
|
+
* Read our [Composition](https://www.radix-vue.com/guides/composition.html) guide for more details.
|
|
8
|
+
*/
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The element or component this component should render as. Can be overwrite by `asChild`
|
|
12
|
+
* @defaultValue "div"
|
|
13
|
+
*/
|
|
14
|
+
as?: AsTag | Component;
|
|
15
|
+
}
|
|
16
|
+
export declare const Primitive: import('vue').DefineComponent<{
|
|
17
|
+
asChild: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
as: {
|
|
22
|
+
type: PropType<AsTag>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
asChild: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
as: {
|
|
33
|
+
type: PropType<AsTag>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
}>>, {
|
|
37
|
+
asChild: boolean;
|
|
38
|
+
as: AsTag;
|
|
39
|
+
}, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const Slot: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}> | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MotionState } from '../state/motion-state';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export declare const injectMotion: <T extends MotionState = MotionState>(fallback?: T) => T extends null ? MotionState : MotionState, provideMotion: (contextValue: MotionState) => MotionState;
|
|
4
|
+
export interface PresenceContext {
|
|
5
|
+
initial: Ref<boolean>;
|
|
6
|
+
}
|
|
7
|
+
export declare const injectAnimatePresence: <T extends PresenceContext = PresenceContext>(fallback?: T) => T extends null ? PresenceContext : PresenceContext, provideAnimatePresence: (contextValue: PresenceContext) => PresenceContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare const doneCallbacks: WeakMap<Element, VoidFunction>;
|
|
3
|
+
export declare function removeDoneCallback(element: Element): void;
|
|
4
|
+
export interface PresenceContext {
|
|
5
|
+
initial: Ref<boolean>;
|
|
6
|
+
}
|
|
7
|
+
export declare const injectAnimatePresence: <T extends PresenceContext = PresenceContext>(fallback?: T) => T extends null ? PresenceContext : PresenceContext, provideAnimatePresence: (contextValue: PresenceContext) => PresenceContext;
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Variant } from './types';
|
|
2
|
+
export type MotionEventNames = 'motionstart' | 'motioncomplete' | 'hoverstart' | 'hoverend' | 'pressstart' | 'pressend' | 'viewenter' | 'viewleave';
|
|
3
|
+
export declare function motionEvent(name: MotionEventNames, target: Variant, isExit?: boolean): CustomEvent<{
|
|
4
|
+
target: Variant;
|
|
5
|
+
isExit: boolean;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MotionState } from '../motion-state';
|
|
2
|
+
export declare abstract class Feature {
|
|
3
|
+
state: MotionState;
|
|
4
|
+
constructor(state: MotionState);
|
|
5
|
+
abstract mount(): void;
|
|
6
|
+
abstract unmount(): void;
|
|
7
|
+
update(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class FeatureManager {
|
|
10
|
+
features: Feature[];
|
|
11
|
+
constructor(state: MotionState);
|
|
12
|
+
mount(): void;
|
|
13
|
+
unmount(): void;
|
|
14
|
+
update(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Feature } from '../feature';
|
|
2
|
+
import { MotionEventNames } from '../../../types';
|
|
3
|
+
export declare abstract class BaseGesture extends Feature {
|
|
4
|
+
abstract isActive(): boolean;
|
|
5
|
+
removeGestureSubscriptions?: VoidFunction;
|
|
6
|
+
subscribeEvents?: () => VoidFunction;
|
|
7
|
+
protected updateGestureSubscriptions(): void;
|
|
8
|
+
unmount(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createGestureEvent(element: Element, name: MotionEventNames, action: VoidFunction): (event: PointerEvent) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Gesture } from './types';
|
|
2
|
+
import { MotionState } from '../../motion-state';
|
|
3
|
+
import { BaseGesture } from '.';
|
|
4
|
+
export declare const hover: Gesture;
|
|
5
|
+
export declare class HoverGesture extends BaseGesture {
|
|
6
|
+
isActive(): boolean;
|
|
7
|
+
constructor(state: MotionState);
|
|
8
|
+
mount(): void;
|
|
9
|
+
update(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Options } from '../../types';
|
|
2
|
+
export interface StateHandlers {
|
|
3
|
+
enable: VoidFunction;
|
|
4
|
+
disable: VoidFunction;
|
|
5
|
+
}
|
|
6
|
+
export interface Gesture {
|
|
7
|
+
isActive: (options: Options) => void;
|
|
8
|
+
subscribe: (element: Element, stateHandlers: StateHandlers, options: Options) => () => void;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './motion-state';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Options } from './types';
|
|
2
|
+
import { DOMKeyframesDefinition } from 'framer-motion';
|
|
3
|
+
declare const STATE_TYPES: readonly ["initial", "animate", "inView", "hover", "press", "exit"];
|
|
4
|
+
type StateType = typeof STATE_TYPES[number];
|
|
5
|
+
export declare const mountedStates: WeakMap<Element, MotionState>;
|
|
6
|
+
export declare class MotionState {
|
|
7
|
+
private element;
|
|
8
|
+
private context;
|
|
9
|
+
private parent?;
|
|
10
|
+
private options;
|
|
11
|
+
private activeStates;
|
|
12
|
+
private depth;
|
|
13
|
+
private baseTarget;
|
|
14
|
+
private target;
|
|
15
|
+
private featureManager;
|
|
16
|
+
constructor(options: Options, parent?: MotionState);
|
|
17
|
+
private initContext;
|
|
18
|
+
private initTarget;
|
|
19
|
+
get initial(): string | boolean | import('./types').Variant;
|
|
20
|
+
mount(element: Element): void;
|
|
21
|
+
unmount(): void;
|
|
22
|
+
update(options: Options): void;
|
|
23
|
+
setActive(name: StateType, isActive: boolean): void;
|
|
24
|
+
animateUpdates(): Generator<any, void, unknown>;
|
|
25
|
+
isMounted(): boolean;
|
|
26
|
+
getDepth(): number;
|
|
27
|
+
getOptions(): Options;
|
|
28
|
+
getElement(): Element;
|
|
29
|
+
getTarget(): DOMKeyframesDefinition;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DOMKeyframesDefinition } from 'framer-motion';
|
|
2
|
+
export declare const style: {
|
|
3
|
+
get: (element: Element, name: string) => string | undefined;
|
|
4
|
+
set: (element: Element, name: string, value: string | number) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function createStyles(keyframes?: DOMKeyframesDefinition): any;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CssPropertyDefinition } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A list of all transformable axes. We'll use this list to generated a version
|
|
4
|
+
* of each axes for each transform.
|
|
5
|
+
*/
|
|
6
|
+
export declare const axes: string[];
|
|
7
|
+
export declare const transformDefinitions: Map<string, CssPropertyDefinition>;
|
|
8
|
+
export declare const isTransform: (name: string) => boolean;
|
|
9
|
+
export declare const transformAlias: {
|
|
10
|
+
x: string;
|
|
11
|
+
y: string;
|
|
12
|
+
z: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function compareTransformOrder([a]: [string, any], [b]: [string, any]): number;
|
|
15
|
+
export declare function buildTransformTemplate(transforms: [string, any][]): string;
|
|
16
|
+
export declare function getFirstAnimateTransform(initialFrame: any, animateFrame: any): any;
|
|
17
|
+
export declare const transformResetValue: {
|
|
18
|
+
translate: number[];
|
|
19
|
+
rotate: number;
|
|
20
|
+
scale: number;
|
|
21
|
+
skew: number;
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
z: number;
|
|
25
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DOMKeyframesDefinition, DynamicAnimationOptions } from 'framer-motion';
|
|
2
|
+
import { animate } from 'framer-motion/dom';
|
|
3
|
+
import { CSSProperties } from 'vue';
|
|
4
|
+
type AnimationPlaybackControls = ReturnType<typeof animate>;
|
|
5
|
+
export interface Variant extends DOMKeyframesDefinition {
|
|
6
|
+
transition?: DynamicAnimationOptions;
|
|
7
|
+
}
|
|
8
|
+
type MarginValue = `${number}${'px' | '%'}`;
|
|
9
|
+
type MarginType = MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`;
|
|
10
|
+
export interface InViewOptions {
|
|
11
|
+
root?: Element | Document;
|
|
12
|
+
margin?: MarginType;
|
|
13
|
+
amount?: 'some' | 'all' | number;
|
|
14
|
+
}
|
|
15
|
+
export interface Options {
|
|
16
|
+
inViewOptions?: InViewOptions & {
|
|
17
|
+
once?: boolean;
|
|
18
|
+
};
|
|
19
|
+
inView?: string | Variant;
|
|
20
|
+
press?: string | Variant;
|
|
21
|
+
hover?: string | Variant;
|
|
22
|
+
initial?: string | Variant | boolean;
|
|
23
|
+
animate?: string | Variant;
|
|
24
|
+
exit?: string | Variant;
|
|
25
|
+
variants?: {
|
|
26
|
+
[k: string]: Variant;
|
|
27
|
+
};
|
|
28
|
+
transition?: DynamicAnimationOptions;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
onMotionStart?: (target: DOMKeyframesDefinition) => void;
|
|
31
|
+
onMotionComplete?: (target: DOMKeyframesDefinition) => void;
|
|
32
|
+
onHoverStart?: (e: PointerEvent) => void;
|
|
33
|
+
onHoverEnd?: (e: PointerEvent) => void;
|
|
34
|
+
onPressStart?: (e: PointerEvent) => void;
|
|
35
|
+
onPressEnd?: (e: PointerEvent) => void;
|
|
36
|
+
onViewEnter?: (target: Element) => void;
|
|
37
|
+
onViewLeave?: (target: Element) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface MotionStateContext {
|
|
40
|
+
initial?: string;
|
|
41
|
+
animate?: string;
|
|
42
|
+
inView?: string;
|
|
43
|
+
hover?: string;
|
|
44
|
+
press?: string;
|
|
45
|
+
exit?: string;
|
|
46
|
+
}
|
|
47
|
+
export type AnimationFactory = () => AnimationPlaybackControls | undefined;
|
|
48
|
+
export interface CssPropertyDefinition {
|
|
49
|
+
syntax: `<${string}>`;
|
|
50
|
+
initialValue: string | number;
|
|
51
|
+
toDefaultUnit: (v: number) => string | number;
|
|
52
|
+
}
|
|
53
|
+
export type CssPropertyDefinitionMap = {
|
|
54
|
+
[key: string]: CssPropertyDefinition;
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnimateOptions } from '../types';
|
|
2
|
+
import { DynamicAnimationOptions, Variant } from 'framer-motion';
|
|
3
|
+
import { VNode } from 'vue';
|
|
4
|
+
export declare function resolveVariant(definition?: AnimateOptions['initial'], variants?: AnimateOptions['variants']): Variant | undefined;
|
|
5
|
+
export declare function hasChanged(a: any, b: any): boolean;
|
|
6
|
+
export declare function shallowCompare(next: any[], prev: any[]): boolean;
|
|
7
|
+
export declare function addUniqueItem<T>(array: T[], item: T): void;
|
|
8
|
+
export declare function removeItem<T>(array: T[], item: T): void;
|
|
9
|
+
export declare function getOptions(options: DynamicAnimationOptions, key: string): DynamicAnimationOptions;
|
|
10
|
+
export declare function isCssVar(name: string): boolean;
|
|
11
|
+
export declare function noop(): void;
|
|
12
|
+
export declare const noopReturn: <V>(v: V) => V;
|
|
13
|
+
export declare function isNumber(value: any): boolean;
|
|
14
|
+
export declare function isElement(vNode: VNode): boolean;
|
|
15
|
+
export declare function getChildKey(vNode: VNode): PropertyKey;
|
|
16
|
+
export declare function setStaticValue(): void;
|