motion 14.3.0 → 14.3.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.
package/dist/motion.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;let s=()=>{};const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(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 f=t=>1e3*t,m=t=>t/1e3,g=(t,e)=>e?t*(1e3/e):0,y=new Set;function v(t,e,n){t||y.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),y.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function T(t,e,n,i){return t===e&&n===i?u:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=w(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(w(a+1e-7,t,n)-s-i)}return w(a,e,i)}}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),M=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=S(E),D=b(E),C=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:B,easeOut:R,circIn:E,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:M},I=t=>{if(O(t)){t.length;const[e,n,i,s]=t;return T(e,n,i,s)}return"string"==typeof t?F[t]:t},N={delta:0,timestamp:0,isProcessing:!1};let W;function U(){W=void 0}const $={now:()=>(void 0===W&&$.set(N.isProcessing||o.useManualTiming?N.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(U)}},z=t=>Math.round(1e5*t)/1e5,K=t=>e=>"string"==typeof e&&e.startsWith(t),Y=K("--"),G=K("var(--"),X=t=>!!G(t)&&H.test(t.split("/*")[0].trim()),H=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Z={...q,transform:t=>i(0,1,t)},J={...q,default:1},Q=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,et=(t,e)=>n=>Boolean("string"==typeof n&&tt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),nt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Q);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},it={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},st={test:et("rgb","red"),parse:nt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+z(Z.transform(i))+")"};const ot={test:et("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:st.transform},rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ct=rt("px"),ut=rt("vh"),ht=rt("vw"),dt=(()=>({...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}))(),pt={test:et("hsl","hue"),parse:nt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform(z(e))+", "+lt.transform(z(n))+", "+z(Z.transform(i))+")"},ft={test:t=>st.test(t)||ot.test(t)||pt.test(t),parse:t=>st.test(t)?st.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?st.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=ft.parse(t);return e.alpha=0,ft.transform(e)}},mt=new RegExp(Q.source),gt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const yt="number",vt="color",xt=/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+)(?![a-z]*\()/giu;function wt(t){const e=t.toString();return mt.test(e)||gt.test(e)}function Tt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(xt,t=>(ft.test(t)?(i.color.push(o),s.push(vt),n.push(ft.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(yt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function bt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===yt?z(i[o]):t===vt?ft.transform(i[o]):i[o]}return s}}const St=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:ft.test(n)?ft.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(mt.test(t)||gt.test(t))},parse:function(t){return Tt(t).values},createTransformer:function(t){return bt(Tt(t))},getAnimatableNone:function(t){const e=Tt(t);return bt(e)(e.values.map((t,n)=>St(t,e.split[n])))}};function Vt(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 Pt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Vt(a,i,t+1/3),o=Vt(a,i,t),r=Vt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Mt(t,e){return n=>n>0?e:t}const Et=(t,e,n)=>t+(e-t)*n,kt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,st,pt];function Ct(t){const e=(n=t,Dt.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===pt&&(i=Pt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Mt(t,e);const s={...n};return t=>(s.red=kt(n.red,i.red,t),s.green=kt(n.green,i.green,t),s.blue=kt(n.blue,i.blue,t),s.alpha=Et(n.alpha,i.alpha,t),st.transform(s))},Bt=new Set(["none","hidden"]);function Lt(t,e){return Bt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>Et(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?X(t)?Mt:ft.test(t)?Rt:Nt:Array.isArray(t)?Ft:"object"==typeof t?ft.test(t)?Rt:It:Mt}function Ft(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function It(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ot(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=At.createTransformer(e),i=Tt(t),s=Tt(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?Bt.has(t)&&!s.values.length||Bt.has(e)&&!i.values.length?Lt(t,e):h(Ft(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):Mt(t,e)},Wt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Et(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Wt.exec(t);if(!n)return;const i=Wt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>z(Et(o,r,t))+s}(t,e);if(n)return n}return Ot(t)(t,e)}const $t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,s=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new Set;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(n.add(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const r=o.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=s?1e3/60:Math.max(Math.min(a-n.timestamp,40),1)),n.timestamp=a,n.isProcessing=!0,l.process(n),c.process(n),u.process(n),h.process(n),d.process(n),p.process(n),f.process(n),m.process(n),n.isProcessing=!1,i&&e&&(s=!1,t(g))};return{schedule:$t.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(i||(i=!0,s=!0,n.isProcessing||t(g)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:Kt,cancel:Yt,steps:Gt}=zt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0,N),Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Kt.update(e,t),stop:()=>Yt(e),now:()=>N.isProcessing?N.timestamp:$.now()}},Ht=(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,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const{keyframes:i,velocity:s}=t,o=i&&i[i.length-1]-i[0],r=n({...t,velocity:s&&o?s*e/o:s,keyframes:[0,e]}),a=Math.min(qt(r),_t);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=100,Qt=10,te=1,ee=800,ne=.3,ie=.3,se={granular:.01,default:2},oe={granular:.005,default:.5},re=.01,ae=10,le=.05,ce=t=>t<0?1/Math.max(1+t,le):Math.max(1-t,le);function ue(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return pe(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function he(t,e){return t*Math.sqrt(1-e*e)}const de=12;function pe(t,e,n){let i=n;for(let n=1;n<de;n++)i-=t(i)/e(i);return i}const fe=.001;const me=(t,e)=>(e?t>=0:t>0)&&t<1/0;function ge(t,e){if(me(t,e))return t}function ye(t){const e=ge(t.stiffness),n=ge(t.damping,!0),s=ge(t.mass),o={...t,stiffness:e??Jt,damping:n??Qt,mass:s??te,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=ce(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*ue(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=ee,bounce:e=ne}){let n,s;const o=ce(e);t=i(re,ae,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=he(e,o),r=Math.exp(-i);return fe-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=he(e*e,o);return(-n(e)+fe>0?-1:1)*-s*r/a}):(n=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=pe(n,s,5/t),a=r*ue(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:f(t)}}(o)),o.isResolvedFromDuration=!0;me(o.stiffness)&&me(o.damping,!0)||(o.stiffness=Jt,o.damping=Qt)}return o}function ve(t=ie,e=ne){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,isResolvedFromDuration:u,isTimeDefined:h}=ye({...n}),d=t=>h?0:-m(t),p=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=p*g,v={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?se.granular:se.default),v.restDelta=n.restDelta||(t?oe.granular:oe.default)};let w,T,b;if(x(),p<1){const t=he(g,p),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===p){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(p*p-1),e=y-t,n=y+t,i=h?1/0:300/t,s=(t,e)=>Math.exp(e>i?-t*i-y*(e-i):-t*e),o={S:0,F:0};b=()=>{const e=(v.velocity+y*v.delta)/t;o.S=(v.delta+e)/2,o.F=(v.delta-e)/2},w=t=>v.target-o.S*s(e,t)-o.F*s(n,t),T=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}b();const S=u&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>f(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=f(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(qt(A),_t),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}function xe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===r?m:r(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:g+e};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=ve({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function we(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,n){const i=[],s=n||o.mix||Ut,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=h(t,o)}i.push(o)}return i}(e,s,r),p=c.length,f=n=>{if(l&&n<t[0])return e[0];let i=0;if(p>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=d(t[i],t[i+1],n);return c[i](s)};return n?e=>f(i(t[0],t[a-1],e)):f}function Te(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Et(n,1,s))}}function be(t){const e=[0];return Te(e,t.length-1),e}function Se(t,e){return t.map(t=>t*e)}function Ae(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=L(s)?s.map(I):I(s)||B,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,s]=e,l=n===s?void 0:(o.mix||Ut)(n,s);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):s,a.done=e>=t,a)}}const l=we(Se(n&&n.length===e.length?n:be(e),t),e,{ease:Array.isArray(r)?r:Ae(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}ve.applyToOptions=t=>{const e=Zt(t,100,ve);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};function Pe(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const Me=t=>null!==t;function Ee(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Me),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:xe,inertia:xe,tween:Ve,keyframes:Ve,spring:ve};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}const Ce=(t,e)=>e-t>40&&!o.useManualTiming?e:t;function Re(t,e){return{kind:t,animation:e,timestamp:$.now(),frameTimestamp:N.timestamp,frameIsProcessing:N.isProcessing}}function Be(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Re("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Le{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const je=t=>t/100,Oe=t=>Math.round(1e4*t)/1e4;class Fe extends Le{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==$.now()&&this.tick($.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Be(this,this.options)}initAnimation(){const{options:t}=this;De(t);const{type:e=Ve,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ve;a!==Ve&&"number"!=typeof r[0]&&(this.mixKeyframes=h(je,Ut(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=qt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}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,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Ce(this.startTime,t)),this.pendingStartTime=void 0,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 u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||null===s||(p=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const f=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return f&&a!==xe&&(d.value=Ee(r,this.options,c,this.speed)),l&&l(d.value),f&&this.finish(),d}at(t){return this.holdTime??Oe((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==xe?Ee(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,e){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,f=n;if(c){const e=Math.min(t,s)/a;let n=Math.floor(e),o=e%1;!o&&e>=1&&(o=1),1===o&&n--,n=Math.min(n,c+1);Boolean(n%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(f=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=f.next(p),o&&!e&&(d.value=o(d.value)),d}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(this.currentTime)}set time(t){t=f(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime($.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,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.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=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($.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 Ie=new Set(["brightness","contrast","saturate","opacity"]);function Ne(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Q)||[];if(!i)return t;const s=n.replace(i,"");let o=Ie.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const We=/\b([a-z-]*)\(.*?\)/gu,Ue={...At,getAnimatableNone:t=>{const e=t.match(We);return e?e.map(Ne).join(" "):t}},$e={...At,getAnimatableNone:t=>{const e=At.parse(t);return At.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ze={...q,transform:Math.round},Ke={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:J,scaleX:J,scaleY:J,scaleZ:J,skew:at,skewX:at,skewY:at,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:Z,originX:dt,originY:dt,originZ:ct},Ye={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,inset:ct,insetBlock:ct,insetBlockStart:ct,insetBlockEnd:ct,insetInline:ct,insetInlineStart:ct,insetInlineEnd:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,paddingBlock:ct,paddingBlockStart:ct,paddingBlockEnd:ct,paddingInline:ct,paddingInlineStart:ct,paddingInlineEnd:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,marginBlock:ct,marginBlockStart:ct,marginBlockEnd:ct,marginInline:ct,marginInlineStart:ct,marginInlineEnd:ct,fontSize:ct,backgroundPositionX:ct,backgroundPositionY:ct,...Ke,zIndex:ze,fillOpacity:Z,strokeOpacity:Z,numOctaves:ze},Ge={...Ye,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:Ue,WebkitFilter:Ue,mask:$e,WebkitMask:$e},Xe=t=>Ge[t],He=new Set([Ue,$e]);function _e(t,e){let n=Xe(t);return He.has(n)||(n=At),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function qe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ze=t=>180*t/Math.PI,Je=t=>{const e=Ze(Math.atan2(t[1],t[0]));return tn(e)},Qe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Je,rotateZ:Je,skewX:t=>Ze(Math.atan(t[1])),skewY:t=>Ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>((t%=360)<0&&(t+=360),t),en=t=>Math.hypot(t[0],t[1]),nn=t=>Math.hypot(t[4],t[5]),sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:en,scaleY:nn,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(en(t)+nn(t))/2,rotateX:t=>tn(Ze(Math.atan2(t[6],t[5]))),rotateY:t=>tn(Ze(Math.atan2(-t[2],t[0]))),rotateZ:Je,rotate:Je,skewX:t=>Ze(Math.atan(t[4])),skewY:t=>Ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function on(t){return t.includes("scale")?1:0}function rn(t,e){if(!t||"none"===t)return on(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=sn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Qe,s=e}if(!s)return on(e);const o=i[e],r=s[1].split(",").map(ln);return"function"==typeof o?o(r):r[o]}const an=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return rn(n,e)};function ln(t){return parseFloat(t.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=(()=>new Set([...cn,"pathRotation"]))(),hn=t=>t===q||t===ct,dn=new Set(["x","y","z"]),pn=cn.filter(t=>!dn.has(t));const fn=new Set(["bottom","right"]);function mn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const gn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>mn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>mn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:({transform:t})=>rn(t,"x"),y:({transform:t})=>rn(t,"y")};gn.translateX=gn.x,gn.translateY=gn.y;const yn=new Set;let vn=!1,xn=!1,wn=!1;function Tn(){if(xn){const t=[],e=new Set,n=new Set;yn.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),fn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return pn.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.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)})}xn=!1,vn=!1,yn.forEach(t=>t.complete(wn)),yn.clear()}function bn(){yn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function Sn(){wn=!0,bn(),Tn(),wn=!1}class An{constructor(t,e,n,i,s,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(yn.add(this),vn||(vn=!0,Kt.read(bn),Kt.resolveKeyframes(Tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(r(t)||l(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return _e(e,n)}return t??void 0}(n.readValue(e,o),e,o);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}qe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yn.delete(this)}cancel(){"scheduled"===this.state&&(yn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Vn=t=>t.startsWith("--");function Pn(t,e,n){Vn(e)?t.style.setProperty(e,n):t.style[e]=n}const Mn={};function En(t,e){const n=c(t);return()=>Mn[e]??n()}const kn=En(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Dn=En(()=>void 0!==window.ViewTimeline,"viewTimeline"),Cn=En(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Rn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Bn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function Ln(t,e){return t?"function"==typeof t?Cn()?Ht(t,e):"ease-out":O(t)?Rn(t):Array.isArray(t)?t.map(t=>Ln(t,e)||Bn.easeOut):Bn[t]:void 0}function jn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Ln(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function On(t){return"function"==typeof t&&"applyToOptions"in t}function Fn({type:t,...e}){return On(t)&&Cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class In extends Le{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,t.type;const l=Fn(t);this.animation=jn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ee(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Pn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Be(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,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(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t),e&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&kn()?(this.animation.timeline=t,e?.(this.animation),u):n(this)}}const Nn={anticipate:M,backInOut:P,circInOut:D};function Wn(t){"string"==typeof t.ease&&t.ease in Nn&&(t.ease=Nn[t.ease])}const Un=10;class $n extends In{constructor(t){Wn(t),De(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?($.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Fe({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:e,element:n,name:s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?i(0,10,r):0,l=this.sample(r);n&&s&&Pn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const zn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function Kn(t){t.duration=0,t.type="keyframes"}const Yn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Gn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Xn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Hn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _n(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Yn.has(n)&&!Xn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Hn()&&(Yn.has(n)||Xn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Gn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const qn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jn=cn.length;function Qn(t,e,n){let i="",s=!0;for(let o=0;o<Jn;o++){const r=cn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=qn(a,Ye[r]);if(!l){s=!1;i+=`${Zn[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${qn(o,Ye.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}const ti=new WeakMap,ei=.001,ni=(t,e)=>t-e,ii=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Et(t,e,s/n));return i},si=t=>t.motionValue.owner,oi=t=>ti.get(t),ri=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ai extends Fe{constructor(t){const e=si(t).current,{driver:n=Xt}=t,i=function(t){const e=si(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(ri(e,"transform")||"none")||ri(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const i=n(t);return{js:i,now:i.now,start:(t=!0)=>{const n=oi(e);!n||n.isJS?i.start(t):n.schedule(!1,!t)},stop:()=>{i.stop();const t=oi(e);t?.schedule(!t.isFinishing)}}},super(t),this.canAccelerate=i;const{stop:s}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),s()}}get group(){return oi(si(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt($.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=O(n)?Rn(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&Bn[n];if(r&&!s&&!i&&2===t.length&&e===Ve&&null===this.holdTime){const t=this.startTime+o/this.speed;return[t,t+this.resolvedDuration/this.speed,r]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||Ve)===Ve?u||be(h):[0,1],f=n+r/i,m=[];if(null!==this.holdTime||!(s>0))return m;for(let n=Math.max(0,Math.floor((t-f)*i/s));n<=a;n++){const o=f+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&m.push(a)}}return m}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=$.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const e=t.current,n=new Set,i=new Map;let s={},o=[],r=new Map,a=[],l=!1,c=!1,u=!1,h=-1/0;const p=t=>{for(const e of n)if(e.name===t)return!0},f=(e,n)=>{const r={};for(const a of void 0===e?cn:o){const o=i.get(a),l=void 0===e?ri(t,a):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):s[a];void 0!==l&&(r[a]=l)}return r},m=(t,e)=>{let n="";const i=f(t,e);for(const t in i)n+=(Zn[t]||t)+"("+qn(i[t],Ye[t])+") ";return n||"none"},g=(t=f())=>{e.style.transform=Qn(t,{})},y=(t=!0)=>{t&&g(),a.forEach(({animation:t})=>t.cancel()),a=[]},v=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=$.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(t.cancel(),a=a.filter(t=>t!==i)),M.schedule(!1)}),t.oncancel=()=>a.includes(i)&&M.demote(),a.push(i)},x=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},w=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/Un)));if(4*i.length>s)return;const o=ii(e,n,s).concat(i).sort(ni),r=t=>d(e,n,t);let a,l;for(const e of t){const t=o.map(t=>e.numberAt(t)),[n]=t,i=t[t.length-1]-n,s=t.map(t=>i?(t-n)/i:t-n);if(i)if(a){if(s.some((t,e)=>!(Math.abs(t-a[e])<=ei)))return}else a=s,l=t=>(e.numberAt(t)-n)/i;else if(s.some(t=>!(Math.abs(t)<=ei)))return}if(!a||a.every((t,e)=>Math.abs(t-r(o[e]))<=ei))return"linear";const c=[],u=(t,e=l(t))=>c.push(Oe(e)+" "+Oe(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&x(l,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+c+")"},T=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...x(t=>i.numberAt(t),e,n));s.push(n)}},a=ii(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(ni))t>l&&r(l,t,0),l=t;return s.sort(ni)},b=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},S=(t,n,i,s={fill:"both"},o,r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=r||w(t,n,i,a),c=l?[n,i]:T(t,n,i,a),u=c.map(t=>m(t,o));let h={transform:u};return l||(h.offset=c.map(t=>d(n,i,t))),u.every(t=>t===u[0])&&(g(f(n,o)),h=null),e.animate(h,{...s,duration:i-n,easing:l||"linear"})},A=l=>{let c=l,u=0,h=0;const d=[],p=[],f=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[e,n]=t.timing(),s=e===1/0;if(r.set(t,[t.at(l),t.speed,s]),s)t.sync();else{if(t.speed<0)return;if(n){if(u){const t=(e-h)/n;if(Math.abs(n-u)>1||Math.abs(t-Math.round(t))*u>1)return}else u=n,h=e;p.push(t)}else f.add(e);d.push(t),c=Math.max(c,e)}}s={},o=cn.filter(e=>{if(i.has(e))return!0;const n=s[e]=ri(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),y(!1);const m=!u&&b(d);try{if(m&&m[1]>l){const[t,e,n]=m;v(S(d,t,e,void 0,void 0,n),t-l,e-t)}else c>l&&(v(S(d,l,c),0,c-l),f.forEach(t=>t<c-1&&v(e.animate(null,{duration:t-l}),0,t-l)));if(u){const t=h+Math.floor((c-h)/u)*u;v(S(p,t,t+u,{iterations:1/0,iterationStart:(c-t)/u,fill:"forwards"},c),c-l)}}catch{return}return a.length||y(),!0},V=t=>{let e,i=0;for(const s of n){const n=r.get(s);if(!n)return!1;const[o,a,l]=n,c=s.at(t),u=s.timing()[0]===1/0;if(l){if(u&&c===o)continue;return!1}const h=(c-o)/a,d=u?0:s.speed/a;if(void 0===e)e=h,i=d;else if(Math.abs(h-e)>1||d!==i)return!1}if(void 0===e)return!0;if(!a.length)return!1;for(const{offset:t,end:n,isDone:i}of a){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:n,offset:s,isDone:o}of a){if(o)continue;const r=e-s;i?(n.playbackRate=i,n.startTime=t-r/i):(n.pause(),n.currentTime=r)}return!0},P=()=>{const i=$.now();if(M.isJS||(M.isFinishing=!0,n.forEach(e=>{const[n,o]=e.timing();"running"===e.state&&e.speed>0&&!o&&n<=i+1&&(e.complete(),s[e.name]=ri(t,e.name),r.has(e)||(l=!0))}),M.isFinishing=!1),c=!1,n.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||n.delete(e)}),!n.size)return ti.delete(e),void(M.isJS||y());for(const t of n)if(!t.canAccelerate)return M.demote(!0);M.isJS&&(M.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const o=l,a=u;if(l=u=!1,o||!V(i)){if(a){if(i-h<100)return M.demote();h=i}if(!A(i))return M.demote()}},M={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){l||(l=t),u||(u=!!e),c||(c=!0,N.isProcessing?Kt.render(P,!1,!0):queueMicrotask(P))},check(){if(!M.isJS)for(const e in s)if(ri(t,e)!==s[e]&&!p(e))return M.schedule(!0,!0)},demote(t){M.isJS||(n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),M.isJS=!0,r=new Map,y(),n.forEach(t=>"running"===t.state&&t.js?.start()))}};return ti.set(e,M),M}(si(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick($.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at($.now())-(this.options.delay||0))):super.time}set time(t){super.time=t}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class li extends Le{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=$.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||An;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=$.now();let h=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=zn(s,e),a=zn(o,e);return!(!r||!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||On(n))&&i)})(t,s,r,a)||(h=!1,!o.instantAnimations&&l||u?.(Ee(t,n,e)),t[0]=t[t.length-1],Kn(n),n.repeat=0);const{onComplete:d}=n;n.finalKeyframe=e,n.keyframes=t,n.onComplete=()=>{d?.(),this.notifyFinished()};const p=h&&!c&&_n(n),f=!p&&(({name:t,motionValue:e})=>t&&cn.includes(t)&&e?.owner?.current instanceof HTMLElement&&Hn()&&Cn())(n);let m;if(i&&(p||f||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Ce(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{m=new $n(n)}catch{m=new Fe(n)}}else m=f?new ai(n):new Fe(n);this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sn()),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()}}class ci{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ui(this.animations,"duration")}get iterationDuration(){return ui(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ui(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class hi extends ci{then(t,e){return this.finished.finally(t).then(()=>{})}}class di extends In{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Be(this,{})}}const pi=new WeakMap,fi=(t,e="")=>`${t}:${e}`;function mi(t){let e=pi.get(t);return e||(e=new Map,pi.set(t,e)),e}function gi(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const yi={current:void 0};class vi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=$.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.notifyChange(),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=$.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){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new p)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new p,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Kt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;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.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){yi.current&&yi.current.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=$.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xi(t,e){return new vi(t,e)}function wi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ti(t,e){const n=t?.[e]??t?.default??t;return n!==t?wi(n,t):n}const bi={type:"spring",stiffness:500,damping:25,restSpeed:10},Si={type:"keyframes",duration:.8},Ai={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vi=(t,{keyframes:e})=>e.length>2?Si:un.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:bi:Ai,Pi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Mi(t){for(const e in t)if(!Pi.has(e))return!0;return!1}const Ei=(t,e,n,i={},s,r)=>a=>{const l=Ti(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s,hasOnUpdate:!!l.onUpdate};Mi(l)||Object.assign(h,Vi(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Kn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Kn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ee(h.keyframes,l);if(void 0!==t)return void Kt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Fe(h):new li(h)};function ki(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Di(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Ci(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Ri=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bi(t){const e=Ri.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Li(t,e,n=1){const[i,s]=Bi(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return r(t)?parseFloat(t):t}return X(s)?Li(s,e,n+1):s}function ji(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Oi(t,e,n){return ji(t.getProps(),e,n,t)}const Fi=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Ii=new Set(["width","height","top","left","right","bottom",...cn]),Ni=t=>Array.isArray(t);function Wi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xi(n))}function Ui(t){return Ni(t)?t[t.length-1]||0:t}function $i(t,e){const n=Oi(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Wi(t,e,Ui(o[e]))}}const zi=t=>Boolean(t&&t.getVelocity);function Ki(t){return Boolean(zi(t)&&t.add)}function Yi(t,e){const n=t.getValue("willChange");if(Ki(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Gi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Xi="framerAppearId",Hi="data-"+Gi(Xi);function _i(t){return t.props[Hi]}const qi="undefined"!=typeof window;function Zi({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Ji(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?wi(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&Zi(d,e))continue;const r={delay:n,...Ti(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){Kt.update(()=>i.set(s));continue}let p=!1;if(qi&&window.MotionHandoffAnimation){const n=_i(t);if(n){const t=window.MotionHandoffAnimation(n,e,Kt);null!==t&&(r.startTime=t,p=!0)}}Yi(t,e);const f=c??t.shouldReduceMotion;i.start(Ei(e,i,s,f&&Ii.has(e)?{type:!1}:r,t,p));const m=i.animation;m&&h.push(m)}if(r){const e=()=>Kt.update(()=>{r&&$i(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Qi(t,e,n={}){const i=Oi(t,e,Fi(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Ji(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(Qi(t,e,{...n,delay:i+("function"==typeof r?0:r)+gi(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ts(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>Qi(t,e,n))):"string"==typeof e?Qi(t,e,n):Promise.all(Ji(t,Oi(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const es=t=>e=>e.test(t),ns=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],is=t=>ns.find(es(t));function ss(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const os=new Set(["auto","none","0"]);class rs extends An{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(_(e?t[e]:i))return!1;return!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(),X(i))){const s=Li(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Ii.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=is(i),r=is(s);if(_(i)!==_(s)&&gn[n])this.needsMeasurement=!0;else if(o!==r)if(hn(o)&&hn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else gn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ss(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&&!os.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=_e(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return gn[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const as=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ls=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...as,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function cs(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ls.has(e)&&(t[n]=t[n]+"px")}const us=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),hs=[];function ds(t){"function"==typeof t.test&&t.read,ps(t),hs.unshift(t)}function ps(t){n(hs,t)}function fs(t){return hs.find(e=>e.test(t))}function ms(t,e,n={},i){const s=[],{velocity:o}=n,r=n.reduceMotion??i?.shouldReduceMotion;for(const a in e){if("transition"===a||"transitionEnd"===a)continue;const l=e[a];if(void 0===l)continue;const c=t(a),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Ei(a,c,l,r&&Ii.has(a)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):Kt.update(()=>c.set(l))}const{transitionEnd:a}=e;if(a){const e=()=>Kt.update(()=>{for(const e in a)t(e).set(a[e])});s.length?Promise.all(s).then(e):e()}return s}function gs(t,e,n,i,s){return ms(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=xi(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function ys(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function vs(t){return a(t)&&"ownerSVGElement"in t}function xs(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function ws(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=xs(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Ts{constructor(t=Kt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function bs(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Ts(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const Ss={};const As=new Set(["originX","originY","originZ"]),Vs=(t,e)=>qn(t.get(e)?.get(),Ye[e]),Ps=(t,e,n,i)=>{let s,o;if(un.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>cn.indexOf(t)-cn.indexOf(e)))}e.get("transform")||(ys(t)||e.get("transformBox")||Ps(t,e,"transformBox",new vi("fill-box")),e.set("transform",new vi("none"),()=>{ti.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(("number"==typeof o?o:parseFloat(o))!==(s.startsWith("scale")?1:0)&&(e+=(e&&" ")+(Ss[s]||(Ss[s]=(Zn[s]||s)+"("))+qn(o,Ke[s])+")"))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+"rotate("+qn(s,Ke.pathRotation)+")"),e||"none"}(e)})),o=e.get("transform")}else As.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new vi(""),()=>{const n=Vs(e,"originX")??"50%",i=Vs(e,"originY")??"50%",s=Vs(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Vn(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=qn(i.getCurrent(),Ye[n])};return e.set(n,i,s,o)},Ms=(t,e)=>{if(un.has(e))return an(t,e);const n=getComputedStyle(t),i=Vn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Es=bs(Ps,{test:t=>ys(t)||vs(t),read:Ms}),ks=ws(Es);function Ds(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(un.has(t))r=!0;else if(Y(t))s[t]=n;else{const e=qn(n,Ye[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Qn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Cs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rs={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Cs:Rs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ls=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function js(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ds(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Ls)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Bs(h,s,o,r,!1)}const Os=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Gi(s));const r=Ye[n]||Ye[s],a=o?()=>{t[s]=qn(i.get(),Ye[n])}:()=>{const e=qn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Fs=ws(bs(Os));const Is=(t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return Kt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new vi("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Os(t,e,n,i,$s(n));return(un.has(n)||As.has(n)||Vn(n)||n in t.style?Ps:Os)(t,e,n,i)},Ns=(t,e)=>un.has(e)?Ye[e]?.default||0:Vn(e)||Ls.includes(e)?Ms(t,e)||t.getAttribute(Gi(e))||0:(e=$s(e),t.getAttribute(Gi(e))??t.getAttribute(e)??void 0),Ws=bs(Is,{test:vs,read:Ns}),Us=ws(Ws);function $s(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function zs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ks(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}}function Ys(t){return void 0===t||1===t}function Gs({scale:t,scaleX:e,scaleY:n}){return!Ys(t)||!Ys(e)||!Ys(n)}function Xs(t){return Gs(t)||Hs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Hs(t){return _s(t.x)||_s(t.y)}function _s(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function Zs(t,e,n,i,s){return void 0!==s&&(t=qs(t,s,i)),qs(t,n,i)+e}function Js(t,e=0,n=1,i,s){t.min=Zs(t.min,e,n,i,s),t.max=Zs(t.max,e,n,i,s)}function Qs(t,{x:e,y:n}){Js(t.x,e.translate,e.scale,e.originPoint),Js(t.y,n.translate,n.scale,n.originPoint)}const to=.999999999999,eo=1.0000000000001;function no(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(io(t.x,-o.scroll.offset.x),io(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Qs(t,r)),i&&Xs(o.latestValues)&&ro(t,o.latestValues,o.layout?.layoutBox))}e.x<eo&&e.x>to&&(e.x=1),e.y<eo&&e.y>to&&(e.y=1)}function io(t,e){t.min+=e,t.max+=e}function so(t,e,n,i,s=.5){Js(t,e,n,Et(t.min,t.max,s),i)}function oo(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ro(t,e,n){const i=n??t;so(t.x,oo(e.x,i.x),e.scaleX,e.scale,e.originX),so(t.y,oo(e.y,i.y),e.scaleY,e.scale,e.originY)}function ao(t,e){return zs(Ks(t.getBoundingClientRect(),e))}const lo={},co=t=>vs(t)?Ws:Es;class uo{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=rs}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return ao(this.current)}getProps(){return lo}}function ho(t,e,n,i){if(i)return ms(t=>i.getValue(t,null),e,n,i);const s=co(t);return gs(s,t,e,n,new uo(s,t))}function po(t,e){const n=co(t).state(t);if(!n)return;const{transformKeys:i}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&i?.length||e.addValue(n,t)})}const fo=bs((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>a(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:mo,cancel:go}=zt(queueMicrotask,!1),yo={x:!1,y:!1};function vo(){return yo.x||yo.y}function xo(t,e){const n=xs(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const wo=(t,e)=>!!e&&(t===e||wo(t,e.parentElement)),To=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,bo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function So(t){return bo.has(t.tagName)||!0===t.isContentEditable}const Ao=new Set(["INPUT","SELECT","TEXTAREA"]);const Vo=new WeakSet;function Po(t){return e=>{"Enter"===e.key&&t(e)}}function Mo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Eo(t){return To(t)&&!vo()}const ko=new WeakSet;function Do(t,e){const n=window.getComputedStyle(t);return Vn(e)?n.getPropertyValue(e):n[e]}const Co=new WeakMap;let Ro;const Bo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:vs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Lo=Bo("inline","width","offsetWidth"),jo=Bo("block","height","offsetHeight");function Oo({target:t,borderBoxSize:e}){Co.get(t)?.forEach(n=>{n(t,{get width(){return Lo(t,e)},get height(){return jo(t,e)}})})}function Fo(t){t.forEach(Oo)}function Io(t,e){Ro||"undefined"!=typeof ResizeObserver&&(Ro=new ResizeObserver(Fo));const n=xs(t);return n.forEach(t=>{let n=Co.get(t);n||(n=new Set,Co.set(t,n)),n.add(e),Ro?.observe(t)}),()=>{n.forEach(t=>{const n=Co.get(t);n?.delete(e),n?.size||Ro?.unobserve(t)})}}const No=new Set;let Wo;function Uo(t){return No.add(t),Wo||(Wo=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};No.forEach(e=>e(t))},window.addEventListener("resize",Wo)),()=>{No.delete(t),No.size||"function"!=typeof Wo||(window.removeEventListener("resize",Wo),Wo=void 0)}}function $o(t,e){return"function"==typeof t?Uo(t):Io(t,e)}const zo={value:null,addProjectionMetrics:null};function Ko(t){return vs(t)&&"svg"===t.tagName}function Yo(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=we(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Go=new Set,Xo=({timestamp:t})=>{Go.forEach(e=>e.tick(t))};class Ho extends Le{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Go.size||Kt.update(Xo,!0),Go.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Ce(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():$.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Go.delete(this),Go.size||Yt(Xo))}}const _o=t=>"number"==typeof t?t:parseFloat(t);function qo(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=_o(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=_o(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ho({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),zi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Zo(e,r),!1)):t.set(Zo(e,r))},o=e.on("change",s),a=e.get();_o(a)-_o(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Zo(t,e){return e?t+e:t}function Jo(t,e,n={}){const i={type:"spring",...n};return De(i),i.type=i.type||Ve,qo(t,e,i)}function Qo(t){const e=[];yi.current=e;const n=t();yi.current=void 0;const i=xi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>Kt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Yt(i)})}(e,i,t),i}function tr(t,e,n){return qo(t,e,{...n,type:ve})}const er=[...ns,ft,At];let nr=0;const ir=()=>"motion-view-"+nr++;function sr(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function or(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function rr(t,e,n,i,s,o=[],r,a=[],l){const c=xs(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??ir();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),sr(t,s,o),or(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=ir(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),sr(t,s,o),or(t,d,r,a,l),d})}function ar(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let lr={},cr=null;const ur=(t,e)=>{lr[t]=e},hr=()=>{cr||(cr=document.createElement("style"),cr.id="motion-view");let t="";for(const e in lr){const n=lr[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}cr.textContent=t,document.head.appendChild(cr),lr={}},dr=()=>{cr&&cr.parentElement&&cr.parentElement.removeChild(cr)};function pr(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function fr(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const mr=["layout","enter","exit","new","old"],gr=t=>t.split(" ").every(t=>0===parseFloat(t)),yr={group:["layout"],new:["new","enter"],old:["old","exit"]},vr={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function xr(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new ci([])))();const c=new Map,u=[],h=[],d=[],p=new Set,m=new Map,g=new Set,y=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),f="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,xs(n)),g=rr(n,c,u,void 0,l,h,f,d,p),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=rr(o.get(n),c,u,w.get(n),l,h,f,d,p)}else g=rr(n,c,u,void 0,l,h,f,d,p);else g=[n];const v=s.get(n);g.forEach((n,i)=>{const s=m.get(n);m.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&y.set(n,v);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=wr(Ti(l,n),Ti(function(t,e){for(const n of yr[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{const[e,n]=S(t,"group"),i=A(m.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=f(i.duration));const{delay:s=0,duration:o,ease:r}=Fn(i);return{delay:f(s),duration:o,ease:r}},P=new Map,M=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of as)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),E=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||ur(":root",{"view-transition-name":"none"}),ur("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{ur(`::view-transition-group(${t})`,{overflow:"clip"}),ur(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{ur(`::view-transition-group-children(${t})`,{overflow:"clip"})}),hr()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),dr()},C=async()=>{await e(),b("new"),M("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),k()};let R;try{b("old"),M("old"),k(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=fr(),n=[],i=new Set,s=new Set;m.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of mr){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=ar(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[m,g]of Object.entries(d)){if(null==g)continue;if("x"===m||"y"===m){v(!1,`animateView() animates view-transition layers with CSS properties; the "${m}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[m])continue;if("old"===o&&a&&null!=t.exit?.keyframes[m])continue;const d=wr(Ti(l,m),Ti(p,m));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[m]:void 0,n="opacity"===m||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?vr[c]?.[m]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=f(d.duration)),d.delay&&(d.delay=f(d.delay)),n.push(new In({...d,element:document.documentElement,name:m,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===m&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=pr(o);if(!r)continue;const a=m.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new di(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:Ln(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=f(i.duration)),i=Fn(i),h={delay:f(i.delay??0),duration:u&&void 0!==s?f(s):i.duration,easing:u?"linear":Ln(i.ease,i.duration)}}e.updateTiming(h),n.push(new di(t))}P.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of as){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";gr(a)&&gr(l)||n.push(new In({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new ci(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new ci([])),e))})}function wr(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let Tr=[],br=null;function Sr(){br=null;const[t]=Tr;var e;t&&(n(Tr,e=t),br=e,xr(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(Sr))}function Ar(){for(let t=Tr.length-1;t>=0;t--){const e=Tr[t],{interrupt:n}=e.options;if("immediate"===n){const n=Tr.slice(0,t+1).map(t=>t.update),i=Tr.slice(t+1);e.update=()=>{n.forEach(t=>t())},Tr=[e,...i];break}}br&&"immediate"!==Tr[0]?.options.interrupt||Sr()}class Vr{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,Tr.push(n),mo.render(Ar)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Pr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Er=()=>({min:0,max:0}),kr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Dr=new WeakMap;function Cr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Rr(t){return"string"==typeof t||Array.isArray(t)}const Br=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lr=["initial",...Br];function jr(t){if(Cr(t.animate))return!0;for(let e=0;e<Lr.length;e++)if(Rr(t[Lr[e]]))return!0;return!1}function Or(t){return Boolean(jr(t)||t.variants)}function Fr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(zi(s))t.addValue(i,s);else if(zi(o))t.addValue(i,xi(s,{owner:t}));else if(o!==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,xi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Ir={current:null},Nr={current:!1},Wr="undefined"!=typeof window;function Ur(){if(Nr.current=!0,Wr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ir.current=t.matches;t.addEventListener("change",e),e()}else Ir.current=!1}const $r=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zr={};class Kr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=$.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Kt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=jr(e),this.isVariantNode=Or(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&zi(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,Dr.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Nr.current||Ur(),this.shouldReduceMotion=Ir.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Yt(this.notifyUpdate),Yt(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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Yn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new In({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=un.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Kt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),ti.get(this.current)?.check()),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in zr){const e=zr[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){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&ti.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<$r.length;e++){const n=$r[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=Fr(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}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}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=xi(e??this.getDefaultValue?.(t),{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];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=_e(t,e)),this.setBaseTarget(t,zi(n)?n.get():n)),zi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){mo.render(this.render)}}class Yr extends Kr{constructor(){super(...arguments),this.KeyframeResolver=rs}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[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;zi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Gr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}const Xr={};function Hr(t,{layout:e,layoutId:n}){return un.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Xr[t]||"opacity"===t)}function _r(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(zi(i[e])||s&&zi(s[e])||Hr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class qr extends Yr{constructor(){super(...arguments),this.type="html",this.renderInstance=Gr}mount(t){Boolean(t.style),super.mount(t)}readValueFromInstance(t,e){if(un.has(e))return this.projection?.isProjecting?on(e):an(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Y(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ao(t,e)}build(t,e,n){Ds(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _r(t,e,n)}}const Zr=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"]),Jr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Qr(t,e,n,i){Gr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Zr.has(n)?n:Gi(n),e.attrs[n])}function ta(t,e,n){const i=_r(t,e,n);for(const n in t)if("children"!==n&&(zi(t[n])||zi(e[n]))){i[-1!==cn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ea(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 na=[...Br].reverse();function ia(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ea(e,t)}function sa(){const t={};for(const e of Br)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}const oa=Lr.length;function ra(t,e){t.min=e.min,t.max=e.max}function aa(t,e){ra(t.x,e.x),ra(t.y,e.y)}function la(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ca(t){return t.max-t.min}function ua(t,e,n){return Math.abs(t-e)<=n}function ha(t,e,n,i=.5){t.origin=i,t.originPoint=Et(e.min,e.max,t.origin),t.scale=ca(n)/ca(e),t.translate=Et(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function da(t,e,n,i){ha(t.x,e.x,n.x,i?i.originX:void 0),ha(t.y,e.y,n.y,i?i.originY:void 0)}function pa(t,e,n,i=0){const s=i?Et(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+ca(e)}function fa(t,e,n,i){pa(t.x,e.x,n.x,i?.x),pa(t.y,e.y,n.y,i?.y)}function ma(t,e,n,i=0){const s=i?Et(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+ca(e)}function ga(t,e,n,i){ma(t.x,e.x,n.x,i?.x),ma(t.y,e.y,n.y,i?.y)}function ya(t,e,n,i,s){return t=qs(t-=e,1/n,i),void 0!==s&&(t=qs(t,1/s,i)),t}function va(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=Et(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Et(o.min,o.max,i);t===o&&(a-=e),t.min=ya(t.min,e,n,a,s),t.max=ya(t.max,e,n,a,s)}function xa(t,e,[n,i,s],o,r){va(t,e[n],e[i],e[s],e.scale,o,r)}const wa=["x","scaleX","originX"],Ta=["y","scaleY","originY"];function ba(t,e,n,i){xa(t.x,e,wa,n?n.x:void 0,i?i.x:void 0),xa(t.y,e,Ta,n?n.y:void 0,i?i.y:void 0)}function Sa(t){return 0===t.translate&&1===t.scale}function Aa(t){return Sa(t.x)&&Sa(t.y)}function Va(t,e){return t.min===e.min&&t.max===e.max}function Pa(t,e){return Va(t.x,e.x)&&Va(t.y,e.y)}function Ma(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ea(t,e){return Ma(t.x,e.x)&&Ma(t.y,e.y)}function ka(t){return ca(t.x)/ca(t.y)}function Da(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ca(t){return[t("x"),t("y")]}function Ra(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ba={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${Ra(t,e.target.x)}% ${Ra(t,e.target.y)}%`}},La={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=At.parse(t);if(s.length>5)return i;const o=At.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Et(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};function ja(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Oa=as.length,Fa=t=>"number"==typeof t||ct.test(t);function Ia(t,e,n,i,s,o){s?(t.opacity=Et(0,n.opacity??1,Wa(i)),t.opacityExit=Et(e.opacity??1,0,Ua(i))):o&&(t.opacity=Et(e.opacity??1,n.opacity??1,i));for(let s=0;s<Oa;s++){const o=as[s];let r=Na(e,o),a=Na(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Fa(r)===Fa(a)?(t[o]=Math.max(Et(_o(r),_o(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Et(e.rotate||0,n.rotate||0,i))}function Na(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Wa=$a(0,.5,k),Ua=$a(.5,.95,u);function $a(t,e,n){return i=>i<t?0:i>e?1:n(d(t,e,i))}function za(t,e,n){const i=zi(t)?t:xi(t);return i.start(Ei("",i,e,n)),i.animation}function Ka(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const Ya=(t,e)=>t.depth-e.depth;class Ga{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ya),this.isDirty=!1,this.children.forEach(t)}}function Xa(t,e){const n=$.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Yt(i),t(o-e))};return Kt.setup(i,!0),()=>Yt(i)}function Ha(t,e){return Xa(t,f(e))}function _a(t){return zi(t)?t.get():t}class qa{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Za={borderRadius:{...Ba,applyTo:[...as]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:La},Ja={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Xr,{...Za,...Xr});const Qa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},tl=["","X","Y","Z"];let el=0;function nl(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const il=({instance:t})=>t&&ti.get(t)?.demote();function sl(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=_i(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Kt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&sl(i)}function ol({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=el++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,zo.value&&(Qa.nodes=Qa.calculatedTargetDeltas=Qa.calculatedProjections=0),this.nodes.forEach(ll),this.nodes.forEach(vl),this.nodes.forEach(xl),this.nodes.forEach(cl),zo.addProjectionMetrics&&zo.addProjectionMetrics(Qa)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ga)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=vs(e)&&!Ko(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;Kt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Xa(s,250),Ja.hasAnimatedSinceResize&&(Ja.hasAnimatedSinceResize=!1,this.nodes.forEach(yl)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Vl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Ea(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Ti(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||yl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Yt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(wl),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;il(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,il(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(dl),void this.nodes.forEach(hl)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(pl);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fl),this.nodes.forEach(ml),this.nodes.forEach(gl),this.nodes.forEach(rl),this.nodes.forEach(al)):this.nodes.forEach(pl),this.clearAllSnapshots();const t=$.now();N.delta=i(0,1e3/60,t-N.timestamp),N.timestamp=t,N.isProcessing=!0,Gt.update.process(N),Gt.preRender.process(N),Gt.render.process(N),N.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ul),this.sharedNodes.forEach(Tl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ca(this.snapshot.measuredBox.x)||ca(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&il(this);const e=this.projectionDelta&&!Aa(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Xs(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),El((i=n).x),El(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Dl))){const{scroll:t}=this.root;t&&(io(e.x,t.offset.x),io(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(aa(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&aa(e,t),io(e.x,s.offset.x),io(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};aa(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(io(i.x,-n.scroll.offset.x),io(i.y,-n.scroll.offset.y)),Xs(n.latestValues)&&ro(i,n.latestValues,n.layout?.layoutBox)}return Xs(this.latestValues)&&ro(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};aa(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Xs(n.latestValues))continue;let i;n.instance&&(Gs(n.latestValues)&&n.updateSnapshot(),i=kr(),aa(i,n.measurePageBox())),ba(e,n.latestValues,n.snapshot?.layoutBox,i)}return Xs(this.latestValues)&&ba(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==N.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=N.timestamp;const o=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fa(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):aa(this.target,this.layout.layoutBox),Qs(this.target,this.targetDelta)):aa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),zo.value&&Qa.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Gs(this.parent.latestValues)&&!Hs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ga(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),aa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===N.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;aa(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;no(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(la(this.prevProjectionDelta.x,this.projectionDelta.x),la(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),da(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Da(this.projectionDelta.x,this.prevProjectionDelta.x)&&Da(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),zo.value&&Qa.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Al));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,f,m,g;i?(r.x.translate=i.x,r.x.scale=Et(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Et(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(bl(r.x,t.x,n),bl(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ga(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,f=this.relativeTargetOrigin,m=a,g=n,Sl(c.x,f.x,m.x,g),Sl(c.y,f.y,m.y,g),d&&Pa(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),aa(d,this.relativeTarget)),l&&(this.animationValues=o,Ia(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{Ja.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xi(0)),this.motionValue.jump(0,!1),this.currentAnimation=za(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Re("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&kl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){s=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ca(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+e;const n=ca(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}aa(e,s),ro(e,i),da(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new qa);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&nl("z",t,i,this.animationValues);for(let e=0;e<tl.length;e++)nl(`rotate${tl[e]}`,t,i,this.animationValues),nl(`skew${tl[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=_a(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=_a(e?.pointerEvents)||""),void(this.hasProjected&&!Xs(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=ja(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Xr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Xr[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?_a(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(hl),this.root.sharedNodes.clear()}}}function rl(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Ca(t=>io(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function al(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Ca(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=ca(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";ra(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else kl(s,e.layoutBox,n)&&Ca(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=ca(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};da(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?da(a,t.applyTransform(i,!0),e.measuredBox):da(a,n,e.layoutBox);const l=!Aa(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};ga(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};ga(l,n,o.layoutBox,r),Ea(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ll(t){zo.value&&Qa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function cl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ul(t){t.clearSnapshot()}function hl(t){t.clearMeasurements()}function dl(t){t.isLayoutDirty=!0,t.updateLayout()}function pl(t){t.isLayoutDirty=!1}function fl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function ml(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function gl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function yl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function vl(t){t.resolveTargetDelta()}function xl(t){t.calcProjection()}function wl(t){t.resetSkewAndRotation()}function Tl(t){t.removeLeadSnapshot()}function bl(t,e,n){t.translate=Et(e.translate,0,n),t.scale=Et(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Sl(t,e,n,i){t.min=Et(e.min,n.min,i),t.max=Et(e.max,n.max,i)}function Al(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Vl={duration:.45,ease:[.4,0,.1,1]},Pl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ml=Pl("applewebkit/")&&!Pl("chrome/")?Math.round:u;function El(t){t.min=Ml(t.min),t.max=Ml(t.max)}function kl(t,e,n){return"position"===t||"preserve-aspect"===t&&!ua(ka(e),ka(n),.2)}function Dl(t){return t!==t.root&&t.scroll?.wasRoot}const Cl=ol({attachResizeListener:(t,e)=>Ka(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Rl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Bl={current:void 0},Ll=ol({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Bl.current){const t=new Cl({});t.mount(window),t.setOptions({layoutScroll:!0}),Bl.current=t}return Bl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),jl="[data-layout],[data-layout-id]",Ol=new WeakMap;let Fl;function Il(t){const e=[];return t instanceof HTMLElement&&t.matches(jl)&&e.push(t),t.querySelectorAll(jl).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Nl(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Wl(t,e){let n=Ol.get(t);if(n)n.setOptions(Nl(t,e));else{let i=Dr.get(t);i||(i=new qr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),po(t,i)),t.style.transform&&!Xs(i.latestValues)&&(t.style.transform=""),n=new Ll(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Ol.get(e);if(t&&t.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Nl(t,e),visualElement:i}),n.mount(t),Ol.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Ul(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Ol.delete(t)}function $l(){const t=Fl;Fl=void 0,function(){if(N.isProcessing)return;const t=$.now();N.delta=i(0,1e3/60,t-N.timestamp),N.timestamp=t,N.isProcessing=!0,Gt.update.process(N),Gt.preRender.process(N),Gt.render.process(N),N.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Wl(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),mo.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}class zl{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Fl||(Fl=[],queueMicrotask($l)),Fl.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Il(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Il(this.scope)){if(this.tracked.has(e))continue;const n=Wl(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next&&i.next.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Ul(n,e)}}),e.relegate())return;n.remove()}Ul(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new ci([...t]))}}function Kl(t,e,n){if("function"==typeof t)return{scope:document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:xs(t)[0]??document,updateDom:e,defaultOptions:n}}const Yl=Kt,Gl=$t.reduce((t,e)=>(t[e]=t=>Yt(t),t),{});function Xl(t){return"object"==typeof t&&!Array.isArray(t)}function Hl(t,e,n,i){return null==t?[]:"string"==typeof t&&Xl(e)?xs(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function _l(t,e,n){return t*(e+1)+n*e}function ql(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Zl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Et(o,r,s[n]),easing:j(i,n)})}function Jl(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function Ql(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function tc(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ec(t,e){return e[t]||(e[t]=[]),e[t]}function nc(t){return Array.isArray(t)?t:[t]}function ic(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const sc=t=>"number"==typeof t,oc=t=>t.every(sc);function rc(t,e,n,i){const s=[];if(function(t,e){return zi(t)||"number"==typeof t||"string"==typeof t&&!Xl(e)}(t,e))s.push(za(t,Xl(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=Hl(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a={...n};"delay"in a&&"function"==typeof a.delay&&(a.delay=a.delay(t,r)),i instanceof Element?s.push(...ho(i,e,a,Dr.get(i))):s.push(...gs(fs(i)??fo,i,e,a))}}return s}function ac(t,e,n){const i=[],s=function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,l={},c=new Map;let u=0,h=0,p=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){c.set(r,h);continue}if(!Array.isArray(r)){c.set(r.name,ql(h,r.at,u,c));continue}let[d,m,g={}]=r;void 0!==g.at&&(h=ql(h,g.at,u,c));let y=0;const v=(t,n,i,r=0,a=0)=>{const l=nc(t),{delay:c=0,times:u=be(l),type:d=e.type||"keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...x}=n;let{ease:w=e.ease||"easeOut",duration:T}=n;const b="function"==typeof c?c(r,a):c,A=l.length,V=On(d)?d:s?.[d||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&oc(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...x};void 0!==T&&(n.duration=f(T));const i=Zt(n,t,V);w=i.ease,T=i.duration}T??(T=o);const P=h+b;1===u.length&&0===u[0]&&(u[1]=1);const M=u.length-l.length;if(M>0&&Te(u,M),1===l.length&&l.unshift(null),m&&m<20){const t=T>0?v/T:0;T=_l(T,m,v);const e=[...l],n=[...u];w=Array.isArray(w)?[...w]:[w];const i=[...w],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?S(t):t)));for(let a=0;a<m;a++){const c=s&&a%2==0,h=c?o:e,d=c?r:i,p=(a+1)*(1+t);t>0&&(l.push(l[l.length-1]),u.push(p),w.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),w.push(0===t?"linear":j(d,t-1))}Jl(u,m,t)}const E=P+T;Zl(i,l,w,u,P,E),y=Math.max(b+T,y),p=Math.max(E,p)};if(zi(d))v(m,g,ec("default",tc(d,a)));else{const t=Hl(d,m,i,l),e=t.length;for(let n=0;n<e;n++){const i=tc(t[n],a);for(const t in m)v(m[t],ic(g,t),ec(t,i),n,e)}}u=h,h+=y}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Ql);const a=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),l.push(d(0,p,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const u=r.get(i);u.keyframes[s]=a;const{type:h,...f}=e;u.transition[s]={...f,duration:p,ease:c,times:l,...n}}}),r}(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=xi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),e,n,{spring:ve});return s.forEach(({keyframes:t,transition:e},n)=>{i.push(...rc(n,t,e))}),i}function lc(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=ac(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=rc(t,o,{...c,...i},e)}var u;const h=new hi(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const cc=Object.assign(lc(),{addEffect:ds,removeEffect:ps});const uc=t=>function(e,n,i){return new hi(function(t,e,n,i){if(null==t)return[];const s=xs(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const s={...Ti(a,t)};s.duration&&(s.duration=f(s.duration)),s.delay&&(s.delay=f(s.delay));const o=mi(i),l=fi(t,s.pseudoElement||""),c=o.get(l);c&&c.stop(),r.push({map:o,key:l,unresolvedKeyframes:n,options:{...s,element:i,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<r.length;t++){const{unresolvedKeyframes:e,options:n}=r[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=Do(i,s)),qe(e),cs(e,s),!o&&e.length<2&&e.unshift(Do(i,s)),n.keyframes=e}const a=[];for(let t=0;t<r.length;t++){const{map:e,key:n,options:i}=r[t],s=new In(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),a.push(s)}return a}(e,n,i,t))},hc=uc(),dc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},pc=new WeakMap;function fc(t,e,n,s){const o=n[e],{length:r,position:a}=dc[e],l=o.current,c=n.time,u=t[`scroll${a}`];o.current=function(t,e){const n=t===document.scrollingElement,i=n&&document.body||t;let s=pc.get(i);s||pc.set(i,s=getComputedStyle(i));const{writingMode:o,flexDirection:r}=s,a="x"===e!==/^[vs]/.test(o);return(a?"rtl"===s.direction!=("sideways-lr"===o):o.endsWith("rl"))!==(!n&&s.display.includes("flex")&&(a!==("c"===r[0])?r:s.flexWrap).endsWith("reverse"))}(t,e)?-u||0:u,o.containerLength=t[`client${r}`],o.targetLength=t[`scroll${r}`],o.scrollLength=o.targetLength-o.containerLength,o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=i(0,1,d(0,o.scrollLength,o.current));const h=s-c;o.velocity=h>50?0:g(o.current-l,h)}const mc={start:0,center:.5,end:1};function gc(t,e,n=0){let i=0;if(t in mc&&(t=mc[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const yc=[0,0];function vc(t,e,n,i){let s=Array.isArray(t)?t:yc,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,mc[t]?t:"0"]),o=gc(s[0],n,i),r=gc(s[1],e),o-r}const xc={All:[[0,0],[1,1]]};function wc(t,e){const{offset:n=xc.All,axis:s="y"}=e,o=t[s];o.offset.length=0;const r=n.length;for(let t=0;t<r;t++)o.offset[t]=vc(n[t],o.containerLength,o.targetLength,o.targetOffset);o.progress=i(0,1,function(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+d(s(o),s(o+1),e))/n;return i?1-r:r}(o.offset,o.current))}function Tc(t,e,n,i={}){const{target:s}=i,o=s||i.offset;return{measure:e=>{if(o){n.time=e.time;for(const t in dc){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(s&&s!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(ys(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}wc(n,i)}},notify:t=>e(o?n:t)}}const bc=new WeakMap,Sc=new WeakMap,Ac=new WeakMap,Vc=new WeakMap,Pc=t=>t===document.scrollingElement?window:t;function Mc(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Ac.get(e);s||(s=new Set,Ac.set(e,s));const o=Tc(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!bc.has(e)){const t={time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n=()=>{!function(t,e,n){for(const i in dc)fc(t,i,e,n);e.time=n}(e,t,N.timestamp);for(const e of s)e.measure(t);Kt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>Kt.read(n);bc.set(e,o);const r=Pc(e);window.addEventListener("resize",o),e!==document.documentElement&&Sc.set(e,$o(e,o)),r.addEventListener("scroll",o),o()}if(n&&!Vc.has(e)){const t=bc.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=Kt.read(i,!0);Vc.set(e,s)}const r=bc.get(e);return Kt.read(r,!1,!0),()=>{Yt(r);const t=Ac.get(e);if(!t)return;if(t.delete(o),t.size)return;Ac.delete(e);const n=bc.get(e);bc.delete(e),n&&(Pc(e).removeEventListener("scroll",n),Sc.get(e)?.(),window.removeEventListener("resize",n));const i=Vc.get(e);i&&(Yt(i),Vc.delete(e))}}const Ec=new Map;const kc=t=>{if(/v/u.test(t))return[];const e=vc(t,0,0,0);return[vc(t,0,1,0)-e,e-vc(t,1,0,0),e]},Dc=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function Cc(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=xc.All){if(2!==t.length)return;const[e,n]=t.map(kc),i=[Dc(e),Dc(n)],s=n[0]-e[0],o=e[1]-n[1];return i[0]&&i[1]&&(s||o)?{points:i,a:s,b:o,cover:!e[0]&&1===s&&1===o}:void 0}(e.offset),r=function(t){return"undefined"!=typeof window&&(t?Dn():kn())}(n)&&(n?!!o:!e.offset),a=new Map,l=new Set;let c,u=!1;const h=(t,e)=>{const[n,i]=o.points;e.effect.updateTiming({direction:u?"normal"===t?"reverse":"alternate-reverse":t}),Object.assign(e,{rangeStart:u?i:n,rangeEnd:u?n:i}),e.play()},d=[t.attachTimeline({get timeline(){return r?function({container:t,target:e,axis:n}){let i=Ec.get(t);i||(i=new Map,Ec.set(t,i));const s=e??"self";let o=i.get(s);return o||(o={},i.set(s,o)),o[n]||(o[n]=e?new ViewTimeline({subject:e,axis:n}):new ScrollTimeline({source:t,axis:n}))}(e):void 0},onAttach:o&&(t=>{const e=t.effect.getTiming().direction;a.set(t,e),h(e,t)}),observe:t=>(t.pause(),l.add(t),c||(c=Mc(t=>{l.forEach(e=>{e.time=e.iterationDuration*t[s].progress})},e)),()=>l.delete(t))})];if(r&&o){const{a:t,b:e}=o,r="y"===s?"clientHeight":"clientWidth",l=()=>{u!==(u=t*n[r]+e*i[r]<0)&&a.forEach(h)};l(),t*e<0&&d.push($o(l),$o([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const Rc={some:0,all:1};const Bc=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=li,t.DOMKeyframesResolver=rs,t.DOMVisualElement=Yr,t.DocumentProjectionNode=Cl,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Ga,t.GroupAnimation=ci,t.GroupAnimationWithThen=hi,t.HTMLProjectionNode=Ll,t.HTMLVisualElement=qr,t.JSAnimation=Fe,t.KeyframeResolver=An,t.LayoutAnimationBuilder=zl,t.MotionGlobalConfig=o,t.MotionValue=vi,t.MotionValueState=Ts,t.NativeAnimation=In,t.NativeAnimationExtended=$n,t.NativeAnimationWrapper=di,t.NodeStack=qa,t.ObjectVisualElement=class extends Kr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends Yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kr}getBaseTargetFromProps(t,e){return un.has(e)?super.getBaseTargetFromProps(t,e)??on(e):t[e]}getDefaultValue(t){return un.has(t)?this.latestValues[t]??on(t):void 0}readValueFromInstance(t,e){if(un.has(e)){const t=Xe(e);return t&&t.default||0}if(Ls.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Zr.has(e)?e:Gi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ta(t,e,n)}build(t,e,n){js(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Qr(t,e,0,i)}mount(t){this.isSVGTag=Jr(t.tagName),super.mount(t)}},t.SubscriptionManager=p,t.ViewTransitionBuilder=Vr,t.VisualElement=Kr,t.acceleratedValues=Yn,t.addAttrValue=Os,t.addDomEvent=Ka,t.addEffect=ds,t.addSVGValue=Is,t.addScaleCorrector=function(t){for(const e in t)Xr[e]=t[e],Y(e)&&(Xr[e].isCSSVariable=!0)},t.addStyleValue=Ps,t.addUniqueItem=e,t.addValueToWillChange=Yi,t.alpha=Z,t.analyseComplexValue=Tt,t.animate=cc,t.animateEffectSubject=gs,t.animateElement=ho,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Kl(t,e,n);return new zl(i,s,o)},t.animateMini=hc,t.animateMotionValue=Ei,t.animateSingleValue=za,t.animateTarget=Ji,t.animateValue=function(t){return new Fe(t)},t.animateValues=ms,t.animateVariant=Qi,t.animateView=function(t,e={}){return new Vr(t,e)},t.animateVisualElement=ts,t.animationMapKey=fi,t.anticipate=M,t.applyAxisDelta=Js,t.applyBoxDelta=Qs,t.applyGeneratorOptions=Fn,t.applyPointDelta=Zs,t.applyPxDefaults=cs,t.applyTreeDeltas=no,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=Ci(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=Ci(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Di(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Di(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?x(-180,180,d-h):0;return t=>{const e={x:ki(t,i.x,u.x,r.x),y:ki(t,i.y,u.y,r.y)};if(s){const n=Di(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=x(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,f=e({x:u,y:h},{x:d,y:p}),m=void 0!==f(0).rotate?t.getValue("pathRotation",0):void 0,g={delay:s,...Ti(i||{},"x")};delete g.path;const y=xi(0);y.start(Ei("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=f(t/1e3);r?.set(e.x),a?.set(e.y),m&&void 0!==e.rotate&&m.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),m?.set(0)},onStop:()=>m?.set(0),onCancel:()=>m?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=ka,t.attachFollow=Jo,t.attachSpring=tr,t.attrEffect=Fs,t.axisDeltaEquals=Da,t.axisEquals=Va,t.axisEqualsRounded=Ma,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Pa,t.boxEqualsRounded=Ea,t.buildHTMLStyles=Ds,t.buildProjectionTransform=ja,t.buildSVGAttrs=js,t.buildSVGPath=Bs,t.buildTransform=Qn,t.calcAxisDelta=ha,t.calcBoxDelta=da,t.calcChildStagger=gi,t.calcGeneratorDuration=qt,t.calcLength=ca,t.calcRelativeAxis=pa,t.calcRelativeAxisPosition=ma,t.calcRelativeBox=fa,t.calcRelativePosition=ga,t.camelCaseAttributes=Zr,t.camelToDash=Gi,t.cancelFrame=Yt,t.cancelMicrotask=go,t.cancelSync=Gl,t.checkVariantsDidChange=ia,t.circIn=E,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=cl,t.collectMotionValues=yi,t.color=ft,t.compareByDepth=Ya,t.complex=At,t.containsCSSVariable=_,t.convertBoundingBoxToBox=zs,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Se,t.copyAxisDeltaInto=la,t.copyAxisInto=ra,t.copyBoxInto=aa,t.correctBorderRadius=Ba,t.correctBoxShadow=La,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ts(t,e,n))),n=sa(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,c=i||s,u=[],h=new Set;let d={},p=1/0,f=t;do{f=!1!==f.props.inherit&&f.parent}while(f&&!f.isControllingVariants);if(na.forEach((e,i)=>{const s=n[e],m=r[e],g=f&&f.props[e],y=void 0!==m?m:Rr(g)||!1===g?g:void 0,v=Rr(y),x=e===o?s.isActive:null;!1===x&&(p=i);const w=v&&void 0===m&&!(c&&l);if(s.protectedKeys={...d},!s.isActive&&null===x||!y&&!s.prevProp||Cr(y)||"boolean"==typeof y)return;if("exit"===e&&s.isActive&&!0!==x)return void(d={...d,...s.prevResolvedValues});const T=ia(s.prevProp,y);let b=T||v&&(x&&!w||i>p),S=!1;const A=Array.isArray(y)?y:[y];let V={};if(!1!==x)for(const n of A){const{transition:i,transitionEnd:s,...o}=Oi(t,n,Fi(t,e))||{};V={...V,...o,...s}}const{prevResolvedValues:P}=s;for(const e in{...P,...V}){if(e in d)continue;const n=V[e],i=P[e],o=Array.isArray(n)&&Array.isArray(i)?!ea(n,i)||T:n!==i;if(o&&null==n)h.add(e);else if(o||void 0!==n&&h.has(e)){b=!0,h.delete(e)&&(S=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0}if(s.prevProp=y,s.prevResolvedValues=V,s.isActive&&(d={...d,...V}),b&&(!w||!T||S))for(const n of A){const i={type:e};if("string"==typeof n&&c&&l&&a?.enteringChildren){const e=Oi(a,n)?.transition?.delayChildren;i.delay=gi(a.enteringChildren,t,e)}u.push({animation:n,options:i})}}),h.size){const{initial:e}=r,n={},i="boolean"!=typeof e&&Oi(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom);i&&i.transition&&(n.transition=i.transition),h.forEach(s=>{const o=t.getValue(s);o&&(o.liveStyle=!0);const a=i&&!Array.isArray(e)?i[s]:void 0,l=t.getBaseTargetFromProps(r,s);n[s]=(void 0!==a?a:void 0===l||zi(l)?void 0===t.initialValues[s]?t.baseTarget[s]:void 0:l)??null}),u.push({animation:n})}const m=c&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!m&&u.length?e(u):Promise.resolve()}return{animateChanges:o,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=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=sa(),s=!0}}},t.createAxis=Er,t.createAxisDelta=Pr,t.createBox=kr,t.createDelta=Mr,t.createEffect=bs,t.createGeneratorEasing=Zt,t.createProjectionNode=ol,t.createRenderBatcher=zt,t.createScopedAnimate=lc,t.cubicBezier=T,t.cubicBezierAsString=Rn,t.defaultEasing=Ae,t.defaultOffset=be,t.defaultTransformValue=on,t.defaultValueTypes=Ge,t.degrees=at,t.delay=Ha,t.delayInSeconds=Ha,t.dimensionValueTypes=ns,t.distance=Bc,t.distance2D=function(t,e){const n=Bc(t.x,e.x),i=Bc(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Ca,t.easeIn=C,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=I,t.fillOffset=Te,t.fillWildcards=qe,t.findDimensionValueType=is,t.findEffect=fs,t.findValueType=t=>er.find(es(t)),t.flushKeyframeResolvers=Sn,t.followValue=function(t,e){const n=xi(zi(t)?t.get():t);return Jo(n,t,e),n},t.frame=Kt,t.frameData=N,t.frameSteps=Gt,t.generateLinearEasing=Ht,t.getAnimatableNone=_e,t.getAnimationMap=mi,t.getComputedStyle=Do,t.getDefaultTransition=Vi,t.getDefaultValueType=Xe,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return zr},t.getFinalKeyframe=Ee,t.getMixer=Ot,t.getOptimisedAppearId=_i,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=qn,t.getValueTransition=Ti,t.getVariableValue=Li,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<oa;t++){const i=Lr[t],s=e.props[i];(Rr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=pr,t.getViewAnimations=fr,t.globalProjectionState=Ja,t.handOffElementState=po,t.has2DTranslate=Hs,t.hasComplexValues=wt,t.hasReducedMotionListener=Nr,t.hasScale=Gs,t.hasTransform=Xs,t.hasWarned=function(t){return y.has(t)},t.hex=ot,t.hover=function(t,e,n={}){const[i,s,o]=xo(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||vo())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=pt,t.hslaToRgba=Pt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=xs(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Rc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=xe,t.initPrefersReducedMotion=Ur,t.interpolate=we,t.invariant=s,t.invisibleValues=Bt,t.isAnimationControls=Cr,t.isBezierDefinition=O,t.isCSSVariableName=Y,t.isCSSVariableToken=X,t.isControllingVariants=jr,t.isDeltaZero=Aa,t.isDragActive=vo,t.isDragging=yo,t.isEasingArray=L,t.isElementKeyboardAccessible=So,t.isElementTextInput=function(t){return Ao.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=Hr,t.isGenerator=On,t.isHTMLElement=ys,t.isKeyframesTarget=Ni,t.isMotionValue=zi,t.isNear=ua,t.isNodeOrChild=wo,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=To,t.isSVGElement=vs,t.isSVGSVGElement=Ko,t.isSVGTag=Jr,t.isTransitionDefined=Mi,t.isVariantLabel=Rr,t.isVariantNode=Or,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Cn()||!e||"string"==typeof e&&(e in Bn||Cn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ki,t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=Kn,t.mapEasingToNativeEasing=Ln,t.mapValue=function(t,e,n,i){const s=Yo(e,n,i);return Qo(()=>s(t.get()))},t.maxGeneratorDuration=_t,t.measurePageBox=function(t,e,n){const i=ao(t,n),{scroll:s}=e;return s&&(io(i.x,s.offset.x),io(i.y,s.offset.y)),i},t.measureViewportBox=ao,t.memo=c,t.microtask=mo,t.millisecondsToSeconds=m,t.mirrorEasing=b,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Nt,t.mixImmediate=Mt,t.mixLinearColor=kt,t.mixNumber=Et,t.mixObject=It,t.mixValues=Ia,t.mixVisibility=Lt,t.motionValue=xi,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Rl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=q,t.numberValueTypes=Ye,t.optimizedAppearDataAttribute=Hi,t.optimizedAppearDataId=Xi,t.originProps=As,t.parseAnimateLayoutArgs=Kl,t.parseCSSVariable=Bi,t.parseValueFromTransform=rn,t.percent=lt,t.pipe=h,t.pixelsToPercent=Ra,t.positionalKeys=Ii,t.prefersReducedMotion=Ir,t.press=function(t,e,n={}){const[i,s,o]=xo(t,n),r=t=>{const i=t.currentTarget;if(!Eo(t))return;if(ko.has(t))return;Vo.add(i),n.stopPropagation&&ko.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Vo.has(i)&&Vo.delete(i),Eo(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||wo(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ys(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Po(()=>{if(Vo.has(n))return;Mo(n,"down");const t=Po(()=>{Mo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Mo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),So(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=dt,t.propEffect=fo,t.propagateDirtyNodes=ll,t.px=ct,t.readSVGValue=Ns,t.readStyleValue=Ms,t.readTransformValue=an,t.recordStats=function(){if(zo.value)throw zo.value=null,zo.addProjectionMetrics=null,new Error("Stats are already being measured");const t=zo;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.removeAxisDelta=va,t.removeAxisTransforms=xa,t.removeBoxTransforms=ba,t.removeEffect=ps,t.removeItem=n,t.removePointDelta=ya,t.renderHTML=Gr,t.renderSVG=Qr,t.resize=$o,t.resolveElements=xs,t.resolveMotionValue=_a,t.resolveTransition=wi,t.resolveVariant=Oi,t.resolveVariantFromProps=ji,t.reverseEasing=S,t.rgbUnit=it,t.rgba=st,t.rootProjectionNode=Bl,t.round=Oe,t.sampleDelta=Un,t.scale=J,t.scaleCorrectors=Xr,t.scalePoint=qs,t.scrapeHTMLMotionValuesFromProps=_r,t.scrapeSVGMotionValuesFromProps=ta,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return u;const o={axis:e,container:n||i,...s};return"function"==typeof t?Mc(n=>t(n[e].progress,n),o):Cc(t,o)},t.scrollInfo=Mc,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?yo[t]?null:(yo[t]=!0,()=>{yo[t]=!1}):yo.x||yo.y?null:(yo.x=yo.y=!0,()=>{yo.x=yo.y=!1})},t.setFeatureDefinitions=function(t){zr=t},t.setStyle=Pn,t.setTarget=$i,t.spring=ve,t.springValue=function(t,e){const n=xi(zi(t)?t.get():t);return tr(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i,grid:s}={}){const o={};return(r,a)=>{let l=o[a];if(!l){const[t,e]=s||[1/0,1],i=Math.min(t,a)-1,r=Math.max(e,Math.ceil(a/t))-1,c="number"==typeof n,u="first"===n?0:"last"===n?1:.5,h=c?n%t:i*u,d=c?Math.floor(n/t):r*u;l=o[a]=[];for(let e=0;e<a;e++){const s=e%t,o=Math.floor(e/t),a=Math.min(s,i-s),c=Math.min(o,r-o);if("random"===n){const t=Math.random()*(e+1)|0;l[e]=l[t],l[t]=e}else l[e]="edges"===n?Math.min(i?a:c,r?c:a):Math.hypot(s-h,o-d)}l.push(s?Math.max(...l):a)}let c=t*l[r];const u=t*l[a];if(i&&u){c=I(i)(c/u)*u}return e+c}},t.startWaapiAnimation=jn,t.statsBuffer=zo,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=ks,t.styleSubjectEffect=Es,t.supportedWaapiEasing=Bn,t.supportsBrowserAnimation=_n,t.supportsFlags=Mn,t.supportsLinearEasing=Cn,t.supportsPartialKeyframes=us,t.supportsScrollTimeline=kn,t.supportsViewTimeline=Dn,t.supportsWaapi=Hn,t.svgEffect=Us,t.svgSubjectEffect=Ws,t.sync=Yl,t.testValueType=es,t.time=$,t.transform=Yo,t.transformAxis=so,t.transformBox=ro,t.transformBoxPoints=Ks,t.transformPropOrder=cn,t.transformProps=un,t.transformValue=Qo,t.transformValueTypes=Ke,t.translateAxis=io,t.updateMotionValuesFromProps=Fr,t.variantPriorityOrder=Br,t.variantProps=Lr,t.velocityPerSecond=g,t.vh=ut,t.visualElementStore=Dr,t.vw=ht,t.warnOnce=v,t.warning=()=>{},t.wrap=x});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;let s=()=>{};const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>this.remove(t)}remove(t){n(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 f=t=>1e3*t,m=t=>t/1e3,g=(t,e)=>e?t*(1e3/e):0,y=new Set;function v(t,e,n){t||y.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),y.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function T(t,e,n,i){return t===e&&n===i?u:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=w(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(w(a+1e-7,t,n)-s-i)}return w(a,e,i)}}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),M=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=S(E),D=b(E),C=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:B,easeOut:R,circIn:E,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:M},I=t=>{if(O(t)){t.length;const[e,n,i,s]=t;return T(e,n,i,s)}return"string"==typeof t?F[t]:t},N={delta:0,timestamp:0,isProcessing:!1};let W;function U(){W=void 0}const $={now:()=>(void 0===W&&$.set(N.isProcessing||o.useManualTiming?N.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(U)}},z=t=>Math.round(1e5*t)/1e5,K=t=>e=>"string"==typeof e&&e.startsWith(t),Y=K("--"),X=K("var(--"),G=t=>!!X(t)&&H.test(t.split("/*")[0].trim()),H=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Z={...q,transform:t=>i(0,1,t)},J={...q,default:1},Q=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,et=(t,e)=>n=>Boolean("string"==typeof n&&tt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),nt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Q);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},it={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},st={test:et("rgb","red"),parse:nt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+it.transform(t)+", "+it.transform(e)+", "+it.transform(n)+", "+z(Z.transform(i))+")"};const ot={test:et("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:st.transform},rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ct=rt("px"),ut=rt("vh"),ht=rt("vw"),dt=(()=>({...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}))(),pt={test:et("hsl","hue"),parse:nt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform(z(e))+", "+lt.transform(z(n))+", "+z(Z.transform(i))+")"},ft={test:t=>st.test(t)||ot.test(t)||pt.test(t),parse:t=>st.test(t)?st.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?st.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=ft.parse(t);return e.alpha=0,ft.transform(e)}},mt=new RegExp(Q.source),gt=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const yt="number",vt="color",xt=/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+)(?![a-z]*\()/giu;function wt(t){const e=t.toString();return mt.test(e)||gt.test(e)}function Tt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(xt,t=>(ft.test(t)?(i.color.push(o),s.push(vt),n.push(ft.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(yt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function bt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===yt?z(i[o]):t===vt?ft.transform(i[o]):i[o]}return s}}const St=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:ft.test(n)?ft.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(mt.test(t)||gt.test(t))},parse:function(t){return Tt(t).values},createTransformer:function(t){return bt(Tt(t))},getAnimatableNone:function(t){const e=Tt(t);return bt(e)(e.values.map((t,n)=>St(t,e.split[n])))}};function Vt(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 Pt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Vt(a,i,t+1/3),o=Vt(a,i,t),r=Vt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Mt(t,e){return n=>n>0?e:t}const Et=(t,e,n)=>t+(e-t)*n,kt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,st,pt];function Ct(t){const e=(n=t,Dt.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===pt&&(i=Pt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Mt(t,e);const s={...n};return t=>(s.red=kt(n.red,i.red,t),s.green=kt(n.green,i.green,t),s.blue=kt(n.blue,i.blue,t),s.alpha=Et(n.alpha,i.alpha,t),st.transform(s))},Bt=new Set(["none","hidden"]);function Lt(t,e){return Bt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>Et(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?G(t)?Mt:ft.test(t)?Rt:Nt:Array.isArray(t)?Ft:"object"==typeof t?ft.test(t)?Rt:It:Mt}function Ft(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function It(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ot(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=At.createTransformer(e),i=Tt(t),s=Tt(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?Bt.has(t)&&!s.values.length||Bt.has(e)&&!i.values.length?Lt(t,e):h(Ft(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):Mt(t,e)},Wt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Et(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Wt.exec(t);if(!n)return;const i=Wt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>z(Et(o,r,t))+s}(t,e);if(n)return n}return Ot(t)(t,e)}const $t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,s=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new Set;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(n.add(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const r=o.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=s?1e3/60:Math.max(Math.min(a-n.timestamp,40),1)),n.timestamp=a,n.isProcessing=!0,l.process(n),c.process(n),u.process(n),h.process(n),d.process(n),p.process(n),f.process(n),m.process(n),n.isProcessing=!1,i&&e&&(s=!1,t(g))};return{schedule:$t.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(i||(i=!0,s=!0,n.isProcessing||t(g)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:Kt,cancel:Yt,steps:Xt}=zt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0,N),Gt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Kt.update(e,t),stop:()=>Yt(e),now:()=>N.isProcessing?N.timestamp:$.now()}},Ht=(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,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function Zt(t,e=100,n){const{keyframes:i,velocity:s}=t,o=i&&i[i.length-1]-i[0],r=n({...t,velocity:s&&o?s*e/o:s,keyframes:[0,e]}),a=Math.min(qt(r),_t);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=100,Qt=10,te=1,ee=800,ne=.3,ie=.3,se={granular:.01,default:2},oe={granular:.005,default:.5},re=.01,ae=10,le=.05,ce=t=>t<0?1/Math.max(1+t,le):Math.max(1-t,le);function ue(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return pe(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function he(t,e){return t*Math.sqrt(1-e*e)}const de=12;function pe(t,e,n){let i=n;for(let n=1;n<de;n++)i-=t(i)/e(i);return i}const fe=.001;const me=(t,e)=>(e?t>=0:t>0)&&t<1/0;function ge(t,e){if(me(t,e))return t}function ye(t){const e=ge(t.stiffness),n=ge(t.damping,!0),s=ge(t.mass),o={...t,stiffness:e??Jt,damping:n??Qt,mass:s??te,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=ce(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*ue(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=ee,bounce:e=ne}){let n,s;const o=ce(e);t=i(re,ae,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=he(e,o),r=Math.exp(-i);return fe-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=he(e*e,o);return(-n(e)+fe>0?-1:1)*-s*r/a}):(n=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=pe(n,s,5/t),a=r*ue(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:f(t)}}(o)),o.isResolvedFromDuration=!0;me(o.stiffness)&&me(o.damping,!0)||(o.stiffness=Jt,o.damping=Qt)}return o}function ve(t=ie,e=ne){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:r,damping:a,mass:l,duration:c,isResolvedFromDuration:u,isTimeDefined:h}=ye({...n}),d=t=>h?0:-m(t),p=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=p*g,v={target:s,delta:s-i,velocity:d(n.velocity||0)||0,restSpeed:0,restDelta:0},x=()=>{const t=Math.abs(v.delta)<5;v.restSpeed=n.restSpeed||(t?se.granular:se.default),v.restDelta=n.restDelta||(t?oe.granular:oe.default)};let w,T,b;if(x(),p<1){const t=he(g,p),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{e.A=(v.velocity+y*v.delta)/t,e.sinC=y*e.A+v.delta*t,e.cosC=y*v.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-y*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};w=t=>(n(t),v.target-e.env*(e.A*e.sin+v.delta*e.cos)),T=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===p){w=t=>v.target-Math.exp(-g*t)*(v.delta+(v.velocity+g*v.delta)*t);const t={C:0};b=()=>{t.C=v.velocity+g*v.delta},T=e=>Math.exp(-g*e)*(g*t.C*e-v.velocity)}else{const t=g*Math.sqrt(p*p-1),e=y-t,n=y+t,i=h?1/0:300/t,s=(t,e)=>Math.exp(e>i?-t*i-y*(e-i):-t*e),o={S:0,F:0};b=()=>{const e=(v.velocity+y*v.delta)/t;o.S=(v.delta+e)/2,o.F=(v.delta-e)/2},w=t=>v.target-o.S*s(e,t)-o.F*s(n,t),T=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}b();const S=u&&c||null,A={calculatedDuration:S,retarget:(t,e)=>{v.target=t[t.length-1],v.delta=v.target-t[0],v.velocity=d(e),n.restSpeed&&n.restDelta||x(),A.calculatedDuration=S,o.done=!1,b()},velocity:t=>f(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=f(T(t));o.done=Math.abs(n)<=v.restSpeed&&Math.abs(v.target-e)<=v.restDelta}return o.value=o.done?v.target:e,o},toString:()=>{const t=Math.min(qt(A),_t),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}function xe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===r?m:r(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:g+e};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=ve({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function we(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,n){const i=[],s=n||o.mix||Ut,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=h(t,o)}i.push(o)}return i}(e,s,r),p=c.length,f=n=>{if(l&&n<t[0])return e[0];let i=0;if(p>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=d(t[i],t[i+1],n);return c[i](s)};return n?e=>f(i(t[0],t[a-1],e)):f}function Te(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Et(n,1,s))}}function be(t){const e=[0];return Te(e,t.length-1),e}function Se(t,e){return t.map(t=>t*e)}function Ae(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=L(s)?s.map(I):I(s)||B,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(r)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,s]=e,l=n===s?void 0:(o.mix||Ut)(n,s);return{calculatedDuration:t,next:e=>(a.value=l?l(r(t>0?i(0,1,e/t):1)):s,a.done=e>=t,a)}}const l=we(Se(n&&n.length===e.length?n:be(e),t),e,{ease:Array.isArray(r)?r:Ae(e,r)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}ve.applyToOptions=t=>{const e=Zt(t,100,ve);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};function Pe(t,e,n=0){return e<=0?n:t.velocity?t.velocity(e):function(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const Me=t=>null!==t;function Ee(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Me),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:xe,inertia:xe,tween:Ve,keyframes:Ve,spring:ve};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}const Ce=(t,e)=>e-t>40&&!o.useManualTiming?e:t;function Re(t,e){return{kind:t,animation:e,timestamp:$.now(),frameTimestamp:N.timestamp,frameIsProcessing:N.isProcessing}}function Be(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Re("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Le{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const je=t=>t/100,Oe=t=>Math.round(1e4*t)/1e4;class Fe extends Le{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==$.now()&&this.tick($.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Be(this,this.options)}initAnimation(){const{options:t}=this;De(t);const{type:e=Ve,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ve;a!==Ve&&"number"!=typeof r[0]&&(this.mixKeyframes=h(je,Ut(r[0],r[1])),r=[0,100]);const l=a(r===t.keyframes?t:{...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=qt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}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,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Ce(this.startTime,t)),this.pendingStartTime=void 0,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 u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||null===s||(p=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const f=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return f&&a!==xe&&(d.value=Ee(r,this.options,c,this.speed)),l&&l(d.value),f&&this.finish(),d}at(t){return this.holdTime??Oe((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==xe?Ee(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,e){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,f=n;if(c){const e=Math.min(t,s)/a;let n=Math.floor(e),o=e%1;!o&&e>=1&&(o=1),1===o&&n--,n=Math.min(n,c+1);Boolean(n%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(f=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=f.next(p),o&&!e&&(d.value=o(d.value)),d}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(this.currentTime)}set time(t){t=f(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime($.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Gt,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.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=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($.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 Ie=new Set(["brightness","contrast","saturate","opacity"]);function Ne(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Q)||[];if(!i)return t;const s=n.replace(i,"");let o=Ie.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const We=/\b([a-z-]*)\(.*?\)/gu,Ue={...At,getAnimatableNone:t=>{const e=t.match(We);return e?e.map(Ne).join(" "):t}},$e={...At,getAnimatableNone:t=>{const e=At.parse(t);return At.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ze={...q,transform:Math.round},Ke={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:J,scaleX:J,scaleY:J,scaleZ:J,skew:at,skewX:at,skewY:at,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:Z,originX:dt,originY:dt,originZ:ct},Ye={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,inset:ct,insetBlock:ct,insetBlockStart:ct,insetBlockEnd:ct,insetInline:ct,insetInlineStart:ct,insetInlineEnd:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,paddingBlock:ct,paddingBlockStart:ct,paddingBlockEnd:ct,paddingInline:ct,paddingInlineStart:ct,paddingInlineEnd:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,marginBlock:ct,marginBlockStart:ct,marginBlockEnd:ct,marginInline:ct,marginInlineStart:ct,marginInlineEnd:ct,fontSize:ct,backgroundPositionX:ct,backgroundPositionY:ct,...Ke,zIndex:ze,fillOpacity:Z,strokeOpacity:Z,numOctaves:ze},Xe={...Ye,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:Ue,WebkitFilter:Ue,mask:$e,WebkitMask:$e},Ge=t=>Xe[t],He=new Set([Ue,$e]);function _e(t,e){let n=Ge(t);return He.has(n)||(n=At),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function qe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ze=t=>180*t/Math.PI,Je=t=>{const e=Ze(Math.atan2(t[1],t[0]));return tn(e)},Qe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Je,rotateZ:Je,skewX:t=>Ze(Math.atan(t[1])),skewY:t=>Ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>((t%=360)<0&&(t+=360),t),en=t=>Math.hypot(t[0],t[1]),nn=t=>Math.hypot(t[4],t[5]),sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:en,scaleY:nn,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(en(t)+nn(t))/2,rotateX:t=>tn(Ze(Math.atan2(t[6],t[5]))),rotateY:t=>tn(Ze(Math.atan2(-t[2],t[0]))),rotateZ:Je,rotate:Je,skewX:t=>Ze(Math.atan(t[4])),skewY:t=>Ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function on(t){return t.includes("scale")?1:0}function rn(t,e){if(!t||"none"===t)return on(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=sn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Qe,s=e}if(!s)return on(e);const o=i[e],r=s[1].split(",").map(ln);return"function"==typeof o?o(r):r[o]}const an=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return rn(n,e)};function ln(t){return parseFloat(t.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=(()=>new Set([...cn,"pathRotation"]))(),hn=t=>t===q||t===ct,dn=new Set(["x","y","z"]),pn=cn.filter(t=>!dn.has(t));const fn=new Set(["bottom","right"]);function mn(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const gn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>mn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>mn(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:({transform:t})=>rn(t,"x"),y:({transform:t})=>rn(t,"y")};gn.translateX=gn.x,gn.translateY=gn.y;const yn=new Set;let vn=!1,xn=!1,wn=!1;function Tn(){if(xn){const t=[],e=new Set,n=new Set;yn.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),fn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return pn.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.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)})}xn=!1,vn=!1,yn.forEach(t=>t.complete(wn)),yn.clear()}function bn(){yn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function Sn(){wn=!0,bn(),Tn(),wn=!1}class An{constructor(t,e,n,i,s,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(yn.add(this),vn||(vn=!0,Kt.read(bn),Kt.resolveKeyframes(Tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(r(t)||l(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return _e(e,n)}return t??void 0}(n.readValue(e,o),e,o);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}qe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yn.delete(this)}cancel(){"scheduled"===this.state&&(yn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Vn=t=>t.startsWith("--");function Pn(t,e,n){Vn(e)?t.style.setProperty(e,n):t.style[e]=n}const Mn={};function En(t,e){const n=c(t);return()=>Mn[e]??n()}const kn=En(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Dn=En(()=>void 0!==window.ViewTimeline,"viewTimeline"),Cn=En(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Rn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Bn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function Ln(t,e){return t?"function"==typeof t?Cn()?Ht(t,e):"ease-out":O(t)?Rn(t):Array.isArray(t)?t.map(t=>Ln(t,e)||Bn.easeOut):Bn[t]:void 0}function jn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Ln(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function On(t){return"function"==typeof t&&"applyToOptions"in t}function Fn({type:t,...e}){return On(t)&&Cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class In extends Le{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,t.type;const l=Fn(t);this.animation=jn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ee(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Pn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Be(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,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(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t),e&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&kn()?(this.animation.timeline=t,e?.(this.animation),u):n(this)}}const Nn={anticipate:M,backInOut:P,circInOut:D};function Wn(t){"string"==typeof t.ease&&t.ease in Nn&&(t.ease=Nn[t.ease])}const Un=10;class $n extends In{constructor(t){Wn(t),De(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?($.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Fe({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:e,element:n,name:s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?i(0,10,r):0,l=this.sample(r);n&&s&&Pn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const zn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function Kn(t){t.duration=0,t.type="keyframes"}const Yn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Xn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Gn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Hn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _n(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Yn.has(n)&&!Gn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Hn()&&(Yn.has(n)||Gn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Xn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}const qn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jn=cn.length;function Qn(t,e,n){let i="",s=!0;for(let o=0;o<Jn;o++){const r=cn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=qn(a,Ye[r]);if(!l){s=!1;i+=`${Zn[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${qn(o,Ye.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}const ti=new WeakMap,ei=.001,ni=(t,e)=>t-e,ii=(t,e,n)=>{const i=[];for(let s=0;s<=n;s++)i.push(Et(t,e,s/n));return i},si=t=>t.motionValue.owner,oi=t=>ti.get(t),ri=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ai extends Fe{constructor(t){const e=si(t).current,{driver:n=Gt}=t;let i;const s=function(t){const e=si(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(ri(e,"transform")||"none")||ri(e,"pathRotation")||e.projection?.isProjecting())}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=oi(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=oi(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return oi(si(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt($.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=O(n)?Rn(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&Bn[n];if(r&&!s&&!i&&2===t.length&&e===Ve&&null===this.holdTime){const t=this.startTime+o/this.speed;return[t,t+this.resolvedDuration/this.speed,r]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||Ve)===Ve?u||be(h):[0,1],f=n+r/i,m=[];if(null!==this.holdTime||!(s>0))return m;for(let n=Math.max(0,Math.floor((t-f)*i/s));n<=a;n++){const o=f+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&m.push(a)}}return m}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=$.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const e=t.current,n=new Set,i=new Map;let s={},o=[],r=new Map,a=[],l=!1,c=!1,u=!1,h=!1,p=-1/0;const f=t=>{for(const e of n)if(e.name===t)return!0},m=(e,n)=>{const r={};for(const a of void 0===e?cn:o){const o=i.get(a),l=void 0===e?ri(t,a):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):s[a];void 0!==l&&(r[a]=l)}return r},g=(t,e)=>{let n="";const i=m(t,e);for(const t in i)n+=(Zn[t]||t)+"("+qn(i[t],Ye[t])+") ";return n||"none"},y=(t=m())=>{e.style.transform=Qn(t,{})},v=(t=!0)=>{t&&y(),a.forEach(({animation:t})=>t.cancel()),a=[]},x=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=$.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(t.cancel(),a=a.filter(t=>t!==i)),k.schedule(!1)}),t.oncancel=()=>a.includes(i)&&k.demote(),a.push(i)},w=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},T=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/Un)));if(4*i.length>s)return;const o=ii(e,n,s).concat(i).sort(ni),r=t=>d(e,n,t);let a,l;for(const e of t){const t=o.map(t=>e.numberAt(t)),[n]=t,i=t.map(t=>t-n),s=i[i.length-1],r=i.some(t=>Math.abs(t)*ei>Math.abs(s))?0:s,c=i.map(t=>r?t/r:t);if(r)if(a){if(c.some((t,e)=>!(Math.abs(t-a[e])<=ei)))return}else a=c,l=t=>(e.numberAt(t)-n)/r;else if(c.some(t=>!(Math.abs(t)<=ei)))return}if(!a||a.every((t,e)=>Math.abs(t-r(o[e]))<=ei))return"linear";const c=[],u=(t,e=l(t))=>c.push(Oe(e)+" "+Oe(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&w(l,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+c+")"},b=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...w(t=>i.numberAt(t),e,n));s.push(n)}},a=ii(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(ni))t>l&&r(l,t,0),l=t;return s.sort(ni)},S=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},A=(t,n,i,s={fill:"both"},o,r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=r||T(t,n,i,a),c=l?[n,i]:b(t,n,i,a),u=c.map(t=>g(t,o));let h={transform:u};return l||(h.offset=c.map(t=>d(n,i,t))),u.every(t=>t===u[0])&&(y(m(n,o)),h=null),e.animate(h,{...s,duration:i-n,easing:l||"linear"})},V=l=>{let c=l,u=0,h=0;const d=[],p=[],f=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[e,n]=t.timing(),s=e===1/0;if(r.set(t,[t.at(l),t.speed,s]),s)t.sync();else{if(t.speed<0)return;if(n){if(u){const t=(e-h)/n;if(Math.abs(n-u)>1||Math.abs(t-Math.round(t))*u>1)return}else u=n,h=e;p.push(t)}else f.add(e);d.push(t),c=Math.max(c,e)}}s={},o=cn.filter(e=>{if(i.has(e))return!0;const n=s[e]=ri(t,e);return void 0!==n&&parseFloat(n)!==(e.startsWith("scale")?1:0)}),v(!1);const m=!u&&S(d);try{if(m&&m[1]>l){const[t,e,n]=m;x(A(d,t,e,void 0,void 0,n),t-l,e-t)}else c>l&&(x(A(d,l,c),0,c-l),f.forEach(t=>t<c-1&&x(e.animate(null,{duration:t-l}),0,t-l)));if(u){const t=h+Math.floor((c-h)/u)*u;x(A(p,t,t+u,{iterations:1/0,iterationStart:(c-t)/u,fill:"forwards"},c),c-l)}}catch{return}return a.length||v(),!0},P=t=>{let e,i=0;for(const s of n){const n=r.get(s);if(!n)return!1;const[o,a,l]=n,c=s.at(t),u=s.timing()[0]===1/0;if(l){if(u&&c===o)continue;return!1}const h=(c-o)/a,d=u?0:s.speed/a;if(void 0===e)e=h,i=d;else if(Math.abs(h-e)>1||d!==i)return!1}if(void 0===e)return!0;if(!a.length)return!1;for(const{offset:t,end:n,isDone:i}of a){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:n,offset:s,isDone:o}of a){if(o)continue;const r=e-s;i?(n.playbackRate=i,n.startTime=t-r/i):(n.pause(),n.currentTime=r)}return!0},M=()=>!n.size&&(u=!0,ti.delete(e),k.isJS||v(),!0),E=()=>{const e=$.now();if(k.isJS||(k.isFinishing=!0,n.forEach(n=>{const[i,o]=n.timing();"running"===n.state&&n.speed>0&&!o&&i<=e+1&&(n.complete(),s[n.name]=ri(t,n.name),r.has(n)||(l=!0))}),k.isFinishing=!1),c=!1,u)return;if(n.forEach(({state:t},e)=>{"idle"!==t&&"finished"!==t||n.delete(e)}),M())return;for(const t of n)if(!t.canAccelerate)return k.demote(!0);k.isJS&&(k.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const i=l,o=h;if(l=h=!1,i||!P(e)){if(o){if(e-p<100)return k.demote();p=e}if(!V(e))return k.demote()}},k={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){u||(l||(l=t),h||(h=!!e),c||(c=!0,N.isProcessing?Kt.render(E,!1,!0):queueMicrotask(E)))},release(t){const{state:e}=t;"idle"!==e&&"finished"!==e||n.delete(t),M()||k.schedule(!0)},check(){if(!k.isJS)for(const e in s)if(ri(t,e)!==s[e]&&!f(e))return k.schedule(!0,!0)},demote(t){k.isJS||u||(n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),k.isJS=!0,r=new Map,v(),n.forEach(t=>"running"===t.state&&t.js?.start()))}};return ti.set(e,k),k}(si(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick($.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at($.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class li extends Le{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=$.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,o=t;o.autoplay??(o.autoplay=!0),o.delay??(o.delay=0),o.type??(o.type="keyframes"),o.repeat??(o.repeat=0),o.repeatDelay??(o.repeatDelay=0),o.repeatType??(o.repeatType="loop");const r=s?.KeyframeResolver||An;this.keyframeResolver=new r(e,(t,e,n)=>this.onKeyframesResolved(t,e,o,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=$.now();let h=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=zn(s,e),a=zn(o,e);return!(!r||!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||On(n))&&i)})(t,s,r,a)||(h=!1,!o.instantAnimations&&l||u?.(Ee(t,n,e)),t[0]=t[t.length-1],Kn(n),n.repeat=0);const{onComplete:d}=n;n.finalKeyframe=e,n.keyframes=t,n.onComplete=()=>{d?.(),this.notifyFinished()};const p=h&&!c&&_n(n),f=!p&&(({name:t,motionValue:e})=>t&&cn.includes(t)&&e?.owner?.current instanceof HTMLElement&&Hn()&&Cn())(n);let m;if(i&&(p||f||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Ce(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{m=new $n(n)}catch{m=new Fe(n)}}else m=f?new ai(n):new Fe(n);this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sn()),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()}}class ci{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ui(this.animations,"duration")}get iterationDuration(){return ui(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ui(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class hi extends ci{then(t,e){return this.finished.finally(t).then(()=>{})}}class di extends In{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Be(this,{})}}const pi=new WeakMap,fi=(t,e="")=>`${t}:${e}`;function mi(t){let e=pi.get(t);return e||(e=new Map,pi.set(t,e)),e}function gi(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const yi={current:void 0};class vi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=$.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.notifyChange(),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=$.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){var n;return"change"===t?this.onChangeSubscribe(e):((n=this.events)[t]||(n[t]=new p)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new p,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Kt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;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.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){yi.current&&yi.current.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=$.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xi(t,e){return new vi(t,e)}function wi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ti(t,e){const n=t?.[e]??t?.default??t;return n!==t?wi(n,t):n}const bi={type:"spring",stiffness:500,damping:25,restSpeed:10},Si={type:"keyframes",duration:.8},Ai={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vi=(t,{keyframes:e})=>e.length>2?Si:un.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:bi:Ai,Pi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Mi(t){for(const e in t)if(!Pi.has(e))return!0;return!1}const Ei=(t,e,n,i={},s,r)=>a=>{const l=Ti(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s,hasOnUpdate:!!l.onUpdate};Mi(l)||Object.assign(h,Vi(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Kn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Kn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ee(h.keyframes,l);if(void 0!==t)return void Kt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Fe(h):new li(h)};function ki(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Di(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Ci(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Ri=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bi(t){const e=Ri.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Li(t,e,n=1){const[i,s]=Bi(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return r(t)?parseFloat(t):t}return G(s)?Li(s,e,n+1):s}function ji(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function Oi(t,e,n){return ji(t.getProps(),e,n,t)}const Fi=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Ii=new Set(["width","height","top","left","right","bottom",...cn]),Ni=t=>Array.isArray(t);function Wi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xi(n))}function Ui(t){return Ni(t)?t[t.length-1]||0:t}function $i(t,e){const n=Oi(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Wi(t,e,Ui(o[e]))}}const zi=t=>Boolean(t&&t.getVelocity);function Ki(t){return Boolean(zi(t)&&t.add)}function Yi(t,e){const n=t.getValue("willChange");if(Ki(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Xi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Gi="framerAppearId",Hi="data-"+Xi(Gi);function _i(t){return t.props[Hi]}const qi="undefined"!=typeof window;function Zi({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Ji(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?wi(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&Zi(d,e))continue;const r={delay:n,...Ti(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){Kt.update(()=>i.set(s));continue}let p=!1;if(qi&&window.MotionHandoffAnimation){const n=_i(t);if(n){const t=window.MotionHandoffAnimation(n,e,Kt);null!==t&&(r.startTime=t,p=!0)}}Yi(t,e);const f=c??t.shouldReduceMotion;i.start(Ei(e,i,s,f&&Ii.has(e)?{type:!1}:r,t,p));const m=i.animation;m&&h.push(m)}if(r){const e=()=>Kt.update(()=>{r&&$i(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Qi(t,e,n={}){const i=Oi(t,e,Fi(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Ji(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(Qi(t,e,{...n,delay:i+("function"==typeof r?0:r)+gi(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ts(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>Qi(t,e,n))):"string"==typeof e?Qi(t,e,n):Promise.all(Ji(t,Oi(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const es=t=>e=>e.test(t),ns=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],is=t=>ns.find(es(t));function ss(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const os=new Set(["auto","none","0"]);class rs extends An{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(_(e?t[e]:i))return!1;return!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(),G(i))){const s=Li(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Ii.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=is(i),r=is(s);if(_(i)!==_(s)&&gn[n])this.needsMeasurement=!0;else if(o!==r)if(hn(o)&&hn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else gn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ss(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&&!os.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=_e(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return gn[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const as=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ls=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...as,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function cs(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ls.has(e)&&(t[n]=t[n]+"px")}const us=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),hs=[];function ds(t){"function"==typeof t.test&&t.read,ps(t),hs.unshift(t)}function ps(t){n(hs,t)}function fs(t){return hs.find(e=>e.test(t))}function ms(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Ei(r,c,l,a&&Ii.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):Kt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>Kt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function gs(t,e,n,i,s){return ms(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=xi(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function ys(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function vs(t){return a(t)&&"ownerSVGElement"in t}function xs(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function ws(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=xs(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Ts{constructor(t=Kt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function bs(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Ts(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const Ss={};const As=new Set(["originX","originY","originZ"]),Vs=(t,e)=>qn(t.get(e)?.get(),Ye[e]),Ps=(t,e,n,i)=>{let s,o;if(un.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>cn.indexOf(t)-cn.indexOf(e)))}e.get("transform")||(ys(t)||e.get("transformBox")||Ps(t,e,"transformBox",new vi("fill-box")),e.set("transform",new vi("none"),()=>{ti.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(("number"==typeof o?o:parseFloat(o))!==(s.startsWith("scale")?1:0)&&(e+=(e&&" ")+(Ss[s]||(Ss[s]=(Zn[s]||s)+"("))+qn(o,Ke[s])+")"))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+"rotate("+qn(s,Ke.pathRotation)+")"),e||"none"}(e)})),o=e.get("transform")}else As.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new vi(""),()=>{const n=Vs(e,"originX")??"50%",i=Vs(e,"originY")??"50%",s=Vs(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Vn(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=qn(i.getCurrent(),Ye[n])};return e.set(n,i,s,o)},Ms=(t,e)=>{if(un.has(e))return an(t,e);const n=getComputedStyle(t),i=Vn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Es=bs(Ps,{test:t=>ys(t)||vs(t),read:Ms}),ks=ws(Es);function Ds(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(un.has(t))r=!0;else if(Y(t))s[t]=n;else{const e=qn(n,Ye[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Qn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Cs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rs={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Cs:Rs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ls=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function js(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ds(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Ls)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&Bs(h,s,o,r,!1)}const Os=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Xi(s));const r=Ye[n]||Ye[s],a=o?()=>{t[s]=qn(i.get(),Ye[n])}:()=>{const e=qn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Fs=ws(bs(Os));const Is=(t,e,n,i)=>{if(n.startsWith("path")&&!un.has(n))return function(t,e,n,i){return Kt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new vi("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Os(t,e,n,i,$s(n));return(un.has(n)||As.has(n)||Vn(n)||n in t.style?Ps:Os)(t,e,n,i)},Ns=(t,e)=>un.has(e)?Ye[e]?.default||0:Vn(e)||Ls.includes(e)?Ms(t,e)||t.getAttribute(Xi(e))||0:(e=$s(e),t.getAttribute(Xi(e))??t.getAttribute(e)??void 0),Ws=bs(Is,{test:vs,read:Ns}),Us=ws(Ws);function $s(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function zs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ks(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}}function Ys(t){return void 0===t||1===t}function Xs({scale:t,scaleX:e,scaleY:n}){return!Ys(t)||!Ys(e)||!Ys(n)}function Gs(t){return Xs(t)||Hs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function Hs(t){return _s(t.x)||_s(t.y)}function _s(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function Zs(t,e,n,i,s){return void 0!==s&&(t=qs(t,s,i)),qs(t,n,i)+e}function Js(t,e=0,n=1,i,s){t.min=Zs(t.min,e,n,i,s),t.max=Zs(t.max,e,n,i,s)}function Qs(t,{x:e,y:n}){Js(t.x,e.translate,e.scale,e.originPoint),Js(t.y,n.translate,n.scale,n.originPoint)}const to=.999999999999,eo=1.0000000000001;function no(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(io(t.x,-o.scroll.offset.x),io(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Qs(t,r)),i&&Gs(o.latestValues)&&ro(t,o.latestValues,o.layout?.layoutBox))}e.x<eo&&e.x>to&&(e.x=1),e.y<eo&&e.y>to&&(e.y=1)}function io(t,e){t.min+=e,t.max+=e}function so(t,e,n,i,s=.5){Js(t,e,n,Et(t.min,t.max,s),i)}function oo(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ro(t,e,n){const i=n??t;so(t.x,oo(e.x,i.x),e.scaleX,e.scale,e.originX),so(t.y,oo(e.y,i.y),e.scaleY,e.scale,e.originY)}function ao(t,e){return zs(Ks(t.getBoundingClientRect(),e))}const lo={},co=t=>vs(t)?Ws:Es;class uo{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=rs}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return ao(this.current)}getProps(){return lo}}function ho(t,e,n,i){if(i)return ms(t=>i.getValue(t,null),e,n,i);const s=co(t);return gs(s,t,e,n,new uo(s,t))}function po(t,e){const n=co(t).state(t);if(!n)return;const{transformKeys:i}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&i?.length||e.addValue(n,t)})}const fo=bs((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>a(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:mo,cancel:go}=zt(queueMicrotask,!1),yo={x:!1,y:!1};function vo(){return yo.x||yo.y}function xo(t,e){const n=xs(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const wo=(t,e)=>!!e&&(t===e||wo(t,e.parentElement)),To=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,bo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function So(t){return bo.has(t.tagName)||!0===t.isContentEditable}const Ao=new Set(["INPUT","SELECT","TEXTAREA"]);const Vo=new WeakSet;function Po(t){return e=>{"Enter"===e.key&&t(e)}}function Mo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Eo(t){return To(t)&&!vo()}const ko=new WeakSet;function Do(t,e){const n=window.getComputedStyle(t);return Vn(e)?n.getPropertyValue(e):n[e]}const Co=new WeakMap;let Ro;const Bo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:vs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Lo=Bo("inline","width","offsetWidth"),jo=Bo("block","height","offsetHeight");function Oo({target:t,borderBoxSize:e}){Co.get(t)?.forEach(n=>{n(t,{get width(){return Lo(t,e)},get height(){return jo(t,e)}})})}function Fo(t){t.forEach(Oo)}function Io(t,e){Ro||"undefined"!=typeof ResizeObserver&&(Ro=new ResizeObserver(Fo));const n=xs(t);return n.forEach(t=>{let n=Co.get(t);n||(n=new Set,Co.set(t,n)),n.add(e),Ro?.observe(t)}),()=>{n.forEach(t=>{const n=Co.get(t);n?.delete(e),n?.size||Ro?.unobserve(t)})}}const No=new Set;let Wo;function Uo(t){return No.add(t),Wo||(Wo=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};No.forEach(e=>e(t))},window.addEventListener("resize",Wo)),()=>{No.delete(t),No.size||"function"!=typeof Wo||(window.removeEventListener("resize",Wo),Wo=void 0)}}function $o(t,e){return"function"==typeof t?Uo(t):Io(t,e)}const zo={value:null,addProjectionMetrics:null};function Ko(t){return vs(t)&&"svg"===t.tagName}function Yo(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=we(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Xo=new Set,Go=({timestamp:t})=>{Xo.forEach(e=>e.tick(t))};class Ho extends Le{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Xo.size||Kt.update(Go,!0),Xo.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Ce(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Pe(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():$.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Xo.delete(this),Xo.size||Yt(Go))}}const _o=t=>"number"==typeof t?t:parseFloat(t);function qo(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=_o(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=_o(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new Ho({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),zi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Zo(e,r),!1)):t.set(Zo(e,r))},o=e.on("change",s),a=e.get();_o(a)-_o(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Zo(t,e){return e?t+e:t}function Jo(t,e,n={}){const i={type:"spring",...n};return De(i),i.type=i.type||Ve,qo(t,e,i)}function Qo(t){const e=[];yi.current=e;const n=t();yi.current=void 0;const i=xi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>Kt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Yt(i)})}(e,i,t),i}function tr(t,e,n){return qo(t,e,{...n,type:ve})}const er=[...ns,ft,At];let nr=0;const ir=()=>"motion-view-"+nr++;function sr(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function or(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function rr(t,e,n,i,s,o=[],r,a=[],l){const c=xs(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??ir();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),sr(t,s,o),or(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=ir(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),sr(t,s,o),or(t,d,r,a,l),d})}function ar(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let lr={},cr=null;const ur=(t,e)=>{lr[t]=e},hr=()=>{cr||(cr=document.createElement("style"),cr.id="motion-view");let t="";for(const e in lr){const n=lr[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}cr.textContent=t,document.head.appendChild(cr),lr={}},dr=()=>{cr&&cr.parentElement&&cr.parentElement.removeChild(cr)};function pr(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function fr(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const mr=["layout","enter","exit","new","old"],gr=t=>t.split(" ").every(t=>0===parseFloat(t)),yr={group:["layout"],new:["new","enter"],old:["old","exit"]},vr={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function xr(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new ci([])))();const c=new Map,u=[],h=[],d=[],p=new Set,m=new Map,g=new Set,y=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),f="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let g;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,xs(n)),g=rr(n,c,u,void 0,l,h,f,d,p),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=rr(o.get(n),c,u,w.get(n),l,h,f,d,p)}else g=rr(n,c,u,void 0,l,h,f,d,p);else g=[n];const v=s.get(n);g.forEach((n,i)=>{const s=m.get(n);m.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&y.set(n,v);const o=x.get(n)??{};o[t]=[i,g.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=wr(Ti(l,n),Ti(function(t,e){for(const n of yr[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{const[e,n]=S(t,"group"),i=A(m.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=f(i.duration));const{delay:s=0,duration:o,ease:r}=Fn(i);return{delay:f(s),duration:o,ease:r}},P=new Map,M=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of as)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),E=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||ur(":root",{"view-transition-name":"none"}),ur("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{ur(`::view-transition-group(${t})`,{overflow:"clip"}),ur(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{ur(`::view-transition-group-children(${t})`,{overflow:"clip"})}),hr()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),dr()},C=async()=>{await e(),b("new"),M("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),k()};let R;try{b("old"),M("old"),k(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=fr(),n=[],i=new Set,s=new Set;m.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of mr){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=ar(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[m,g]of Object.entries(d)){if(null==g)continue;if("x"===m||"y"===m){v(!1,`animateView() animates view-transition layers with CSS properties; the "${m}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[m])continue;if("old"===o&&a&&null!=t.exit?.keyframes[m])continue;const d=wr(Ti(l,m),Ti(p,m));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[m]:void 0,n="opacity"===m||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?vr[c]?.[m]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=f(d.duration)),d.delay&&(d.delay=f(d.delay)),n.push(new In({...d,element:document.documentElement,name:m,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===m&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=pr(o);if(!r)continue;const a=m.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new di(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:Ln(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=f(i.duration)),i=Fn(i),h={delay:f(i.delay??0),duration:u&&void 0!==s?f(s):i.duration,easing:u?"linear":Ln(i.ease,i.duration)}}e.updateTiming(h),n.push(new di(t))}P.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of as){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";gr(a)&&gr(l)||n.push(new In({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new ci(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new ci([])),e))})}function wr(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let Tr=[],br=null;function Sr(){br=null;const[t]=Tr;var e;t&&(n(Tr,e=t),br=e,xr(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(Sr))}function Ar(){for(let t=Tr.length-1;t>=0;t--){const e=Tr[t],{interrupt:n}=e.options;if("immediate"===n){const n=Tr.slice(0,t+1).map(t=>t.update),i=Tr.slice(t+1);e.update=()=>{n.forEach(t=>t())},Tr=[e,...i];break}}br&&"immediate"!==Tr[0]?.options.interrupt||Sr()}class Vr{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,Tr.push(n),mo.render(Ar)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Pr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Er=()=>({min:0,max:0}),kr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Dr=new WeakMap;function Cr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Rr(t){return"string"==typeof t||Array.isArray(t)}const Br=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lr=["initial",...Br];function jr(t){if(Cr(t.animate))return!0;for(let e=0;e<Lr.length;e++)if(Rr(t[Lr[e]]))return!0;return!1}function Or(t){return Boolean(jr(t)||t.variants)}function Fr(t,e,n){for(const i in e){const s=e[i],o=n[i];if(zi(s))t.addValue(i,s);else if(zi(o))t.addValue(i,xi(s,{owner:t}));else if(o!==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,xi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Ir={current:null},Nr={current:!1},Wr="undefined"!=typeof window;function Ur(){if(Nr.current=!0,Wr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ir.current=t.matches;t.addEventListener("change",e),e()}else Ir.current=!1}const $r=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zr={};class Kr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=$.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Kt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=jr(e),this.isVariantNode=Or(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&zi(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,Dr.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Nr.current||Ur(),this.shouldReduceMotion=Ir.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Yt(this.notifyUpdate),Yt(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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Yn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new In({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=un.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Kt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),ti.get(this.current)?.check()),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in zr){const e=zr[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){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&ti.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<$r.length;e++){const n=$r[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=Fr(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}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}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=xi(e??this.getDefaultValue?.(t),{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];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=_e(t,e)),this.setBaseTarget(t,zi(n)?n.get():n)),zi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){mo.render(this.render)}}class Yr extends Kr{constructor(){super(...arguments),this.KeyframeResolver=rs}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[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;zi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Xr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}const Gr={};function Hr(t,{layout:e,layoutId:n}){return un.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Gr[t]||"opacity"===t)}function _r(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(zi(i[e])||s&&zi(s[e])||Hr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class qr extends Yr{constructor(){super(...arguments),this.type="html",this.renderInstance=Xr}mount(t){Boolean(t.style),super.mount(t)}readValueFromInstance(t,e){if(un.has(e))return this.projection?.isProjecting?on(e):an(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Y(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ao(t,e)}build(t,e,n){Ds(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _r(t,e,n)}}const Zr=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"]),Jr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Qr(t,e,n,i){Xr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Zr.has(n)?n:Xi(n),e.attrs[n])}function ta(t,e,n){const i=_r(t,e,n);for(const n in t)if("children"!==n&&(zi(t[n])||zi(e[n]))){i[-1!==cn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ea(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 na=[...Br].reverse();function ia(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ea(e,t)}function sa(){const t={};for(const e of Br)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}const oa=Lr.length;function ra(t,e){t.min=e.min,t.max=e.max}function aa(t,e){ra(t.x,e.x),ra(t.y,e.y)}function la(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ca(t){return t.max-t.min}function ua(t,e,n){return Math.abs(t-e)<=n}function ha(t,e,n,i=.5){t.origin=i,t.originPoint=Et(e.min,e.max,t.origin),t.scale=ca(n)/ca(e),t.translate=Et(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function da(t,e,n,i){ha(t.x,e.x,n.x,i?i.originX:void 0),ha(t.y,e.y,n.y,i?i.originY:void 0)}function pa(t,e,n,i=0){const s=i?Et(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+ca(e)}function fa(t,e,n,i){pa(t.x,e.x,n.x,i?.x),pa(t.y,e.y,n.y,i?.y)}function ma(t,e,n,i=0){const s=i?Et(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+ca(e)}function ga(t,e,n,i){ma(t.x,e.x,n.x,i?.x),ma(t.y,e.y,n.y,i?.y)}function ya(t,e,n,i,s){return t=qs(t-=e,1/n,i),void 0!==s&&(t=qs(t,1/s,i)),t}function va(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=Et(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Et(o.min,o.max,i);t===o&&(a-=e),t.min=ya(t.min,e,n,a,s),t.max=ya(t.max,e,n,a,s)}function xa(t,e,[n,i,s],o,r){va(t,e[n],e[i],e[s],e.scale,o,r)}const wa=["x","scaleX","originX"],Ta=["y","scaleY","originY"];function ba(t,e,n,i){xa(t.x,e,wa,n?n.x:void 0,i?i.x:void 0),xa(t.y,e,Ta,n?n.y:void 0,i?i.y:void 0)}function Sa(t){return 0===t.translate&&1===t.scale}function Aa(t){return Sa(t.x)&&Sa(t.y)}function Va(t,e){return t.min===e.min&&t.max===e.max}function Pa(t,e){return Va(t.x,e.x)&&Va(t.y,e.y)}function Ma(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ea(t,e){return Ma(t.x,e.x)&&Ma(t.y,e.y)}function ka(t){return ca(t.x)/ca(t.y)}function Da(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ca(t){return[t("x"),t("y")]}function Ra(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ba={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${Ra(t,e.target.x)}% ${Ra(t,e.target.y)}%`}},La={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=At.parse(t);if(s.length>5)return i;const o=At.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Et(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};function ja(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,rotateZ:a,skewX:l,skewY:c}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`rotateZ(${a}deg) `),l&&(i+=`skewX(${l}deg) `),c&&(i+=`skewY(${c}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Oa=as.length,Fa=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"],Ia=Fa.length,Na=t=>"number"==typeof t||ct.test(t);function Wa(t,e,n,i,s,o){s?(t.opacity=Et(0,n.opacity??1,$a(i)),t.opacityExit=Et(e.opacity??1,0,za(i))):o&&(t.opacity=Et(e.opacity??1,n.opacity??1,i));for(let s=0;s<Oa;s++){const o=as[s];let r=Ua(e,o),a=Ua(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Na(r)===Na(a)?(t[o]=Math.max(Et(_o(r),_o(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<Ia;s++){const o=Fa[s];(e[o]||n[o])&&(t[o]=Et(e[o]||0,n[o]||0,i))}}function Ua(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const $a=Ka(0,.5,k),za=Ka(.5,.95,u);function Ka(t,e,n){return i=>i<t?0:i>e?1:n(d(t,e,i))}function Ya(t,e,n){const i=zi(t)?t:xi(t);return i.start(Ei("",i,e,n)),i.animation}function Xa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const Ga=(t,e)=>t.depth-e.depth;class Ha{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ga),this.isDirty=!1,this.children.forEach(t)}}function _a(t,e){const n=$.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Yt(i),t(o-e))};return Kt.setup(i,!0),()=>Yt(i)}function qa(t,e){return _a(t,f(e))}function Za(t){return zi(t)?t.get():t}class Ja{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Qa={borderRadius:{...Ba,applyTo:[...as]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:La},tl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Gr,{...Qa,...Gr});const el={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},nl=["","X","Y","Z"];let il=0;function sl(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const ol=({instance:t})=>t&&ti.get(t)?.demote();function rl(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=_i(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Kt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&rl(i)}function al({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=il++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,zo.value&&(el.nodes=el.calculatedTargetDeltas=el.calculatedProjections=0),this.nodes.forEach(ul),this.nodes.forEach(wl),this.nodes.forEach(Tl),this.nodes.forEach(hl),zo.addProjectionMetrics&&zo.addProjectionMetrics(el)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ha)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=vs(e)&&!Ko(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;Kt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=_a(s,250),tl.hasAnimatedSinceResize&&(tl.hasAnimatedSinceResize=!1,this.nodes.forEach(xl)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||Pl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!Ea(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Ti(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||xl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Yt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bl),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;ol(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,ol(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(fl),void this.nodes.forEach(pl)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ml);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gl),this.nodes.forEach(yl),this.nodes.forEach(vl),this.nodes.forEach(ll),this.nodes.forEach(cl)):this.nodes.forEach(ml),this.clearAllSnapshots();const t=$.now();N.delta=i(0,1e3/60,t-N.timestamp),N.timestamp=t,N.isProcessing=!0,Xt.update.process(N),Xt.preRender.process(N),Xt.render.process(N),N.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dl),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ca(this.snapshot.measuredBox.x)||ca(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&ol(this);const e=this.projectionDelta&&!Aa(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Gs(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),kl((i=n).x),kl(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Cl))){const{scroll:t}=this.root;t&&(io(e.x,t.offset.x),io(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(aa(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&aa(e,t),io(e.x,s.offset.x),io(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};aa(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(io(i.x,-n.scroll.offset.x),io(i.y,-n.scroll.offset.y)),Gs(n.latestValues)&&ro(i,n.latestValues,n.layout?.layoutBox)}return Gs(this.latestValues)&&ro(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};aa(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Gs(n.latestValues))continue;let i;n.instance&&(Xs(n.latestValues)&&n.updateSnapshot(),i=kr(),aa(i,n.measurePageBox())),ba(e,n.latestValues,n.snapshot?.layoutBox,i)}return Gs(this.latestValues)&&ba(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==N.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=N.timestamp;const o=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fa(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):aa(this.target,this.layout.layoutBox),Qs(this.target,this.targetDelta)):aa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),zo.value&&el.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Xs(this.parent.latestValues)&&!Hs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ga(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),aa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===N.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;aa(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;no(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(la(this.prevProjectionDelta.x,this.projectionDelta.x),la(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),da(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Da(this.projectionDelta.x,this.prevProjectionDelta.x)&&Da(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),zo.value&&el.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Vl));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,f,m,g;i?(r.x.translate=i.x,r.x.scale=Et(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Et(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Sl(r.x,t.x,n),Sl(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ga(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,f=this.relativeTargetOrigin,m=a,g=n,Al(c.x,f.x,m.x,g),Al(c.y,f.y,m.y,g),d&&Pa(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),aa(d,this.relativeTarget)),l&&(this.animationValues=o,Wa(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{tl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ya(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Re("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&Dl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){s=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ca(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+e;const n=ca(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}aa(e,s),ro(e,i),da(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ja);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&sl("z",t,i,this.animationValues);for(let e=0;e<nl.length;e++)sl(`rotate${nl[e]}`,t,i,this.animationValues),sl(`skew${nl[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Za(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Za(e?.pointerEvents)||""),void(this.hasProjected&&!Gs(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=ja(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Gr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Gr[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?Za(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(pl),this.root.sharedNodes.clear()}}}function ll(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Ca(t=>io(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function cl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Ca(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=ca(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";ra(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Dl(s,e.layoutBox,n)&&Ca(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=ca(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};da(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?da(a,t.applyTransform(i,!0),e.measuredBox):da(a,n,e.layoutBox);const l=!Aa(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};ga(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};ga(l,n,o.layoutBox,r),Ea(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ul(t){zo.value&&el.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function hl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function dl(t){t.clearSnapshot()}function pl(t){t.clearMeasurements()}function fl(t){t.isLayoutDirty=!0,t.updateLayout()}function ml(t){t.isLayoutDirty=!1}function gl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function yl(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function vl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wl(t){t.resolveTargetDelta()}function Tl(t){t.calcProjection()}function bl(t){t.resetSkewAndRotation()}function Sl(t,e,n){t.translate=Et(e.translate,0,n),t.scale=Et(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Al(t,e,n,i){t.min=Et(e.min,n.min,i),t.max=Et(e.max,n.max,i)}function Vl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Pl={duration:.45,ease:[.4,0,.1,1]},Ml=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),El=Ml("applewebkit/")&&!Ml("chrome/")?Math.round:u;function kl(t){t.min=El(t.min),t.max=El(t.max)}function Dl(t,e,n){return"position"===t||"preserve-aspect"===t&&!ua(ka(e),ka(n),.2)}function Cl(t){return t!==t.root&&t.scroll?.wasRoot}const Rl=al({attachResizeListener:(t,e)=>Xa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Bl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Ll={current:void 0},jl=al({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ll.current){const t=new Rl({});t.mount(window),t.setOptions({layoutScroll:!0}),Ll.current=t}return Ll.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ol="[data-layout],[data-layout-id]",Fl=new WeakMap;let Il;function Nl(t){const e=[];return t instanceof HTMLElement&&t.matches(Ol)&&e.push(t),t.querySelectorAll(Ol).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Wl(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Ul(t,e){let n=Fl.get(t);if(n)n.setOptions(Wl(t,e));else{let i=Dr.get(t);i||(i=new qr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),po(t,i)),t.style.transform&&!Gs(i.latestValues)&&(t.style.transform=""),n=new jl(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Fl.get(e);if(t&&t.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Wl(t,e),visualElement:i}),n.mount(t),Fl.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function $l(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Fl.delete(t)}function zl(){const t=Il;Il=void 0,function(){if(N.isProcessing)return;const t=$.now();N.delta=i(0,1e3/60,t-N.timestamp),N.timestamp=t,N.isProcessing=!0,Xt.update.process(N),Xt.preRender.process(N),Xt.render.process(N),N.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=Ul(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),mo.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}class Kl{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),Il||(Il=[],queueMicrotask(zl)),Il.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Nl(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Nl(this.scope)){if(this.tracked.has(e))continue;const n=Ul(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next&&i.next.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),$l(n,e)}}),e.relegate())return;n.remove()}$l(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new ci([...t]))}}function Yl(t,e,n){if("function"==typeof t)return{scope:document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:xs(t)[0]??document,updateDom:e,defaultOptions:n}}const Xl=Kt,Gl=$t.reduce((t,e)=>(t[e]=t=>Yt(t),t),{});function Hl(t){return"object"==typeof t&&!Array.isArray(t)}function _l(t,e,n,i){return null==t?[]:"string"==typeof t&&Hl(e)?xs(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function ql(t,e,n){return t*(e+1)+n*e}function Zl(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Jl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Et(o,r,s[n]),easing:j(i,n)})}function Ql(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function tc(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ec(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function nc(t,e){return e[t]||(e[t]=[]),e[t]}function ic(t){return Array.isArray(t)?t:[t]}function sc(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const oc=t=>"number"==typeof t,rc=t=>t.every(oc);function ac(t,e,n,i){const s=[];if(function(t,e){return zi(t)||"number"==typeof t||"string"==typeof t&&!Hl(e)}(t,e))s.push(Ya(t,Hl(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=_l(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a={...n};"delay"in a&&"function"==typeof a.delay&&(a.delay=a.delay(t,r)),i instanceof Element?s.push(...ho(i,e,a,Dr.get(i))):s.push(...gs(fs(i)??fo,i,e,a))}}return s}function lc(t,e,n){const i=[],s=function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,l={},c=new Map;let u=0,h=0,p=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){c.set(r,h);continue}if(!Array.isArray(r)){c.set(r.name,Zl(h,r.at,u,c));continue}let[d,m,g={}]=r;void 0!==g.at&&(h=Zl(h,g.at,u,c));let y=0;const v=(t,n,i,r=0,a=0)=>{const l=ic(t),{delay:c=0,times:u=be(l),type:d=e.type||"keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...x}=n;let{ease:w=e.ease||"easeOut",duration:T}=n;const b="function"==typeof c?c(r,a):c,A=l.length,V=On(d)?d:s?.[d||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&rc(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...x};void 0!==T&&(n.duration=f(T));const i=Zt(n,t,V);w=i.ease,T=i.duration}T??(T=o);const P=h+b;1===u.length&&0===u[0]&&(u[1]=1);const M=u.length-l.length;if(M>0&&Te(u,M),1===l.length&&l.unshift(null),m&&m<20){const t=T>0?v/T:0;T=ql(T,m,v);const e=[...l],n=[...u];w=Array.isArray(w)?[...w]:[w];const i=[...w],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?S(t):t)));for(let a=0;a<m;a++){const c=s&&a%2==0,h=c?o:e,d=c?r:i,p=(a+1)*(1+t);t>0&&(l.push(l[l.length-1]),u.push(p),w.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),w.push(0===t?"linear":j(d,t-1))}Ql(u,m,t)}const E=P+T;Jl(i,l,w,u,P,E),y=Math.max(b+T,y),p=Math.max(E,p)};if(zi(d))v(m,g,nc("default",ec(d,a)));else{const t=_l(d,m,i,l),e=t.length;for(let n=0;n<e;n++){const i=ec(t[n],a);for(const t in m)v(m[t],sc(g,t),nc(t,i),n,e)}}u=h,h+=y}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(tc);const a=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),l.push(d(0,p,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const u=r.get(i);u.keyframes[s]=a;const{type:h,...f}=e;u.transition[s]={...f,duration:p,ease:c,times:l,...n}}}),r}(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=xi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),e,n,{spring:ve});return s.forEach(({keyframes:t,transition:e},n)=>{i.push(...ac(n,t,e))}),i}function cc(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=lc(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=ac(t,o,{...c,...i},e)}var u;const h=new hi(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const uc=Object.assign(cc(),{addEffect:ds,removeEffect:ps});const hc=t=>function(e,n,i){return new hi(function(t,e,n,i){if(null==t)return[];const s=xs(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const s={...Ti(a,t)};s.duration&&(s.duration=f(s.duration)),s.delay&&(s.delay=f(s.delay));const o=mi(i),l=fi(t,s.pseudoElement||""),c=o.get(l);c&&c.stop(),r.push({map:o,key:l,unresolvedKeyframes:n,options:{...s,element:i,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<r.length;t++){const{unresolvedKeyframes:e,options:n}=r[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=Do(i,s)),qe(e),cs(e,s),!o&&e.length<2&&e.unshift(Do(i,s)),n.keyframes=e}const a=[];for(let t=0;t<r.length;t++){const{map:e,key:n,options:i}=r[t],s=new In(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),a.push(s)}return a}(e,n,i,t))},dc=hc(),pc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},fc=new WeakMap;function mc(t,e,n,s){const o=n[e],{length:r,position:a}=pc[e],l=o.current,c=n.time,u=t[`scroll${a}`];o.current=function(t,e){const n=t===document.scrollingElement,i=n&&document.body||t;let s=fc.get(i);s||fc.set(i,s=getComputedStyle(i));const{writingMode:o,flexDirection:r}=s,a="x"===e!==/^[vs]/.test(o);return(a?"rtl"===s.direction!=("sideways-lr"===o):o.endsWith("rl"))!==(!n&&s.display.includes("flex")&&(a!==("c"===r[0])?r:s.flexWrap).endsWith("reverse"))}(t,e)?-u||0:u,o.containerLength=t[`client${r}`],o.targetLength=t[`scroll${r}`],o.scrollLength=o.targetLength-o.containerLength,o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=i(0,1,d(0,o.scrollLength,o.current));const h=s-c;o.velocity=h>50?0:g(o.current-l,h)}const gc={start:0,center:.5,end:1};function yc(t,e,n=0){let i=0;if(t in gc&&(t=gc[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const vc=[0,0];function xc(t,e,n,i){let s=Array.isArray(t)?t:vc,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,gc[t]?t:"0"]),o=yc(s[0],n,i),r=yc(s[1],e),o-r}const wc={All:[[0,0],[1,1]]};function Tc(t,e){const{offset:n=wc.All,axis:s="y"}=e,o=t[s];o.offset.length=0;const r=n.length;for(let t=0;t<r;t++)o.offset[t]=xc(n[t],o.containerLength,o.targetLength,o.targetOffset);o.progress=i(0,1,function(t,e){const n=t.length-1;if(n<1)return 0;const i=t[0]>t[n],s=e=>t[i?n-e:e];if(t[0]===t[1]&&e<s(0))return i?1:0;let o=0;for(;o<n-1&&e>=s(o+1);)o++;const r=(o+d(s(o),s(o+1),e))/n;return i?1-r:r}(o.offset,o.current))}function bc(t,e,n,i={}){const{target:s}=i,o=s||i.offset;return{measure:e=>{if(o){n.time=e.time;for(const t in pc){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(s&&s!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(ys(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}Tc(n,i)}},notify:t=>e(o?n:t)}}const Sc=new WeakMap,Ac=new WeakMap,Vc=new WeakMap,Pc=new WeakMap,Mc=t=>t===document.scrollingElement?window:t;function Ec(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Vc.get(e);s||(s=new Set,Vc.set(e,s));const o=bc(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!Sc.has(e)){const t={time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n=()=>{!function(t,e,n){for(const i in pc)mc(t,i,e,n);e.time=n}(e,t,N.timestamp);for(const e of s)e.measure(t);Kt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>Kt.read(n);Sc.set(e,o);const r=Mc(e);window.addEventListener("resize",o),e!==document.documentElement&&Ac.set(e,$o(e,o)),r.addEventListener("scroll",o),o()}if(n&&!Pc.has(e)){const t=Sc.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=Kt.read(i,!0);Pc.set(e,s)}const r=Sc.get(e);return Kt.read(r,!1,!0),()=>{Yt(r);const t=Vc.get(e);if(!t)return;if(t.delete(o),t.size)return;Vc.delete(e);const n=Sc.get(e);Sc.delete(e),n&&(Mc(e).removeEventListener("scroll",n),Ac.get(e)?.(),window.removeEventListener("resize",n));const i=Pc.get(e);i&&(Yt(i),Pc.delete(e))}}const kc=new Map;const Dc=t=>{if(/v/u.test(t))return[];const e=xc(t,0,0,0);return[xc(t,0,1,0)-e,e-xc(t,1,0,0),e]},Cc=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function Rc(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=wc.All){if(2!==t.length)return;const[e,n]=t.map(Dc),i=[Cc(e),Cc(n)],s=n[0]-e[0],o=e[1]-n[1];return i[0]&&i[1]&&(s||o)?{points:i,a:s,b:o,cover:!e[0]&&1===s&&1===o}:void 0}(e.offset),r=function(t){return"undefined"!=typeof window&&(t?Dn():kn())}(n)&&(n?!!o:!e.offset),a=new Map,l=new Set;let c,u=!1;const h=(t,e)=>{const[n,i]=o.points;e.effect.updateTiming({direction:u?"normal"===t?"reverse":"alternate-reverse":t}),Object.assign(e,{rangeStart:u?i:n,rangeEnd:u?n:i}),e.play()},d=[t.attachTimeline({get timeline(){return r?function({container:t,target:e,axis:n}){let i=kc.get(t);i||(i=new Map,kc.set(t,i));const s=e??"self";let o=i.get(s);return o||(o={},i.set(s,o)),o[n]||(o[n]=e?new ViewTimeline({subject:e,axis:n}):new ScrollTimeline({source:t,axis:n}))}(e):void 0},onAttach:o&&(t=>{const e=t.effect.getTiming().direction;a.set(t,e),h(e,t)}),observe:t=>(t.pause(),l.add(t),c||(c=Ec(t=>{l.forEach(e=>{e.time=e.iterationDuration*t[s].progress})},e)),()=>l.delete(t))})];if(r&&o){const{a:t,b:e}=o,r="y"===s?"clientHeight":"clientWidth",l=()=>{u!==(u=t*n[r]+e*i[r]<0)&&a.forEach(h)};l(),t*e<0&&d.push($o(l),$o([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const Bc={some:0,all:1};const Lc=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=li,t.DOMKeyframesResolver=rs,t.DOMVisualElement=Yr,t.DocumentProjectionNode=Rl,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Ha,t.GroupAnimation=ci,t.GroupAnimationWithThen=hi,t.HTMLProjectionNode=jl,t.HTMLVisualElement=qr,t.JSAnimation=Fe,t.KeyframeResolver=An,t.LayoutAnimationBuilder=Kl,t.MotionGlobalConfig=o,t.MotionValue=vi,t.MotionValueState=Ts,t.NativeAnimation=In,t.NativeAnimationExtended=$n,t.NativeAnimationWrapper=di,t.NodeStack=Ja,t.ObjectVisualElement=class extends Kr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends Yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kr}getBaseTargetFromProps(t,e){return un.has(e)?super.getBaseTargetFromProps(t,e)??on(e):t[e]}getDefaultValue(t){return un.has(t)?this.latestValues[t]??on(t):void 0}readValueFromInstance(t,e){if(un.has(e)){const t=Ge(e);return t&&t.default||0}if(Ls.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Zr.has(e)?e:Xi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ta(t,e,n)}build(t,e,n){js(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Qr(t,e,0,i)}mount(t){this.isSVGTag=Jr(t.tagName),super.mount(t)}},t.SubscriptionManager=p,t.ViewTransitionBuilder=Vr,t.VisualElement=Kr,t.acceleratedValues=Yn,t.addAttrValue=Os,t.addDomEvent=Xa,t.addEffect=ds,t.addSVGValue=Is,t.addScaleCorrector=function(t){for(const e in t)Gr[e]=t[e],Y(e)&&(Gr[e].isCSSVariable=!0)},t.addStyleValue=Ps,t.addUniqueItem=e,t.addValueToWillChange=Yi,t.alpha=Z,t.analyseComplexValue=Tt,t.animate=uc,t.animateEffectSubject=gs,t.animateElement=ho,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Yl(t,e,n);return new Kl(i,s,o)},t.animateMini=dc,t.animateMotionValue=Ei,t.animateSingleValue=Ya,t.animateTarget=Ji,t.animateValue=function(t){return new Fe(t)},t.animateValues=ms,t.animateVariant=Qi,t.animateView=function(t,e={}){return new Vr(t,e)},t.animateVisualElement=ts,t.animationMapKey=fi,t.anticipate=M,t.applyAxisDelta=Js,t.applyBoxDelta=Qs,t.applyGeneratorOptions=Fn,t.applyPointDelta=Zs,t.applyPxDefaults=cs,t.applyTreeDeltas=no,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=Ci(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=Ci(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Di(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Di(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?x(-180,180,d-h):0;return t=>{const e={x:ki(t,i.x,u.x,r.x),y:ki(t,i.y,u.y,r.y)};if(s){const n=Di(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=x(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateValues(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t("x"),a=t("y"),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,f=e({x:u,y:h},{x:d,y:p}),m=void 0!==f(0).rotate?t("pathRotation"):void 0,g={delay:s,...Ti(i||{},"x")};delete g.path;const y=xi(0);y.start(Ei("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=f(t/1e3);r?.set(e.x),a?.set(e.y),m&&void 0!==e.rotate&&m.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),m?.set(0)},onStop:()=>m?.set(0),onCancel:()=>m?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=ka,t.attachFollow=Jo,t.attachSpring=tr,t.attrEffect=Fs,t.axisDeltaEquals=Da,t.axisEquals=Va,t.axisEqualsRounded=Ma,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Pa,t.boxEqualsRounded=Ea,t.buildHTMLStyles=Ds,t.buildProjectionTransform=ja,t.buildSVGAttrs=js,t.buildSVGPath=Bs,t.buildTransform=Qn,t.calcAxisDelta=ha,t.calcBoxDelta=da,t.calcChildStagger=gi,t.calcGeneratorDuration=qt,t.calcLength=ca,t.calcRelativeAxis=pa,t.calcRelativeAxisPosition=ma,t.calcRelativeBox=fa,t.calcRelativePosition=ga,t.camelCaseAttributes=Zr,t.camelToDash=Xi,t.cancelFrame=Yt,t.cancelMicrotask=go,t.cancelSync=Gl,t.checkVariantsDidChange=ia,t.circIn=E,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=hl,t.collectMotionValues=yi,t.color=ft,t.compareByDepth=Ga,t.complex=At,t.containsCSSVariable=_,t.convertBoundingBoxToBox=zs,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Se,t.copyAxisDeltaInto=la,t.copyAxisInto=ra,t.copyBoxInto=aa,t.correctBorderRadius=Ba,t.correctBoxShadow=La,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ts(t,e,n))),n=sa(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,c=i||s,u=[],h=new Set;let d={},p=1/0,f=t;do{f=!1!==f.props.inherit&&f.parent}while(f&&!f.isControllingVariants);if(na.forEach((e,i)=>{const s=n[e],m=r[e],g=f&&f.props[e],y=void 0!==m?m:Rr(g)||!1===g?g:void 0,v=Rr(y),x=e===o?s.isActive:null;!1===x&&(p=i);const w=v&&void 0===m&&!(c&&l);if(s.protectedKeys={...d},!s.isActive&&null===x||!y&&!s.prevProp||Cr(y)||"boolean"==typeof y)return;if("exit"===e&&s.isActive&&!0!==x)return void(d={...d,...s.prevResolvedValues});const T=ia(s.prevProp,y);let b=T||v&&(x&&!w||i>p),S=!1;const A=Array.isArray(y)?y:[y];let V={};if(!1!==x)for(const n of A){const{transition:i,transitionEnd:s,...o}=Oi(t,n,Fi(t,e))||{};V={...V,...o,...s}}const{prevResolvedValues:P}=s;for(const e in{...P,...V}){if(e in d)continue;const n=V[e],i=P[e],o=Array.isArray(n)&&Array.isArray(i)?!ea(n,i)||T:n!==i;if(o&&null==n)h.add(e);else if(o||void 0!==n&&h.has(e)){b=!0,h.delete(e)&&(S=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0}if(s.prevProp=y,s.prevResolvedValues=V,s.isActive&&(d={...d,...V}),b&&(!w||!T||S))for(const n of A){const i={type:e};if("string"==typeof n&&c&&l&&a?.enteringChildren){const e=Oi(a,n)?.transition?.delayChildren;i.delay=gi(a.enteringChildren,t,e)}u.push({animation:n,options:i})}}),h.size){const{initial:e}=r,n={},i="boolean"!=typeof e&&Oi(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom);i&&i.transition&&(n.transition=i.transition),h.forEach(s=>{const o=t.getValue(s);o&&(o.liveStyle=!0);const a=i&&!Array.isArray(e)?i[s]:void 0,l=t.getBaseTargetFromProps(r,s);n[s]=(void 0!==a?a:void 0===l||zi(l)?void 0===t.initialValues[s]?t.baseTarget[s]:void 0:l)??null}),u.push({animation:n})}const m=c&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!m&&u.length?e(u):Promise.resolve()}return{animateChanges:o,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=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=sa(),s=!0}}},t.createAxis=Er,t.createAxisDelta=Pr,t.createBox=kr,t.createDelta=Mr,t.createEffect=bs,t.createGeneratorEasing=Zt,t.createProjectionNode=al,t.createRenderBatcher=zt,t.createScopedAnimate=cc,t.cubicBezier=T,t.cubicBezierAsString=Rn,t.defaultEasing=Ae,t.defaultOffset=be,t.defaultTransformValue=on,t.defaultValueTypes=Xe,t.degrees=at,t.delay=qa,t.delayInSeconds=qa,t.dimensionValueTypes=ns,t.distance=Lc,t.distance2D=function(t,e){const n=Lc(t.x,e.x),i=Lc(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Ca,t.easeIn=C,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=I,t.fillOffset=Te,t.fillWildcards=qe,t.findDimensionValueType=is,t.findEffect=fs,t.findValueType=t=>er.find(es(t)),t.flushKeyframeResolvers=Sn,t.followValue=function(t,e){const n=xi(zi(t)?t.get():t);return Jo(n,t,e),n},t.frame=Kt,t.frameData=N,t.frameSteps=Xt,t.generateLinearEasing=Ht,t.getAnimatableNone=_e,t.getAnimationMap=mi,t.getComputedStyle=Do,t.getDefaultTransition=Vi,t.getDefaultValueType=Ge,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return zr},t.getFinalKeyframe=Ee,t.getMixer=Ot,t.getOptimisedAppearId=_i,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=qn,t.getValueTransition=Ti,t.getVariableValue=Li,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<oa;t++){const i=Lr[t],s=e.props[i];(Rr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=pr,t.getViewAnimations=fr,t.globalProjectionState=tl,t.handOffElementState=po,t.has2DTranslate=Hs,t.hasComplexValues=wt,t.hasReducedMotionListener=Nr,t.hasScale=Xs,t.hasTransform=Gs,t.hasWarned=function(t){return y.has(t)},t.hex=ot,t.hover=function(t,e,n={}){const[i,s,o]=xo(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||vo())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=pt,t.hslaToRgba=Pt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=xs(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Bc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=xe,t.initPrefersReducedMotion=Ur,t.interpolate=we,t.invariant=s,t.invisibleValues=Bt,t.isAnimationControls=Cr,t.isBezierDefinition=O,t.isCSSVariableName=Y,t.isCSSVariableToken=G,t.isControllingVariants=jr,t.isDeltaZero=Aa,t.isDragActive=vo,t.isDragging=yo,t.isEasingArray=L,t.isElementKeyboardAccessible=So,t.isElementTextInput=function(t){return Ao.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=Hr,t.isGenerator=On,t.isHTMLElement=ys,t.isKeyframesTarget=Ni,t.isMotionValue=zi,t.isNear=ua,t.isNodeOrChild=wo,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=To,t.isSVGElement=vs,t.isSVGSVGElement=Ko,t.isSVGTag=Jr,t.isTransitionDefined=Mi,t.isVariantLabel=Rr,t.isVariantNode=Or,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Cn()||!e||"string"==typeof e&&(e in Bn||Cn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ki,t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=Kn,t.mapEasingToNativeEasing=Ln,t.mapValue=function(t,e,n,i){const s=Yo(e,n,i);return Qo(()=>s(t.get()))},t.maxGeneratorDuration=_t,t.measurePageBox=function(t,e,n){const i=ao(t,n),{scroll:s}=e;return s&&(io(i.x,s.offset.x),io(i.y,s.offset.y)),i},t.measureViewportBox=ao,t.memo=c,t.microtask=mo,t.millisecondsToSeconds=m,t.mirrorEasing=b,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Nt,t.mixImmediate=Mt,t.mixLinearColor=kt,t.mixNumber=Et,t.mixObject=It,t.mixValues=Wa,t.mixVisibility=Lt,t.motionValue=xi,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Bl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=q,t.numberValueTypes=Ye,t.optimizedAppearDataAttribute=Hi,t.optimizedAppearDataId=Gi,t.originProps=As,t.parseAnimateLayoutArgs=Yl,t.parseCSSVariable=Bi,t.parseValueFromTransform=rn,t.percent=lt,t.pipe=h,t.pixelsToPercent=Ra,t.positionalKeys=Ii,t.prefersReducedMotion=Ir,t.press=function(t,e,n={}){const[i,s,o]=xo(t,n),r=t=>{const i=t.currentTarget;if(!Eo(t))return;if(ko.has(t))return;Vo.add(i),n.stopPropagation&&ko.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Vo.has(i)&&Vo.delete(i),Eo(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||wo(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ys(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Po(()=>{if(Vo.has(n))return;Mo(n,"down");const t=Po(()=>{Mo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Mo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),So(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=dt,t.propEffect=fo,t.propagateDirtyNodes=ul,t.px=ct,t.readSVGValue=Ns,t.readStyleValue=Ms,t.readTransformValue=an,t.recordStats=function(){if(zo.value)throw zo.value=null,zo.addProjectionMetrics=null,new Error("Stats are already being measured");const t=zo;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.removeAxisDelta=va,t.removeAxisTransforms=xa,t.removeBoxTransforms=ba,t.removeEffect=ps,t.removeItem=n,t.removePointDelta=ya,t.renderHTML=Xr,t.renderSVG=Qr,t.resize=$o,t.resolveElements=xs,t.resolveMotionValue=Za,t.resolveTransition=wi,t.resolveVariant=Oi,t.resolveVariantFromProps=ji,t.reverseEasing=S,t.rgbUnit=it,t.rgba=st,t.rootProjectionNode=Ll,t.round=Oe,t.sampleDelta=Un,t.scale=J,t.scaleCorrectors=Gr,t.scalePoint=qs,t.scrapeHTMLMotionValuesFromProps=_r,t.scrapeSVGMotionValuesFromProps=ta,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return u;const o={axis:e,container:n||i,...s};return"function"==typeof t?Ec(n=>t(n[e].progress,n),o):Rc(t,o)},t.scrollInfo=Ec,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?yo[t]?null:(yo[t]=!0,()=>{yo[t]=!1}):yo.x||yo.y?null:(yo.x=yo.y=!0,()=>{yo.x=yo.y=!1})},t.setFeatureDefinitions=function(t){zr=t},t.setStyle=Pn,t.setTarget=$i,t.spring=ve,t.springValue=function(t,e){const n=xi(zi(t)?t.get():t);return tr(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i,grid:s}={}){const o={};return(r,a)=>{let l=o[a];if(!l){const[t,e]=s||[1/0,1],i=Math.min(t,a)-1,r=Math.max(e,Math.ceil(a/t))-1,c="number"==typeof n,u="first"===n?0:"last"===n?1:.5,h=c?n%t:i*u,d=c?Math.floor(n/t):r*u;l=o[a]=[];for(let e=0;e<a;e++){const s=e%t,o=Math.floor(e/t),a=Math.min(s,i-s),c=Math.min(o,r-o);if("random"===n){const t=Math.random()*(e+1)|0;l[e]=l[t],l[t]=e}else l[e]="edges"===n?Math.min(i?a:c,r?c:a):Math.hypot(s-h,o-d)}l.push(s?Math.max(...l):a)}let c=t*l[r];const u=t*l[a];if(i&&u){c=I(i)(c/u)*u}return e+c}},t.startWaapiAnimation=jn,t.statsBuffer=zo,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=ks,t.styleSubjectEffect=Es,t.supportedWaapiEasing=Bn,t.supportsBrowserAnimation=_n,t.supportsFlags=Mn,t.supportsLinearEasing=Cn,t.supportsPartialKeyframes=us,t.supportsScrollTimeline=kn,t.supportsViewTimeline=Dn,t.supportsWaapi=Hn,t.svgEffect=Us,t.svgSubjectEffect=Ws,t.sync=Xl,t.testValueType=es,t.time=$,t.transform=Yo,t.transformAxis=so,t.transformBox=ro,t.transformBoxPoints=Ks,t.transformPropOrder=cn,t.transformProps=un,t.transformValue=Qo,t.transformValueTypes=Ke,t.translateAxis=io,t.updateMotionValuesFromProps=Fr,t.variantPriorityOrder=Br,t.variantProps=Lr,t.velocityPerSecond=g,t.vh=ut,t.visualElementStore=Dr,t.vw=ht,t.warnOnce=v,t.warning=()=>{},t.wrap=x});