framer-motion 12.23.28 → 12.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/client.js +1 -1
  2. package/dist/cjs/dom.js +15 -0
  3. package/dist/cjs/dom.js.map +1 -1
  4. package/dist/cjs/{feature-bundle-Dt2VtvSZ.js → feature-bundle-DRMwxyzS.js} +45 -13
  5. package/dist/cjs/feature-bundle-DRMwxyzS.js.map +1 -0
  6. package/dist/cjs/index.js +1 -1
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/m.js +29 -11
  9. package/dist/cjs/m.js.map +1 -1
  10. package/dist/dom-mini.js +1 -1
  11. package/dist/dom.js +1 -1
  12. package/dist/es/components/Reorder/Group.mjs.map +1 -1
  13. package/dist/es/components/Reorder/Item.mjs.map +1 -1
  14. package/dist/es/gestures/drag/index.mjs +10 -0
  15. package/dist/es/gestures/drag/index.mjs.map +1 -1
  16. package/dist/es/motion/index.mjs +10 -6
  17. package/dist/es/motion/index.mjs.map +1 -1
  18. package/dist/es/motion/utils/use-visual-element.mjs +2 -1
  19. package/dist/es/motion/utils/use-visual-element.mjs.map +1 -1
  20. package/dist/es/render/dom/create-visual-element.mjs +5 -1
  21. package/dist/es/render/dom/create-visual-element.mjs.map +1 -1
  22. package/dist/es/render/dom/use-render.mjs +2 -4
  23. package/dist/es/render/dom/use-render.mjs.map +1 -1
  24. package/dist/es/render/svg/utils/build-attrs.mjs +15 -0
  25. package/dist/es/render/svg/utils/build-attrs.mjs.map +1 -1
  26. package/dist/framer-motion.dev.js +82 -34
  27. package/dist/framer-motion.js +1 -1
  28. package/dist/m.d.ts +8 -0
  29. package/dist/mini.js +1 -1
  30. package/dist/size-rollup-animate.js +1 -1
  31. package/dist/size-rollup-animate.js.map +1 -1
  32. package/dist/size-rollup-dom-animation-assets.js +1 -1
  33. package/dist/size-rollup-dom-animation-m.js +1 -1
  34. package/dist/size-rollup-dom-animation.js +1 -1
  35. package/dist/size-rollup-dom-max-assets.js +1 -1
  36. package/dist/size-rollup-dom-max.js +1 -1
  37. package/dist/size-rollup-m.js +1 -1
  38. package/dist/size-rollup-m.js.map +1 -1
  39. package/dist/size-rollup-motion.js +1 -1
  40. package/dist/size-rollup-motion.js.map +1 -1
  41. package/dist/size-rollup-scroll.js.map +1 -1
  42. package/dist/size-rollup-waapi-animate.js +1 -1
  43. package/dist/size-rollup-waapi-animate.js.map +1 -1
  44. package/dist/types/client.d.ts +1 -1
  45. package/dist/types/index.d.ts +13 -5
  46. package/dist/{types.d-C8SDx5n-.d.ts → types.d-a9pt5qxk.d.ts} +5 -0
  47. package/package.json +3 -3
  48. package/dist/cjs/feature-bundle-Dt2VtvSZ.js.map +0 -1
