@animateicons/react 0.3.3 → 0.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animateicons/react",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Animated SVG icons for React with hover and imperative animation triggers. Built on motion/react.",
5
5
  "license": "MIT",
6
6
  "author": "Avijit Dey",
@@ -1,2 +0,0 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {createContext,forwardRef,useContext,useMemo,useRef,useInsertionEffect,useEffect,Fragment,createElement,useCallback,useLayoutEffect,useState}from'react';var go=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ga=(...e)=>e.filter(Boolean).join(" ");var Be=createContext({strict:false});function yo(e,t){e.indexOf(t)===-1&&e.push(t);}function Vo(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1);}var G=(e,t,r)=>r>t?t:r<e?e:r;function Qe(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var H=()=>{},I=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(H=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(Qe(t,r));},I=(e,t,r)=>{if(!e)throw new Error(Qe(t,r))});var K={};var et=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var tt=e=>/^0[^.\s]+$/u.test(e);function rt(e){let t;return ()=>(t===void 0&&(t=e()),t)}var j=e=>e;var Vi=(e,t)=>r=>t(e(r)),Te=(...e)=>e.reduce(Vi);var ot=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var Se=class{constructor(){this.subscriptions=[];}add(t){return yo(this.subscriptions,t),()=>Vo(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let i=0;i<n;i++){let s=this.subscriptions[i];s&&s(t,r,o);}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0;}};var O=e=>e*1e3,L=e=>e/1e3;function nt(e,t){return t?e*(1e3/t):0}var bo=new Set;function re(e,t,r){e||bo.has(t)||(console.warn(Qe(t,r)),bo.add(t));}var To=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,bi=1e-7,Ti=12;function Si(e,t,r,o,n){let i,s,a=0;do s=t+(r-t)/2,i=To(s,o,n)-e,i>0?r=s:t=s;while(Math.abs(i)>bi&&++a<Ti);return s}function ae(e,t,r,o){if(e===t&&r===o)return j;let n=i=>Si(i,0,1,e,r);return i=>i===0||i===1?i:To(n(i),t,o)}var Lt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Nt=e=>t=>1-e(1-t);var Gt=ae(.33,1.53,.69,.99),Ee=Nt(Gt),it=Lt(Ee);var st=e=>e>=1?1:(e*=2)<1?.5*Ee(e):.5*(2-Math.pow(2,-10*(e-1)));var at=e=>1-Math.sin(Math.acos(e)),Or=Nt(at),mt=Lt(at);var Br=ae(.42,0,1,1),Er=ae(0,0,.58,1),lt=ae(.42,0,.58,1);var kr=e=>Array.isArray(e)&&typeof e[0]!="number";var ft=e=>Array.isArray(e)&&typeof e[0]=="number";var So={linear:j,easeIn:Br,easeInOut:lt,easeOut:Er,circIn:at,circInOut:mt,circOut:Or,backIn:Ee,backInOut:it,backOut:Gt,anticipate:st},vi=e=>typeof e=="string",Kt=e=>{if(ft(e)){I(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return ae(t,r,o,n)}else if(vi(e))return I(So[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),So[e];return e};var ut=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function vo(e,t){let r=new Set,o=new Set,n=false,i=false,s=new WeakSet,a={delta:0,timestamp:0,isProcessing:false};function u(l){s.has(l)&&(m.schedule(l),e()),l(a);}let m={schedule:(l,c=false,d=false)=>{let x=d&&n?r:o;return c&&s.add(l),x.add(l),l},cancel:l=>{o.delete(l),s.delete(l);},process:l=>{if(a=l,n){i=true;return}n=true;let c=r;r=o,o=c,r.forEach(u),r.clear(),n=false,i&&(i=false,m.process(l));}};return m}var Mi=40;function Wt(e,t){let r=false,o=true,n={delta:0,timestamp:0,isProcessing:false},i=()=>r=true,s=ut.reduce((y,b)=>(y[b]=vo(i),y),{}),{setup:a,read:f,resolveKeyframes:u,preUpdate:m,update:l,preRender:c,render:d,postRender:h}=s,x=()=>{let y=K.useManualTiming,b=y?n.timestamp:performance.now();r=false,y||(n.delta=o?1e3/60:Math.max(Math.min(b-n.timestamp,Mi),1)),n.timestamp=b,n.isProcessing=true,a.process(n),f.process(n),u.process(n),m.process(n),l.process(n),c.process(n),d.process(n),h.process(n),n.isProcessing=false,r&&t&&(o=false,e(x));},V=()=>{r=true,o=true,n.isProcessing||e(x);};return {schedule:ut.reduce((y,b)=>{let v=s[b];return y[b]=(D,k=false,M=false)=>(r||V(),v.schedule(D,k,M)),y},{}),cancel:y=>{for(let b=0;b<ut.length;b++)s[ut[b]].cancel(y);},state:n,steps:s}}var{schedule:N,cancel:ct,state:Le}=Wt(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,true);var jt;function Ci(){jt=void 0;}var F={now:()=>(jt===void 0&&F.set(Le.isProcessing||K.useManualTiming?Le.timestamp:performance.now()),jt),set:e=>{jt=e,queueMicrotask(Ci);}};var Mo=e=>t=>typeof t=="string"&&t.startsWith(e),zt=Mo("--"),Ai=Mo("var(--"),Ge=e=>Ai(e)?wi.test(e.split("/*")[0].trim()):false,wi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lr(e){return typeof e!="string"?false:e.split("/*")[0].includes("var(--")}var q={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},oe={...q,transform:e=>G(0,1,e)},pt={...q,default:1};var me=e=>Math.round(e*1e5)/1e5;var Ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Co(e){return e==null}var Ao=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var We=(e,t)=>r=>!!(typeof r=="string"&&Ao.test(r)&&r.startsWith(e)||t&&!Co(r)&&Object.prototype.hasOwnProperty.call(r,t)),$t=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,i,s,a]=o.match(Ke);return {[e]:parseFloat(n),[t]:parseFloat(i),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var Pi=e=>G(0,255,e),Nr={...q,transform:e=>Math.round(Pi(e))},X={test:We("rgb","red"),parse:$t("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+Nr.transform(e)+", "+Nr.transform(t)+", "+Nr.transform(r)+", "+me(oe.transform(o))+")"};function Di(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var dt={test:We("#"),parse:Di,transform:X.transform};var ht=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Z=ht("deg"),le=ht("%"),p=ht("px"),wo=ht("vh"),Po=ht("vw"),Gr={...le,parse:e=>le.parse(e)/100,transform:e=>le.transform(e*100)};var fe={test:We("hsl","hue"),parse:$t("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+le.transform(me(t))+", "+le.transform(me(r))+", "+me(oe.transform(o))+")"};var A={test:e=>X.test(e)||dt.test(e)||fe.test(e),parse:e=>X.test(e)?X.parse(e):fe.test(e)?fe.parse(e):dt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?X.transform(e):fe.transform(e),getAnimatableNone:e=>{let t=A.parse(e);return t.alpha=0,A.transform(t)}};var Do=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fi(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ke)?.length||0)+(e.match(Do)?.length||0)>0}var Ro="number",Io="color",Ri="var",Ii="var(",Fo="${}",Oi=/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 ue(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],i=0,a=t.replace(Oi,f=>(A.test(f)?(o.color.push(i),n.push(Io),r.push(A.parse(f))):f.startsWith(Ii)?(o.var.push(i),n.push(Ri),r.push(f)):(o.number.push(i),n.push(Ro),r.push(parseFloat(f))),++i,Fo)).split(Fo);return {values:r,split:a,indexes:o,types:n}}function Bi(e){return ue(e).values}function Oo({split:e,types:t}){let r=e.length;return o=>{let n="";for(let i=0;i<r;i++)if(n+=e[i],o[i]!==void 0){let s=t[i];s===Ro?n+=me(o[i]):s===Io?n+=A.transform(o[i]):n+=o[i];}return n}}function Ei(e){return Oo(ue(e))}var ki=e=>typeof e=="number"?0:A.test(e)?A.getAnimatableNone(e):e,Li=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:ki(e);function Ni(e){let t=ue(e);return Oo(t)(t.values.map((o,n)=>Li(o,t.split[n])))}var R={test:Fi,parse:Bi,createTransformer:Ei,getAnimatableNone:Ni};function Kr(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Bo({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,i=0,s=0;if(!t)n=i=s=r;else {let a=r<.5?r*(1+t):r+t-r*t,f=2*r-a;n=Kr(f,a,e+1/3),i=Kr(f,a,e),s=Kr(f,a,e-1/3);}return {red:Math.round(n*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:o}}function je(e,t){return r=>r>0?t:e}var J=(e,t,r)=>e+(t-e)*r;var Wr=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},Gi=[dt,X,fe],Ki=e=>Gi.find(t=>t.test(e));function Eo(e){let t=Ki(e);if(H(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return false;let r=t.parse(e);return t===fe&&(r=Bo(r)),r}var jr=(e,t)=>{let r=Eo(e),o=Eo(t);if(!r||!o)return je(e,t);let n={...r};return i=>(n.red=Wr(r.red,o.red,i),n.green=Wr(r.green,o.green,i),n.blue=Wr(r.blue,o.blue,i),n.alpha=J(r.alpha,o.alpha,i),X.transform(n))};var Ht=new Set(["none","hidden"]);function ko(e,t){return Ht.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Wi(e,t){return r=>J(e,t,r)}function Ut(e){return typeof e=="number"?Wi:typeof e=="string"?Ge(e)?je:A.test(e)?jr:$i:Array.isArray(e)?Lo:typeof e=="object"?A.test(e)?jr:ji:je}function Lo(e,t){let r=[...e],o=r.length,n=e.map((i,s)=>Ut(i)(i,t[s]));return i=>{for(let s=0;s<o;s++)r[s]=n[s](i);return r}}function ji(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=Ut(e[n])(e[n],t[n]));return n=>{for(let i in o)r[i]=o[i](n);return r}}function zi(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let i=t.types[n],s=e.indexes[i][o[i]],a=e.values[s]??0;r[n]=a,o[i]++;}return r}var $i=(e,t)=>{let r=R.createTransformer(t),o=ue(e),n=ue(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?Ht.has(e)&&!n.values.length||Ht.has(t)&&!o.values.length?ko(e,t):Te(Lo(zi(o,n),n.values),r):(H(true,`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.`,"complex-values-different"),je(e,t))};function _t(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?J(e,t,r):Ut(e)(e,t)}var No=e=>{let t=({timestamp:r})=>e(r);return {start:(r=true)=>N.update(t,r),stop:()=>ct(t),now:()=>Le.isProcessing?Le.timestamp:F.now()}};var Yt=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let i=0;i<n;i++)o+=Math.round(e(i/(n-1))*1e4)/1e4+", ";return `linear(${o.substring(0,o.length-2)})`};function ze(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function Go(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(ze(o),2e4);return {type:"keyframes",ease:i=>o.next(n*i).value/t,duration:L(n)}}var w={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Hr(e,t){return e*Math.sqrt(1-t*t)}var Hi=12;function Ui(e,t,r){let o=r;for(let n=1;n<Hi;n++)o=o-e(o)/t(o);return o}var $r=.001;function _i({duration:e=w.duration,bounce:t=w.bounce,velocity:r=w.velocity,mass:o=w.mass}){let n,i;H(e<=O(w.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=G(w.minDamping,w.maxDamping,s),e=G(w.minDuration,w.maxDuration,L(e)),s<1?(n=u=>{let m=u*s,l=m*e,c=m-r,d=Hr(u,s),h=Math.exp(-l);return $r-c/d*h},i=u=>{let l=u*s*e,c=l*r+r,d=Math.pow(s,2)*Math.pow(u,2)*e,h=Math.exp(-l),x=Hr(Math.pow(u,2),s);return (-n(u)+$r>0?-1:1)*((c-d)*h)/x}):(n=u=>{let m=Math.exp(-u*e),l=(u-r)*e+1;return -$r+m*l},i=u=>{let m=Math.exp(-u*e),l=(r-u)*(e*e);return m*l});let a=5/e,f=Ui(n,i,a);if(e=O(e),isNaN(f))return {stiffness:w.stiffness,damping:w.damping,duration:e};{let u=Math.pow(f,2)*o;return {stiffness:u,damping:s*2*Math.sqrt(o*u),duration:e}}}var Yi=["duration","bounce"],qi=["stiffness","damping","mass"];function Ko(e,t){return t.some(r=>e[r]!==void 0)}function Xi(e){let t={velocity:w.velocity,stiffness:w.stiffness,damping:w.damping,mass:w.mass,isResolvedFromDuration:false,...e};if(!Ko(e,qi)&&Ko(e,Yi))if(t.velocity=0,e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,i=2*G(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:w.mass,stiffness:n,damping:i};}else {let r=_i({...e,velocity:0});t={...t,...r,mass:w.mass},t.isResolvedFromDuration=true;}return t}function $e(e=w.visualDuration,t=w.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,i=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],a={done:false,value:i},{stiffness:f,damping:u,mass:m,duration:l,velocity:c,isResolvedFromDuration:d}=Xi({...r,velocity:-L(r.velocity||0)}),h=c||0,x=u/(2*Math.sqrt(f*m)),V=s-i,g=L(Math.sqrt(f/m)),T=Math.abs(V)<5;o||(o=T?w.restSpeed.granular:w.restSpeed.default),n||(n=T?w.restDelta.granular:w.restDelta.default);let y,b,v,D,k,M;if(x<1)v=Hr(g,x),D=(h+x*g*V)/v,y=S=>{let P=Math.exp(-x*g*S);return s-P*(D*Math.sin(v*S)+V*Math.cos(v*S))},k=x*g*D+V*v,M=x*g*V-D*v,b=S=>Math.exp(-x*g*S)*(k*Math.sin(v*S)+M*Math.cos(v*S));else if(x===1){y=P=>s-Math.exp(-g*P)*(V+(h+g*V)*P);let S=h+g*V;b=P=>Math.exp(-g*P)*(g*S*P-h);}else {let S=g*Math.sqrt(x*x-1);y=_=>{let te=Math.exp(-x*g*_),Y=Math.min(S*_,300);return s-te*((h+x*g*V)*Math.sinh(Y)+S*V*Math.cosh(Y))/S};let P=(h+x*g*V)/S,W=x*g*P-V*S,Ve=x*g*V-P*S;b=_=>{let te=Math.exp(-x*g*_),Y=Math.min(S*_,300);return te*(W*Math.sinh(Y)+Ve*Math.cosh(Y))};}let B={calculatedDuration:d&&l||null,velocity:S=>O(b(S)),next:S=>{if(!d&&x<1){let W=Math.exp(-x*g*S),Ve=Math.sin(v*S),_=Math.cos(v*S),te=s-W*(D*Ve+V*_),Y=O(W*(k*Ve+M*_));return a.done=Math.abs(Y)<=o&&Math.abs(s-te)<=n,a.value=a.done?s:te,a}let P=y(S);if(d)a.done=S>=l;else {let W=O(b(S));a.done=Math.abs(W)<=o&&Math.abs(s-P)<=n;}return a.value=a.done?s:P,a},toString:()=>{let S=Math.min(ze(B),2e4),P=Yt(W=>B.next(S*W).value,S,30);return S+"ms "+P},toTransition:()=>{}};return B}$e.applyToOptions=e=>{let t=Go(e,100,$e);return e.ease=t.ease,e.duration=O(t.duration),e.type="keyframes",e};var Zi=5;function qt(e,t,r){let o=Math.max(t-Zi,0);return nt(r-e(o),t-o)}function xt({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=325,bounceDamping:n=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:f,restDelta:u=.5,restSpeed:m}){let l=e[0],c={done:false,value:l},d=M=>a!==void 0&&M<a||f!==void 0&&M>f,h=M=>a===void 0?f:f===void 0||Math.abs(a-M)<Math.abs(f-M)?a:f,x=r*t,V=l+x,g=s===void 0?V:s(V);g!==V&&(x=g-l);let T=M=>-x*Math.exp(-M/o),y=M=>g+T(M),b=M=>{let B=T(M),S=y(M);c.done=Math.abs(B)<=u,c.value=c.done?g:S;},v,D,k=M=>{d(c.value)&&(v=M,D=$e({keyframes:[c.value,h(c.value)],velocity:qt(y,M,c.value),damping:n,stiffness:i,restDelta:u,restSpeed:m}));};return k(0),{calculatedDuration:null,next:M=>{let B=false;return !D&&v===void 0&&(B=true,b(M),k(M)),v!==void 0&&M>=v?D.next(M-v):(!B&&b(M),c)}}}function Ji(e,t,r){let o=[],n=r||K.mix||_t,i=e.length-1;for(let s=0;s<i;s++){let a=n(e[s],e[s+1]);if(t){let f=Array.isArray(t)?t[s]||j:t;a=Te(f,a);}o.push(a);}return o}function Wo(e,t,{clamp:r=true,ease:o,mixer:n}={}){let i=e.length;if(I(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return ()=>t[0];if(i===2&&t[0]===t[1])return ()=>t[1];let s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=Ji(t,o,n),f=a.length,u=m=>{if(s&&m<e[0])return t[0];let l=0;if(f>1)for(;l<e.length-2&&!(m<e[l+1]);l++);let c=ot(e[l],e[l+1],m);return a[l](c)};return r?m=>u(G(e[0],e[i-1],m)):u}function jo(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=ot(0,t,o);e.push(J(r,1,n));}}function zo(e){let t=[0];return jo(t,e.length-1),t}function $o(e,t){return e.map(r=>r*t)}function Qi(e,t){return e.map(()=>t||lt).splice(0,e.length-1)}function ce({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=kr(o)?o.map(Kt):Kt(o),i={done:false,value:t[0]},s=$o(r&&r.length===t.length?r:zo(t),e),a=Wo(s,t,{ease:Array.isArray(n)?n:Qi(t,n)});return {calculatedDuration:e,next:f=>(i.value=a(f),i.done=f>=e,i)}}var es=e=>e!==null;function pe(e,{repeat:t,repeatType:r="loop"},o,n=1){let i=e.filter(es),a=n<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return !a||o===void 0?i[a]:o}var ts={decay:xt,inertia:xt,tween:ce,keyframes:ce,spring:$e};function Xt(e){typeof e.type=="string"&&(e.type=ts[e.type]);}var de=class{constructor(){this.updateFinished();}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t;});}notifyFinished(){this.resolve();}then(t,r){return this.finished.then(t,r)}};var rs=e=>e/100,ne=class extends de{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:false,value:void 0},this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==F.now()&&this.tick(F.now()),this.isStopped=true,this.state!=="idle"&&(this.teardown(),this.options.onStop?.());},this.options=t,this.initAnimation(),this.play(),t.autoplay===false&&this.pause();}initAnimation(){let{options:t}=this;Xt(t);let{type:r=ce,repeat:o=0,repeatDelay:n=0,repeatType:i,velocity:s=0}=t,{keyframes:a}=t,f=r||ce;process.env.NODE_ENV!=="production"&&f!==ce&&I(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),f!==ce&&typeof a[0]!="number"&&(this.mixKeyframes=Te(rs,_t(a[0],a[1])),a=[0,100]);let u=f({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...a].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=ze(u));let{calculatedDuration:m}=u;this.calculatedDuration=m,this.resolvedDuration=m+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u;}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r;}tick(t,r=false){let{generator:o,totalDuration:n,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:f}=this;if(this.startTime===null)return o.next(0);let{delay:u=0,keyframes:m,repeat:l,repeatType:c,repeatDelay:d,type:h,onUpdate:x,finalKeyframe:V}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,b=o;if(l){let M=Math.min(this.currentTime,n)/a,B=Math.floor(M),S=M%1;!S&&M>=1&&(S=1),S===1&&B--,B=Math.min(B,l+1),B%2&&(c==="reverse"?(S=1-S,d&&(S-=d/a)):c==="mirror"&&(b=s)),y=G(0,1,S)*a;}let v;T?(this.delayState.value=m[0],v=this.delayState):v=b.next(y),i&&!T&&(v.value=i(v.value));let{done:D}=v;!T&&f!==null&&(D=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return k&&h!==xt&&(v.value=pe(m,this.options,V,this.speed)),x&&x(v.value),k&&this.finish(),v}then(t,r){return this.finished.then(t,r)}get duration(){return L(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+L(t)}get time(){return L(this.currentTime)}set time(t){t=O(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(false):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t));}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let r=this.generator.next(t).value;return qt(o=>this.generator.next(o).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(F.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=L(this.currentTime));}play(){if(this.isStopped)return;let{driver:t=No,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start();}pause(){this.state="paused",this.updateTime(F.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.();}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(t){return this.startTime=0,this.tick(t,true)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Ho(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1]);}var ve=e=>e*180/Math.PI,Ur=e=>{let t=ve(Math.atan2(e[1],e[0]));return _r(t)},os={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ur,rotateZ:Ur,skewX:e=>ve(Math.atan(e[1])),skewY:e=>ve(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_r=e=>(e=e%360,e<0&&(e+=360),e),Uo=Ur,_o=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ns={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_o,scaleY:Yo,scale:e=>(_o(e)+Yo(e))/2,rotateX:e=>_r(ve(Math.atan2(e[6],e[5]))),rotateY:e=>_r(ve(Math.atan2(-e[2],e[0]))),rotateZ:Uo,rotate:Uo,skewX:e=>ve(Math.atan(e[4])),skewY:e=>ve(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zt(e){return e.includes("scale")?1:0}function Jt(e,t){if(!e||e==="none")return Zt(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=ns,n=r;else {let a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=os,n=a;}if(!n)return Zt(t);let i=o[t],s=n[1].split(",").map(is);return typeof i=="function"?i(s):s[i]}var qo=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Jt(r,t)};function is(e){return parseFloat(e.trim())}var Q=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U=new Set(Q);var Yr=e=>e===q||e===p,ss=new Set(["x","y","z"]),as=Q.filter(e=>!ss.has(e));function Xo(e){let t=[];return as.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0));}),t}var ie={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:o})=>{let n=e.max-e.min;return o==="border-box"?n:n-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:o})=>{let n=e.max-e.min;return o==="border-box"?n:n-parseFloat(t)-parseFloat(r)},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:(e,{transform:t})=>Jt(t,"x"),y:(e,{transform:t})=>Jt(t,"y")};ie.translateX=ie.x;ie.translateY=ie.y;var Me=new Set,qr=false,Xr=false,Zr=false;function Zo(){if(Xr){let e=Array.from(Me).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=Xo(o);n.length&&(r.set(o,n),o.render());}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([i,s])=>{o.getValue(i)?.set(s);});}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY);});}Xr=false,qr=false,Me.forEach(e=>e.complete(Zr)),Me.clear();}function Jo(){Me.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xr=true);});}function Qo(){Zr=true,Jo(),Zo(),Zr=false;}var he=class{constructor(t,r,o,n,i,s=false){this.state="pending",this.isAsync=false,this.needsMeasurement=false,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=i,this.isAsync=s;}scheduleResolve(){this.state="scheduled",this.isAsync?(Me.add(this),qr||(qr=true,N.read(Jo),N.resolveKeyframes(Zo))):(this.readKeyframes(),this.complete());}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,motionValue:n}=this;if(t[0]===null){let i=n?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&r){let a=o.readValue(r,s);a!=null&&(t[0]=a);}t[0]===void 0&&(t[0]=s),n&&i===void 0&&n.set(t[0]);}Ho(t);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=false){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Me.delete(this);}cancel(){this.state==="scheduled"&&(Me.delete(this),this.state="pending");}resume(){this.state==="pending"&&this.scheduleResolve();}};var en=e=>e.startsWith("--");function Qt(e,t,r){en(t)?e.style.setProperty(t,r):e.style[t]=r;}var tn={};function er(e,t){let r=rt(e);return ()=>tn[t]??r()}var rn=er(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var tr=er(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing");var Ce=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var Jr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ce([0,.65,.55,1]),circOut:Ce([.55,0,1,.45]),backIn:Ce([.31,.01,.66,-0.59]),backOut:Ce([.33,1.53,.69,.99])};function Qr(e,t){if(e)return typeof e=="function"?tr()?Yt(e,t):"ease-out":ft(e)?Ce(e):Array.isArray(e)?e.map(r=>Qr(r,t)||Jr.easeOut):Jr[e]}function on(e,t,r,{delay:o=0,duration:n=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:f}={},u=void 0){let m={[t]:r};f&&(m.offset=f);let l=Qr(a,n);Array.isArray(l)&&(m.easing=l);let c={delay:o,duration:n,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};u&&(c.pseudoElement=u);let d=e.animate(m,c);return d}function rr(e){return typeof e=="function"&&"applyToOptions"in e}function nn({type:e,...t}){return rr(e)&&tr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var He=class extends de{constructor(t){if(super(),this.finishedTime=null,this.isStopped=false,this.manualStartTime=null,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:i,allowFlatten:s=false,finalKeyframe:a,onComplete:f}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,I(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=nn(t);this.animation=on(r,o,n,u,i),u.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let m=pe(n,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Qt(r,o,m),this.animation.cancel();}f?.(),this.notifyFinished();};}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.();}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return L(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+L(t)}get time(){return L(Number(this.animation.currentTime)||0)}set time(t){let r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=O(t),r&&this.animation.pause();}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t;}attachTimeline({timeline:t,rangeStart:r,rangeEnd:o,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&rn()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),o&&(this.animation.rangeEnd=o),j):n(this)}};var sn={anticipate:st,backInOut:it,circInOut:mt};function ms(e){return e in sn}function an(e){typeof e.ease=="string"&&ms(e.ease)&&(e.ease=sn[e.ease]);}var eo=10,or=class extends He{constructor(t){an(t),Xt(t),super(t),t.startTime!==void 0&&t.autoplay!==false&&(this.startTime=t.startTime),this.options=t;}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:i,...s}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let a=new ne({...s,autoplay:false}),f=Math.max(eo,F.now()-this.startTime),u=G(0,eo,f-eo),m=a.sample(f).value,{name:l}=this.options;i&&l&&Qt(i,l,m),r.setWithVelocity(a.sample(Math.max(0,f-u)).value,m,u),a.stop();}};var to=(e,t)=>t==="zIndex"?false:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(R.test(e)||e==="0")&&!e.startsWith("url("));function ls(e){let t=e[0];if(e.length===1)return true;for(let r=0;r<e.length;r++)if(e[r]!==t)return true}function mn(e,t,r,o){let n=e[0];if(n===null)return false;if(t==="display"||t==="visibility")return true;let i=e[e.length-1],s=to(n,t),a=to(i,t);return H(s===a,`You are trying to animate ${t} from "${n}" to "${i}". "${s?i:n}" is not an animatable value.`,"value-not-animatable"),!s||!a?false:ls(e)||(r==="spring"||rr(r))&&o}function gt(e){e.duration=0,e.type="keyframes";}var nr=new Set(["opacity","clipPath","filter","transform"]);var fs=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ln(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&fs.test(e[t]))return true;return false}var us=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),cs=rt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fn(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:i,type:s,keyframes:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return false;let{onUpdate:u,transformTemplate:m}=t.owner.getProps();return cs()&&r&&(nr.has(r)||us.has(r)&&ln(a))&&(r!=="transform"||!m)&&!u&&!o&&n!=="mirror"&&i!==0&&s!=="inertia"}var ps=40,ir=class extends de{constructor({autoplay:t=true,delay:r=0,type:o="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:f,motionValue:u,element:m,...l}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel();},this.createdAt=F.now();let c={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:i,repeatType:s,name:f,motionValue:u,element:m,...l},d=m?.KeyframeResolver||he;this.keyframeResolver=new d(a,(h,x,V)=>this.onKeyframesResolved(h,x,c,!V),f,u,m),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:i,type:s,velocity:a,delay:f,isHandoff:u,onUpdate:m}=o;this.resolvedAt=F.now();let l=true;mn(t,i,s,a)||(l=false,(K.instantAnimations||!f)&&m?.(pe(t,o,r)),t[0]=t[t.length-1],gt(o),o.repeat=0);let d={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>ps?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},h=l&&!u&&fn(d),x=d.motionValue?.owner?.current,V;if(h)try{V=new or({...d,element:x});}catch{V=new ne(d);}else V=new ne(d);V.finished.then(()=>{this.notifyFinished();}).catch(j),this.pendingTimeline&&(this.stopTimeline=V.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=V;}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Qo()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t;}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel();}};function sr(e,t,r,o=0,n=1){let i=Array.from(e).sort((u,m)=>u.sortNodePosition(m)).indexOf(t),s=e.size,a=(s-1)*o;return typeof r=="function"?r(i,s):n===1?i*o:a-i*o}var ds=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hs(e){let t=ds.exec(e);if(!t)return [,];let[,r,o,n]=t;return [`--${r??o}`,n]}var xs=4;function ro(e,t,r=1){I(r<=xs,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=hs(e);if(!o)return;let i=window.getComputedStyle(t).getPropertyValue(o);if(i){let s=i.trim();return et(s)?parseFloat(s):s}return Ge(n)?ro(n,t,r+1):n}var gs={type:"spring",stiffness:500,damping:25,restSpeed:10},ys=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vs={type:"keyframes",duration:.8},bs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},un=(e,{keyframes:t})=>t.length>2?Vs:U.has(e)?e.startsWith("scale")?ys(t[1]):gs:bs;function ar(e,t){if(e?.inherit&&t){let{inherit:r,...o}=e;return {...t,...o}}return e}function mr(e,t){let r=e?.[t]??e?.default??e;return r!==e?ar(r,e):r}var Ts=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cn(e){for(let t in e)if(!Ts.has(t))return true;return false}var pn=(e,t,r,o={},n,i)=>s=>{let a=mr(o,e)||{},f=a.delay||o.delay||0,{elapsed:u=0}=o;u=u-O(f);let m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:c=>{t.set(c),a.onUpdate&&a.onUpdate(c);},onComplete:()=>{s(),a.onComplete&&a.onComplete();},name:e,motionValue:t,element:i?void 0:n};cn(a)||Object.assign(m,un(e,m)),m.duration&&(m.duration=O(m.duration)),m.repeatDelay&&(m.repeatDelay=O(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let l=false;if((m.type===false||m.duration===0&&!m.repeatDelay)&&(gt(m),m.delay===0&&(l=true)),(K.instantAnimations||K.skipAnimations||n?.shouldSkipAnimations)&&(l=true,gt(m),m.delay=0),m.allowFlatten=!a.type&&!a.ease,l&&!i&&t.get()!==void 0){let c=pe(m.keyframes,a);if(c!==void 0){N.update(()=>{m.onUpdate(c),m.onComplete();});return}}return a.isSync?new ne(m):new ir(m)};function dn(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity();}),t}function Ae(e,t,r,o){if(typeof t=="function"){let[n,i]=dn(o);t=t(r!==void 0?r:e.custom,n,i);}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,i]=dn(o);t=t(r!==void 0?r:e.custom,n,i);}return t}function z(e,t,r){let o=e.getProps();return Ae(o,t,r!==void 0?r:o.custom,e)}var lr=new Set(["width","height","top","left","right","bottom",...Q]);var hn=30,Ss=e=>!isNaN(parseFloat(e)),oo=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=F.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let i of this.dependents)i.dirty();},this.hasAnimated=false,this.setCurrent(t),this.owner=r.owner;}setCurrent(t){this.current=t,this.updatedAt=F.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ss(this.current));}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt;}onChange(t){return process.env.NODE_ENV!=="production"&&re(false,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Se);let o=this.events[t].add(r);return t==="change"?()=>{o(),N.read(()=>{this.events.change.getSize()||this.stop();});}:o}clearListeners(){for(let t in this.events)this.events[t].clear();}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r;}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t);}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o;}jump(t,r=true){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}dirty(){this.events.change?.notify(this.current);}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t);}removeDependent(t){this.dependents&&this.dependents.delete(t);}get(){return this.current}getPrevious(){return this.prev}getVelocity(){let t=F.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hn)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,hn);return nt(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=true,this.animation=t(r),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}};function we(e,t){return new oo(e,t)}var yt=e=>Array.isArray(e);function vs(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,we(r));}function Ms(e){return yt(e)?e[e.length-1]||0:e}function Ue(e,t){let r=z(e,t),{transitionEnd:o={},transition:n={},...i}=r||{};i={...i,...o};for(let s in i){let a=Ms(i[s]);vs(e,s,a);}}var C=e=>!!(e&&e.getVelocity);function gn(e){return !!(C(e)&&e.add)}function yn(e,t){let r=e.getValue("willChange");if(gn(r))return r.add(t);if(!r&&K.WillChange){let o=new K.WillChange("auto");e.addValue("willChange",o),o.add(t);}}function _e(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Vn="framerAppearId",Vt="data-"+_e(Vn);function bn(e){return e.props[Vt]}function Cs({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==true;return t[r]=false,o}function fr(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:i,transitionEnd:s,...a}=t,f=e.getDefaultTransition();i=i?ar(i,f):f;let u=i?.reduceMotion;o&&(i=o);let m=[],l=n&&e.animationState&&e.animationState.getState()[n];for(let c in a){let d=e.getValue(c,e.latestValues[c]??null),h=a[c];if(h===void 0||l&&Cs(l,c))continue;let x={delay:r,...mr(i||{},c)},V=d.get();if(V!==void 0&&!d.isAnimating()&&!Array.isArray(h)&&h===V&&!x.velocity){N.update(()=>d.set(h));continue}let g=false;if(window.MotionHandoffAnimation){let b=bn(e);if(b){let v=window.MotionHandoffAnimation(b,c,N);v!==null&&(x.startTime=v,g=true);}}yn(e,c);let T=u??e.shouldReduceMotion;d.start(pn(c,d,h,T&&lr.has(c)?{type:false}:x,e,g));let y=d.animation;y&&m.push(y);}if(s){let c=()=>N.update(()=>{s&&Ue(e,s);});m.length?Promise.all(m).then(c):c();}return m}function ur(e,t,r={}){let o=z(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let i=o?()=>Promise.all(fr(e,o,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(f=0)=>{let{delayChildren:u=0,staggerChildren:m,staggerDirection:l}=n;return As(e,t,f,u,m,l,r)}:()=>Promise.resolve(),{when:a}=n;if(a){let[f,u]=a==="beforeChildren"?[i,s]:[s,i];return f().then(()=>u())}else return Promise.all([i(),s(r.delay)])}function As(e,t,r=0,o=0,n=0,i=1,s){let a=[];for(let f of e.variantChildren)f.notify("AnimationStart",t),a.push(ur(f,t,{...s,delay:r+(typeof o=="function"?0:o)+sr(e.variantChildren,f,o,n,i)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(a)}function bt(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(i=>ur(e,i,r));o=Promise.all(n);}else if(typeof t=="string")o=ur(e,t,r);else {let n=typeof t=="function"?z(e,t,r.custom):t;o=Promise.all(fr(e,n,r));}return o.then(()=>{e.notify("AnimationComplete",t);})}var Tn={test:e=>e==="auto",parse:e=>e};var cr=e=>t=>t.test(e);var no=[q,p,le,Z,Po,wo,Tn],io=e=>no.find(cr(e));function Sn(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tt(e):true}var ws=new Set(["brightness","contrast","saturate","opacity"]);function Ps(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(Ke)||[];if(!o)return e;let n=r.replace(o,""),i=ws.has(t)?1:0;return o!==r&&(i*=100),t+"("+i+n+")"}var Ds=/\b([a-z-]*)\(.*?\)/gu,Tt={...R,getAnimatableNone:e=>{let t=e.match(Ds);return t?t.map(Ps).join(" "):e}};var St={...R,getAnimatableNone:e=>{let t=R.parse(e);return R.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}};var so={...q,transform:Math.round};var vn={rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:pt,scaleX:pt,scaleY:pt,scaleZ:pt,skew:Z,skewX:Z,skewY:Z,distance:p,translateX:p,translateY:p,translateZ:p,x:p,y:p,z:p,perspective:p,transformPerspective:p,opacity:oe,originX:Gr,originY:Gr,originZ:p};var Ye={borderWidth:p,borderTopWidth:p,borderRightWidth:p,borderBottomWidth:p,borderLeftWidth:p,borderRadius: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,inset:p,insetBlock:p,insetBlockStart:p,insetBlockEnd:p,insetInline:p,insetInlineStart:p,insetInlineEnd:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,paddingBlock:p,paddingBlockStart:p,paddingBlockEnd:p,paddingInline:p,paddingInlineStart:p,paddingInlineEnd:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,marginBlock:p,marginBlockStart:p,marginBlockEnd:p,marginInline:p,marginInlineStart:p,marginInlineEnd:p,fontSize:p,backgroundPositionX:p,backgroundPositionY:p,...vn,zIndex:so,fillOpacity:oe,strokeOpacity:oe,numOctaves:so};var Fs={...Ye,color:A,backgroundColor:A,outlineColor:A,fill:A,stroke:A,borderColor:A,borderTopColor:A,borderRightColor:A,borderBottomColor:A,borderLeftColor:A,filter:Tt,WebkitFilter:Tt,mask:St,WebkitMask:St},pr=e=>Fs[e];var Rs=new Set([Tt,St]);function dr(e,t){let r=pr(e);return Rs.has(r)||(r=R),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Is=new Set(["auto","none","0"]);function Mn(e,t,r){let o=0,n;for(;o<e.length&&!n;){let i=e[o];typeof i=="string"&&!Is.has(i)&&ue(i).values.length&&(n=e[o]),o++;}if(n&&r)for(let i of t)e[i]=dr(r,n);}var hr=class extends he{constructor(t,r,o,n,i){super(t,r,o,n,i,true);}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let l=t[m];if(typeof l=="string"&&(l=l.trim(),Ge(l))){let c=ro(l,r.current);c!==void 0&&(t[m]=c),m===t.length-1&&(this.finalKeyframe=l);}}if(this.resolveNoneKeyframes(),!lr.has(o)||t.length!==2)return;let[n,i]=t,s=io(n),a=io(i),f=Lr(n),u=Lr(i);if(f!==u&&ie[o]){this.needsMeasurement=true;return}if(s!==a)if(Yr(s)&&Yr(a))for(let m=0;m<t.length;m++){let l=t[m];typeof l=="string"&&(t[m]=parseFloat(l));}else ie[o]&&(this.needsMeasurement=true);}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||Sn(t[n]))&&o.push(n);o.length&&Mn(t,o,r);}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ie[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,false);}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,false);let i=o.length-1,s=o[i];o[i]=ie[r](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,f])=>{t.getValue(a).set(f);}),this.resolveNoneKeyframes();}};var xr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var{schedule:Cn}=Wt(queueMicrotask,false);var Os=[...no,A,R],An=e=>Os.find(cr(e));var wn=()=>({min:0,max:0}),gr=()=>({x:wn(),y:wn()});var Pn=new WeakMap;function se(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ee(e){return typeof e=="string"||Array.isArray(e)}var yr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vt=["initial",...yr];function xe(e){return se(e.animate)||vt.some(t=>ee(e[t]))}function Mt(e){return !!(xe(e)||e.variants)}function Dn(e,t,r){for(let o in t){let n=t[o],i=r[o];if(C(n))e.addValue(o,n);else if(C(i))e.addValue(o,we(n,{owner:e}));else if(i!==n)if(e.hasValue(o)){let s=e.getValue(o);s.liveStyle===true?s.jump(n):s.hasAnimated||s.set(n);}else {let s=e.getStaticValue(o);e.addValue(o,we(s!==void 0?s:n,{owner:e}));}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var ge={current:null},Pe={current:false};var Bs=typeof window<"u";function Ct(){if(Pe.current=true,!!Bs)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ge.current=e.matches;e.addEventListener("change",t),t();}else ge.current=false;}var Fn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Vr={};function wt(e){Vr=e;}function ao(){return Vr}var At=class{scrapeMotionValuesFromProps(t,r,o){return {}}constructor({parent:t,props:r,presenceContext:o,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:s,visualState:a},f={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.shouldSkipAnimations=false,this.values=new Map,this.KeyframeResolver=he,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=false,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=()=>{let d=F.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,N.render(this.render,false,true));};let{latestValues:u,renderState:m}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=m,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=i,this.options=f,this.blockInitialAnimation=!!s,this.isControllingVariants=xe(r),this.isVariantNode=Mt(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{},this);for(let d in c){let h=c[d];u[d]!==void 0&&C(h)&&h.set(u[d]);}}mount(t){if(this.hasBeenMounted)for(let r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,Pn.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((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=false:this.reducedMotionConfig==="always"?this.shouldReduceMotion=true:(Pe.current||Ct(),this.shouldReduceMotion=ge.current),process.env.NODE_ENV!=="production"&&re(this.shouldReduceMotion!==true,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??false,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=true;}unmount(){this.projection&&this.projection.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=false);}this.current=null;}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t);}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t);}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&nr.has(t)&&this.current instanceof HTMLElement){let{factory:s,keyframes:a,times:f,ease:u,duration:m}=r.accelerate,l=new He({element:this.current,name:t,keyframes:a,times:f,ease:u,duration:O(m)}),c=s(l);this.valueSubscriptions.set(t,()=>{c(),l.cancel();});return}let o=U.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&N.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=true),this.scheduleRender();}),i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),i&&i(),r.owner&&r.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 Vr){let r=Vr[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(this.props)&&(this.features[t]=new n(this)),this.features[t]){let i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r;}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<Fn.length;o++){let n=Fn[o];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i="on"+n,s=t[i];s&&(this.propEventSubscriptions[n]=this.on(n,s));}this.prevMotionValues=Dn(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){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get());}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState);}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=we(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(et(o)||tt(o))?o=parseFloat(o):!An(o)&&R.test(r)&&(o=dr(t,r)),this.setBaseTarget(t,C(o)?o.get():o)),C(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r;}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let i=Ae(this.props,r,this.presenceContext?.custom);i&&(o=i[t]);}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!C(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Se),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r);}scheduleRenderMicrotask(){Cn.render(this.render);}};var qe=class extends At{constructor(){super(...arguments),this.KeyframeResolver=hr;}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let o=t.style;return o?o[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;C(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`);}));}};var De=class{constructor(t){this.isMounted=false,this.node=t;}update(){}};function Rn({top:e,left:t,right:r,bottom:o}){return {x:{min:t,max:r},y:{min:e,max:o}}}function In(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return {top:r.y,left:r.x,bottom:o.y,right:o.x}}function On(e,t){return Rn(In(e.getBoundingClientRect(),t))}var Es={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ks=Q.length;function Bn(e,t,r){let o="",n=true;for(let i=0;i<ks;i++){let s=Q[i],a=e[s];if(a===void 0)continue;let f=true;if(typeof a=="number")f=a===(s.startsWith("scale")?1:0);else {let u=parseFloat(a);f=s.startsWith("scale")?u===1:u===0;}if(!f||r){let u=xr(a,Ye[s]);if(!f){n=false;let m=Es[s]||s;o+=`${m}(${u}) `;}r&&(t[s]=u);}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function Fe(e,t,r){let{style:o,vars:n,transformOrigin:i}=e,s=false,a=false;for(let f in t){let u=t[f];if(U.has(f)){s=true;continue}else if(zt(f)){n[f]=u;continue}else {let m=xr(u,Ye[f]);f.startsWith("origin")?(a=true,i[f]=m):o[f]=m;}}if(t.transform||(s||r?o.transform=Bn(t,e.transform,r):o.transform&&(o.transform="none")),a){let{originX:f="50%",originY:u="50%",originZ:m=0}=i;o.transformOrigin=`${f} ${u} ${m}`;}}function br(e,{style:t,vars:r},o,n){let i=e.style,s;for(s in t)i[s]=t[s];n?.applyProjectionStyles(i,o);for(s in r)i.setProperty(s,r[s]);}function En(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Xe={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(p.test(e))e=parseFloat(e);else return e;let r=En(e,t.target.x),o=En(e,t.target.y);return `${r}% ${o}%`}};var kn={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=R.parse(e);if(n.length>5)return o;let i=R.createTransformer(e),s=typeof n[0]!="number"?1:0,a=r.x.scale*t.x,f=r.y.scale*t.y;n[0+s]/=a,n[1+s]/=f;let u=J(a,f,.5);return typeof n[2+s]=="number"&&(n[2+s]/=u),typeof n[3+s]=="number"&&(n[3+s]/=u),i(n)}};var Ln={borderRadius:{...Xe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xe,borderTopRightRadius:Xe,borderBottomLeftRadius:Xe,borderBottomRightRadius:Xe,boxShadow:kn};function Pt(e,{layout:t,layoutId:r}){return U.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ln[e]||e==="opacity")}function Re(e,t,r){let o=e.style,n=t?.style,i={};if(!o)return i;for(let s in o)(C(o[s])||n&&C(n[s])||Pt(s,e)||r?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}function Ls(e){return window.getComputedStyle(e)}var Dt=class extends qe{constructor(){super(...arguments),this.type="html",this.renderInstance=br;}readValueFromInstance(t,r){if(U.has(r))return this.projection?.isProjecting?Zt(r):qo(t,r);{let o=Ls(t),n=(zt(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return On(t,r)}build(t,r,o){Fe(t,r,o.transformTemplate);}scrapeMotionValuesFromProps(t,r,o){return Re(t,r,o)}};var Ns={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gs={offset:"strokeDashoffset",array:"strokeDasharray"};function Nn(e,t,r=1,o=0,n=true){e.pathLength=1;let i=n?Ns:Gs;e[i.offset]=`${-o}`,e[i.array]=`${t} ${r}`;}var Ks=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ft(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:i=1,pathOffset:s=0,...a},f,u,m){if(Fe(e,a,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:l,style:c}=e;l.transform&&(c.transform=l.transform,delete l.transform),(c.transform||l.transformOrigin)&&(c.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),c.transform&&(c.transformBox=m?.transformBox??"fill-box",delete l.transformBox);for(let d of Ks)l[d]!==void 0&&(c[d]=l[d],delete l[d]);t!==void 0&&(l.x=t),r!==void 0&&(l.y=r),o!==void 0&&(l.scale=o),n!==void 0&&Nn(l,n,i,s,false);}var Tr=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"]);var Rt=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gn(e,t,r,o){br(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Tr.has(n)?n:_e(n),t.attrs[n]);}function It(e,t,r){let o=Re(e,t,r);for(let n in e)if(C(e[n])||C(t[n])){let i=Q.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[i]=e[n];}return o}var Ot=class extends qe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=gr;}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(U.has(r)){let o=pr(r);return o&&o.default||0}return r=Tr.has(r)?r:_e(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return It(t,r,o)}build(t,r,o){Ft(t,r,this.isSVGTag,o.transformTemplate,o.style);}renderInstance(t,r,o,n){Gn(t,r,o,n);}mount(t){this.isSVGTag=Rt(t.tagName),super.mount(t);}};var Ws=vt.length;function mo(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?mo(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<Ws;r++){let o=vt[r],n=e.props[o];(ee(n)||n===false)&&(t[o]=n);}return t}function lo(e,t){if(!Array.isArray(t))return false;let r=t.length;if(r!==e.length)return false;for(let o=0;o<r;o++)if(t[o]!==e[o])return false;return true}var js=[...yr].reverse(),zs=yr.length;function $s(e){return t=>Promise.all(t.map(({animation:r,options:o})=>bt(e,r,o)))}function fo(e){let t=$s(e),r=Kn(),o=true,n=false,i=u=>(m,l)=>{let c=z(e,l,u==="exit"?e.presenceContext?.custom:void 0);if(c){let{transition:d,transitionEnd:h,...x}=c;m={...m,...x,...h};}return m};function s(u){t=u(e);}function a(u){let{props:m}=e,l=mo(e.parent)||{},c=[],d=new Set,h={},x=1/0;for(let g=0;g<zs;g++){let T=js[g],y=r[T],b=m[T]!==void 0?m[T]:l[T],v=ee(b),D=T===u?y.isActive:null;D===false&&(x=g);let k=b===l[T]&&b!==m[T]&&v;if(k&&(o||n)&&e.manuallyAnimateOnMount&&(k=false),y.protectedKeys={...h},!y.isActive&&D===null||!b&&!y.prevProp||se(b)||typeof b=="boolean")continue;if(T==="exit"&&y.isActive&&D!==true){y.prevResolvedValues&&(h={...h,...y.prevResolvedValues});continue}let M=Wn(y.prevProp,b),B=M||T===u&&y.isActive&&!k&&v||g>x&&v,S=false,P=Array.isArray(b)?b:[b],W=P.reduce(i(T),{});D===false&&(W={});let{prevResolvedValues:Ve={}}=y,_={...Ve,...W},te=E=>{B=true,d.has(E)&&(S=true,d.delete(E)),y.needsAnimating[E]=true;let $=e.getValue(E);$&&($.liveStyle=false);};for(let E in _){let $=W[E],be=Ve[E];if(h.hasOwnProperty(E))continue;let Oe=false;yt($)&&yt(be)?Oe=!lo($,be):Oe=$!==be,Oe?$!=null?te(E):d.add(E):$!==void 0&&d.has(E)?te(E):y.protectedKeys[E]=true;}y.prevProp=b,y.prevResolvedValues=W,y.isActive&&(h={...h,...W}),(o||n)&&e.blockInitialAnimation&&(B=false);let Y=k&&M;B&&(!Y||S)&&c.push(...P.map(E=>{let $={type:T};if(typeof E=="string"&&(o||n)&&!Y&&e.manuallyAnimateOnMount&&e.parent){let{parent:be}=e,Oe=z(be,E);if(be.enteringChildren&&Oe){let{delayChildren:gi}=Oe.transition||{};$.delay=sr(be.enteringChildren,e,gi);}}return {animation:E,options:$}}));}if(d.size){let g={};if(typeof m.initial!="boolean"){let T=z(e,Array.isArray(m.initial)?m.initial[0]:m.initial);T&&T.transition&&(g.transition=T.transition);}d.forEach(T=>{let y=e.getBaseTarget(T),b=e.getValue(T);b&&(b.liveStyle=true),g[T]=y??null;}),c.push({animation:g});}let V=!!c.length;return o&&(m.initial===false||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(V=false),o=false,n=false,V?t(c):Promise.resolve()}function f(u,m){if(r[u].isActive===m)return Promise.resolve();e.variantChildren?.forEach(c=>c.animationState?.setActive(u,m)),r[u].isActive=m;let l=a(u);for(let c in r)r[c].protectedKeys={};return l}return {animateChanges:a,setActive:f,setAnimateFunction:s,getState:()=>r,reset:()=>{r=Kn(),n=true;}}}function Wn(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lo(t,e):false}function Ie(e=false){return {isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kn(){return {animate:Ie(true),whileInView:Ie(),whileHover:Ie(),whileTap:Ie(),whileDrag:Ie(),whileFocus:Ie(),exit:Ie()}}function uo(e){return C(e)?e.get():e}var jn={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"]},zn=false;function Hs(){if(zn)return;let e={};for(let t in jn)e[t]={isEnabled:r=>jn[t].some(o=>!!r[o])};wt(e),zn=true;}function Sr(){return Hs(),ao()}function Bt(e){let t=Sr();for(let r in e)t[r]={...t[r],...e[r]};wt(t);}function Xs({children:e,features:t,strict:r=false}){let[,o]=useState(!co(t)),n=useRef(void 0);if(!co(t)){let{renderer:i,...s}=t;n.current=i,Bt(s);}return useEffect(()=>{co(t)&&t().then(({renderer:i,...s})=>{Bt(s),n.current=i,o(true);});},[]),jsx(Be.Provider,{value:{renderer:n.current,strict:r},children:e})}function co(e){return typeof e=="function"}var $n=createContext({});var vr=createContext({transformPagePoint:e=>e,isStatic:false,reducedMotion:"never"});var ye=createContext({});function Hn(e,t){if(xe(e)){let{initial:r,animate:o}=e;return {initial:r===false||ee(r)?r:void 0,animate:ee(o)?o:void 0}}return e.inherit!==false?t:{}}function _n(e){let{initial:t,animate:r}=Hn(e,useContext(ye));return useMemo(()=>({initial:t,animate:r}),[Un(t),Un(r)])}function Un(e){return Array.isArray(e)?e.join(" "):e}var Ze=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function po(e,t,r){for(let o in t)!C(t[o])&&!Pt(o,r)&&(e[o]=t[o]);}function oa({transformTemplate:e},t){return useMemo(()=>{let r=Ze();return Fe(r,t,e),Object.assign({},r.vars,r.style)},[t])}function na(e,t){let r=e.style||{},o={};return po(o,r,e),Object.assign(o,oa(e,t)),o}function Yn(e,t){let r={},o=na(e,t);return e.drag&&e.dragListener!==false&&(r.draggable=false,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===true?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var Mr=()=>({...Ze(),attrs:{}});function qn(e,t,r,o){let n=useMemo(()=>{let i=Mr();return Ft(i,t,Rt(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let i={};po(i,e.style,e),n.style={...i,...n.style};}return n}var sa=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Et(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sa.has(e)}var Xn=e=>!Et(e);function aa(e){typeof e=="function"&&(Xn=t=>t.startsWith("on")?!Et(t):e(t));}try{aa(go("@emotion/is-prop-valid").default);}catch{}function Zn(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||C(e[n])||(Xn(n)||r===true&&Et(n)||!t&&!Et(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Jn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Je(e){return typeof e!="string"||e.includes("-")?false:!!(Jn.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qn(e,t,r,{latestValues:o},n,i=false,s){let f=(s??Je(e)?qn:Yn)(t,o,n,e),u=Zn(t,typeof e=="string",i),m=e!==Fragment?{...u,...f,ref:r}:{},{children:l}=t,c=useMemo(()=>C(l)?l.get():l,[l]);return createElement(e,{...m,children:c})}var Cr=createContext(null);function Ar(e){let t=useRef(null);return t.current===null&&(t.current=e()),t.current}function pa({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return {latestValues:da(r,o,n,e),renderState:t()}}function da(e,t,r,o){let n={},i=o(e,{});for(let c in i)n[c]=uo(i[c]);let{initial:s,animate:a}=e,f=xe(e),u=Mt(e);t&&u&&!f&&e.inherit!==false&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let m=r?r.initial===false:false;m=m||s===false;let l=m?a:s;if(l&&typeof l!="boolean"&&!se(l)){let c=Array.isArray(l)?l:[l];for(let d=0;d<c.length;d++){let h=Ae(e,c[d]);if(h){let{transitionEnd:x,transition:V,...g}=h;for(let T in g){let y=g[T];if(Array.isArray(y)){let b=m?y.length-1:0;y=y[b];}y!==null&&(n[T]=y);}for(let T in x)n[T]=x[T];}}}return n}var wr=e=>(t,r)=>{let o=useContext(ye),n=useContext(Cr),i=()=>pa(e,t,o,n);return r?i():Ar(i)};var ti=wr({scrapeMotionValuesFromProps:Re,createRenderState:Ze});var ri=wr({scrapeMotionValuesFromProps:It,createRenderState:Mr});var oi=Symbol.for("motionComponentSymbol");function ii(e,t,r){let o=useRef(r);useInsertionEffect(()=>{o.current=r;});let n=useRef(null);return useCallback(i=>{i&&e.onMount?.(i);let s=o.current;if(typeof s=="function")if(i){let a=s(i);typeof a=="function"&&(n.current=a);}else n.current?(n.current(),n.current=null):s(i);else s&&(s.current=i);t&&(i?t.mount(i):t.unmount());},[t])}var si=createContext({});function ai(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}var mi=typeof window<"u";var Pr=mi?useLayoutEffect:useEffect;function li(e,t,r,o,n,i){let{visualElement:s}=useContext(ye),a=useContext(Be),f=useContext(Cr),u=useContext(vr),m=u.reducedMotion,l=u.skipAnimations,c=useRef(null),d=useRef(false);o=o||a.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:s,props:r,presenceContext:f,blockInitialAnimation:f?f.initial===false:false,reducedMotionConfig:m,skipAnimations:l,isSVG:i}),d.current&&c.current&&(c.current.manuallyAnimateOnMount=true));let h=c.current,x=useContext(si);h&&!h.projection&&n&&(h.type==="html"||h.type==="svg")&&Sa(c.current,r,n,x);let V=useRef(false);useInsertionEffect(()=>{h&&V.current&&h.update(r,f);});let g=r[Vt],T=useRef(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Pr(()=>{d.current=true,h&&(V.current=true,window.MotionIsMounted=true,h.updateFeatures(),h.scheduleRenderMicrotask(),T.current&&h.animationState&&h.animationState.animateChanges());}),useEffect(()=>{h&&(!T.current&&h.animationState&&h.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g);}),T.current=false),h.enteringChildren=void 0);}),h}function Sa(e,t,r,o){let{layoutId:n,layout:i,drag:s,dragConstraints:a,layoutScroll:f,layoutRoot:u,layoutAnchor:m,layoutCrossfade:l}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:fi(e.parent)),e.projection.setOptions({layoutId:n,layout:i,alwaysMeasureLayout:!!s||a&&ai(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:l,layoutScroll:f,layoutRoot:u,layoutAnchor:m});}function fi(e){if(e)return e.options.allowProjection!==false?e.projection:fi(e.parent)}function Fr(e,{forwardMotionProps:t=false,type:r}={},o,n){o&&Bt(o);let i=r?r==="svg":Je(e),s=i?ri:ti;function a(u,m){let l,c={...useContext(vr),...u,layoutId:Aa(u)},{isStatic:d}=c,h=_n(u),x=s(u,d);if(!d&&typeof window<"u"){wa(c,o);let V=Pa(c);l=V.MeasureLayout,h.visualElement=li(e,x,c,n,V.ProjectionNode,i);}return jsxs(ye.Provider,{value:h,children:[l&&h.visualElement?jsx(l,{visualElement:h.visualElement,...c}):null,Qn(e,u,ii(x,h.visualElement,m),x,d,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let f=forwardRef(a);return f[oi]=e,f}function Aa({layoutId:e}){let t=useContext($n).id;return t&&e!==void 0?t+"-"+e:e}function wa(e,t){let r=useContext(Be).strict;if(process.env.NODE_ENV!=="production"&&t&&r){let o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?H(false,o,"lazy-strict-mode"):I(false,o,"lazy-strict-mode");}}function Pa(e){let t=Sr(),{drag:r,layout:o}=t;if(!r&&!o)return {};let n={...r,...o};return {MeasureLayout:r?.isEnabled(e)||o?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function ui(e,t){if(typeof Proxy>"u")return Fr;let r=new Map,o=(i,s)=>Fr(i,s,e,t),n=(i,s)=>(process.env.NODE_ENV!=="production"&&re(false,"motion() is deprecated. Use motion.create() instead."),o(i,s));return new Proxy(n,{get:(i,s)=>s==="create"?o:(r.has(s)||r.set(s,Fr(s,void 0,e,t)),r.get(s))})}var ci=ui();var Rr=class extends De{constructor(t){super(t),t.animationState||(t.animationState=fo(t));}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();se(t)&&(this.unmountControls=t.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}};var Da=0,Ir=class extends De{constructor(){super(...arguments),this.id=Da++,this.isExitComplete=false;}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===false){if(this.isExitComplete){let{initial:i,custom:s}=this.node.getProps();if(typeof i=="string"){let a=z(this.node,i,s);if(a){let{transition:f,transitionEnd:u,...m}=a;for(let l in m)this.node.getValue(l)?.jump(m[l]);}}this.node.animationState.reset(),this.node.animationState.animateChanges();}else this.node.animationState.setActive("exit",false);this.isExitComplete=false;return}let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{this.isExitComplete=true,r(this.id);});}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id));}unmount(){}};var pi={animation:{Feature:Rr},exit:{Feature:Ir}};var di=(e,t)=>t.isSVG??Je(e)?new Ot(t):new Dt(t,{allowProjection:e!==Fragment});var Ra={renderer:di,...pi};function Oa(){!Pe.current&&Ct();let[e]=useState(ge.current);return process.env.NODE_ENV!=="production"&&re(e!==true,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function Ba(e){e.values.forEach(t=>t.stop());}function xo(e,t){[...t].reverse().forEach(o=>{let n=e.getVariant(o);n&&Ue(e,n),e.variantChildren&&e.variantChildren.forEach(i=>{xo(i,t);});});}function Ea(e,t){if(Array.isArray(t))return xo(e,t);if(typeof t=="string")return xo(e,[t]);Ue(e,t);}function hi(){let e=false,t=new Set,r={subscribe(o){return t.add(o),()=>{t.delete(o);}},start(o,n){I(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let i=[];return t.forEach(s=>{i.push(bt(s,o,{transitionOverride:n}));}),Promise.all(i)},set(o){return I(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(n=>{Ea(n,o);})},stop(){t.forEach(o=>{Ba(o);});},mount(){return e=true,()=>{e=false,r.stop();}}};return r}function xi(){let e=Ar(hi);return Pr(e.mount,[]),e}var ka=xi;
2
- export{Ga as a,Xs as b,ci as c,Ra as d,Oa as e,ka as f};