@@ -1 +1 @@
1
- const t=(t,r,e)=>e>r?r:e<t?t:e;function r(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function e(t){return"string"==typeof t||Array.isArray(t)}const s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],a=["initial",...s];function n(t){return r(t.animate)||a.some(r=>e(t[r]))}function o(t){return Boolean(n(t)||t.variants)}const i=t=>r=>"string"==typeof r&&r.startsWith(t),f=i("--"),l=i("var(--"),u=t=>!!l(t)&&p.test(t.split("/*")[0].trim()),p=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function c(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const d={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...d,transform:r=>t(0,1,r)},g={...d,default:1},h=t=>Math.round(1e5*t)/1e5,y=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const b=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v=(t,r)=>e=>Boolean("string"==typeof e&&b.test(e)&&e.startsWith(t)||r&&!function(t){return null==t}(e)&&Object.prototype.hasOwnProperty.call(e,r)),w=(t,r,e)=>s=>{if("string"!=typeof s)return s;const[a,n,o,i]=s.match(y);return{[t]:parseFloat(a),[r]:parseFloat(n),[e]:parseFloat(o),alpha:void 0!==i?parseFloat(i):1}},x={...d,transform:r=>Math.round((r=>t(0,255,r))(r))},R={test:v("rgb","red"),parse:w("red","green","blue"),transform:({red:t,green:r,blue:e,alpha:s=1})=>"rgba("+x.transform(t)+", "+x.transform(r)+", "+x.transform(e)+", "+h(m.transform(s))+")"};const B={test:v("#"),parse:function(t){let r="",e="",s="",a="";return t.length>5?(r=t.substring(1,3),e=t.substring(3,5),s=t.substring(5,7),a=t.substring(7,9)):(r=t.substring(1,2),e=t.substring(2,3),s=t.substring(3,4),a=t.substring(4,5),r+=r,e+=e,s+=s,a+=a),{red:parseInt(r,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}},transform:R.transform},T=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),$=T("deg"),k=T("%"),L=T("px"),O=T("vh"),F=T("vw"),W=(()=>({...k,parse:t=>k.parse(t)/100,transform:t=>k.transform(100*t)}))(),X={test:v("hsl","hue"),parse:w("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+k.transform(h(r))+", "+k.transform(h(e))+", "+h(m.transform(s))+")"},Y={test:t=>R.test(t)||B.test(t)||X.test(t),parse:t=>R.test(t)?R.parse(t):X.test(t)?X.parse(t):B.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?R.transform(t):X.transform(t),getAnimatableNone:t=>{const r=Y.parse(t);return r.alpha=0,Y.transform(r)}},I=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const S="number",P="color",A=/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 Z(t){const r=t.toString(),e=[],s={color:[],number:[],var:[]},a=[];let n=0;const o=r.replace(A,t=>(Y.test(t)?(s.color.push(n),a.push(P),e.push(Y.parse(t))):t.startsWith("var(")?(s.var.push(n),a.push("var"),e.push(t)):(s.number.push(n),a.push(S),e.push(parseFloat(t))),++n,"${}")).split("${}");return{values:e,split:o,indexes:s,types:a}}function V(t){return Z(t).values}function H(t){const{split:r,types:e}=Z(t),s=r.length;return t=>{let a="";for(let n=0;n<s;n++)if(a+=r[n],void 0!==t[n]){const r=e[n];a+=r===S?h(t[n]):r===P?Y.transform(t[n]):t[n]}return a}}const z=t=>"number"==typeof t?0:Y.test(t)?Y.getAnimatableNone(t):t;const C={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(y)?.length||0)+(t.match(I)?.length||0)>0},parse:V,createTransformer:H,getAnimatableNone:function(t){const r=V(t);return H(t)(r.map(z))}},D=(t,r,e)=>t+(r-t)*e,E=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],N=(()=>new Set(E))(),M={...d,transform:Math.round},j={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:g,scaleX:g,scaleY:g,scaleZ:g,skew:$,skewX:$,skewY:$,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:m,originX:W,originY:W,originZ:L},zIndex:M,fillOpacity:m,strokeOpacity:m,numOctaves:M},q=(t,r)=>r&&"number"==typeof t?r.transform(t):t,G=t=>Boolean(t&&t.getVelocity);function J(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const K={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!L.test(t))return t;t=parseFloat(t)}return`${J(t,r.target.x)}% ${J(t,r.target.y)}%`}},U={correct:(t,{treeScale:r,projectionDelta:e})=>{const s=t,a=C.parse(t);if(a.length>5)return s;const n=C.createTransformer(t),o="number"!=typeof a[0]?1:0,i=e.x.scale*r.x,f=e.y.scale*r.y;a[0+o]/=i,a[1+o]/=f;const l=D(i,f,.5);return"number"==typeof a[2+o]&&(a[2+o]/=l),"number"==typeof a[3+o]&&(a[3+o]/=l),n(a)}},Q={borderRadius:{...K,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomLeftRadius:K,borderBottomRightRadius:K,boxShadow:U};function _(t,{layout:r,layoutId:e}){return N.has(t)||t.startsWith("origin")||(r||void 0!==e)&&(!!Q[t]||"opacity"===t)}const tt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rt=E.length;function et(t,r,e){const{style:s,vars:a,transformOrigin:n}=t;let o=!1,i=!1;for(const t in r){const e=r[t];if(N.has(t))o=!0;else if(f(t))a[t]=e;else{const r=q(e,j[t]);t.startsWith("origin")?(i=!0,n[t]=r):s[t]=r}}if(r.transform||(o||e?s.transform=function(t,r,e){let s="",a=!0;for(let n=0;n<rt;n++){const o=E[n],i=t[o];if(void 0===i)continue;let f=!0;if(f="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!f||e){const t=q(i,j[o]);f||(a=!1,s+=`${tt[o]||o}(${t}) `),e&&(r[o]=t)}}return s=s.trim(),e?s=e(r,a?"":s):a&&(s="none"),s}(r,t.transform,e):s.transform&&(s.transform="none")),i){const{originX:t="50%",originY:r="50%",originZ:e=0}=n;s.transformOrigin=`${t} ${r} ${e}`}}const st={offset:"stroke-dashoffset",array:"stroke-dasharray"},at={offset:"strokeDashoffset",array:"strokeDasharray"};function nt(t,{attrX:r,attrY:e,attrScale:s,pathLength:a,pathSpacing:n=1,pathOffset:o=0,...i},f,l,u){if(et(t,i,l),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:c}=t;p.transform&&(c.transform=p.transform,delete p.transform),(c.transform||p.transformOrigin)&&(c.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),c.transform&&(c.transformBox=u?.transformBox??"fill-box",delete p.transformBox),void 0!==r&&(p.x=r),void 0!==e&&(p.y=e),void 0!==s&&(p.scale=s),void 0!==a&&function(t,r,e=1,s=0,a=!0){t.pathLength=1;const n=a?st:at;t[n.offset]=L.transform(-s);const o=L.transform(r),i=L.transform(e);t[n.array]=`${o} ${i}`}(p,a,n,o,!1)}const ot=t=>"string"==typeof t&&"svg"===t.toLowerCase(),it=["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 ft(t){return"string"==typeof t&&!t.includes("-")&&!!(it.indexOf(t)>-1||/[A-Z]/u.test(t))}function lt(t){const r=[{},{}];return t?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r}function ut(t,r,e,s){if("function"==typeof r){const[a,n]=lt(s);r=r(void 0!==e?e:t.custom,a,n)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[a,n]=lt(s);r=r(void 0!==e?e:t.custom,a,n)}return r}function pt(t,r,e){const{style:s}=t,a={};for(const n in s)(G(s[n])||r.style&&G(r.style[n])||_(n,t)||void 0!==e?.getValue(n)?.liveStyle)&&(a[n]=s[n]);return a}function ct(t,r,e){const s=pt(t,r,e);for(const e in t)if(G(t[e])||G(r[e])){s[-1!==E.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=t[e]}return s}const dt="undefined"!=typeof window,mt={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"]},gt={};for(const t in mt)gt[t]={isEnabled:r=>mt[t].some(t=>!!r[t])};const ht=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yt="data-"+ht("framerAppearId");export{L as A,E as B,k as C,$ as D,F as E,O as F,y as G,j as H,c as I,N as J,a as K,s as L,f as M,ht as N,e as a,G as b,_ as c,et as d,nt as e,ot as f,ft as g,o as h,n as i,r as j,ct as k,dt as l,gt as m,D as n,yt as o,R as p,X as q,ut as r,pt as s,B as t,u,Y as v,C as w,Z as x,t as y,d as z};
1
+ const t=(t,r,e)=>e>r?r:e<t?t:e;function r(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function e(t){return"string"==typeof t||Array.isArray(t)}const s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],a=["initial",...s];function n(t){return r(t.animate)||a.some(r=>e(t[r]))}function o(t){return Boolean(n(t)||t.variants)}const i=t=>r=>"string"==typeof r&&r.startsWith(t),f=i("--"),l=i("var(--"),d=t=>!!l(t)&&c.test(t.split("/*")[0].trim()),c=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,p={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},u={...p,transform:r=>t(0,1,r)},g={...p,default:1},m=t=>Math.round(1e5*t)/1e5,h=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,b=(t,r)=>e=>Boolean("string"==typeof e&&y.test(e)&&e.startsWith(t)||r&&!function(t){return null==t}(e)&&Object.prototype.hasOwnProperty.call(e,r)),v=(t,r,e)=>s=>{if("string"!=typeof s)return s;const[a,n,o,i]=s.match(h);return{[t]:parseFloat(a),[r]:parseFloat(n),[e]:parseFloat(o),alpha:void 0!==i?parseFloat(i):1}},w={...p,transform:r=>Math.round((r=>t(0,255,r))(r))},x={test:b("rgb","red"),parse:v("red","green","blue"),transform:({red:t,green:r,blue:e,alpha:s=1})=>"rgba("+w.transform(t)+", "+w.transform(r)+", "+w.transform(e)+", "+m(u.transform(s))+")"};const B={test:b("#"),parse:function(t){let r="",e="",s="",a="";return t.length>5?(r=t.substring(1,3),e=t.substring(3,5),s=t.substring(5,7),a=t.substring(7,9)):(r=t.substring(1,2),e=t.substring(2,3),s=t.substring(3,4),a=t.substring(4,5),r+=r,e+=e,s+=s,a+=a),{red:parseInt(r,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}},transform:x.transform},k=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),R=k("deg"),I=k("%"),S=k("px"),T=k("vh"),$=k("vw"),L=(()=>({...I,parse:t=>I.parse(t)/100,transform:t=>I.transform(100*t)}))(),O={test:b("hsl","hue"),parse:v("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+I.transform(m(r))+", "+I.transform(m(e))+", "+m(u.transform(s))+")"},F={test:t=>x.test(t)||B.test(t)||O.test(t),parse:t=>x.test(t)?x.parse(t):O.test(t)?O.parse(t):B.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?x.transform(t):O.transform(t),getAnimatableNone:t=>{const r=F.parse(t);return r.alpha=0,F.transform(r)}},W=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const X="number",Y="color",E=/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 P(t){const r=t.toString(),e=[],s={color:[],number:[],var:[]},a=[];let n=0;const o=r.replace(E,t=>(F.test(t)?(s.color.push(n),a.push(Y),e.push(F.parse(t))):t.startsWith("var(")?(s.var.push(n),a.push("var"),e.push(t)):(s.number.push(n),a.push(X),e.push(parseFloat(t))),++n,"${}")).split("${}");return{values:e,split:o,indexes:s,types:a}}function A(t){return P(t).values}function Z(t){const{split:r,types:e}=P(t),s=r.length;return t=>{let a="";for(let n=0;n<s;n++)if(a+=r[n],void 0!==t[n]){const r=e[n];a+=r===X?m(t[n]):r===Y?F.transform(t[n]):t[n]}return a}}const V=t=>"number"==typeof t?0:F.test(t)?F.getAnimatableNone(t):t;const D={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(h)?.length||0)+(t.match(W)?.length||0)>0},parse:A,createTransformer:Z,getAnimatableNone:function(t){const r=A(t);return Z(t)(r.map(V))}},H=(t,r,e)=>t+(r-t)*e,z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],C=(()=>new Set(z))(),M={...p,transform:Math.round},N={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,backgroundPositionX:S,backgroundPositionY:S,...{rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:g,scaleX:g,scaleY:g,scaleZ:g,skew:R,skewX:R,skewY:R,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:u,originX:L,originY:L,originZ:S},zIndex:M,fillOpacity:u,strokeOpacity:u,numOctaves:M},j=(t,r)=>r&&"number"==typeof t?r.transform(t):t,q=t=>Boolean(t&&t.getVelocity);function G(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const J={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!S.test(t))return t;t=parseFloat(t)}return`${G(t,r.target.x)}% ${G(t,r.target.y)}%`}},K={correct:(t,{treeScale:r,projectionDelta:e})=>{const s=t,a=D.parse(t);if(a.length>5)return s;const n=D.createTransformer(t),o="number"!=typeof a[0]?1:0,i=e.x.scale*r.x,f=e.y.scale*r.y;a[0+o]/=i,a[1+o]/=f;const l=H(i,f,.5);return"number"==typeof a[2+o]&&(a[2+o]/=l),"number"==typeof a[3+o]&&(a[3+o]/=l),n(a)}},U={borderRadius:{...J,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomLeftRadius:J,borderBottomRightRadius:J,boxShadow:K};function Q(t,{layout:r,layoutId:e}){return C.has(t)||t.startsWith("origin")||(r||void 0!==e)&&(!!U[t]||"opacity"===t)}const _={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tt=z.length;function rt(t,r,e){const{style:s,vars:a,transformOrigin:n}=t;let o=!1,i=!1;for(const t in r){const e=r[t];if(C.has(t))o=!0;else if(f(t))a[t]=e;else{const r=j(e,N[t]);t.startsWith("origin")?(i=!0,n[t]=r):s[t]=r}}if(r.transform||(o||e?s.transform=function(t,r,e){let s="",a=!0;for(let n=0;n<tt;n++){const o=z[n],i=t[o];if(void 0===i)continue;let f=!0;if(f="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!f||e){const t=j(i,N[o]);f||(a=!1,s+=`${_[o]||o}(${t}) `),e&&(r[o]=t)}}return s=s.trim(),e?s=e(r,a?"":s):a&&(s="none"),s}(r,t.transform,e):s.transform&&(s.transform="none")),i){const{originX:t="50%",originY:r="50%",originZ:e=0}=n;s.transformOrigin=`${t} ${r} ${e}`}}const et={offset:"stroke-dashoffset",array:"stroke-dasharray"},st={offset:"strokeDashoffset",array:"strokeDasharray"};const at=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function nt(t,{attrX:r,attrY:e,attrScale:s,pathLength:a,pathSpacing:n=1,pathOffset:o=0,...i},f,l,d){if(rt(t,i,l),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:p}=t;c.transform&&(p.transform=c.transform,delete c.transform),(p.transform||c.transformOrigin)&&(p.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete c.transformBox);for(const t of at)void 0!==c[t]&&(p[t]=c[t],delete c[t]);void 0!==r&&(c.x=r),void 0!==e&&(c.y=e),void 0!==s&&(c.scale=s),void 0!==a&&function(t,r,e=1,s=0,a=!0){t.pathLength=1;const n=a?et:st;t[n.offset]=S.transform(-s);const o=S.transform(r),i=S.transform(e);t[n.array]=`${o} ${i}`}(c,a,n,o,!1)}const ot=t=>"string"==typeof t&&"svg"===t.toLowerCase(),it=["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 ft(t){return"string"==typeof t&&!t.includes("-")&&!!(it.indexOf(t)>-1||/[A-Z]/u.test(t))}function lt(t){const r=[{},{}];return t?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r}function dt(t,r,e,s){if("function"==typeof r){const[a,n]=lt(s);r=r(void 0!==e?e:t.custom,a,n)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[a,n]=lt(s);r=r(void 0!==e?e:t.custom,a,n)}return r}function ct(t,r,e){const{style:s}=t,a={};for(const n in s)(q(s[n])||r.style&&q(r.style[n])||Q(n,t)||void 0!==e?.getValue(n)?.liveStyle)&&(a[n]=s[n]);return a}function pt(t,r,e){const s=ct(t,r,e);for(const e in t)if(q(t[e])||q(r[e])){s[-1!==z.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=t[e]}return s}const ut="undefined"!=typeof window,gt={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"]},mt={};for(const t in gt)mt[t]={isEnabled:r=>gt[t].some(t=>!!r[t])};const ht=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yt="data-"+ht("framerAppearId");export{S as A,z as B,I as C,R as D,$ as E,T as F,h as G,N as H,C as I,a as J,s as K,f as L,ht as M,e as a,q as b,Q as c,rt as d,nt as e,ot as f,ft as g,o as h,n as i,r as j,pt as k,ut as l,mt as m,H as n,yt as o,x as p,O as q,dt as r,ct as s,B as t,d as u,F as v,D as w,P as x,t as y,p as z};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as n}from"react/jsx-runtime";import{createContext as o,useContext as e,useMemo as r,Fragment as a,createElement as i,useRef as s,useCallback as u,useLayoutEffect as c,useEffect as l,useInsertionEffect as d,forwardRef as f}from"react";import{i as m,a as p,b as y,c as g,d as v,e as h,f as S,g as M,P as b,r as w,h as j,j as C,k as E,s as P,l as A,m as T,n as L,S as W,o as x,L as I,p as k}from"./size-rollup-dom-max-assets.js";const O=o({strict:!1}),V=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),D=o({});function R(t){const{initial:n,animate:o}=function(t,n){if(m(t)){const{initial:n,animate:o}=t;return{initial:!1===n||p(n)?n:void 0,animate:p(o)?o:void 0}}return!1!==t.inherit?n:{}}(t,e(D));return r(()=>({initial:n,animate:o}),[H(n),H(o)])}function H(t){return Array.isArray(t)?t.join(" "):t}const N=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function F(t,n,o){for(const e in n)y(n[e])||g(e,o)||(t[e]=n[e])}function B(t,n){const o={};return F(o,t.style||{},t),Object.assign(o,function({transformTemplate:t},n){return r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{}};return v(o,n,t),Object.assign({},o.vars,o.style)},[n])}(t,n)),o}function q(t,n){const o={},e=B(t,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=e,o}const U=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function $(t,n,o,e){const a=r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return h(o,n,S(e),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[n]);if(t.style){const n={};F(n,t.style,t),a.style={...n,...a.style}}return a}const _=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","ignoreStrict","viewport"]);function z(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_.has(t)}let X=t=>!z(t);try{"function"==typeof(Y=require("@emotion/is-prop-valid").default)&&(X=t=>t.startsWith("on")?!z(t):Y(t))}catch{}var Y;function G(t,n,o,{latestValues:e},s,u=!1){const c=(M(t)?$:q)(n,e,s,t),l=function(t,n,o){const e={};for(const r in t)"values"===r&&"object"==typeof t.values||(X(r)||!0===o&&z(r)||!n&&!z(r)||t.draggable&&r.startsWith("onDrag"))&&(e[r]=t[r]);return e}(n,"string"==typeof t,u),d=t!==a?{...l,...c,ref:o}:{},{children:f}=n,m=r(()=>y(f)?f.get():f,[f]);return i(t,{...d,children:m})}function J(t,n,o,e){const r={},a=e(t,{});for(const t in a)r[t]=w(a[t]);let{initial:i,animate:s}=t;const u=m(t),c=j(t);n&&c&&!u&&!1!==t.inherit&&(void 0===i&&(i=n.initial),void 0===s&&(s=n.animate));let l=!!o&&!1===o.initial;l=l||!1===i;const d=l?s:i;if(d&&"boolean"!=typeof d&&!C(d)){const n=Array.isArray(d)?d:[d];for(let o=0;o<n.length;o++){const e=E(t,n[o]);if(e){const{transitionEnd:t,transition:n,...o}=e;for(const t in o){let n=o[t];if(Array.isArray(n)){n=n[l?n.length-1:0]}null!==n&&(r[t]=n)}for(const n in t)r[n]=t[n]}}}return r}const K=t=>(n,o)=>{const r=e(D),a=e(b),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n},o,e,r){return{latestValues:J(o,e,r,t),renderState:n()}}(t,n,r,a);return o?i():function(t){const n=s(null);return null===n.current&&(n.current=t()),n.current}(i)},Q=K({scrapeMotionValuesFromProps:P,createRenderState:N}),Z=K({scrapeMotionValuesFromProps:A,createRenderState:U}),tt=Symbol.for("motionComponentSymbol");function nt(t,n,o){return u(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):T(o)&&(o.current=e))},[n])}const ot=L?c:l;function et(t,n,o,r,a){const{visualElement:i}=e(D),u=e(O),c=e(b),f=e(V).reducedMotion,m=s(null);r=r||u.renderer,!m.current&&r&&(m.current=r(t,{visualState:n,parent:i,props:o,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f}));const p=m.current,y=e(W);!p||p.projection||!a||"html"!==p.type&&"svg"!==p.type||function(t,n,o,e){const{layoutId:r,layout:a,drag:i,dragConstraints:s,layoutScroll:u,layoutRoot:c,layoutCrossfade:l}=n;t.projection=new o(t.latestValues,n["data-framer-portal-id"]?void 0:rt(t.parent)),t.projection.setOptions({layoutId:r,layout:a,alwaysMeasureLayout:Boolean(i)||s&&T(s),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:e,crossfade:l,layoutScroll:u,layoutRoot:c})}(m.current,o,a,y);const g=s(!1);d(()=>{p&&g.current&&p.update(o,c)});const v=o[x],h=s(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ot(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),h.current&&p.animationState&&p.animationState.animateChanges())}),l(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),h.current=!1),p.enteringChildren=void 0)}),p}function rt(t){if(t)return!1!==t.options.allowProjection?t.projection:rt(t.parent)}function at(o,{forwardMotionProps:r=!1}={},a,i){const s=M(o)?Z:Q;function u(a,u){let c;const l={...e(V),...a,layoutId:it(a)},{isStatic:d}=l,f=R(a),m=s(a,d);if(!d&&L){e(O).strict;const t=function(t){const{drag:n,layout:o}=k;if(!n&&!o)return{};const e={...n,...o};return{MeasureLayout:n?.isEnabled(t)||o?.isEnabled(t)?e.MeasureLayout:void 0,ProjectionNode:e.ProjectionNode}}(l);c=t.MeasureLayout,f.visualElement=et(o,m,l,i,t.ProjectionNode)}return t(D.Provider,{value:f,children:[c&&f.visualElement?n(c,{visualElement:f.visualElement,...l}):null,G(o,a,nt(m,f.visualElement,u),m,d,r)]})}u.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const c=f(u);return c[tt]=o,c}function it({layoutId:t}){const n=e(I).id;return n&&void 0!==t?n+"-"+t:t}function st(t,n){return at(t,n)}const ut=st("div");export{ut as MotionDiv};
1
+ import{jsxs as t,jsx as n}from"react/jsx-runtime";import{createContext as o,useContext as e,useMemo as r,Fragment as a,createElement as i,useRef as s,useCallback as u,useLayoutEffect as c,useEffect as l,useInsertionEffect as d,forwardRef as f}from"react";import{i as m,a as p,b as y,c as g,d as v,e as h,f as S,g as M,P as b,r as w,h as j,j as C,k as E,s as P,l as A,m as T,n as L,S as W,o as x,L as I,p as V}from"./size-rollup-dom-max-assets.js";const k=o({strict:!1}),O=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),D=o({});function R(t){const{initial:n,animate:o}=function(t,n){if(m(t)){const{initial:n,animate:o}=t;return{initial:!1===n||p(n)?n:void 0,animate:p(o)?o:void 0}}return!1!==t.inherit?n:{}}(t,e(D));return r(()=>({initial:n,animate:o}),[H(n),H(o)])}function H(t){return Array.isArray(t)?t.join(" "):t}const N=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function F(t,n,o){for(const e in n)y(n[e])||g(e,o)||(t[e]=n[e])}function B(t,n){const o={};return F(o,t.style||{},t),Object.assign(o,function({transformTemplate:t},n){return r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{}};return v(o,n,t),Object.assign({},o.vars,o.style)},[n])}(t,n)),o}function q(t,n){const o={},e=B(t,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=e,o}const U=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function $(t,n,o,e){const a=r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return h(o,n,S(e),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[n]);if(t.style){const n={};F(n,t.style,t),a.style={...n,...a.style}}return a}const _=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","ignoreStrict","viewport"]);function z(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_.has(t)}let G=t=>!z(t);try{"function"==typeof(X=require("@emotion/is-prop-valid").default)&&(G=t=>t.startsWith("on")?!z(t):X(t))}catch{}var X;function Y(t,n,o,{latestValues:e},s,u=!1,c){const l=(c??M(t)?$:q)(n,e,s,t),d=function(t,n,o){const e={};for(const r in t)"values"===r&&"object"==typeof t.values||(G(r)||!0===o&&z(r)||!n&&!z(r)||t.draggable&&r.startsWith("onDrag"))&&(e[r]=t[r]);return e}(n,"string"==typeof t,u),f=t!==a?{...d,...l,ref:o}:{},{children:m}=n,p=r(()=>y(m)?m.get():m,[m]);return i(t,{...f,children:p})}function J(t,n,o,e){const r={},a=e(t,{});for(const t in a)r[t]=w(a[t]);let{initial:i,animate:s}=t;const u=m(t),c=j(t);n&&c&&!u&&!1!==t.inherit&&(void 0===i&&(i=n.initial),void 0===s&&(s=n.animate));let l=!!o&&!1===o.initial;l=l||!1===i;const d=l?s:i;if(d&&"boolean"!=typeof d&&!C(d)){const n=Array.isArray(d)?d:[d];for(let o=0;o<n.length;o++){const e=E(t,n[o]);if(e){const{transitionEnd:t,transition:n,...o}=e;for(const t in o){let n=o[t];if(Array.isArray(n)){n=n[l?n.length-1:0]}null!==n&&(r[t]=n)}for(const n in t)r[n]=t[n]}}}return r}const K=t=>(n,o)=>{const r=e(D),a=e(b),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n},o,e,r){return{latestValues:J(o,e,r,t),renderState:n()}}(t,n,r,a);return o?i():function(t){const n=s(null);return null===n.current&&(n.current=t()),n.current}(i)},Q=K({scrapeMotionValuesFromProps:P,createRenderState:N}),Z=K({scrapeMotionValuesFromProps:A,createRenderState:U}),tt=Symbol.for("motionComponentSymbol");function nt(t,n,o){return u(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):T(o)&&(o.current=e))},[n])}const ot=L?c:l;function et(t,n,o,r,a,i){const{visualElement:u}=e(D),c=e(k),f=e(b),m=e(O).reducedMotion,p=s(null);r=r||c.renderer,!p.current&&r&&(p.current=r(t,{visualState:n,parent:u,props:o,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:m,isSVG:i}));const y=p.current,g=e(W);!y||y.projection||!a||"html"!==y.type&&"svg"!==y.type||function(t,n,o,e){const{layoutId:r,layout:a,drag:i,dragConstraints:s,layoutScroll:u,layoutRoot:c,layoutCrossfade:l}=n;t.projection=new o(t.latestValues,n["data-framer-portal-id"]?void 0:rt(t.parent)),t.projection.setOptions({layoutId:r,layout:a,alwaysMeasureLayout:Boolean(i)||s&&T(s),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:e,crossfade:l,layoutScroll:u,layoutRoot:c})}(p.current,o,a,g);const v=s(!1);d(()=>{y&&v.current&&y.update(o,f)});const h=o[x],S=s(Boolean(h)&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return ot(()=>{y&&(v.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),S.current&&y.animationState&&y.animationState.animateChanges())}),l(()=>{y&&(!S.current&&y.animationState&&y.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),S.current=!1),y.enteringChildren=void 0)}),y}function rt(t){if(t)return!1!==t.options.allowProjection?t.projection:rt(t.parent)}function at(o,{forwardMotionProps:r=!1,type:a}={},i,s){const u=a?"svg"===a:M(o),c=u?Z:Q;function l(a,i){let l;const d={...e(O),...a,layoutId:it(a)},{isStatic:f}=d,m=R(a),p=c(a,f);if(!f&&L){e(k).strict;const t=function(t){const{drag:n,layout:o}=V;if(!n&&!o)return{};const e={...n,...o};return{MeasureLayout:n?.isEnabled(t)||o?.isEnabled(t)?e.MeasureLayout:void 0,ProjectionNode:e.ProjectionNode}}(d);l=t.MeasureLayout,m.visualElement=et(o,p,d,s,t.ProjectionNode,u)}return t(D.Provider,{value:m,children:[l&&m.visualElement?n(l,{visualElement:m.visualElement,...d}):null,Y(o,a,nt(p,m.visualElement,i),p,f,r,u)]})}l.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const d=f(l);return d[tt]=o,d}function it({layoutId:t}){const n=e(I).id;return n&&void 0!==t?n+"-"+t:t}function st(t,n){return at(t,n)}const ut=st("div");export{ut as MotionDiv};
@@ -1 +1 @@
1
- import{n as t,p as e,q as n,t as i,u as s,v as r,w as o,x as a,y as u,z as l,A as h,B as c,C as d,D as p,E as m,F as f,G as y,H as v,I as g,r as w,b,o as T,J as S,a as A,K as M,j as V,L as x,l as C,i as k,h as E,m as P,M as F,d as D,s as O,N as I,k as R,e as K,f as N,g as B}from"./size-rollup-dom-animation-assets.js";import{Fragment as L}from"react";function j(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let U=()=>{},$=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(U=(t,e,n)=>{t||"undefined"==typeof console||console.warn(j(e,n))},$=(t,e,n)=>{if(!t)throw new Error(j(e,n))});const q={},z=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);const W=t=>/^0[^.\s]+$/u.test(t);function Y(t){let e;return()=>(void 0===e&&(e=t()),e)}const H=t=>t,_=(t,e)=>n=>e(t(n)),X=(...t)=>t.reduce(_),G=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class Z{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const J=t=>1e3*t,Q=t=>t/1e3;function tt(t,e){return e?t*(1e3/e):0}const et=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function nt(t,e,n,i){if(t===e&&n===i)return H;const s=e=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=et(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:et(s(t),e,i)}const it=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,st=t=>e=>1-t(1-e),rt=nt(.33,1.53,.69,.99),ot=st(rt),at=it(ot),ut=t=>(t*=2)<1?.5*ot(t):.5*(2-Math.pow(2,-10*(t-1))),lt=t=>1-Math.sin(Math.acos(t)),ht=st(lt),ct=it(lt),dt=nt(.42,0,1,1),pt=nt(0,0,.58,1),mt=nt(.42,0,.58,1),ft=t=>Array.isArray(t)&&"number"==typeof t[0],yt={linear:H,easeIn:dt,easeInOut:mt,easeOut:pt,circIn:lt,circInOut:ct,circOut:ht,backIn:ot,backInOut:at,backOut:rt,anticipate:ut},vt=t=>{if(ft(t)){$(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return nt(e,n,i,s)}return"string"==typeof t?($(void 0!==yt[t],`Invalid easing type '${t}'`,"invalid-easing-type"),yt[t]):t},gt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],wt={value:null,addProjectionMetrics:null};function bt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=gt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){o.has(e)&&(h.schedule(e),t()),u++,e(a)}const h={schedule:(t,e=!1,r=!1)=>{const a=r&&s?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,s?r=!0:(s=!0,[n,i]=[i,n],n.forEach(l),e&&wt.value&&wt.value.frameloop[e].push(u),u=0,n.clear(),s=!1,r&&(r=!1,h.process(t)))}};return h}(r,e?n:void 0),t),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:h,update:c,preRender:d,render:p,postRender:m}=o,f=()=>{const r=q.useManualTiming?s.timestamp:performance.now();n=!1,q.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),h.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:gt.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<gt.length;e++)o[gt[e]].cancel(t)},state:s,steps:o}}const{schedule:Tt,cancel:St,state:At,steps:Mt}=bt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:H,!0);let Vt;function xt(){Vt=void 0}const Ct={now:()=>(void 0===Vt&&Ct.set(At.isProcessing||q.useManualTiming?At.timestamp:performance.now()),Vt),set:t=>{Vt=t,queueMicrotask(xt)}};function kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Et(t,e){return n=>n>0?e:t}const Pt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ft=[i,e,n];function Dt(t){const e=(i=t,Ft.find(t=>t.test(i)));var i;if(U(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let s=e.parse(t);return e===n&&(s=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),r=kt(a,i,t),o=kt(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(s)),s}const Ot=(n,i)=>{const s=Dt(n),r=Dt(i);if(!s||!r)return Et(n,i);const o={...s};return n=>(o.red=Pt(s.red,r.red,n),o.green=Pt(s.green,r.green,n),o.blue=Pt(s.blue,r.blue,n),o.alpha=t(s.alpha,r.alpha,n),e.transform(o))},It=new Set(["none","hidden"]);function Rt(e,n){return i=>t(e,n,i)}function Kt(t){return"number"==typeof t?Rt:"string"==typeof t?s(t)?Et:r.test(t)?Ot:Lt:Array.isArray(t)?Nt:"object"==typeof t?r.test(t)?Ot:Bt:Et}function Nt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Kt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Bt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Kt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Lt=(t,e)=>{const n=o.createTransformer(e),i=a(t),s=a(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?It.has(t)&&!s.values.length||It.has(e)&&!i.values.length?function(t,e){return It.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):X(Nt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(U(!0,`Complex values '${t}' and '${e}' 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"),Et(t,e))};function jt(e,n,i){if("number"==typeof e&&"number"==typeof n&&"number"==typeof i)return t(e,n,i);return Kt(e)(e,n)}const Ut=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Tt.update(e,t),stop:()=>St(e),now:()=>At.isProcessing?At.timestamp:Ct.now()}},$t=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},qt=2e4;function zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<qt;)e+=50,n=t.next(e);return e>=qt?1/0:e}function Wt(t,e,n){const i=Math.max(e-5,0);return tt(n-t(i),e-i)}const Yt=100,Ht=10,_t=1,Xt=0,Gt=800,Zt=.3,Jt=.3,Qt={granular:.01,default:2},te={granular:.005,default:.5},ee=.01,ne=10,ie=.05,se=1,re=.001;function oe({duration:t=Gt,bounce:e=Zt,velocity:n=Xt,mass:i=_t}){let s,r;U(t<=J(ne),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=u(ie,se,o),t=u(ee,ne,Q(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=ue(e,o),u=Math.exp(-s);return re-r/a*u},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=ue(Math.pow(e,2),o);return(-s(e)+re>0?-1:1)*((r-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<ae;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=J(t),isNaN(a))return{stiffness:Yt,damping:Ht,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const ae=12;function ue(t,e){return t*Math.sqrt(1-e*e)}const le=["duration","bounce"],he=["stiffness","damping","mass"];function ce(t,e){return e.some(e=>void 0!==t[e])}function de(t=Jt,e=Zt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:h,mass:c,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:Xt,stiffness:Yt,damping:Ht,mass:_t,isResolvedFromDuration:!1,...t};if(!ce(t,he)&&ce(t,le))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*u(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:_t,stiffness:s,damping:r}}else{const n=oe(t);e={...e,...n,mass:_t},e.isResolvedFromDuration=!0}return e}({...n,velocity:-Q(n.velocity||0)}),f=p||0,y=h/(2*Math.sqrt(l*c)),v=o-r,g=Q(Math.sqrt(l/c)),w=Math.abs(v)<5;let b;if(i||(i=w?Qt.granular:Qt.default),s||(s=w?te.granular:te.default),y<1){const t=ue(g,y);b=e=>{const n=Math.exp(-y*g*e);return o-n*((f+y*g*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)b=t=>o-Math.exp(-g*t)*(v+(f+g*v)*t);else{const t=g*Math.sqrt(y*y-1);b=e=>{const n=Math.exp(-y*g*e),i=Math.min(t*e,300);return o-n*((f+y*g*v)*Math.sinh(i)+t*v*Math.cosh(i))/t}}const T={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)a.done=t>=d;else{let n=0===t?f:0;y<1&&(n=0===t?J(f):Wt(b,t,e));const r=Math.abs(n)<=i,u=Math.abs(o-e)<=s;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(zt(T),qt),e=$t(e=>T.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return T}function pe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:h}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=c+m,y=void 0===o?f:o(f);y!==f&&(m=y-c);const v=t=>-m*Math.exp(-t/i),g=t=>y+v(t),w=t=>{const e=v(t),n=g(t);d.done=Math.abs(e)<=l,d.value=d.done?y:n};let b,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(b=t,T=de({keyframes:[d.value,p(d.value)],velocity:Wt(g,t,d.value),damping:s,stiffness:r,restDelta:l,restSpeed:h}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function me(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if($(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||q.mix||jt,r=t.length-1;for(let n=0;n<r;n++){let r=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||H:e;r=X(t,r)}i.push(r)}return i}(e,i,s),l=a.length,h=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=G(t[i],t[i+1],n);return a[i](s)};return n?e=>h(u(t[0],t[r-1],e)):h}function fe(e){const n=[0];return function(e,n){const i=e[e.length-1];for(let s=1;s<=n;s++){const r=G(0,n,s);e.push(t(i,1,r))}}(n,e.length-1),n}function ye({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(vt):vt(i),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:fe(e),t),a=me(o,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map(()=>l||mt).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}de.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(zt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:Q(s)}}(t,100,de);return t.ease=e.ease,t.duration=J(e.duration),t.type="keyframes",t};const ve=t=>null!==t;function ge(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(ve),o=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const we={decay:pe,inertia:pe,tween:ye,keyframes:ye,spring:de};function be(t){"string"==typeof t.type&&(t.type=we[t.type])}class Te{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Se=t=>t/100;class Ae extends Te{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;be(t);const{type:e=ye,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||ye;a!==ye&&"number"!=typeof o[0]&&(this.mixKeyframes=X(Se,jt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=zt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:h,repeat:c,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(c){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/o)):"mirror"===d&&(b=r)),w=u(0,1,n)*o}const T=g?{done:!1,value:h[0]}:b.next(w);s&&(T.value=s(T.value));let{done:S}=T;g||null===a||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return A&&m!==pe&&(T.value=ge(h,this.options,y,this.speed)),f&&f(T.value),A&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return Q(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(this.currentTime)}set time(t){t=J(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ct.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Q(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ut,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ct.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Me=t=>180*t/Math.PI,Ve=t=>{const e=Me(Math.atan2(t[1],t[0]));return Ce(e)},xe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ve,rotateZ:Ve,skewX:t=>Me(Math.atan(t[1])),skewY:t=>Me(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ce=t=>((t%=360)<0&&(t+=360),t),ke=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ee=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Pe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ke,scaleY:Ee,scale:t=>(ke(t)+Ee(t))/2,rotateX:t=>Ce(Me(Math.atan2(t[6],t[5]))),rotateY:t=>Ce(Me(Math.atan2(-t[2],t[0]))),rotateZ:Ve,rotate:Ve,skewX:t=>Me(Math.atan(t[4])),skewY:t=>Me(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Fe(t){return t.includes("scale")?1:0}function De(t,e){if(!t||"none"===t)return Fe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Pe,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=xe,s=e}if(!s)return Fe(e);const r=i[e],o=s[1].split(",").map(Oe);return"function"==typeof r?r(o):o[r]}function Oe(t){return parseFloat(t.trim())}const Ie=t=>t===l||t===h,Re=new Set(["x","y","z"]),Ke=c.filter(t=>!Re.has(t));const Ne={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>De(e,"x"),y:(t,{transform:e})=>De(e,"y")};Ne.translateX=Ne.x,Ne.translateY=Ne.y;const Be=new Set;let Le=!1,je=!1,Ue=!1;function $e(){if(je){const t=Array.from(Be).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ke.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}je=!1,Le=!1,Be.forEach(t=>t.complete(Ue)),Be.clear()}function qe(){Be.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(je=!0)})}class ze{constructor(t,e,n,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Be.add(this),Le||(Le=!0,Tt.read(qe),Tt.resolveKeyframes($e))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Be.delete(this)}cancel(){"scheduled"===this.state&&(Be.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const We=Y(()=>void 0!==window.ScrollTimeline),Ye={};function He(t,e){const n=Y(t);return()=>Ye[e]??n()}const _e=He(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Xe=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Ge={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xe([0,.65,.55,1]),circOut:Xe([.55,0,1,.45]),backIn:Xe([.31,.01,.66,-.59]),backOut:Xe([.33,1.53,.69,.99])};function Ze(t,e){return t?"function"==typeof t?_e()?$t(t,e):"ease-out":ft(t)?Xe(t):Array.isArray(t)?t.map(t=>Ze(t,e)||Ge.easeOut):Ge[t]:void 0}function Je(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const h={[e]:n};u&&(h.offset=u);const c=Ze(a,s);Array.isArray(c)&&(h.easing=c);const d={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(h,d)}function Qe(t){return"function"==typeof t&&"applyToOptions"in t}class tn extends Te{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=t,$("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=function({type:t,...e}){return Qe(t)&&_e()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Je(e,n,i,u,s),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=ge(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Q(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=J(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&We()?(this.animation.timeline=t,H):e(this)}}const en={anticipate:ut,backInOut:at,circInOut:ct};function nn(t){"string"==typeof t.ease&&t.ease in en&&(t.ease=en[t.ease])}class sn extends tn{constructor(t){nn(t),be(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Ae({...r,autoplay:!1}),a=J(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const rn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!o.test(t)&&"0"!==t||t.startsWith("url(")));function on(t){t.duration=0,t.type="keyframes"}const an=new Set(["opacity","clipPath","filter","transform"]),un=Y(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ln extends Te{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:u,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ct.now();const c={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:u,element:l,...h},d=l?.KeyframeResolver||ze;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,c,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:o,delay:a,isHandoff:u,onUpdate:l}=n;this.resolvedAt=Ct.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=rn(s,e),a=rn(r,e);return U(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Qe(n))&&i)}(t,s,r,o)||(!q.instantAnimations&&a||l?.(ge(t,n,e)),t[0]=t[t.length-1],on(n),n.repeat=0);const h={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},c=!u&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return un()&&n&&an.has(n)&&("transform"!==n||!l)&&!u&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(h)?new sn({...h,element:h.motionValue.owner.current}):new Ae(h);c.finished.then(()=>this.notifyFinished()).catch(H),this.pendingTimeline&&(this.stopTimeline=c.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=c}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ue=!0,qe(),$e(),Ue=!1),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()}}const hn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){$(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=hn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return z(t)?parseFloat(t):t}return s(r)?cn(r,e,n+1):r}function dn(t,e){return t?.[e]??t?.default??t}const pn=new Set(["width","height","top","left","right","bottom",...c]),mn=t=>e=>e.test(t),fn=[l,h,d,p,m,f,{test:t=>"auto"===t,parse:t=>t}],yn=t=>fn.find(mn(t));function vn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||W(t))}const gn=new Set(["brightness","contrast","saturate","opacity"]);function wn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(y)||[];if(!i)return t;const s=n.replace(i,"");let r=gn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const bn=/\b([a-z-]*)\(.*?\)/gu,Tn={...o,getAnimatableNone:t=>{const e=t.match(bn);return e?e.map(wn).join(" "):t}},Sn={...v,color:r,backgroundColor:r,outlineColor:r,fill:r,stroke:r,borderColor:r,borderTopColor:r,borderRightColor:r,borderBottomColor:r,borderLeftColor:r,filter:Tn,WebkitFilter:Tn},An=t=>Sn[t];function Mn(t,e){let n=An(t);return n!==Tn&&(n=o),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Vn=new Set(["auto","none","0"]);class xn extends ze{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),s(i))){const s=cn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!pn.has(n)||2!==t.length)return;const[i,r]=t,o=yn(i),a=yn(r);if(g(i)!==g(r)&&Ne[n])this.needsMeasurement=!0;else if(o!==a)if(Ie(o)&&Ie(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Ne[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||vn(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Vn.has(e)&&a(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Mn(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ne[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=Ne[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}class Cn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=Ct.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ct.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Z);const n=this.events[t].add(e);return"change"===t?()=>{n(),Tt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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(){const t=Ct.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return tt(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 kn(t,e){return new Cn(t,e)}const{schedule:En,cancel:Pn}=bt(queueMicrotask,!1),Fn=!1;function Dn(){return Fn}function On(t,e){const n=function(t){if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function In(t){return!("touch"===t.pointerType||Dn())}const Rn=(t,e)=>!!e&&(t===e||Rn(t,e.parentElement)),Kn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Nn=new WeakSet;function Bn(t){return e=>{"Enter"===e.key&&t(e)}}function Ln(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function jn(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!Dn()}function Un(t,e,n={}){const[i,s,r]=On(t,n),o=t=>{const i=t.currentTarget;if(!jn(t))return;Nn.add(i);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Nn.has(i)&&Nn.delete(i),jn(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||Rn(i,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach(t=>{var e,i;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),"object"==typeof(i=e=t)&&null!==i&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bn(()=>{if(Nn.has(n))return;Ln(n,"down");const t=Bn(()=>{Ln(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Ln(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return Kn.has(t.tagName)||-1!==t.tabIndex}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}const $n=[...fn,r,o];function qn(t,e,n){const i=t.getProps();return w(i,e,void 0!==n?n:i.custom,t)}const zn=t=>Array.isArray(t);function Wn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,kn(n))}function Yn(t){return zn(t)?t[t.length-1]||0:t}function Hn(t,e){const n=t.getValue("willChange");if(i=n,Boolean(b(i)&&i.add))return n.add(e);if(!n&&q.WillChange){const n=new q.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function _n(t){return t.props[T]}const Xn=t=>null!==t;const Gn={type:"spring",stiffness:500,damping:25,restSpeed:10},Zn={type:"keyframes",duration:.8},Jn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qn=(t,{keyframes:e})=>e.length>2?Zn:S.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Gn:Jn;const ti=(t,e,n,i={},s,r)=>o=>{const a=dn(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=J(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...h}){return!!Object.keys(h).length})(a)||Object.assign(h,Qn(t,h)),h.duration&&(h.duration=J(h.duration)),h.repeatDelay&&(h.repeatDelay=J(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let c=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(on(h),0===h.delay&&(c=!0)),(q.instantAnimations||q.skipAnimations)&&(c=!0,on(h),h.delay=0),h.allowFlatten=!a.type&&!a.ease,c&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Xn),r=e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(h.keyframes,a);if(void 0!==t)return void Tt.update(()=>{h.onUpdate(t),h.onComplete()})}return a.isSync?new Ae(h):new ln(h)};function ei({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ni(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(r=i);const u=[],l=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||l&&ei(l,e))continue;const o={delay:n,...dn(r||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!o.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){const n=_n(t);if(n){const t=window.MotionHandoffAnimation(n,e,Tt);null!==t&&(o.startTime=t,c=!0)}}Hn(t,e),i.start(ti(e,i,s,t.shouldReduceMotion&&pn.has(e)?{type:!1}:o,t,c));const d=i.animation;d&&u.push(d)}return o&&Promise.all(u).then(()=>{Tt.update(()=>{o&&function(t,e){const n=qn(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)Wn(t,e,Yn(r[e]))}(t,o)})}),u}function ii(t,e,n,i=0,s=1){const r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}function si(t,e,n={}){const i=qn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(ni(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(si(u,e,{...o,delay:n+("function"==typeof i?0:i)+ii(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function ri(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const oi=M.length;function ai(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&ai(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<oi;n++){const i=M[n],s=t.props[i];(A(s)||!1===s)&&(e[i]=s)}return e}const ui=[...x].reverse(),li=x.length;function hi(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>si(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=si(t,e,n);else{const s="function"==typeof e?qn(t,e,n.custom):e;i=Promise.all(ni(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function ci(t){let e=hi(t),n=mi(),i=!0;const s=e=>(n,i)=>{const s=qn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:o}=t,a=ai(t.parent)||{},u=[],l=new Set;let h={},c=1/0;for(let e=0;e<li;e++){const d=ui[e],p=n[d],m=void 0!==o[d]?o[d]:a[d],f=A(m),y=d===r?p.isActive:null;!1===y&&(c=e);let v=m===a[d]&&m!==o[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...h},!p.isActive&&null===y||!m&&!p.prevProp||V(m)||"boolean"==typeof m)continue;const g=di(p.prevProp,m);let w=g||d===r&&p.isActive&&!v&&f||e>c&&f,b=!1;const T=Array.isArray(m)?m:[m];let S=T.reduce(s(d),{});!1===y&&(S={});const{prevResolvedValues:M={}}=p,x={...M,...S},C=e=>{w=!0,l.has(e)&&(b=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in x){const e=S[t],n=M[t];if(h.hasOwnProperty(t))continue;let i=!1;i=zn(e)&&zn(n)?!ri(e,n):e!==n,i?null!=e?C(t):l.add(t):void 0!==e&&l.has(t)?C(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(h={...h,...S}),i&&t.blockInitialAnimation&&(w=!1);const k=v&&g;w&&(!k||b)&&u.push(...T.map(e=>{const n={type:d};if("string"==typeof e&&i&&!k&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=qn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ii(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof o.initial){const n=qn(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=mi()}}}function di(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ri(e,t)}function pi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mi(){return{animate:pi(!0),whileInView:pi(),whileHover:pi(),whileTap:pi(),whileDrag:pi(),whileFocus:pi(),exit:pi()}}class fi{constructor(t){this.isMounted=!1,this.node=t}update(){}}let yi=0;const vi={animation:{Feature:class extends fi{constructor(t){super(t),t.animationState||(t.animationState=ci(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();V(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends fi{constructor(){super(...arguments),this.id=yi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function gi(t){return{point:{x:t.pageX,y:t.pageY}}}function wi(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&Tt.postRender(()=>s(e,gi(e)))}function bi(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Ti(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&Tt.postRender(()=>s(e,gi(e)))}const Si=new WeakMap,Ai=new WeakMap,Mi=t=>{const e=Si.get(t.target);e&&e(t)},Vi=t=>{t.forEach(Mi)};function xi(t,e,n){const i=function({root:t,...e}){const n=t||document;Ai.has(n)||Ai.set(n,{});const i=Ai.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Vi,{root:t,...e})),i[s]}(e);return Si.set(t,n),i.observe(t),()=>{Si.delete(t),i.unobserve(t)}}const Ci={some:0,all:1};const ki={inView:{Feature:class extends fi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ci[i]};return xi(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=e?n:i;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends fi{mount(){const{current:t}=this.node;t&&(this.unmount=Un(t,(t,e)=>(Ti(this.node,e,"Start"),(t,{success:e})=>Ti(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends fi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=X(bi(this.node.current,"focus",()=>this.onFocus()),bi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends fi{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,r]=On(t,n),o=t=>{if(!In(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{In(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",o,s)}),r}(t,(t,e)=>(wi(this.node,e,"Start"),t=>wi(this.node,t,"End"))))}unmount(){}}}};const Ei=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Pi={current:null},Fi={current:!1};const Di=new WeakMap;const Oi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ii{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ze,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 t=Ct.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Tt.render(this.render,!1,!0))};const{latestValues:a,renderState:u}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=k(e),this.isVariantNode=E(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&b(e)&&e.set(a[t])}}mount(t){this.current=t,Di.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((t,e)=>this.bindToMotionValue(e,t)),Fi.current||function(){if(Fi.current=!0,C)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pi.current=t.matches;t.addEventListener("change",e),e()}else Pi.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Pi.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),St(this.notifyUpdate),St(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}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,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=S.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Tt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in P){const e=P[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Oi.length;e++){const n=Oi[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],r=n[i];if(b(s))t.addValue(i,s);else if(b(r))t.addValue(i,kn(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,kn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=kn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(z(n)||W(n))?n=parseFloat(n):(i=n,!$n.find(mn(i))&&o.test(e)&&(n=Mn(t,e))),this.setBaseTarget(t,b(n)?n.get():n)),b(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=w(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||b(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Z),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){En.render(this.render)}}class Ri extends Ii{constructor(){super(...arguments),this.KeyframeResolver=xn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;b(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ki(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}class Ni extends Ri{constructor(){super(...arguments),this.type="html",this.renderInstance=Ki}readValueFromInstance(t,e){if(S.has(e))return this.projection?.isProjecting?Fe(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return De(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(F(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){D(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return O(t,e,n)}}const Bi=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"]);class Li extends Ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ei}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(S.has(e)){const t=An(e);return t&&t.default||0}return e=Bi.has(e)?e:I(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return R(t,e,n)}build(t,e,n){K(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ki(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Bi.has(n)?n:I(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=N(t.tagName),super.mount(t)}}const ji={renderer:(t,e)=>B(t)?new Li(e):new Ni(e,{allowProjection:t!==L}),...vi,...ki};export{ji as domAnimation};
1
+ import{n as t,p as e,q as n,t as i,u as s,v as r,w as o,x as a,y as u,z as l,A as h,B as c,C as d,D as p,E as m,F as f,G as y,H as v,r as g,b as w,o as b,I as T,a as S,J as A,j as V,K as M,l as x,i as C,h as k,m as E,L as P,d as F,s as D,M as O,k as I,e as R,f as K,g as B}from"./size-rollup-dom-animation-assets.js";import{Fragment as N}from"react";function L(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let j=()=>{},U=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(j=(t,e,n)=>{t||"undefined"==typeof console||console.warn(L(e,n))},U=(t,e,n)=>{if(!t)throw new Error(L(e,n))});const $={},q=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);const z=t=>/^0[^.\s]+$/u.test(t);function W(t){let e;return()=>(void 0===e&&(e=t()),e)}const Y=t=>t,H=(t,e)=>n=>e(t(n)),_=(...t)=>t.reduce(H),X=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class G{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Z=t=>1e3*t,J=t=>t/1e3;function Q(t,e){return e?t*(1e3/e):0}const tt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function et(t,e,n,i){if(t===e&&n===i)return Y;const s=e=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=tt(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:tt(s(t),e,i)}const nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,it=t=>e=>1-t(1-e),st=et(.33,1.53,.69,.99),rt=it(st),ot=nt(rt),at=t=>(t*=2)<1?.5*rt(t):.5*(2-Math.pow(2,-10*(t-1))),ut=t=>1-Math.sin(Math.acos(t)),lt=it(ut),ht=nt(ut),ct=et(.42,0,1,1),dt=et(0,0,.58,1),pt=et(.42,0,.58,1),mt=t=>Array.isArray(t)&&"number"==typeof t[0],ft={linear:Y,easeIn:ct,easeInOut:pt,easeOut:dt,circIn:ut,circInOut:ht,circOut:lt,backIn:rt,backInOut:ot,backOut:st,anticipate:at},yt=t=>{if(mt(t)){U(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return et(e,n,i,s)}return"string"==typeof t?(U(void 0!==ft[t],`Invalid easing type '${t}'`,"invalid-easing-type"),ft[t]):t},vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],gt={value:null,addProjectionMetrics:null};function wt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=vt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){o.has(e)&&(h.schedule(e),t()),u++,e(a)}const h={schedule:(t,e=!1,r=!1)=>{const a=r&&s?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,s?r=!0:(s=!0,[n,i]=[i,n],n.forEach(l),e&&gt.value&&gt.value.frameloop[e].push(u),u=0,n.clear(),s=!1,r&&(r=!1,h.process(t)))}};return h}(r,e?n:void 0),t),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:h,update:c,preRender:d,render:p,postRender:m}=o,f=()=>{const r=$.useManualTiming?s.timestamp:performance.now();n=!1,$.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),h.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:vt.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<vt.length;e++)o[vt[e]].cancel(t)},state:s,steps:o}}const{schedule:bt,cancel:Tt,state:St,steps:At}=wt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Y,!0);let Vt;function Mt(){Vt=void 0}const xt={now:()=>(void 0===Vt&&xt.set(St.isProcessing||$.useManualTiming?St.timestamp:performance.now()),Vt),set:t=>{Vt=t,queueMicrotask(Mt)}};function Ct(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function kt(t,e){return n=>n>0?e:t}const Et=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Pt=[i,e,n];function Ft(t){const e=(i=t,Pt.find(t=>t.test(i)));var i;if(j(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let s=e.parse(t);return e===n&&(s=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Ct(a,i,t+1/3),r=Ct(a,i,t),o=Ct(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(s)),s}const Dt=(n,i)=>{const s=Ft(n),r=Ft(i);if(!s||!r)return kt(n,i);const o={...s};return n=>(o.red=Et(s.red,r.red,n),o.green=Et(s.green,r.green,n),o.blue=Et(s.blue,r.blue,n),o.alpha=t(s.alpha,r.alpha,n),e.transform(o))},Ot=new Set(["none","hidden"]);function It(e,n){return i=>t(e,n,i)}function Rt(t){return"number"==typeof t?It:"string"==typeof t?s(t)?kt:r.test(t)?Dt:Nt:Array.isArray(t)?Kt:"object"==typeof t?r.test(t)?Dt:Bt:kt}function Kt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Rt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Bt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Rt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Nt=(t,e)=>{const n=o.createTransformer(e),i=a(t),s=a(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ot.has(t)&&!s.values.length||Ot.has(e)&&!i.values.length?function(t,e){return Ot.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):_(Kt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(j(!0,`Complex values '${t}' and '${e}' 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"),kt(t,e))};function Lt(e,n,i){if("number"==typeof e&&"number"==typeof n&&"number"==typeof i)return t(e,n,i);return Rt(e)(e,n)}const jt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>bt.update(e,t),stop:()=>Tt(e),now:()=>St.isProcessing?St.timestamp:xt.now()}},Ut=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},$t=2e4;function qt(t){let e=0;let n=t.next(e);for(;!n.done&&e<$t;)e+=50,n=t.next(e);return e>=$t?1/0:e}function zt(t,e,n){const i=Math.max(e-5,0);return Q(n-t(i),e-i)}const Wt=100,Yt=10,Ht=1,_t=0,Xt=800,Gt=.3,Zt=.3,Jt={granular:.01,default:2},Qt={granular:.005,default:.5},te=.01,ee=10,ne=.05,ie=1,se=.001;function re({duration:t=Xt,bounce:e=Gt,velocity:n=_t,mass:i=Ht}){let s,r;j(t<=Z(ee),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=u(ne,ie,o),t=u(te,ee,J(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=ae(e,o),u=Math.exp(-s);return se-r/a*u},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=ae(Math.pow(e,2),o);return(-s(e)+se>0?-1:1)*((r-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<oe;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=Z(t),isNaN(a))return{stiffness:Wt,damping:Yt,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const oe=12;function ae(t,e){return t*Math.sqrt(1-e*e)}const ue=["duration","bounce"],le=["stiffness","damping","mass"];function he(t,e){return e.some(e=>void 0!==t[e])}function ce(t=Zt,e=Gt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:h,mass:c,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:_t,stiffness:Wt,damping:Yt,mass:Ht,isResolvedFromDuration:!1,...t};if(!he(t,le)&&he(t,ue))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*u(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Ht,stiffness:s,damping:r}}else{const n=re(t);e={...e,...n,mass:Ht},e.isResolvedFromDuration=!0}return e}({...n,velocity:-J(n.velocity||0)}),f=p||0,y=h/(2*Math.sqrt(l*c)),v=o-r,g=J(Math.sqrt(l/c)),w=Math.abs(v)<5;let b;if(i||(i=w?Jt.granular:Jt.default),s||(s=w?Qt.granular:Qt.default),y<1){const t=ae(g,y);b=e=>{const n=Math.exp(-y*g*e);return o-n*((f+y*g*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)b=t=>o-Math.exp(-g*t)*(v+(f+g*v)*t);else{const t=g*Math.sqrt(y*y-1);b=e=>{const n=Math.exp(-y*g*e),i=Math.min(t*e,300);return o-n*((f+y*g*v)*Math.sinh(i)+t*v*Math.cosh(i))/t}}const T={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)a.done=t>=d;else{let n=0===t?f:0;y<1&&(n=0===t?Z(f):zt(b,t,e));const r=Math.abs(n)<=i,u=Math.abs(o-e)<=s;a.done=r&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(qt(T),$t),e=Ut(e=>T.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return T}function de({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:h}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let m=n*e;const f=c+m,y=void 0===o?f:o(f);y!==f&&(m=y-c);const v=t=>-m*Math.exp(-t/i),g=t=>y+v(t),w=t=>{const e=v(t),n=g(t);d.done=Math.abs(e)<=l,d.value=d.done?y:n};let b,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(b=t,T=ce({keyframes:[d.value,p(d.value)],velocity:zt(g,t,d.value),damping:s,stiffness:r,restDelta:l,restSpeed:h}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function pe(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(U(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||$.mix||Lt,r=t.length-1;for(let n=0;n<r;n++){let r=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Y:e;r=_(t,r)}i.push(r)}return i}(e,i,s),l=a.length,h=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=X(t[i],t[i+1],n);return a[i](s)};return n?e=>h(u(t[0],t[r-1],e)):h}function me(e){const n=[0];return function(e,n){const i=e[e.length-1];for(let s=1;s<=n;s++){const r=X(0,n,s);e.push(t(i,1,r))}}(n,e.length-1),n}function fe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(yt):yt(i),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:me(e),t),a=pe(o,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map(()=>l||pt).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}ce.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(qt(i),$t);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:J(s)}}(t,100,ce);return t.ease=e.ease,t.duration=Z(e.duration),t.type="keyframes",t};const ye=t=>null!==t;function ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(ye),o=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const ge={decay:de,inertia:de,tween:fe,keyframes:fe,spring:ce};function we(t){"string"==typeof t.type&&(t.type=ge[t.type])}class be{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Te=t=>t/100;class Se extends be{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==xt.now()&&this.tick(xt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;we(t);const{type:e=fe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||fe;a!==fe&&"number"!=typeof o[0]&&(this.mixKeyframes=_(Te,Lt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=qt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:h,repeat:c,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(c){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/o)):"mirror"===d&&(b=r)),w=u(0,1,n)*o}const T=g?{done:!1,value:h[0]}:b.next(w);s&&(T.value=s(T.value));let{done:S}=T;g||null===a||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return A&&m!==de&&(T.value=ve(h,this.options,y,this.speed)),f&&f(T.value),A&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return J(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+J(t)}get time(){return J(this.currentTime)}set time(t){t=Z(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(xt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=J(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ae=t=>180*t/Math.PI,Ve=t=>{const e=Ae(Math.atan2(t[1],t[0]));return xe(e)},Me={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ve,rotateZ:Ve,skewX:t=>Ae(Math.atan(t[1])),skewY:t=>Ae(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},xe=t=>((t%=360)<0&&(t+=360),t),Ce=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ke=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ee={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ce,scaleY:ke,scale:t=>(Ce(t)+ke(t))/2,rotateX:t=>xe(Ae(Math.atan2(t[6],t[5]))),rotateY:t=>xe(Ae(Math.atan2(-t[2],t[0]))),rotateZ:Ve,rotate:Ve,skewX:t=>Ae(Math.atan(t[4])),skewY:t=>Ae(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||"none"===t)return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ee,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Me,s=e}if(!s)return Pe(e);const r=i[e],o=s[1].split(",").map(De);return"function"==typeof r?r(o):o[r]}function De(t){return parseFloat(t.trim())}const Oe=t=>t===l||t===h,Ie=new Set(["x","y","z"]),Re=c.filter(t=>!Ie.has(t));const Ke={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};Ke.translateX=Ke.x,Ke.translateY=Ke.y;const Be=new Set;let Ne=!1,Le=!1,je=!1;function Ue(){if(Le){const t=Array.from(Be).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Re.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Le=!1,Ne=!1,Be.forEach(t=>t.complete(je)),Be.clear()}function $e(){Be.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Le=!0)})}class qe{constructor(t,e,n,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Be.add(this),Ne||(Ne=!0,bt.read($e),bt.resolveKeyframes(Ue))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Be.delete(this)}cancel(){"scheduled"===this.state&&(Be.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ze=W(()=>void 0!==window.ScrollTimeline),We={};function Ye(t,e){const n=W(t);return()=>We[e]??n()}const He=Ye(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),_e=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Xe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_e([0,.65,.55,1]),circOut:_e([.55,0,1,.45]),backIn:_e([.31,.01,.66,-.59]),backOut:_e([.33,1.53,.69,.99])};function Ge(t,e){return t?"function"==typeof t?He()?Ut(t,e):"ease-out":mt(t)?_e(t):Array.isArray(t)?t.map(t=>Ge(t,e)||Xe.easeOut):Xe[t]:void 0}function Ze(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const h={[e]:n};u&&(h.offset=u);const c=Ge(a,s);Array.isArray(c)&&(h.easing=c);const d={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(h,d)}function Je(t){return"function"==typeof t&&"applyToOptions"in t}class Qe extends be{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=t,U("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=function({type:t,...e}){return Je(t)&&He()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Ze(e,n,i,u,s),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=ve(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return J(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+J(t)}get time(){return J(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Z(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ze()?(this.animation.timeline=t,Y):e(this)}}const tn={anticipate:at,backInOut:ot,circInOut:ht};function en(t){"string"==typeof t.ease&&t.ease in tn&&(t.ease=tn[t.ease])}class nn extends Qe{constructor(t){en(t),we(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Se({...r,autoplay:!1}),a=Z(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!o.test(t)&&"0"!==t||t.startsWith("url(")));function rn(t){t.duration=0,t.type="keyframes"}const on=new Set(["opacity","clipPath","filter","transform"]),an=W(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class un extends be{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:u,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xt.now();const c={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:u,element:l,...h},d=l?.KeyframeResolver||qe;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,c,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:o,delay:a,isHandoff:u,onUpdate:l}=n;this.resolvedAt=xt.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=sn(s,e),a=sn(r,e);return j(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Je(n))&&i)}(t,s,r,o)||(!$.instantAnimations&&a||l?.(ve(t,n,e)),t[0]=t[t.length-1],rn(n),n.repeat=0);const h={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},c=!u&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return an()&&n&&on.has(n)&&("transform"!==n||!l)&&!u&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(h)?new nn({...h,element:h.motionValue.owner.current}):new Se(h);c.finished.then(()=>this.notifyFinished()).catch(Y),this.pendingTimeline&&(this.stopTimeline=c.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=c}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),je=!0,$e(),Ue(),je=!1),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()}}const ln=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hn(t,e,n=1){U(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=ln.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return q(t)?parseFloat(t):t}return s(r)?hn(r,e,n+1):r}function cn(t,e){return t?.[e]??t?.default??t}const dn=new Set(["width","height","top","left","right","bottom",...c]),pn=t=>e=>e.test(t),mn=[l,h,d,p,m,f,{test:t=>"auto"===t,parse:t=>t}],fn=t=>mn.find(pn(t));function yn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||z(t))}const vn=new Set(["brightness","contrast","saturate","opacity"]);function gn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(y)||[];if(!i)return t;const s=n.replace(i,"");let r=vn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const wn=/\b([a-z-]*)\(.*?\)/gu,bn={...o,getAnimatableNone:t=>{const e=t.match(wn);return e?e.map(gn).join(" "):t}},Tn={...v,color:r,backgroundColor:r,outlineColor:r,fill:r,stroke:r,borderColor:r,borderTopColor:r,borderRightColor:r,borderBottomColor:r,borderLeftColor:r,filter:bn,WebkitFilter:bn},Sn=t=>Tn[t];function An(t,e){let n=Sn(t);return n!==bn&&(n=o),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Vn=new Set(["auto","none","0"]);class Mn extends qe{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),s(i))){const s=hn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!dn.has(n)||2!==t.length)return;const[i,r]=t,o=fn(i),a=fn(r);if(o!==a)if(Oe(o)&&Oe(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Ke[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||yn(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Vn.has(e)&&a(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=An(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ke[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=Ke[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}class xn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=xt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=xt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new G);const n=this.events[t].add(e);return"change"===t?()=>{n(),bt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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(){const t=xt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Q(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 Cn(t,e){return new xn(t,e)}const{schedule:kn,cancel:En}=wt(queueMicrotask,!1),Pn=!1;function Fn(){return Pn}function Dn(t,e){const n=function(t){if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function On(t){return!("touch"===t.pointerType||Fn())}const In=(t,e)=>!!e&&(t===e||In(t,e.parentElement)),Rn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Kn=new WeakSet;function Bn(t){return e=>{"Enter"===e.key&&t(e)}}function Nn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ln(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!Fn()}function jn(t,e,n={}){const[i,s,r]=Dn(t,n),o=t=>{const i=t.currentTarget;if(!Ln(t))return;Kn.add(i);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Kn.has(i)&&Kn.delete(i),Ln(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||In(i,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach(t=>{var e,i;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),"object"==typeof(i=e=t)&&null!==i&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bn(()=>{if(Kn.has(n))return;Nn(n,"down");const t=Bn(()=>{Nn(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Nn(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return Rn.has(t.tagName)||-1!==t.tabIndex}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}const Un=[...mn,r,o];function $n(t,e,n){const i=t.getProps();return g(i,e,void 0!==n?n:i.custom,t)}const qn=t=>Array.isArray(t);function zn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Cn(n))}function Wn(t){return qn(t)?t[t.length-1]||0:t}function Yn(t,e){const n=t.getValue("willChange");if(i=n,Boolean(w(i)&&i.add))return n.add(e);if(!n&&$.WillChange){const n=new $.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Hn(t){return t.props[b]}const _n=t=>null!==t;const Xn={type:"spring",stiffness:500,damping:25,restSpeed:10},Gn={type:"keyframes",duration:.8},Zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jn=(t,{keyframes:e})=>e.length>2?Gn:T.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Xn:Zn;const Qn=(t,e,n,i={},s,r)=>o=>{const a=cn(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=Z(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...h}){return!!Object.keys(h).length})(a)||Object.assign(h,Jn(t,h)),h.duration&&(h.duration=Z(h.duration)),h.repeatDelay&&(h.repeatDelay=Z(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let c=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(rn(h),0===h.delay&&(c=!0)),($.instantAnimations||$.skipAnimations)&&(c=!0,rn(h),h.delay=0),h.allowFlatten=!a.type&&!a.ease,c&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(_n),r=e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(h.keyframes,a);if(void 0!==t)return void bt.update(()=>{h.onUpdate(t),h.onComplete()})}return a.isSync?new Se(h):new un(h)};function ti({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ei(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(r=i);const u=[],l=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||l&&ti(l,e))continue;const o={delay:n,...cn(r||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!o.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){const n=Hn(t);if(n){const t=window.MotionHandoffAnimation(n,e,bt);null!==t&&(o.startTime=t,c=!0)}}Yn(t,e),i.start(Qn(e,i,s,t.shouldReduceMotion&&dn.has(e)?{type:!1}:o,t,c));const d=i.animation;d&&u.push(d)}return o&&Promise.all(u).then(()=>{bt.update(()=>{o&&function(t,e){const n=$n(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)zn(t,e,Wn(r[e]))}(t,o)})}),u}function ni(t,e,n,i=0,s=1){const r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}function ii(t,e,n={}){const i=$n(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(ei(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(ii(u,e,{...o,delay:n+("function"==typeof i?0:i)+ni(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function si(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ri=A.length;function oi(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&oi(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<ri;n++){const i=A[n],s=t.props[i];(S(s)||!1===s)&&(e[i]=s)}return e}const ai=[...M].reverse(),ui=M.length;function li(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>ii(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=ii(t,e,n);else{const s="function"==typeof e?$n(t,e,n.custom):e;i=Promise.all(ei(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function hi(t){let e=li(t),n=pi(),i=!0;const s=e=>(n,i)=>{const s=$n(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:o}=t,a=oi(t.parent)||{},u=[],l=new Set;let h={},c=1/0;for(let e=0;e<ui;e++){const d=ai[e],p=n[d],m=void 0!==o[d]?o[d]:a[d],f=S(m),y=d===r?p.isActive:null;!1===y&&(c=e);let v=m===a[d]&&m!==o[d]&&f;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...h},!p.isActive&&null===y||!m&&!p.prevProp||V(m)||"boolean"==typeof m)continue;const g=ci(p.prevProp,m);let w=g||d===r&&p.isActive&&!v&&f||e>c&&f,b=!1;const T=Array.isArray(m)?m:[m];let A=T.reduce(s(d),{});!1===y&&(A={});const{prevResolvedValues:M={}}=p,x={...M,...A},C=e=>{w=!0,l.has(e)&&(b=!0,l.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in x){const e=A[t],n=M[t];if(h.hasOwnProperty(t))continue;let i=!1;i=qn(e)&&qn(n)?!si(e,n):e!==n,i?null!=e?C(t):l.add(t):void 0!==e&&l.has(t)?C(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=A,p.isActive&&(h={...h,...A}),i&&t.blockInitialAnimation&&(w=!1);const k=v&&g;w&&(!k||b)&&u.push(...T.map(e=>{const n={type:d};if("string"==typeof e&&i&&!k&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=$n(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ni(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof o.initial){const n=$n(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let d=Boolean(u.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=pi()}}}function ci(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!si(e,t)}function di(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pi(){return{animate:di(!0),whileInView:di(),whileHover:di(),whileTap:di(),whileDrag:di(),whileFocus:di(),exit:di()}}class mi{constructor(t){this.isMounted=!1,this.node=t}update(){}}let fi=0;const yi={animation:{Feature:class extends mi{constructor(t){super(t),t.animationState||(t.animationState=hi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();V(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends mi{constructor(){super(...arguments),this.id=fi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function vi(t){return{point:{x:t.pageX,y:t.pageY}}}function gi(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&bt.postRender(()=>s(e,vi(e)))}function wi(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function bi(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&bt.postRender(()=>s(e,vi(e)))}const Ti=new WeakMap,Si=new WeakMap,Ai=t=>{const e=Ti.get(t.target);e&&e(t)},Vi=t=>{t.forEach(Ai)};function Mi(t,e,n){const i=function({root:t,...e}){const n=t||document;Si.has(n)||Si.set(n,{});const i=Si.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Vi,{root:t,...e})),i[s]}(e);return Ti.set(t,n),i.observe(t),()=>{Ti.delete(t),i.unobserve(t)}}const xi={some:0,all:1};const Ci={inView:{Feature:class extends mi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:xi[i]};return Mi(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=e?n:i;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends mi{mount(){const{current:t}=this.node;t&&(this.unmount=jn(t,(t,e)=>(bi(this.node,e,"Start"),(t,{success:e})=>bi(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends mi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_(wi(this.node.current,"focus",()=>this.onFocus()),wi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends mi{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,r]=Dn(t,n),o=t=>{if(!On(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{On(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",o,s)}),r}(t,(t,e)=>(gi(this.node,e,"Start"),t=>gi(this.node,t,"End"))))}unmount(){}}}};const ki=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Ei={current:null},Pi={current:!1};const Fi=new WeakMap;const Di=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Oi{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=qe,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 t=xt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,bt.render(this.render,!1,!0))};const{latestValues:a,renderState:u}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=C(e),this.isVariantNode=k(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&w(e)&&e.set(a[t])}}mount(t){this.current=t,Fi.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((t,e)=>this.bindToMotionValue(e,t)),Pi.current||function(){if(Pi.current=!0,x)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ei.current=t.matches;t.addEventListener("change",e),e()}else Ei.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ei.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Tt(this.notifyUpdate),Tt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}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,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=T.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&bt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in E){const e=E[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Di.length;e++){const n=Di[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],r=n[i];if(w(s))t.addValue(i,s);else if(w(r))t.addValue(i,Cn(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Cn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Cn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(q(n)||z(n))?n=parseFloat(n):(i=n,!Un.find(pn(i))&&o.test(e)&&(n=An(t,e))),this.setBaseTarget(t,w(n)?n.get():n)),w(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=g(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||w(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new G),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){kn.render(this.render)}}class Ii extends Oi{constructor(){super(...arguments),this.KeyframeResolver=Mn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;w(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ri(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}class Ki extends Ii{constructor(){super(...arguments),this.type="html",this.renderInstance=Ri}readValueFromInstance(t,e){if(T.has(e))return this.projection?.isProjecting?Pe(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(P(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){F(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return D(t,e,n)}}const Bi=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"]);class Ni extends Ii{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ki}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(T.has(e)){const t=Sn(e);return t&&t.default||0}return e=Bi.has(e)?e:O(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return I(t,e,n)}build(t,e,n){R(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ri(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Bi.has(n)?n:O(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=K(t.tagName),super.mount(t)}}const Li={renderer:(t,e)=>e.isSVG??B(t)?new Ni(e):new Ki(e,{allowProjection:t!==N}),...yi,...Ci};export{Li as domAnimation};
@@ -1 +1 @@
1
- import{createContext as t}from"react";const r=(t,r,e)=>e>r?r:e<t?t:e,e=t({});function s(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function a(t){return"string"==typeof t||Array.isArray(t)}const n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],o=["initial",...n];function i(t){return s(t.animate)||o.some(r=>a(t[r]))}function f(t){return Boolean(i(t)||t.variants)}const l=t=>r=>"string"==typeof r&&r.startsWith(t),u=l("--"),p=l("var(--"),c=t=>!!p(t)&&d.test(t.split("/*")[0].trim()),d=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function m(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const g={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},h={...g,transform:t=>r(0,1,t)},y={...g,default:1},b=t=>Math.round(1e5*t)/1e5,v=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const w=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,x=(t,r)=>e=>Boolean("string"==typeof e&&w.test(e)&&e.startsWith(t)||r&&!function(t){return null==t}(e)&&Object.prototype.hasOwnProperty.call(e,r)),R=(t,r,e)=>s=>{if("string"!=typeof s)return s;const[a,n,o,i]=s.match(v);return{[t]:parseFloat(a),[r]:parseFloat(n),[e]:parseFloat(o),alpha:void 0!==i?parseFloat(i):1}},B={...g,transform:t=>Math.round((t=>r(0,255,t))(t))},T={test:x("rgb","red"),parse:R("red","green","blue"),transform:({red:t,green:r,blue:e,alpha:s=1})=>"rgba("+B.transform(t)+", "+B.transform(r)+", "+B.transform(e)+", "+b(h.transform(s))+")"};const O={test:x("#"),parse:function(t){let r="",e="",s="",a="";return t.length>5?(r=t.substring(1,3),e=t.substring(3,5),s=t.substring(5,7),a=t.substring(7,9)):(r=t.substring(1,2),e=t.substring(2,3),s=t.substring(3,4),a=t.substring(4,5),r+=r,e+=e,s+=s,a+=a),{red:parseInt(r,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}},transform:T.transform},$=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),k=$("deg"),L=$("%"),F=$("px"),P=$("vh"),S=$("vw"),W=(()=>({...L,parse:t=>L.parse(t)/100,transform:t=>L.transform(100*t)}))(),X={test:x("hsl","hue"),parse:R("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+L.transform(b(r))+", "+L.transform(b(e))+", "+b(h.transform(s))+")"},Y={test:t=>T.test(t)||O.test(t)||X.test(t),parse:t=>T.test(t)?T.parse(t):X.test(t)?X.parse(t):O.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?T.transform(t):X.transform(t),getAnimatableNone:t=>{const r=Y.parse(t);return r.alpha=0,Y.transform(r)}},I=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const A="number",Z="color",V=/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 H(t){const r=t.toString(),e=[],s={color:[],number:[],var:[]},a=[];let n=0;const o=r.replace(V,t=>(Y.test(t)?(s.color.push(n),a.push(Z),e.push(Y.parse(t))):t.startsWith("var(")?(s.var.push(n),a.push("var"),e.push(t)):(s.number.push(n),a.push(A),e.push(parseFloat(t))),++n,"${}")).split("${}");return{values:e,split:o,indexes:s,types:a}}function j(t){return H(t).values}function z(t){const{split:r,types:e}=H(t),s=r.length;return t=>{let a="";for(let n=0;n<s;n++)if(a+=r[n],void 0!==t[n]){const r=e[n];a+=r===A?b(t[n]):r===Z?Y.transform(t[n]):t[n]}return a}}const C=t=>"number"==typeof t?0:Y.test(t)?Y.getAnimatableNone(t):t;const D={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(v)?.length||0)+(t.match(I)?.length||0)>0},parse:j,createTransformer:z,getAnimatableNone:function(t){const r=j(t);return z(t)(r.map(C))}},E=(t,r,e)=>t+(r-t)*e,N=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],M=(()=>new Set(N))(),q={...g,transform:Math.round},G={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F,...{rotate:k,rotateX:k,rotateY:k,rotateZ:k,scale:y,scaleX:y,scaleY:y,scaleZ:y,skew:k,skewX:k,skewY:k,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:h,originX:W,originY:W,originZ:F},zIndex:q,fillOpacity:h,strokeOpacity:h,numOctaves:q},J=(t,r)=>r&&"number"==typeof t?r.transform(t):t,K=t=>Boolean(t&&t.getVelocity);function Q(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const U={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!F.test(t))return t;t=parseFloat(t)}return`${Q(t,r.target.x)}% ${Q(t,r.target.y)}%`}},_={correct:(t,{treeScale:r,projectionDelta:e})=>{const s=t,a=D.parse(t);if(a.length>5)return s;const n=D.createTransformer(t),o="number"!=typeof a[0]?1:0,i=e.x.scale*r.x,f=e.y.scale*r.y;a[0+o]/=i,a[1+o]/=f;const l=E(i,f,.5);return"number"==typeof a[2+o]&&(a[2+o]/=l),"number"==typeof a[3+o]&&(a[3+o]/=l),n(a)}},tt={borderRadius:{...U,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomLeftRadius:U,borderBottomRightRadius:U,boxShadow:_};function rt(t,{layout:r,layoutId:e}){return M.has(t)||t.startsWith("origin")||(r||void 0!==e)&&(!!tt[t]||"opacity"===t)}const et={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},st=N.length;function at(t,r,e){const{style:s,vars:a,transformOrigin:n}=t;let o=!1,i=!1;for(const t in r){const e=r[t];if(M.has(t))o=!0;else if(u(t))a[t]=e;else{const r=J(e,G[t]);t.startsWith("origin")?(i=!0,n[t]=r):s[t]=r}}if(r.transform||(o||e?s.transform=function(t,r,e){let s="",a=!0;for(let n=0;n<st;n++){const o=N[n],i=t[o];if(void 0===i)continue;let f=!0;if(f="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!f||e){const t=J(i,G[o]);f||(a=!1,s+=`${et[o]||o}(${t}) `),e&&(r[o]=t)}}return s=s.trim(),e?s=e(r,a?"":s):a&&(s="none"),s}(r,t.transform,e):s.transform&&(s.transform="none")),i){const{originX:t="50%",originY:r="50%",originZ:e=0}=n;s.transformOrigin=`${t} ${r} ${e}`}}const nt={offset:"stroke-dashoffset",array:"stroke-dasharray"},ot={offset:"strokeDashoffset",array:"strokeDasharray"};function it(t,{attrX:r,attrY:e,attrScale:s,pathLength:a,pathSpacing:n=1,pathOffset:o=0,...i},f,l,u){if(at(t,i,l),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:c}=t;p.transform&&(c.transform=p.transform,delete p.transform),(c.transform||p.transformOrigin)&&(c.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),c.transform&&(c.transformBox=u?.transformBox??"fill-box",delete p.transformBox),void 0!==r&&(p.x=r),void 0!==e&&(p.y=e),void 0!==s&&(p.scale=s),void 0!==a&&function(t,r,e=1,s=0,a=!0){t.pathLength=1;const n=a?nt:ot;t[n.offset]=F.transform(-s);const o=F.transform(r),i=F.transform(e);t[n.array]=`${o} ${i}`}(p,a,n,o,!1)}const ft=t=>"string"==typeof t&&"svg"===t.toLowerCase(),lt=["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 ut(t){return"string"==typeof t&&!t.includes("-")&&!!(lt.indexOf(t)>-1||/[A-Z]/u.test(t))}const pt=t(null);function ct(t){const r=[{},{}];return t?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r}function dt(t,r,e,s){if("function"==typeof r){const[a,n]=ct(s);r=r(void 0!==e?e:t.custom,a,n)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[a,n]=ct(s);r=r(void 0!==e?e:t.custom,a,n)}return r}function mt(t){return K(t)?t.get():t}function gt(t,r,e){const{style:s}=t,a={};for(const n in s)(K(s[n])||r.style&&K(r.style[n])||rt(n,t)||void 0!==e?.getValue(n)?.liveStyle)&&(a[n]=s[n]);return a}function ht(t,r,e){const s=gt(t,r,e);for(const e in t)if(K(t[e])||K(r[e])){s[-1!==N.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=t[e]}return s}const yt="undefined"!=typeof window,bt={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"]},vt={};for(const t in bt)vt[t]={isEnabled:r=>bt[t].some(t=>!!r[t])};function wt(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const xt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Rt="data-"+xt("framerAppearId"),Bt=t({});export{r as A,g as B,F as C,N as D,L as E,k as F,S as G,P as H,v as I,G as J,m as K,e as L,M,tt as N,u as O,pt as P,o as Q,n as R,Bt as S,xt as T,a,K as b,rt as c,at as d,it as e,ft as f,ut as g,f as h,i,s as j,dt as k,ht as l,wt as m,yt as n,Rt as o,vt as p,E as q,mt as r,gt as s,T as t,X as u,O as v,c as w,Y as x,D as y,H as z};
1
+ import{createContext as t}from"react";const r=(t,r,e)=>e>r?r:e<t?t:e,e=t({});function s(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function a(t){return"string"==typeof t||Array.isArray(t)}const n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],o=["initial",...n];function i(t){return s(t.animate)||o.some(r=>a(t[r]))}function f(t){return Boolean(i(t)||t.variants)}const l=t=>r=>"string"==typeof r&&r.startsWith(t),c=l("--"),d=l("var(--"),p=t=>!!d(t)&&u.test(t.split("/*")[0].trim()),u=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,g={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...g,transform:t=>r(0,1,t)},h={...g,default:1},y=t=>Math.round(1e5*t)/1e5,b=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const v=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,w=(t,r)=>e=>Boolean("string"==typeof e&&v.test(e)&&e.startsWith(t)||r&&!function(t){return null==t}(e)&&Object.prototype.hasOwnProperty.call(e,r)),x=(t,r,e)=>s=>{if("string"!=typeof s)return s;const[a,n,o,i]=s.match(b);return{[t]:parseFloat(a),[r]:parseFloat(n),[e]:parseFloat(o),alpha:void 0!==i?parseFloat(i):1}},B={...g,transform:t=>Math.round((t=>r(0,255,t))(t))},k={test:w("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:r,blue:e,alpha:s=1})=>"rgba("+B.transform(t)+", "+B.transform(r)+", "+B.transform(e)+", "+y(m.transform(s))+")"};const R={test:w("#"),parse:function(t){let r="",e="",s="",a="";return t.length>5?(r=t.substring(1,3),e=t.substring(3,5),s=t.substring(5,7),a=t.substring(7,9)):(r=t.substring(1,2),e=t.substring(2,3),s=t.substring(3,4),a=t.substring(4,5),r+=r,e+=e,s+=s,a+=a),{red:parseInt(r,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}},transform:k.transform},I=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),S=I("deg"),O=I("%"),T=I("px"),$=I("vh"),L=I("vw"),P=(()=>({...O,parse:t=>O.parse(t)/100,transform:t=>O.transform(100*t)}))(),F={test:w("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:e,alpha:s=1})=>"hsla("+Math.round(t)+", "+O.transform(y(r))+", "+O.transform(y(e))+", "+y(m.transform(s))+")"},W={test:t=>k.test(t)||R.test(t)||F.test(t),parse:t=>k.test(t)?k.parse(t):F.test(t)?F.parse(t):R.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?k.transform(t):F.transform(t),getAnimatableNone:t=>{const r=W.parse(t);return r.alpha=0,W.transform(r)}},X=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Y="number",E="color",A=/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 Z(t){const r=t.toString(),e=[],s={color:[],number:[],var:[]},a=[];let n=0;const o=r.replace(A,t=>(W.test(t)?(s.color.push(n),a.push(E),e.push(W.parse(t))):t.startsWith("var(")?(s.var.push(n),a.push("var"),e.push(t)):(s.number.push(n),a.push(Y),e.push(parseFloat(t))),++n,"${}")).split("${}");return{values:e,split:o,indexes:s,types:a}}function V(t){return Z(t).values}function D(t){const{split:r,types:e}=Z(t),s=r.length;return t=>{let a="";for(let n=0;n<s;n++)if(a+=r[n],void 0!==t[n]){const r=e[n];a+=r===Y?y(t[n]):r===E?W.transform(t[n]):t[n]}return a}}const H=t=>"number"==typeof t?0:W.test(t)?W.getAnimatableNone(t):t;const j={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(b)?.length||0)+(t.match(X)?.length||0)>0},parse:V,createTransformer:D,getAnimatableNone:function(t){const r=V(t);return D(t)(r.map(H))}},z=(t,r,e)=>t+(r-t)*e,C=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],N=(()=>new Set(C))(),M={...g,transform:Math.round},q={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,backgroundPositionX:T,backgroundPositionY:T,...{rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:h,scaleX:h,scaleY:h,scaleZ:h,skew:S,skewX:S,skewY:S,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:m,originX:P,originY:P,originZ:T},zIndex:M,fillOpacity:m,strokeOpacity:m,numOctaves:M},G=(t,r)=>r&&"number"==typeof t?r.transform(t):t,J=t=>Boolean(t&&t.getVelocity);function K(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const Q={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!T.test(t))return t;t=parseFloat(t)}return`${K(t,r.target.x)}% ${K(t,r.target.y)}%`}},U={correct:(t,{treeScale:r,projectionDelta:e})=>{const s=t,a=j.parse(t);if(a.length>5)return s;const n=j.createTransformer(t),o="number"!=typeof a[0]?1:0,i=e.x.scale*r.x,f=e.y.scale*r.y;a[0+o]/=i,a[1+o]/=f;const l=z(i,f,.5);return"number"==typeof a[2+o]&&(a[2+o]/=l),"number"==typeof a[3+o]&&(a[3+o]/=l),n(a)}},_={borderRadius:{...Q,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomLeftRadius:Q,borderBottomRightRadius:Q,boxShadow:U};function tt(t,{layout:r,layoutId:e}){return N.has(t)||t.startsWith("origin")||(r||void 0!==e)&&(!!_[t]||"opacity"===t)}const rt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},et=C.length;function st(t,r,e){const{style:s,vars:a,transformOrigin:n}=t;let o=!1,i=!1;for(const t in r){const e=r[t];if(N.has(t))o=!0;else if(c(t))a[t]=e;else{const r=G(e,q[t]);t.startsWith("origin")?(i=!0,n[t]=r):s[t]=r}}if(r.transform||(o||e?s.transform=function(t,r,e){let s="",a=!0;for(let n=0;n<et;n++){const o=C[n],i=t[o];if(void 0===i)continue;let f=!0;if(f="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!f||e){const t=G(i,q[o]);f||(a=!1,s+=`${rt[o]||o}(${t}) `),e&&(r[o]=t)}}return s=s.trim(),e?s=e(r,a?"":s):a&&(s="none"),s}(r,t.transform,e):s.transform&&(s.transform="none")),i){const{originX:t="50%",originY:r="50%",originZ:e=0}=n;s.transformOrigin=`${t} ${r} ${e}`}}const at={offset:"stroke-dashoffset",array:"stroke-dasharray"},nt={offset:"strokeDashoffset",array:"strokeDasharray"};const ot=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function it(t,{attrX:r,attrY:e,attrScale:s,pathLength:a,pathSpacing:n=1,pathOffset:o=0,...i},f,l,c){if(st(t,i,l),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p}=t;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete d.transformBox);for(const t of ot)void 0!==d[t]&&(p[t]=d[t],delete d[t]);void 0!==r&&(d.x=r),void 0!==e&&(d.y=e),void 0!==s&&(d.scale=s),void 0!==a&&function(t,r,e=1,s=0,a=!0){t.pathLength=1;const n=a?at:nt;t[n.offset]=T.transform(-s);const o=T.transform(r),i=T.transform(e);t[n.array]=`${o} ${i}`}(d,a,n,o,!1)}const ft=t=>"string"==typeof t&&"svg"===t.toLowerCase(),lt=["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 ct(t){return"string"==typeof t&&!t.includes("-")&&!!(lt.indexOf(t)>-1||/[A-Z]/u.test(t))}const dt=t(null);function pt(t){const r=[{},{}];return t?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r}function ut(t,r,e,s){if("function"==typeof r){const[a,n]=pt(s);r=r(void 0!==e?e:t.custom,a,n)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[a,n]=pt(s);r=r(void 0!==e?e:t.custom,a,n)}return r}function gt(t){return J(t)?t.get():t}function mt(t,r,e){const{style:s}=t,a={};for(const n in s)(J(s[n])||r.style&&J(r.style[n])||tt(n,t)||void 0!==e?.getValue(n)?.liveStyle)&&(a[n]=s[n]);return a}function ht(t,r,e){const s=mt(t,r,e);for(const e in t)if(J(t[e])||J(r[e])){s[-1!==C.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=t[e]}return s}const yt="undefined"!=typeof window,bt={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"]},vt={};for(const t in bt)vt[t]={isEnabled:r=>bt[t].some(t=>!!r[t])};function wt(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const xt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Bt="data-"+xt("framerAppearId"),kt=t({});export{r as A,g as B,T as C,C as D,O as E,S as F,L as G,$ as H,b as I,q as J,N as K,e as L,_ as M,c as N,o as O,dt as P,n as Q,xt as R,kt as S,a,J as b,tt as c,st as d,it as e,ft as f,ct as g,f as h,i,s as j,ut as k,ht as l,wt as m,yt as n,Bt as o,vt as p,z as q,gt as r,mt as s,k as t,F as u,R as v,p as w,W as x,j as y,Z as z};