motion 14.9.1 → 14.10.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.dev.js +877 -252
- package/dist/motion.js +1 -1
- package/package.json +3 -3
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;const s={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),r=t=>"object"==typeof t&&null!==t,a=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,u=(...t)=>t.reduce((t,e)=>n=>e(t(n))),h=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class d{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 p=t=>1e3*t,m=t=>t/1e3,f=(t,e)=>e?t*(1e3/e):0,g=new Set;function y(t,e,n){t||g.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)),g.add(e))}const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function w(t,e,n,i){return t===e&&n===i?c:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=x(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(x(a+1e-7,t,n)-s-i)}return x(a,e,i)}}const T=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=w(.33,1.53,.69,.99),A=b(S),P=T(A),M=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=b(E),V=T(E),D=w(.42,0,1,1),C=w(0,0,.58,1),R=w(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return L(t)?t[v(0,t.length,e)]:t}const j=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:c,easeIn:D,easeInOut:R,easeOut:C,circIn:E,circInOut:V,circOut:k,backIn:A,backInOut:P,backOut:S,anticipate:M},F=t=>{if(j(t)){const[e,n,i,s]=t;return w(e,n,i,s)}return"string"==typeof t?O[t]:t},I={delta:0,timestamp:0,isProcessing:!1};let W;function N(){W=void 0}const U={now:()=>(void 0===W&&U.set(I.isProcessing||s.useManualTiming?I.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(N)}},$=t=>Math.round(1e5*t)/1e5,K=t=>e=>"string"==typeof e&&e.startsWith(t),z=K("--"),G=K("var(--"),Y=t=>!!G(t)&&X.test(t.split("/*")[0].trim()),X=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function H(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...q,transform:t=>i(0,1,t)},Z={...q,default:1},J=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tt=(t,e)=>n=>Boolean("string"==typeof n&&Q.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),et=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(J);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},nt={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},it={test:tt("rgb","red"),parse:et("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+$(_.transform(i))+")"},st=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const ot={test:tt("#"),parse:function(t){const e=t.length>5?2:1,n=st(t,3,e);return{red:parseInt(st(t,0,e),16),green:parseInt(st(t,1,e),16),blue:parseInt(st(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:it.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:tt("hsl","hue"),parse:et("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform($(e))+", "+lt.transform($(n))+", "+$(_.transform(i))+")"},mt={test:t=>it.test(t)||ot.test(t)||pt.test(t),parse:t=>it.test(t)?it.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?it.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=mt.parse(t);return e.alpha=0,mt.transform(e)}},ft=new RegExp(J.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 ft.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=>(mt.test(t)?(i.color.push(o),s.push(vt),n.push(mt.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?$(i[o]):t===vt?mt.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:mt.test(n)?mt.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(ft.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 Pt(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 Mt({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=Pt(a,i,t+1/3),o=Pt(a,i,t),r=Pt(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 Et(t,e){return n=>n>0?e:t}const kt=(t,e,n)=>t+(e-t)*n,Vt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,it,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=Mt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Et(t,e);const s={...n};return t=>(s.red=Vt(n.red,i.red,t),s.green=Vt(n.green,i.green,t),s.blue=Vt(n.blue,i.blue,t),s.alpha=kt(n.alpha,i.alpha,t),it.transform(s))},Lt=new Set(["none","hidden"]);function Bt(t,e){return Lt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>kt(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?Y(t)?Et:mt.test(t)?Rt:Wt:Array.isArray(t)?Ft:"object"==typeof t?mt.test(t)?Rt:It:Et}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 Wt=(t,e)=>{const n=Tt(t),i=Tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Lt.has(t)&&!i.values.length||Lt.has(e)&&!n.values.length?Bt(t,e):u(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}(n,i),i.values),bt(i)):Et(t,e)},Nt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return kt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Nt.exec(t);if(!n)return;const i=Nt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>$(kt(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 Kt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=s.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=o?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),m.process(n),f.process(n),n.isProcessing=!1,i&&e&&(o=!1,t(g))};return{schedule:$t.reduce((e,s)=>{const r=a[s];return e[s]=(e,s=!1,a=!1)=>(i||(i=!0,o=!0,n.isProcessing||t(g)),r.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:zt,cancel:Gt,steps:Yt}=Kt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0,I),Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>zt.update(e,t),stop:()=>Gt(e),now:()=>I.isProcessing?I.timestamp:U.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)})`},qt=2e4;function _t(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(_t(r),qt);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function Qt(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 ne(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function te(t,e){return t*Math.sqrt(1-e*e)}const ee=12;function ne(t,e,n){let i=n;for(let n=1;n<ee;n++)i-=t(i)/e(i);return i}const ie=.001;const se=(t,e)=>(e?t>=0:t>0)&&t<1/0;function oe(t,e){if(se(t,e))return t}function re(t){const e=oe(t.stiffness),n=oe(t.damping,!0),s=oe(t.mass),o={...t,stiffness:e??100,damping:n??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=Jt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*Qt(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=800,bounce:e=.3}){let n,s;const o=Jt(e);t=i(.01,10,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=te(e,o),r=Math.exp(-i);return ie-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=te(e*e,o);return(-n(e)+ie>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=ne(n,s,5/t),a=r*Qt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:p(t)}}(o)),o.isResolvedFromDuration=!0;se(o.stiffness)&&se(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function ae(t=.3,e=.3){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}=re({...n}),d=t=>h?0:-m(t),f=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=f*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?.01:2),v.restDelta=n.restDelta||(t?.005:.5)};let w,T,b;if(x(),f<1){const t=te(g,f),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===f){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(f*f-1),e=y-t,n=y+t,i=t<1||h?1/0:300/t,s=(t,e)=>Math.exp(e>i?(y-t)*i-y*e:-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=>p(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=p(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(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}const le=Object.assign(ae,{applyToOptions:t=>{const e=Zt(t,100,ae);return t.ease=e.ease,t.duration=p(e.duration),t.type="keyframes",t}});function ce({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 m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=le({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 ue(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const a=t.length;if(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 d=function(t,e,n){const i=[],o=s.mix||Ut,r=t.length-1;for(let s=0;s<r;s++){let r=n?.(t[s],t[s+1])||o(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||c:e;r=u(t,r)}i.push(r)}return i}(e,o,r),p=d.length,m=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=h(t[i],t[i+1],n);return d[i](s)};return n?e=>m(i(t[0],t[a-1],e)):m}function he(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=h(0,e,i);t.push(kt(n,1,s))}}function de(t){const e=[0];return he(e,t.length-1),e}function pe(t,e){return t.map(t=>t*e)}function me(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:o="easeInOut",mixer:r}){const a="number"==typeof e[0]?void 0:r,l=L(o)?o.map(F):F(o)||R,c={done:!1,value:e[0]};if(!a&&2===e.length&&!Array.isArray(l)&&(!n||2!==n.length||0===n[0]&&1===n[1])){const[n,o]=e,r=n===o?void 0:(s.mix||Ut)(n,o);return{calculatedDuration:t,next:e=>(c.value=r?r(l(t>0?i(0,1,e/t):1)):o,c.done=e>=t,c)}}const u=ue(pe(n&&n.length===e.length?n:de(e),t),e,{ease:Array.isArray(l)?l:me(e,l),mixer:a});return{calculatedDuration:t,next:e=>(c.value=u(e),c.done=e>=t,c)}}function ge(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 f(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}const ye=t=>null!==t;function ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(ye),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const xe={decay:ce,inertia:ce,tween:fe,keyframes:fe,spring:le};function we(t){"string"==typeof t.type&&(t.type=xe[t.type])}const Te=(t,e)=>e-t>40&&!s.useManualTiming?e:t;function be(t,e){return{kind:t,animation:e,timestamp:U.now(),frameTimestamp:I.timestamp,frameIsProcessing:I.isProcessing}}function Se(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...be("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Ae{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 Pe=t=>t/100,Me=t=>Math.round(1e4*t)/1e4;class Ee extends Ae{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!==U.now()&&this.tick(U.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Se(this,this.options)}initAnimation(){const{options:t}=this;we(t);const{type:e=fe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||fe;this.mixKeyframes=void 0,a!==fe&&"number"!=typeof r[0]&&(this.mixKeyframes=u(Pe,t.mixer?.(r[0],r[1])||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=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}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=Te(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||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==ce&&(d.value=ve(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Me((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!==ce?ve(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,m=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&&(m=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!e&&(d.value=o(d.value)),d}get duration(){return m(this.calculatedDuration)}get iterationDuration(){return this.duration+m(this.options.delay??0)}get time(){return m(this.currentTime)}set time(t){t=p(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 ge(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(U.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(U.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}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 ke=new Set(["brightness","contrast","saturate","opacity"]);function Ve(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const s=n.replace(i,"");let o=ke.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const De=/\b([a-z-]*)\(.*?\)/gu,Ce={...At,getAnimatableNone:t=>{const e=t.match(De);return e?e.map(Ve).join(" "):t}},Re={...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))}},Le={...q,transform:Math.round},Be={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,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:_,originX:dt,originY:dt,originZ:ct},je={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,...Be,zIndex:Le,fillOpacity:_,strokeOpacity:_,numOctaves:Le},Oe={...je,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:Ce,WebkitFilter:Ce,mask:Re,WebkitMask:Re},Fe=t=>Oe[t],Ie=new Set([Ce,Re]);function We(t,e){let n=Fe(t);return Ie.has(n)||(n=At),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function Ne(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ue=t=>180*t/Math.PI,$e=t=>{const e=Ue(Math.atan2(t[1],t[0]));return ze(e)},Ke={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:$e,rotateZ:$e,skewX:t=>Ue(Math.atan(t[1])),skewY:t=>Ue(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ze=t=>((t%=360)<0&&(t+=360),t),Ge=t=>Math.hypot(t[0],t[1]),Ye=t=>Math.hypot(t[4],t[5]),Xe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ge,scaleY:Ye,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(Ge(t)+Ye(t))/2,rotateX:t=>ze(Ue(Math.atan2(t[6],t[5]))),rotateY:t=>ze(Ue(Math.atan2(-t[2],t[0]))),rotateZ:$e,rotate:$e,skewX:t=>Ue(Math.atan(t[4])),skewY:t=>Ue(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function qe(t,e){if(!t||"none"===t)return He(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return He(e);const i=(n[1]?Xe:Ke)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const _e=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qe(n,e)},Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Je=(()=>new Set([...Ze,"pathRotation"]))(),Qe=t=>t===q||t===ct,tn=new Set(["x","y","z"]),en=Ze.filter(t=>!tn.has(t));const nn=new Set(["bottom","right"]);function sn(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 on=({transform:t})=>qe(t,"x"),rn=({transform:t})=>qe(t,"y"),an={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>sn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>sn(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:on,y:rn,translateX:on,translateY:rn},ln=new Set;let cn=!1,un=!1,hn=!1;function dn(){if(un){const t=[],e=new Set,n=new Set;ln.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),nn.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return en.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)})}un=!1,cn=!1,ln.forEach(t=>t.complete(hn)),ln.clear()}function pn(){ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(un=!0)})}function mn(){hn=!0,pn(),dn(),hn=!1}class fn{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?(ln.add(this),cn||(cn=!0,zt.read(pn),zt.resolveKeyframes(dn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(o(t)||a(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return We(e,n)}return t??void 0}(n.readValue(e,r),e,r);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}Ne(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ln.delete(this)}cancel(){"scheduled"===this.state&&(ln.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const gn=t=>t.startsWith("--");function yn(t,e,n){gn(e)?t.style.setProperty(e,n):t.style[e]=n}const vn={};function xn(t,e){const n=l(t);return()=>vn[e]??n()}const wn=xn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Tn=xn(()=>void 0!==window.ViewTimeline,"viewTimeline"),bn=xn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Sn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,An={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sn([0,.65,.55,1]),circOut:Sn([.55,0,1,.45]),backIn:Sn([.31,.01,.66,-.59]),backOut:Sn([.33,1.53,.69,.99])};function Pn(t,e){return t?"function"==typeof t?bn()?Ht(t,e):"ease-out":j(t)?Sn(t):Array.isArray(t)?t.map(t=>Pn(t,e)||An.easeOut):An[t]:void 0}function Mn(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=Pn(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 En(t){return"function"==typeof t&&"applyToOptions"in t}function kn({type:t,...e}){return En(t)&&bn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Vn extends Ae{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;const l=kn(t);this.animation=Mn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!s){const t=ve(i,this.options,r,this.speed);this.updateMotionValue?.(t),yn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Se(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(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=p(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=this.onFinish=null,t&&wn()?(this.animation.timeline=t,e?.(this.animation),c):n(this)}}const Dn={anticipate:M,backInOut:P,circInOut:V};function Cn(t){"string"==typeof t.ease&&t.ease in Dn&&(t.ease=Dn[t.ease])}const Rn=10;class Ln extends Vn{constructor(t){Cn(t),we(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(U.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 Ee({...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&&yn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function jn(t){t.duration=0,t.type="keyframes"}const On=new Set(["opacity","clipPath","filter","transform"]),Fn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const In=({mixer:t,keyframes:e})=>t&&"number"!=typeof e[0]&&e.some((n,i)=>i&&t(e[i-1],n)),Wn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Nn=()=>!s.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function Un(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!On.has(n)&&!Wn.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 Nn()&&(On.has(n)||Wn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Fn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r&&!In(t)}const $n=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Kn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zn=Ze.length,Gn={},Yn=(t,e,n=$n(e,Be[t]))=>(Gn[t]||(Gn[t]=(Kn[t]||t)+"("))+n+")",Xn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function Hn(t,e,n){let i="";for(let s=0;s<zn;s++){const o=Ze[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=$n(r,je[o]));Xn(o,r)||(i+=Yn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=Yn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const qn=new WeakMap,_n=.001,Zn=(t,e)=>Math.abs(t-e)<=.001,Jn=(t,e)=>t-e,Qn=(t,e,n)=>de(Array(n+1)).map(n=>kt(t,e,n)),ti=t=>t.motionValue.owner,ei=t=>qn.get(t),ni=({state:t})=>"idle"===t||"finished"===t,ii=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class si extends Ee{constructor(t){const e=ti(t).current,{driver:n=Xt}=t;let i;const s=function(t){const e=ti(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(ii(e,"transform")||"none")||ii(e,"pathRotation")||e.projection?.isProjecting()||In(t))}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=ei(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=ei(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 ei(ti(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(U.now()):void 0}tween(){const{keyframes:t,type:e,ease:n,times:i,repeat:s,delay:o=0}=this.options,r=j(n)?Sn(n):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(n)&&An[n];if(r&&!s&&!i&&2===t.length&&e===fe&&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||fe)===fe?u||de(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+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&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=U.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,d=!1,p=-1/0;const m=t=>{for(const e of n)if(e.name===t)return!0},f=(e,n)=>{const r={};for(const a of void 0===e?Ze:o){const o=i.get(a),l=void 0===e?ii(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="";for(const i in t){const s=t[i];e&&Xn(i,s)||(n+=Yn(i,s)+" ")}return(e?n.trim():n)||"none"},y=(t,e)=>g(f(t,e)),v=(t=f())=>{e.style.transform=g(t,!0)},x=t=>{t.onfinish=t.oncancel=null,t.cancel()},w=(t=!0)=>{t&&v(),a.forEach(({animation:t})=>x(t)),a=[]},T=(t,n)=>new Animation(new KeyframeEffect(e,t,n)),b=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=U.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,a.some(t=>t.end===1/0)&&(x(t),a=a.filter(t=>t!==i)),R.schedule(!1)}),t.oncancel=()=>a.includes(i)&&R.demote(),a.push(i)},S=(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]:[]},A=(t,e,n,i)=>{const s=Math.min(200,Math.max(2,Math.ceil((n-e)/Rn)));if(4*i.length>s)return;const o=Qn(e,n,s).concat(i).sort(Jn),r=t=>h(e,n,t);let a,l;for(const n of t){const t=n.numberAt(e),i=o.map(e=>n.numberAt(e)-t),s=i[i.length-1],r=i.some(t=>Math.abs(t)*_n>Math.abs(s))?0:s,c=i.map(t=>r?t/r:t);if(r&&!a)a=c,l=e=>(n.numberAt(e)-t)/r;else if(c.some((t,e)=>!Zn(t,r&&a[e])))return}if(!a||a.every((t,e)=>Zn(t,r(o[e]))))return"linear";const c=[],u=(t,e=l(t))=>c.push(Me(e)+" "+Me(100*r(t))+"%");return a.forEach((t,e)=>{e&&Math.abs(t-a[e-1])>.2&&S(l,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+c+")"},P=(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(...S(t=>i.numberAt(t),e,n));s.push(n)}},a=Qn(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(Jn))t>l&&r(l,t,0),l=t;return s.sort(Jn)},M=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},E=(t,e,n,i,s={fill:"both"},o)=>{const r=t.flatMap(t=>t.boundaries(e,n)),a=i||A(t,e,n,r),l=a?[e,n]:P(t,e,n,r),c=l.map(t=>y(t,o));let u={transform:c};return a||(u.offset=l.map(t=>h(e,n,t))),c.every(t=>t===c[0])&&(v(f(e,o)),u=null),T(u,{...s,duration:n-e,easing:a||"linear"})},k=e=>{let l=e,c=0,u=0;const h=[],d=[],p=new Set;i.clear(),r=new Map;for(const t of n){i.set(t.name,t);const[n,s]=t.timing(),o=n===1/0;if(r.set(t,[t.at(e),t.speed,o]),o)t.sync();else{if(t.speed<0)return;if(s){if(c){const t=(n-u)/s;if(Math.abs(s-c)>1||Math.abs(t-Math.round(t))*c>1)return}else c=s,u=n;d.push(t)}else p.add(n);h.push(t),l=Math.max(l,n)}}s={},o=Ze.filter(e=>{if(i.has(e))return!0;const n=s[e]=ii(t,e);return void 0!==n&&!Xn(e,n)}),w(!1);const m=!c&&M(h);try{if(m&&m[1]>e){const[t,n,i]=m;b(E(h,t,n,i),t-e,n-t)}else l>e&&(b(E(h,e,l),0,l-e),p.forEach(t=>t<l-1&&b(T(null,{duration:t-e}),0,t-e)));if(c){const t=u+Math.floor((l-u)/c)*c;b(E(d,t,t+c,void 0,{iterations:1/0,iterationStart:(l-t)/c,fill:"forwards"},l),l-e)}}catch{return}return a.length||w(),!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.updatePlaybackRate&&"running"===n.playState&&Math.abs(Number(n.currentTime)-r)<20?n.playbackRate!==i&&n.updatePlaybackRate(i):i?(n.playbackRate=i,n.startTime=t-r/i):(n.startTime=null,n.currentTime=r)}return!0},D=()=>!n.size&&(u=!0,ei(e)===R&&qn.delete(e),R.isJS||w(),!0),C=()=>{const e=U.now();if(R.isJS||(R.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]=ii(t,n.name),r.has(n)||(l=!0))}),R.isFinishing=!1),c=!1,u)return;if(n.forEach(t=>ni(t)&&n.delete(t)),D())return;for(const t of n)if(!t.canAccelerate)return R.demote(!0);R.isJS&&(R.isJS=!1,l=!0,n.forEach(t=>t.js?.stop()));const i=l,o=d;if(l=d=!1,i||!V(e)){if(o){if(e-p<100)return R.demote();p=e}if(!k(e))return R.demote()}},R={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){u||(l||(l=t),d||(d=!!e),c||(c=!0,I.isProcessing?zt.render(C,!1,!0):queueMicrotask(C)))},release(t){ni(t)&&n.delete(t),D()||R.schedule(!0)},check(){if(!R.isJS)for(const e in s)if(ii(t,e)!==s[e]&&!m(e))return R.schedule(!0,!0)},demote(t){if(!R.isJS&&!u)return n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),R.isJS=!0,r=new Map,w(),n.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return qn.set(e,R),R}(ti(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.tick(U.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at(U.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 oi extends Ae{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=U.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||fn;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:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=U.now();const h=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=Bn(s,e),a=Bn(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||En(n))&&i)}(t,o,r,a);h||(!s.instantAnimations&&l||u?.(ve(t,n,e)),t[0]=t[t.length-1],jn(n),n.repeat=0);const{onComplete:d}=n;n.finalKeyframe=e,n.keyframes=t,n.onComplete=()=>{d?.(),this.notifyFinished()};const p=h&&!c&&Un(n),m=!p&&(({name:t,motionValue:e})=>t&&Ze.includes(t)&&e?.owner?.current instanceof HTMLElement&&Nn()&&bn())(n);let f;if(i&&(p||m||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=Te(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{f=new Ln(n)}catch{f=new Ee(n)}}else f=m?new si(n):new Ee(n);this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),mn()),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?.cancel(),this.keyframeResolver?.cancel()}}class ri{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 ai(this.animations,"duration")}get iterationDuration(){return ai(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 ai(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 li extends ri{then(t,e){return this.finished.finally(t).then(()=>{})}}class ci extends Vn{constructor(t){super(),this.animation=t,t.onfinish=this.onFinish=()=>{t.onfinish=null,this.finishedTime=this.time,this.notifyFinished()},Se(this,{})}}const ui=new WeakMap,hi=(t,e="")=>`${t}:${e}`;function di(t){let e=ui.get(t);return e||(e=new Map,ui.set(t,e)),e}function pi(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 mi={current:void 0};class fi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=U.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),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=U.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 d)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new d,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(){zt.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){e&&(this.updatedAt=U.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){mi.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=U.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f(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.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function gi(t,e){return new fi(t,e)}function yi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function vi(t,e){const n=t?.[e]??t?.default??t;return n!==t?yi(n,t):n}const xi={type:"spring",stiffness:500,damping:25,restSpeed:10},wi={type:"keyframes",duration:.8},Ti={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bi=(t,{keyframes:e})=>e.length>2?wi:Je.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:xi:Ti,Si=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function Ai(t){for(const e in t)if(!Si.has(e))return!0;return!1}const Pi=(t,e,n,i={},o,r)=>a=>{const l=vi(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=p(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:o,hasOnUpdate:!!l.onUpdate};Ai(l)||Object.assign(h,bi(t,h)),h.duration&&(h.duration=p(h.duration)),h.repeatDelay&&(h.repeatDelay=p(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(jn(h),0===h.delay&&(d=!0)),(s.instantAnimations||s.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,jn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=ve(h.keyframes,l);if(void 0!==t)return void zt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ee(h):new oi(h)};function Mi(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Ei(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 ki(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 Vi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Di(t){const e=Vi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Ci(t,e,n=1){const[i,s]=Di(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return Y(s)?Ci(s,e,n+1):s}function Ri(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 Li(t,e,n){return Ri(t.getProps(),e,n,t)}const Bi=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,ji=new Set(["width","height","top","left","right","bottom",...Ze]),Oi=t=>Array.isArray(t);function Fi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gi(n))}function Ii(t){return Oi(t)?t[t.length-1]||0:t}function Wi(t,e){const n=Li(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Fi(t,e,Ii(o[e]))}}const Ni=t=>Boolean(t&&t.getVelocity);function Ui(t){return Boolean(Ni(t)&&t.add)}function $i(t,e){const n=t.getValue("willChange");if(Ui(n))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}}const Ki="data-framer-appear-id";function zi(t){return t.props[Ki]}const Gi="undefined"!=typeof window;function Yi({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function Xi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?yi(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&&Yi(d,e))continue;const r={delay:n,...vi(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){zt.update(()=>i.set(s));continue}let p=!1;if(Gi&&window.MotionHandoffAnimation){const n=zi(t);if(n){const t=window.MotionHandoffAnimation(n,e,zt);null!==t&&(r.startTime=t,p=!0)}}$i(t,e);const m=c??t.shouldReduceMotion;i.start(Pi(e,i,s,m&&ji.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>zt.update(()=>{r&&Wi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Hi(t,e,n={}){const i=Li(t,e,Bi(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?Xi(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(Hi(t,e,{...n,delay:i+("function"==typeof r?0:r)+pi(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 qi(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>Hi(t,e,n))):"string"==typeof e?Hi(t,e,n):Promise.all(Xi(t,Li(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const _i=t=>e=>e.test(t),Zi=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],Ji=t=>Zi.find(_i(t));function Qi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||a(t))}const ts=new Set(["auto","none","0"]);class es extends fn{constructor(){super(...arguments),this.isAsync=!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(H(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Y(i))){const s=Ci(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ji.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=Ji(i),r=Ji(s);if(H(i)!==H(s)&&an[n])this.needsMeasurement=!0;else if(o!==r)if(Qe(o)&&Qe(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else an[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Qi(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&&!ts.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=We(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return an[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!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?.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.resolveNoneKeyframes()}}const ns=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],is=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...ns,"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 ss(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&is.has(e)&&(t[n]=t[n]+"px")}const os=l(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),rs=[];function as(t){ls(t),rs.unshift(t)}function ls(t){n(rs,t)}function cs(t){return rs.find(e=>e.test(t))}function us(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(Pi(r,c,l,a&&ji.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):zt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>zt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function hs(t,e,n,i,s){return us(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=gi(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function ds(t){return r(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function ps(t){return r(t)&&"ownerSVGElement"in t}const ms={};function fs(t){return ms.current?.add(t),t}function gs(t){const e=ms.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const ys=t=>ms.current?ms.current.bind(t):t;function vs(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:ms.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function xs(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=vs(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 ws{constructor(t=zt.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 Ts(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new ws(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 bs=new Set(["originX","originY","originZ"]),Ss=(t,e)=>$n(t.get(e)?.get(),je[e]),As=(t,e,n,i)=>{let s,o;if(Je.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)=>Ze.indexOf(t)-Ze.indexOf(e)))}e.get("transform")||(ds(t)||e.get("transformBox")||As(t,e,"transformBox",new fi("fill-box")),e.set("transform",new fi("none"),()=>{qn.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&&(Xn(s,o)||(e+=(e&&" ")+Yn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+Yn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else bs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new fi(""),()=>{const n=Ss(e,"originX")??"50%",i=Ss(e,"originY")??"50%",s=Ss(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=gn(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=$n(i.getCurrent(),je[n])};return e.set(n,i,s,o)},Ps=(t,e)=>{if(Je.has(e))return _e(t,e);const n=getComputedStyle(t),i=gn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Ms=Ts(As,{test:t=>ds(t)||ps(t),read:Ps}),Es=xs(Ms);function ks(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Vs(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(Je.has(t))r=!0;else if(z(t))s[t]=n;else{const e=$n(n,je[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Hn(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 Ds={offset:"stroke-dashoffset",array:"stroke-dasharray"},Cs={offset:"strokeDashoffset",array:"strokeDasharray"};function Rs(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ds:Cs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Ls=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Bs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Vs(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&&Rs(h,s,o,r,!1)}const js=(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=ks(s));const r=je[n]||je[s],a=o?()=>{t[s]=$n(i.get(),je[n])}:()=>{const e=$n(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Os=xs(Ts(js));const Fs=(t,e,n,i)=>{if(n.startsWith("path")&&!Je.has(n))return function(t,e,n,i){return zt.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 fi("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 js(t,e,n,i,Us(n));if("d"===n)return e.set(n,i,()=>{const e=i.get()?.replace(/path\(|["')]/g,"");void 0===e?t.removeAttribute(n):t.setAttribute(n,e)});return(Je.has(n)||bs.has(n)||gn(n)||n in t.style?As:js)(t,e,n,i)},Is=(t,e)=>Je.has(e)?je[e]?.default||0:gn(e)||Ls.includes(e)?Ps(t,e)||t.getAttribute(ks(e))||0:(e=Us(e),t.getAttribute(ks(e))??t.getAttribute(e)??void 0),Ws=Ts(Fs,{test:ps,read:Is}),Ns=xs(Ws);function Us(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function $s({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ks({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function zs(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 Gs(t){return void 0===t||1===t}function Ys({scale:t,scaleX:e,scaleY:n}){return!Gs(t)||!Gs(e)||!Gs(n)}const Xs=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function Hs(t){return Ys(t)||_s(t)||qs(t)}function qs(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function _s(t){return Zs(t.x)||Zs(t.y)}function Zs(t){return t&&"0%"!==t}function Js(t,e,n){return n+e*(t-n)}function Qs(t,e,n,i,s){return void 0!==s&&(t=Js(t,s,i)),Js(t,n,i)+e}function to(t,e=0,n=1,i,s){t.min=Qs(t.min,e,n,i,s),t.max=Qs(t.max,e,n,i,s)}function eo(t,{x:e,y:n}){to(t.x,e.translate,e.scale,e.originPoint),to(t.y,n.translate,n.scale,n.originPoint)}const no=.999999999999,io=1.0000000000001;function so(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,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(oo(t.x,-o.scroll.offset.x),oo(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,eo(t,r)),i&&(i.path?.[a]||i)!==o&&Hs(o.latestValues)&&lo(t,o.latestValues,o.layout?.layoutBox));e.x<io&&e.x>no&&(e.x=1),e.y<io&&e.y>no&&(e.y=1)}function oo(t,e){t.min+=e,t.max+=e}function ro(t,e,n,i,s=.5){to(t,e,n,kt(t.min,t.max,s),i)}function ao(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function lo(t,e,n){const i=n??t;ro(t.x,ao(e.x,i.x),e.scaleX,e.scale,e.originX),ro(t.y,ao(e.y,i.y),e.scaleY,e.scale,e.originY)}function co(t,e){return $s(zs(t.getBoundingClientRect(),e))}function uo(t,e,n){const i=co(t,n),{scroll:s}=e;return s&&(oo(i.x,s.offset.x),oo(i.y,s.offset.y)),i}const ho=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),po={},mo=t=>ps(t)?Ws:Ms;class fo{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=es}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 co(this.current)}getProps(){return po}}function go(t,e,n,i){if(ms.current?.track(t),i)return us(t=>i.getValue(t,null),e,n,i);const s=mo(t);return hs(s,t,e,n,new fo(s,t))}const yo=t=>mo(t).state(t)?.release();function vo(t,e){const n=mo(t).state(t);if(!n)return;const i=qn.get(t);i&&(i.demote(),qn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const xo=Ts((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>r(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:wo,cancel:To}=Kt(queueMicrotask,!1);function bo(t,e,n){const i=Ni(t)?t:gi(t);return i.start(Pi("",i,e,n)),i.animation}const So={};const Ao={value:null,addProjectionMetrics:null,countProjection:void 0};function Po(t,e){const n=U.now();t=ys(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(Gt(i),t(o-e))};return zt.setup(i,!0),fs(()=>Gt(i))}function Mo(t,e){return Po(t,p(e))}function Eo(t){return ps(t)&&"svg"===t.tagName}function ko(t){return Ni(t)?t.get():t}const Vo=t=>"number"==typeof t?t:parseFloat(t),Do=ns.length,Co=t=>"number"==typeof t||ct.test(t);function Ro(t,e,n,i,s,o){s?(t.opacity=kt(0,n.opacity??1,Bo(i)),t.opacityExit=kt(e.opacity??1,0,jo(i))):o&&(t.opacity=kt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Do;s++){const o=ns[s];let r=Lo(e,o),a=Lo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Co(r)===Co(a)?(t[o]=Math.max(kt(Vo(r),Vo(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<Xs.length;s++){const o=Xs[s];(e[o]||n[o])&&(t[o]=kt(e[o]||0,n[o]||0,i))}}function Lo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Bo=Oo(0,.5,k),jo=Oo(.5,.95,c);function Oo(t,e,n){return i=>i<t?0:i>e?1:n(h(t,e,i))}function Fo(t,e){t.min=e.min,t.max=e.max}function Io(t,e){Fo(t.x,e.x),Fo(t.y,e.y)}function Wo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function No(t){return t.max-t.min}function Uo(t,e,n){return Math.abs(t-e)<=n}function $o(t,e,n,i=.5){t.origin=i,t.originPoint=kt(e.min,e.max,t.origin),t.scale=No(n)/No(e),t.translate=kt(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 Ko(t,e,n,i){$o(t.x,e.x,n.x,i?.originX),$o(t.y,e.y,n.y,i?.originY)}function zo(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+No(e)}function Go(t,e,n,i){zo(t.x,e.x,n.x,i?.x),zo(t.y,e.y,n.y,i?.y)}function Yo(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+No(e)}function Xo(t,e,n,i){Yo(t.x,e.x,n.x,i?.x),Yo(t.y,e.y,n.y,i?.y)}function Ho(t,e,n,i,s){return t=Js(t-=e,1/n,i),void 0!==s&&(t=Js(t,1/s,i)),t}function qo(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=kt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=kt(o.min,o.max,i);t===o&&(a-=e),t.min=Ho(t.min,e,n,a,s),t.max=Ho(t.max,e,n,a,s)}function _o(t,e,[n,i,s],o,r){qo(t,e[n],e[i],e[s],e.scale,o,r)}const Zo=["x","scaleX","originX"],Jo=["y","scaleY","originY"];function Qo(t,e,n,i){_o(t.x,e,Zo,n?.x,i?.x),_o(t.y,e,Jo,n?.y,i?.y)}const tr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),er=tr("applewebkit/")&&!tr("chrome/")?Math.round:c;function nr(t){t.min=er(t.min),t.max=er(t.max)}function ir(t){nr(t.x),nr(t.y)}const sr=()=>({translate:0,scale:1,origin:0,originPoint:0}),or=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),rr=()=>({min:0,max:0}),ar=()=>({x:{min:0,max:0},y:{min:0,max:0}});function lr(t){return 0===t.translate&&1===t.scale}function cr(t){return lr(t.x)&&lr(t.y)}function ur(t,e){return t.min===e.min&&t.max===e.max}function hr(t,e){return ur(t.x,e.x)&&ur(t.y,e.y)}function dr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function pr(t,e){return dr(t.x,e.x)&&dr(t.y,e.y)}function mr(t){return No(t.x)/No(t.y)}function fr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class gr{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)}}function yr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const vr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${yr(t,e.target.x)}% ${yr(t,e.target.y)}%`}},xr={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=kt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},wr={borderRadius:Object.assign({},vr,{applyTo:ns.slice()}),borderTopLeftRadius:vr,borderTopRightRadius:vr,borderBottomLeftRadius:vr,borderBottomRightRadius:vr,boxShadow:xr};function Tr(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}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<Xs.length;t++){const e=Xs[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}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"}function br(t){return[t("x"),t("y")]}const Sr=(t,e)=>t.depth-e.depth;class Ar{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(Sr),this.isDirty=!1,this.children.forEach(t)}}const Pr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mr=["z","skew","skewZ"];let Er=0;function kr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const Vr=t=>t.instance&&qn.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Dr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=zi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",zt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Dr(i)}function Cr(t){if(t)return!1!==t.options.allowProjection?t.projection:Cr(t.parent)}function Rr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return Object.assign(So,{...wr,...So}),class{static create(t,e,n){const{layoutId:i,layout:s,drag:o,dragConstraints:r,layoutScroll:a,layoutRoot:l,layoutAnchor:c,layoutCrossfade:u}=e,h=t.projection=new this(t.latestValues,e["data-framer-portal-id"]?void 0:Cr(t.parent));var d;h.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(o)||r&&(d=r,d&&"object"==typeof d&&Object.prototype.hasOwnProperty.call(d,"current")),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:a,layoutRoot:l,layoutAnchor:c});const p=h.getStack()?.lead;p&&!h.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}constructor(t={},n=e?.()){this.id=Er++,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,this.nodes.forEach(jr),this.nodes.forEach(Gr),this.nodes.forEach(Yr),this.nodes.forEach(Or),Ao.countProjection?.()},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 Ar)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new d),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ps(e)&&!Eo(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?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;zt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Po(s,250),Pr.hasAnimatedSinceResize&&(Pr.hasAnimatedSinceResize=!1,this.nodes.forEach(zr)))})}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()||Zr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!pr(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={...vi(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||zr(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Xr),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?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Vr(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,Vr(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(Wr),void this.nodes.forEach(Ir)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Nr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ur),this.nodes.forEach($r),this.nodes.forEach(Kr),this.nodes.forEach(Lr),this.nodes.forEach(Br)):this.nodes.forEach(Nr),this.clearAllSnapshots();const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Fr),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||No(this.snapshot.measuredBox.x)||No(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?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:i}=this,{animationId:o}=this.root;if(this.options.layoutScroll&&i&&(!e||e.animationId!==o||e.phase!==t)){const r=s(i);this.scroll={animationId:o,phase:t,isRoot:r,offset:n(i),wasRoot:e?e.isRoot:r}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&Vr(this);const e=this.projectionDelta&&!cr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Hs(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),ir(n),{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(ta))){const{scroll:t}=this.root;t&&(oo(e.x,t.offset.x),oo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Io(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&&Io(e,t),oo(e.x,s.offset.x),oo(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Io(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(oo(o.x,-n.scroll.offset.x),oo(o.y,-n.scroll.offset.y)),Hs(n.latestValues)&&lo(o,n.latestValues,n.layout?.layoutBox)}return!i&&Hs(this.latestValues)&&lo(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Io(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Hs(n.latestValues))continue;let i;n.instance&&(Ys(n.latestValues)&&n.updateSnapshot(),i=ar(),Io(i,n.measurePageBox())),Qo(e,n.latestValues,n.snapshot?.layoutBox,i)}return Hs(this.latestValues)&&Qo(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!==I.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=I.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(),Go(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,!0):Io(this.target,this.layout.layoutBox),eo(this.target,this.targetDelta)):Io(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&(!o.resumingFrom==!this.resumingFrom||o.options.layoutRoot&&!o.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Ao.countProjection?.(1))}getClosestProjectingParent(){if(this.parent&&!Ys(this.parent.latestValues)&&!_s(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}},Xo(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Io(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===I.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Io(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;so(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!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?(Wo(this.prevProjectionDelta.x,this.projectionDelta.x),Wo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ko(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&fr(this.projectionDelta.x,this.prevProjectionDelta.x)&&fr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),Ao.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.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?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(_r));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;Hr(r.x,t.x,n),Hr(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,qr(c.x,m.x,f.x,g),qr(c.y,m.y,f.y,g),d&&hr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Io(d,this.relativeTarget)),l&&(this.animationValues=o,Ro(o,s,this.latestValues,n,h,u)),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&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zt.update(()=>{Pr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gi(0)),this.motionValue.jump(0,!1),this.currentAnimation=bo(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({...be("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?.(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&&Qr(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},Jr(s.x,e.x,t.x),Jr(s.y,e.y,t.y)}Io(e,s),lo(e,i),Ko(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new gr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity: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}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!qs(e))return;const n={};for(let e=0;e<Mr.length;e++)kr(Mr[e],t,n,this.animationValues);for(let e=0;e<Xs.length;e++)kr(Xs[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=ko(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ko(e?.pointerEvents)||""),void(this.hasProjected&&!Hs(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Tr(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in So){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=So[e],l="none"===o?s[e]:i(s[e],n);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=n===this?ko(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(Ir),this.root.sharedNodes.clear()}}}function Lr(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;br(t=>oo(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Br(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,r=(i,o)=>{if("size"===s)br(t=>{const e=No(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Fo(i[t],o[t])}else Qr(s,e.layoutBox,n)&&br(e=>{const n=No(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ko(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ko(c,o?t.applyTransform(i,!0):n,a);const u=!cr(l);let h=!1;const d=t.getClosestProjectingParent();if((!o||d?.options.layoutRoot&&t.resumeFrom?.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};Xo(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};Xo(c,n,s.layoutBox,a),o&&r(l,c),pr(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function jr(t){Ao.countProjection?.(0),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 Or(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fr(t){t.clearSnapshot()}function Ir(t){t.clearMeasurements()}function Wr(t){t.isLayoutDirty=!0,t.updateLayout()}function Nr(t){t.isLayoutDirty=!1}function Ur(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function $r(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function Kr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gr(t){t.resolveTargetDelta()}function Yr(t){t.calcProjection()}function Xr(t){t.resetSkewAndRotation()}function Hr(t,e,n){t.translate=kt(e.translate,0,n),t.scale=kt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function qr(t,e,n,i){t.min=kt(e.min,n.min,i),t.max=kt(e.max,n.max,i)}function _r(t){return void 0!==t.animationValues?.opacityExit}const Zr={duration:.45,ease:[.4,0,.1,1]};function Jr(t,e,n){t.max=No(n)+(t.min=e.min)}function Qr(t,e,n){return"position"===t||"preserve-aspect"===t&&!Uo(mr(e),mr(n),.2)}function ta(t){return t!==t.root&&t.scroll?.wasRoot}function ea(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const na=Rr({attachResizeListener:(t,e)=>ea(t,"resize",e),measureScroll:ho,checkIsScrollRoot:()=>!0}),ia={current:void 0},sa=Rr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ia.current){const t=new na({});t.mount(window),t.setOptions({layoutScroll:!0}),ia.current=t}return ia.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),oa=new WeakMap;function ra(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function aa(t){return"string"==typeof t||Array.isArray(t)}const la=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ca=["initial"].concat(la);function ua(t){if(ra(t.animate))return!0;for(let e=0;e<ca.length;e++)if(aa(t[ca[e]]))return!0;return!1}function ha(t){return Boolean(ua(t)||t.variants)}function da(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Ni(s))t.addValue(i,s);else if(Ni(o))t.addValue(i,gi(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,gi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const pa={current:null},ma={current:!1},fa="undefined"!=typeof window;function ga(){if(ma.current=!0,fa)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pa.current=t.matches;t.addEventListener("change",e),e()}else pa.current=!1}const ya=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let va={};class xa{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=fn,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=U.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,zt.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=ua(e),this.isVariantNode=ha(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]&&Ni(e)&&e.set(l[t])}}mount(t){const e=this.presenceContext;if(this.hasBeenMounted&&!1!==e?.isPresent&&!e?.keepValuesOnRemount)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,oa.set(t,this),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:(ma.current||ga(),this.shouldReduceMotion=pa.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.get(t)?.(),e.accelerate&&On.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Vn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:p(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Je.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&zt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),qn.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?.()})}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 va){const e=va[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)&&qn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ya.length;e++){const n=ya[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=da(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}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),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=gi(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&&(o(n)||a(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=We(t,e)),this.setBaseTarget(t,Ni(n)?n.get():n)),Ni(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return(this.events[t]||(this.events[t]=new d)).add(e)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){wo.render(this.render)}}class wa extends xa{constructor(){super(...arguments),this.KeyframeResolver=es}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;Ni(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ta(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])}function ba(t,{layout:e,layoutId:n}){return Je.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!So[t]||"opacity"===t)}function Sa(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Ni(i[e])||s&&Ni(s[e])||ba(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Aa extends wa{constructor(){super(...arguments),this.type="html",this.renderInstance=Ta}mount(t){super.mount(t)}readValueFromInstance(t,e){if(Je.has(e))return this.projection?.isProjecting?He(e):_e(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return co(t,e)}build(t,e,n){Vs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Sa(t,e,n)}}function Pa(t){let e=oa.get(t);return e||(e=new Aa({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),vo(t,e)),t.style.transform&&!Hs(e.latestValues)&&(t.style.transform=""),e}const Ma={},Ea={updateScroll:()=>{Ea.scroll||(Ea.scroll={offset:ho()})}},ka=t=>{const e=Pa(t),n=new d,i={instance:t,root:Ea,path:[Ea],setOptions:c,isProjecting:c,applyProjectionStyles:c,removeElementScroll:t=>t,updateLayout:()=>{const s=uo(t,Ea,e.getTransformPagePoint());ir(s),i.layout={layoutBox:s},n.notify()},addEventListener:(t,e)=>"measure"===t?n.add(e):c,unmount:()=>{i.instance=void 0,e.projection===i&&(e.projection=void 0)}};return e.projection=i,e.current||e.mount(t),[i,i.unmount]},Va=t=>{const e=oa.get(t)?.projection;return e?.instance?[e,c]:(Ma.create||ka)(t)},Da="[data-layout],[data-layout-id]",Ca=new WeakMap;let Ra;function La(t){const e=[];return t instanceof HTMLElement&&t.matches(Da)&&e.push(t),t.querySelectorAll(Da).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Ba(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 ja(t,e){let n=Ca.get(t);if(n)n.setOptions(Ba(t,e));else{const i=Pa(t);n=new sa(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Ca.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Ba(t,e),visualElement:i}),n.mount(t),Ca.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Oa(t){const e=ja(t);return[e,()=>Ca.get(t)===e&&Fa(t,e)]}function Fa(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Ca.delete(t)}function Ia(){const t=Ra;if(!t)return;Ra=void 0,function(){if(I.isProcessing)return;const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Yt.update.process(I),Yt.preRender.process(I),Yt.render.process(I),I.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=ja(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(),wo.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}Ma.create=Oa;const Wa=Ia;class Na{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}),Ra||(Ra=[],queueMicrotask(Ia)),Ra.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 La(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 La(this.scope)){if(this.tracked.has(e))continue;const n=ja(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?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Fa(n,e)}}),e.relegate())return;n.remove()}Fa(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 ri([...t]))}}function Ua(t,e,n){if("function"==typeof t)return{scope:ms.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:vs(t)[0]??document,updateDom:e,defaultOptions:n}}const $a=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Ka(t){return{point:{x:t.pageX,y:t.pageY}}}const za=t=>e=>$a(e)&&t(e,Ka(e));function Ga(t,e,n,i){return ea(t,e,za(n),i)}const Ya=new WeakMap;let Xa;const Ha=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ps(i)&&"getBBox"in i?i.getBBox()[e]:i[n],qa=Ha("inline","width","offsetWidth"),_a=Ha("block","height","offsetHeight");function Za({target:t,borderBoxSize:e}){Ya.get(t)?.forEach(n=>{n(t,{get width(){return qa(t,e)},get height(){return _a(t,e)}})})}function Ja(t){t.forEach(Za)}function Qa(t,e){Xa||"undefined"!=typeof ResizeObserver&&(Xa=new ResizeObserver(Ja));const n=vs(t);return n.forEach(t=>{let n=Ya.get(t);n||(n=new Set,Ya.set(t,n)),n.add(e),Xa?.observe(t)}),()=>{n.forEach(t=>{const n=Ya.get(t);n?.delete(e),n?.size||Xa?.unobserve(t)})}}const tl=new Set;let el;function nl(t){return tl.add(t),el||(el=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};tl.forEach(e=>e(t))},window.addEventListener("resize",el)),()=>{tl.delete(t),tl.size||"function"!=typeof el||(window.removeEventListener("resize",el),el=void 0)}}function il(t,e){return fs("function"==typeof t?nl(t):Qa(t,e))}const sl=(t,e)=>Math.abs(t-e);function ol(t,e){const n=sl(t.x,e.x),i=sl(t.y,e.y);return Math.sqrt(n**2+i**2)}const rl=new Set(["auto","scroll"]);class al{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=cl(this.lastRawMoveEventInfo,this.transformPagePoint));const t=hl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ol(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:U.now()});const{onStart:s,onMove:o}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=cl(e,this.transformPagePoint),this.hasPendingMove=!0,zt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=hl("pointercancel"===t.type?this.lastMoveEventInfo:cl(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!$a(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=cl(Ka(t),this.transformPagePoint),{point:l}=a;this.history=[{...l,timestamp:U.now()}];const{onSessionStart:c}=e;c&&c(t,hl(a,this.history));const h={passive:!0,capture:!0};this.removeListeners=u(Ga(this.contextWindow,"pointermove",this.handlePointerMove,h),Ga(this.contextWindow,"pointerup",this.handlePointerUp,h),Ga(this.contextWindow,"pointercancel",this.handlePointerUp,h)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(rl.has(t.overflowX)||rl.has(t.overflowY))&&this.scrollPositions.set(e,ll(e)),e=e.parentElement}this.scrollPositions.set(window,ll(window)),this.removeScrollListeners=u(ea(window,"scroll",this.onElementScroll,{capture:!0}),ea(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=ll(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),zt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Gt(this.updatePoint)}}const ll=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function cl(t,e){return e?{point:e(t.point)}:t}function ul(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hl({point:t},e){return{point:t,delta:ul(t,pl(e)),offset:ul(t,dl(e)),velocity:ml(e,.1)}}function dl(t){return t[0]}function pl(t){return t[t.length-1]}function ml(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=pl(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>p(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*p(e)&&(i=t[1]);const o=m(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}const fl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gl(t){return fl.has(t.tagName)||!0===t.isContentEditable}const yl=new Set(["INPUT","SELECT","TEXTAREA"]);function vl(t){return yl.has(t.tagName)||!0===t.isContentEditable}const xl={x:!1,y:!1};function wl(){return xl.x||xl.y}function Tl(t){return"x"===t||"y"===t?xl[t]?null:(xl[t]=!0,()=>{xl[t]=!1}):xl.x||xl.y?null:(xl.x=xl.y=!0,()=>{xl.x=xl.y=!1})}function bl(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Sl(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Al=.35;function Pl(t,e,n){return{min:Ml(t,e),max:Ml(t,n)}}function Ml(t,e){return"number"==typeof t?t:t[e]||0}function El(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const kl=new WeakMap;class Vl{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new al(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragConstraints:i,dragPropagation:s,onDragStart:o}=this.getProps();if(n&&!s&&(this.openDragLock?.(),this.openDragLock=Tl(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:r}=this.visualElement;r&&(r.isAnimationBlocked=!0,r.target=void 0),br(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Y(e)&&(e=Ci(e,this.visualElement.current)||0),ct.test(e))e=parseFloat(e);else if(lt.test(e)){const n=r?.layout?.layoutBox[t];n&&(e=No(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),this.point="function"==typeof i&&i(this),o&&zt.update(()=>o(t,e),!1,!0),$i(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.point&&this.point.move(),this.visualElement.render(),o&&zt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints||this.point)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&&zt.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Ll(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?kt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?kt(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),this.point?this.point[t]=s:i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Dl(t)?this.constraints&&this.scroll===El(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i||"object"!=typeof t)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:bl(t.x,n,s),y:bl(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Al){return!1===t?t=0:!0===t&&(t=Al),{x:Pl(t,"left","right"),y:Pl(t,"top","bottom")}}(e),s!==this.constraints&&!Dl(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&br(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Dl(t))return!1;const n=Cl(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=El(i);const s=uo(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Sl(t.x,e.x),y:Sl(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Ks(o));this.hasMutatedConstraints=!!t,t&&(o=$s(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l={bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o},c=s=>!i||this.point&&r||!Ll(s,e||n,this.currentDirection)?0:t[s];if(this.point&&!r)return this.point.release({x:c("x"),y:c("y")},l).then(a);const u=this.constraints||{},h=br(t=>{if(!Ll(t,e||n,this.currentDirection))return;let i=u[t]||{};!0!==r&&r!==t||(i={min:0,max:0});const s={type:"inertia",velocity:c(t),...l,...i};return this.startAxisValueAnimation(t,s)});return Promise.all(h).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return $i(this.visualElement,t),n.start(Pi(t,n,0,e,this.visualElement,!1))}stopAnimation(){br(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();br(t=>{if(!Ll(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-kt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Dl(e)||!n||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};br(t=>{const e=this.getAxisMotionValue(t).get();o[t]=function(t,e){let n=.5;const s=No(t),o=No(e);return o>s?n=h(e.min,e.max-s,t.min):s>o&&(n=h(t.min,t.max-o,e.min)),i(0,1,n)}({min:e,max:e},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),br(e=>{const n=this.getAxisMotionValue(e);if(!Ll(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(kt(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;kl.set(this.visualElement,this);const t=this.visualElement.current,e=Ga(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&vl(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Dl(e)&&Cl(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=il(t,Rl(n)),s=il(e,Rl(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),zt.read(i);const r=ea(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(br(e=>{if(!Ll(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=Al,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Dl(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Cl=t=>"current"in t?t.current:t;function Rl(t){let e=!0;return()=>{e?e=!1:t()}}function Ll(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Bl=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function jl(t,e){const n=vs(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},fs(()=>i.abort())]}const Ol=(t,e)=>!!e&&(t===e||Ol(t,e.parentElement)),Fl=new WeakSet;function Il(t){return e=>{"Enter"===e.key&&t(e)}}function Wl(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Nl(t){return $a(t)&&!wl()}const Ul=new WeakSet;function $l(t,e){const n=window.getComputedStyle(t);return gn(e)?n.getPropertyValue(e):n[e]}const Kl={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function zl(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Kl[t]||t;return e?`(not (${i}))`:i}).join(" and ")}const Gl=["nodes","calculatedTargetDeltas","calculatedProjections"];function Yl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ue(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const Xl=new Set,Hl=({timestamp:t})=>{Xl.forEach(e=>e.tick(t))};class ql extends Ae{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():(Xl.size||zt.update(Hl,!0),Xl.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=Te(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 ge(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():U.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Xl.delete(this),Xl.size||Gt(Hl))}}function _l(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=Vo(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Vo(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 ql({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Ni(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(Zl(e,r),!1)):t.set(Zl(e,r))},o=e.on("change",s),a=e.get();Vo(a)-Vo(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function Zl(t,e){return e?t+e:t}function Jl(t,e,n={}){const i={type:"spring",...n};return we(i),i.type=i.type||fe,_l(t,e,i)}function Ql(t){const e=[];mi.current=e;const n=t();mi.current=void 0;const i=gi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>zt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Gt(i)})}(e,i,t),i}function tc(t,e,n){return _l(t,e,{...n,type:le})}const ec=[...Zi,mt,At];let nc=0;const ic=()=>"motion-view-"+nc++;function sc(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function oc(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 rc(t,e,n,i,s,o=[],r,a=[],l){const c=vs(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??ic();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),sc(t,s,o),oc(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=ic(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),sc(t,s,o),oc(t,d,r,a,l),d})}function ac(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let lc={},cc=null;const uc=(t,e)=>{lc[t]=e},hc=()=>{cc||(cc=document.createElement("style"),cc.id="motion-view");let t="";for(const e in lc){const n=lc[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}cc.textContent=t,document.head.appendChild(cc),lc={}},dc=()=>{cc&&cc.parentElement&&cc.parentElement.removeChild(cc)};function pc(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function mc(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const fc=["layout","enter","exit","new","old"],gc=t=>t.split(" ").every(t=>0===parseFloat(t)),yc={group:["layout"],new:["new","enter"],old:["old","exit"]},vc={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function xc(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 ri([])))();const c=new Map,u=[],h=[],d=[],m=new Set,f=new Map,g=new Set,v=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),p="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,vs(n)),g=rc(n,c,u,void 0,l,h,p,d,m),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=rc(o.get(n),c,u,w.get(n),l,h,p,d,m)}else g=rc(n,c,u,void 0,l,h,p,d,m);else g=[n];const y=s.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==y&&v.set(n,y);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=wc(vi(l,n),vi(function(t,e){for(const n of yc[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},P=t=>{const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=p(i.duration));const{delay:s=0,duration:o,ease:r}=kn(i);return{delay:p(s),duration:o,ease:r}},M=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of ns)o[t]=n[t];const r=M.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},M.set(e,r)}}),k=t=>{const e=M.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},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||uc(":root",{"view-transition-name":"none"}),uc("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{uc(`::view-transition-group(${t})`,{overflow:"clip"}),uc(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{uc(`::view-transition-group-children(${t})`,{overflow:"clip"})}),hc()},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),dc()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(v.get(t)??k(t))&&g.add(t)})(),V()};let R;try{b("old"),E("old"),V(),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=mc(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of fc){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=ac(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:m}=t[o];for(let[f,g]of Object.entries(d)){if(null==g)continue;if("x"===f||"y"===f){y(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=wc(vi(l,f),vi(m,f));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?vc[c]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=p(d.duration)),d.delay&&(d.delay=p(d.delay)),n.push(new Vn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===f&&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=pc(o);if(!r)continue;const a=f.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 ci(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}=P(r.layer);h={delay:t,duration:e,easing:Pn(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=p(i.duration)),i=kn(i),h={delay:p(i.delay??0),duration:u&&void 0!==s?p(s):i.duration,easing:u?"linear":Pn(i.ease,i.duration)}}e.updateTiming(h),n.push(new ci(t))}M.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=P(e);for(const r of ns){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";gc(a)&&gc(l)||n.push(new Vn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new ri(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new ri([])),e))})}function wc(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 Tc=[],bc=null;function Sc(){bc=null;const[t]=Tc;var e;t&&(n(Tc,e=t),bc=e,xc(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(Sc))}function Ac(){for(let t=Tc.length-1;t>=0;t--){const e=Tc[t],{interrupt:n}=e.options;if("immediate"===n){const n=Tc.slice(0,t+1).map(t=>t.update),i=Tc.slice(t+1);e.update=()=>{n.forEach(t=>t())},Tc=[e,...i];break}}bc&&"immediate"!==Tc[0]?.options.interrupt||Sc()}class Pc{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=c,this.notifyReject=c,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(c),n=this,Tc.push(n),wo.render(Ac)}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 Mc=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"]),Ec=t=>"string"==typeof t&&"svg"===t.toLowerCase();function kc(t,e,n,i){Ta(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Mc.has(n)?n:ks(n),e.attrs[n])}function Vc(t,e,n){const i=Sa(t,e,n);for(const n in t)if("children"!==n&&(Ni(t[n])||Ni(e[n]))){i[-1!==Ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Dc(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 Cc=[...la].reverse(),Rc=t=>!0===t?.out?t:t?.out;function Lc(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Dc(e,t)}function Bc(){const t={};for(const e of la)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const jc=ca.length;const Oc=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Fc=zt,Ic=$t.reduce((t,e)=>(t[e]=t=>Gt(t),t),{});function Wc(t){return"object"==typeof t&&!Array.isArray(t)}function Nc(t,e,n,i){return null==t?[]:"string"==typeof t&&Wc(e)?vs(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Uc(t,e,n){return t*(e+1)+n*e}function $c(t,e){if(e.has(t))return e.get(t);const[,n,i]=t.match(/^(.+?)([+-][\d.]+)$/)||[];return e.has(n)?Math.max(0,e.get(n)+parseFloat(i)):void 0}function Kc(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:kt(o,r,s[n]),easing:B(i,n)})}function zc(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function Gc(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Yc(t,{defaultTransition:e={},...n}={},i,s,o){const r=e.duration||.3,a=new Map,l=new Map,c={},u=new Map;let d=0,m=0,f=0;const g=(t,n)=>{let o=n;const a=t=>"number"==typeof t?n+t:function(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))):$c(e,i)??t}(m,t,d,u);for(let n=0;n<t.length;n++){const h=t[n];if("string"==typeof h){u.set(h,m);continue}if(!Array.isArray(h)){const t=void 0===h.at?m:a(h.at);"sequence"in h?(d=m=t,m=g(h.sequence,t),d=t,o=Math.max(o,m)):u.set(h.name,t);continue}let[y,v,x={}]=h;void 0!==x.at&&(m=a(x.at));let w=0;const T=(t,n,i,o=0,a=0)=>{const l=qc(t),{delay:c=0,times:u=de(l),type:h=e.type||"keyframes",repeat:d,repeatType:g,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:T}=n;i.mixer||(i.mixer=n.mixer);const S="function"==typeof c?c(o,a):c,A=l.length,P=En(h)?h:s?.[h||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&Jc(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...v};void 0!==T&&(n.duration=p(T));const i=Zt(n,t,P);x=i.ease,T=i.duration}T??(T=r);const M=m+S;1===u.length&&0===u[0]&&(u[1]=1);const E=u.length-l.length;if(E>0&&he(u,E),1===l.length&&l.unshift(null),d&&d<20){const t=T>0?y/T:0;T=Uc(T,d,y);const e=[...l],n=[...u];x=Array.isArray(x)?[...x]:[x];const i=[...x],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a<d;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),x.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),x.push(0===t?"linear":B(d,t-1))}zc(u,d,t)}const k=M+T;Kc(i,l,x,u,M,k),w=Math.max(S+T,w),f=Math.max(k,f)};if(Ni(y)){T(v,x,Hc("default",Xc(y,l)))}else{const t=Nc(y,v,i,c),e=t.length;for(let n=0;n<e;n++){const i=Xc(t[n],l);for(const t in v)T(v[t],_c(x,t),Hc(t,i),n,e)}}d=m,m+=w,o=Math.max(o,m)}return o};return g(t,0),o&&(o.duration=f,o.labels=u),l.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Gc);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(h(0,f,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(i)||a.set(i,{keyframes:{},transition:{}});const u=a.get(i);u.keyframes[s]=r;const{type:d,...p}=e;u.transition[s]={...p,duration:f,ease:c,times:l,mixer:o.mixer||e.mixer,...n}}}),a}function Xc(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Hc(t,e){return e[t]||(e[t]=[]),e[t]}function qc(t){return Array.isArray(t)?t:[t]}function _c(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Zc=t=>"number"==typeof t,Jc=t=>t.every(Zc);function Qc(t,e,n,i){const s=[];if(function(t,e){return Ni(t)||"number"==typeof t||"string"==typeof t&&!Wc(e)}(t,e))s.push(bo(t,Wc(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=Nc(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(...go(i,e,a,oa.get(i))):s.push(...hs(cs(i)??xo,i,e,a))}}return s}let tu=0;const eu=(t,e)=>void 0===e?t:{name:t,at:e};function nu(t){t.pause(),t.time=0,t.stop()}class iu{constructor(t=[],e={},i){this.options=e,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.motionScope=ms.current,this.isKilled=!1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=!1===e.autoplay,this.newFinished(),t.forEach(t=>this.add(t)),i?(this.isDirty=!1,this.isWrapped=!0,this.group=new li(i),this.watch()):(this.invalidate(),this.flush());const{scope:s}=e;s&&(s.animations.push(this),this.finished.then(()=>n(s.animations,this)))}add(t,e){return t instanceof iu&&t.adopt(this),this.push({item:t,at:e})}call(t,e){return this.push({item:t,at:e,marker:{name:"_m"+tu++,time:0,callback:t}})}addPause(t,e){return this.push({item:e||{},at:t,marker:{name:"_m"+tu++,time:0,callback:e,pause:!0}})}move(t,e){return this.entries.forEach(n=>{n.item===t&&(n.at=e)}),this.invalidate()}remove(t){return t instanceof iu&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(t){return this.flush(),this.labels.get(t)}seek(t){return this.time=this.resolve(t),this}playTo(t){const e=this.resolve(t),n=Math.abs(this.speed);return this.speed=e<this.time?-n:n,this.stopAt=e,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(t){this.time=t*this.duration}get time(){return this.active()?.time??0}set time(t){this.flush(),this.prevTime=t,this.group&&(this.group.time=t),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(t){this.playbackSpeed=t,this.group&&(this.group.speed=t)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??"idle"}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(t){return this.flush(),this.scrollTimeline=t,this.detachScroll=this.group?.attachTimeline(t),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(t,e){return this.finished.then(t,e)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(t){return this.entries.push(t),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&!this.isKilled&&this.build()}adopt(t){this.group&&(nu(this.group),this.group=void 0),this.isDirty=!1,this.parent=t}build(){this.isDirty=!1,this.isWrapped=!1;const t=this.group;let e=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(e=t.animations.length?t.time:0,nu(t)),this.isRebuilding=!1);const{defaultTransition:n,onComplete:i,onUpdate:s,onRepeat:o,onReverseComplete:r,autoplay:a,scope:l,...c}=this.options,u={};void 0!==l?.reduceMotion&&(u.reduceMotion=l.reduceMotion),void 0!==l?.skipAnimations&&(u.skipAnimations=l.skipAnimations),Object.assign(u,c);const h=new Map,d={},p=ms.current;let m;ms.current=this.motionScope;try{m=function(t,e,n,i){const s=[];return Yc(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=gi(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:le},i).forEach(({keyframes:t,transition:e},n)=>{s.push(...Qc(n,t,e))}),s}(this.toSequence(h),{defaultTransition:n,...u},l,d)}finally{ms.current=p}const f=d.labels;let g=u.duration??d.duration;const y=d.duration?g/d.duration:1;if(f.forEach((t,e)=>f.set(e,t*y)),this.markers=[],h.forEach((t,e)=>{t.time=f.get(e),f.delete(e),g=Math.max(g,t.time),this.markers.push(t)}),this.markers.sort((t,e)=>t.time-e.time),this.labels=f,this.totalDuration=g,this.clock=this.clockAnimation=void 0,this.markers.length||void 0!==this.stopAt||s||o){const t=this.clock=gi(0);t.on("change",e=>t===this.clock&&this.onClock(e)),m.unshift(this.clockAnimation=bo(t,[0,g],{...u,duration:g,ease:"linear"}))}const v=this.group=new li(m);e=Math.min(e,g),this.isDone&&e<g&&this.newFinished(),this.scrollTimeline?this.detachScroll=v.attachTimeline(this.scrollTimeline):(v.speed=this.playbackSpeed,this.isPaused&&v.pause(),e&&(v.time=e)),this.repeatIndex=this.currentRepeat(),this.prevTime=e||-1,this.watch()}toSequence(t){return this.entries.map(({item:e,at:n,marker:i})=>i?(t.set(i.name,i),eu(i.name,n)):e instanceof iu?{sequence:e.toSequence(t),at:n}:"string"==typeof e?eu(e,n):void 0===n?e:Array.isArray(e)?function(t,e){const n=[...t],i="function"==typeof n[0]?Math.max(1,n.length-1):2;return n[i]={...n[i],at:e},n}(e,n):{...e,at:n})}resolve(t){return this.flush(),"number"==typeof t?t:$c(t,this.labels)??this.time}currentRepeat(){const{repeat:t=0,repeatDelay:e=0,delay:n=0}=this.options,i=this.totalDuration+e,s=(this.clockAnimation?.time??0)-n;return i&&s>0?Math.min(t,Math.floor(s/i)):0}onClock(t){let e=this.prevTime;if(this.prevTime=t,this.isRebuilding)return;const{onUpdate:n,onRepeat:i,repeatType:s="loop"}=this.options;n?.(t);const o=this.currentRepeat();if(o!==this.repeatIndex&&(this.repeatIndex=o,i?.(),"loop"===s)){const t=this.speed>0;if(this.cross(e,t?this.totalDuration:0))return;e=t?-1:1/0}this.cross(e,t)}cross(t,e){if(t===e)return;const n=e>t,i=i=>n?i>t&&i<=e:i<t&&i>=e,s=n?this.markers:[...this.markers].reverse();for(const t of s)if(i(t.time)&&(t.callback?.(n?1:-1),t.pause))return this.pauseAt(t.time);return void 0!==this.stopAt&&i(this.stopAt)?(this.pauseAt(this.stopAt),this.stopAt=void 0,!0):void 0}pauseAt(t){return this.pause(),this.time=t,!0}watch(){const t=this.group;t.finished.then(()=>{if(t!==this.group||this.isDone)return;this.isDone=!0;const{onComplete:e,onReverseComplete:n}=this.options,i=this.speed<0&&n||e;i?.(),this.resolveFinished()})}newFinished(){this.isDone=!1,this.finished=new Promise(t=>{this.resolveFinished=t});const t=this.motionScope?.add(()=>{this.isKilled=!0,this.stop()});t&&this.finished.then(t)}}function su(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;return function(t,s,o){const r=ms.current?.transition,a={};let l;if(void 0!==n&&(a.reduceMotion=n),void 0!==i&&(a.skipAnimations=i),c=t,Array.isArray(c)&&c.some(Array.isArray)){const n={...a,...s,scope:e};r&&(n.defaultTransition={...r,...n.defaultTransition}),l=new iu(t,n)}else{const{onComplete:n,...i}=o||{},c={...a,...r,...i},{onUpdate:u}=i,h="number"==typeof t||"string"==typeof t&&("string"==typeof s||Array.isArray(s))?[u||(()=>{}),Array.isArray(s)?s:[t,s],{...c,onUpdate:void 0}]:[t,s,c];l=new iu([h],{...a,onComplete:n,scope:e},Qc(t,s,c,e))}var c;return l}}const ou=Object.assign(su(),{addEffect:as,removeEffect:ls});const ru=t=>function(e,n,i){return new li(function(t,e,n,i){if(null==t)return[];const s=vs(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={...vi(a,t)};s.duration&&(s.duration=p(s.duration)),s.delay&&(s.delay=p(s.delay));const o=di(i),l=hi(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]=$l(i,s)),Ne(e),ss(e,s),!o&&e.length<2&&e.unshift($l(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 Vn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),a.push(s)}return a}(e,n,i,t))},au=ru(),lu={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},cu=new WeakMap;function uu(t,e,n,s){const o=n[e],{length:r,position:a}=lu[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=cu.get(i);s||cu.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,h(0,o.scrollLength,o.current));const d=s-c;o.velocity=d>50?0:f(o.current-l,d)}const hu={start:0,center:.5,end:1};function du(t,e,n=0){let i=0;if(t in hu&&(t=hu[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 pu=[0,0];function mu(t,e,n,i){let s=Array.isArray(t)?t:pu,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,hu[t]?t:"0"]),o=du(s[0],n,i),r=du(s[1],e),o-r}const fu=[[0,0],[1,1]];function gu(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+h(s(o),s(o+1),e))/n;return i?1-r:r}function yu(t,e,n,s={}){const{target:o}=s,r=o||s.offset;return{measure:e=>{if(r){n.time=e.time;for(const t in lu){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(o&&o!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(ds(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}(o,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}!function(t,{offset:e=fu}){for(const n in lu){const s=t[n];s.offset.length=0;for(let t=0;t<e.length;t++)s.offset[t]=mu(e[t],s.containerLength,s.targetLength,s.targetOffset);s.progress=i(0,1,gu(s.offset,s.current))}}(n,s)}},notify:t=>e(r?n:t)}}const vu=new WeakMap,xu=new WeakMap,wu=new WeakMap,Tu=new WeakMap,bu=t=>t===document.scrollingElement?window:t;function Su(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return c;let s=wu.get(e);s||(s=new Set,wu.set(e,s));const o=yu(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),!vu.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 lu)uu(t,i,e,n);e.time=n}(e,t,I.timestamp);for(const e of s)e.measure(t);zt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>zt.read(n);vu.set(e,o);const r=bu(e);window.addEventListener("resize",o),e!==document.documentElement&&xu.set(e,il(e,o)),r.addEventListener("scroll",o),o()}if(n&&!Tu.has(e)){const t=vu.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=zt.read(i,!0);Tu.set(e,s)}const r=vu.get(e);return zt.read(r,!1,!0),()=>{Gt(r);const t=wu.get(e);if(!t)return;if(t.delete(o),t.size)return;wu.delete(e);const n=vu.get(e);vu.delete(e),n&&(bu(e).removeEventListener("scroll",n),xu.get(e)?.(),window.removeEventListener("resize",n));const i=Tu.get(e);i&&(Gt(i),Tu.delete(e))}}const Au=new Map;const Pu=t=>{if(/v/u.test(t))return[];const e=mu(t,0,0,0);return[mu(t,0,1,0)-e,e-mu(t,1,0,0),e]},Mu=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function Eu(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=fu){if(2!==t.length)return;const[e,n]=t.map(Pu),i=[Mu(e),Mu(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?Tn():wn())}(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=Au.get(t);i||(i=new Map,Au.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=Su(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(il(l),il([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const ku={some:0,all:1};t.AsyncMotionValueAnimation=oi,t.DOMKeyframesResolver=es,t.DOMVisualElement=wa,t.DocumentProjectionNode=na,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Ar,t.GroupAnimation=ri,t.GroupAnimationWithThen=li,t.HTMLProjectionNode=sa,t.HTMLVisualElement=Aa,t.JSAnimation=Ee,t.KeyframeResolver=fn,t.LayoutAnimationBuilder=Na,t.MotionGlobalConfig=s,t.MotionValue=fi,t.MotionValueState=ws,t.NativeAnimation=Vn,t.NativeAnimationExtended=Ln,t.NativeAnimationWrapper=ci,t.NodeStack=gr,t.ObjectVisualElement=class extends xa{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.PanSession=al,t.SVGVisualElement=class extends wa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ar}getBaseTargetFromProps(t,e){return Je.has(e)?super.getBaseTargetFromProps(t,e)??He(e):t[e]}getDefaultValue(t){return Je.has(t)?this.latestValues[t]??He(t):void 0}readValueFromInstance(t,e){if(Je.has(e)){const t=Fe(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=Mc.has(e)?e:ks(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Vc(t,e,n)}build(t,e,n){Bs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){kc(t,e,0,i)}mount(t){this.isSVGTag=Ec(t.tagName),super.mount(t)}},t.SubscriptionManager=d,t.ViewTransitionBuilder=Pc,t.VisualElement=xa,t.VisualElementDragControls=Vl,t.acceleratedValues=On,t.acquireProjectionNode=function(t){const e=Ca.get(t)||oa.get(t)?.projection;return e?.instance?[e,()=>{}]:Oa(t)},t.activeScope=ms,t.addAttrValue=js,t.addBuilderToScope=gs,t.addDomEvent=ea,t.addEffect=as,t.addPointerEvent=Ga,t.addPointerInfo=za,t.addSVGValue=Fs,t.addScaleCorrector=function(t){for(const e in t)So[e]=t[e],z(e)&&(So[e].isCSSVariable=!0)},t.addStyleValue=As,t.addToScope=fs,t.addUniqueItem=e,t.addValueToWillChange=$i,t.alpha=_,t.analyseComplexValue=Tt,t.animate=ou,t.animateEffectSubject=hs,t.animateElement=go,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Ua(t,e,n),r=new Na(i,s,{...ms.current?.transition,...o});return gs(r),r},t.animateMini=au,t.animateMotionValue=Pi,t.animateSingleValue=bo,t.animateTarget=Xi,t.animateValue=function(t){return new Ee(t)},t.animateValues=us,t.animateVariant=Hi,t.animateView=function(t,e={}){const n=new Pc(t,e);return gs(n),n},t.animateVisualElement=qi,t.animationMapKey=hi,t.anticipate=M,t.applyAxisDelta=to,t.applyBoxDelta=eo,t.applyGeneratorOptions=kn,t.applyPointDelta=Qs,t.applyPxDefaults=ss,t.applyTreeDeltas=so,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=ki(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=ki(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Ei(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Ei(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?v(-180,180,d-h):0;return t=>{const e={x:Mi(t,i.x,u.x,r.x),y:Mi(t,i.y,u.y,r.y)};if(s){const n=Ei(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-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,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...vi(i||{},"x")};delete g.path;const y=gi(0);y.start(Pi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=mr,t.attachFollow=Jl,t.attachSpring=tc,t.attrEffect=Os,t.axisDeltaEquals=fr,t.axisEquals=ur,t.axisEqualsRounded=dr,t.backIn=A,t.backInOut=P,t.backOut=S,t.bindToScope=ys,t.boxEquals=hr,t.boxEqualsRounded=pr,t.buildHTMLStyles=Vs,t.buildProjectionTransform=Tr,t.buildSVGAttrs=Bs,t.buildSVGPath=Rs,t.buildTransform=Hn,t.buildTransformer=bt,t.calcAxisDelta=$o,t.calcBoxDelta=Ko,t.calcChildStagger=pi,t.calcGeneratorDuration=_t,t.calcLength=No,t.calcRelativeAxis=zo,t.calcRelativeAxisPosition=Yo,t.calcRelativeBox=Go,t.calcRelativePosition=Xo,t.camelCaseAttributes=Mc,t.camelToDash=ks,t.cancelFrame=Gt,t.cancelMicrotask=To,t.cancelSync=Ic,t.checkVariantsDidChange=Lc,t.circIn=E,t.circInOut=V,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Or,t.collectMotionValues=mi,t.color=mt,t.compareByDepth=Sr,t.complex=At,t.containsCSSVariable=H,t.convertBoundingBoxToBox=$s,t.convertBoxToBoundingBox=Ks,t.convertOffsetToTimes=pe,t.copyAxisDeltaInto=Wo,t.copyAxisInto=Fo,t.copyBoxInto=Io,t.correctBorderRadius=vr,t.correctBoxShadow=xr,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>qi(t,e,n))),n=Bc(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&Li(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&Rc(d(c??(g&&g.props.initial))?.transition);if(Cc.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:aa(d)||!1===d?d:void 0,x=aa(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||ra(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const b=Lc(s.prevProp,v);let S=b||x&&(w&&!T||i>f),A=!1;const P=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of P){const{transition:i,transitionEnd:s,...o}=Li(t,n,Bi(t,e))||{};E={...E,...o,...s},M=Rc(i)||M}const{prevResolvedValues:k}=s;for(const e in{...k,...E}){if(e in m)continue;const n=E[e],i=k[e],o=Array.isArray(n)&&Array.isArray(i)?!Dc(n,i)||b:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){S=!0,r=p.get(e)||y,p.delete(e)&&(A=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),S&&(!T||!b||A))for(const n of P){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=Li(a,n)?.transition?.delayChildren;i.delay=pi(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||Ni(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):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=Bc(),s=!0}}},t.createAxis=rr,t.createAxisDelta=sr,t.createBox=ar,t.createDelta=or,t.createEffect=Ts,t.createGeneratorEasing=Zt,t.createProjectionNode=Rr,t.createRenderBatcher=Kt,t.createScopedAnimate=su,t.cubicBezier=w,t.cubicBezierAsString=Sn,t.defaultEasing=me,t.defaultOffset=de,t.defaultTransformValue=He,t.defaultValueTypes=Oe,t.degrees=at,t.delay=Mo,t.delayInSeconds=Mo,t.dimensionValueTypes=Zi,t.distance=sl,t.distance2D=ol,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=ms.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=vs(t).map(t=>{i?.track(t);const[s,o]=Va(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Vl(oa.get(t),()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=Bl.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return Bl.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{Bl.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return fs(()=>s.forEach(t=>t()))},t.eachAxis=br,t.easeIn=D,t.easeInOut=R,t.easeOut=C,t.easingDefinitionToFunction=F,t.elementDragControls=kl,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Dl(t)&&!!e},t.extractEventInfo=Ka,t.fillOffset=he,t.fillWildcards=Ne,t.findDimensionValueType=Ji,t.findEffect=cs,t.findValueType=t=>ec.find(_i(t)),t.flushKeyframeResolvers=mn,t.flushLayoutSnapshots=Wa,t.followValue=function(t,e){const n=gi(Ni(t)?t.get():t);return Jl(n,t,e),n},t.frame=zt,t.frameData=I,t.frameSteps=Yt,t.generateLinearEasing=Ht,t.getAnimatableNone=We,t.getAnimationMap=di,t.getComputedStyle=$l,t.getDefaultTransition=bi,t.getDefaultValueType=Fe,t.getEasingForSegment=B,t.getFeatureDefinitions=function(){return va},t.getFinalKeyframe=ve,t.getMixer=Ot,t.getOptimisedAppearId=zi,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=$n,t.getValueTransition=vi,t.getVariableValue=Ci,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<jc;t++){const i=ca[t],s=e.props[i];(aa(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=pc,t.getViewAnimations=mc,t.globalProjectionState=Pr,t.handOffElementState=vo,t.has2DTranslate=_s,t.hasComplexValues=wt,t.hasReducedMotionListener=ma,t.hasScale=Ys,t.hasTransform=Hs,t.hasWarned=function(t){return g.has(t)},t.hex=ot,t.hover=function(t,e,n={}){e=ys(e);const[i,s,o]=jl(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||wl())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=Mt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=vs(t);e=ys(e);const 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:ku[s]});return o.forEach(t=>a.observe(t)),fs(()=>a.disconnect())},t.inertia=ce,t.initPrefersReducedMotion=ga,t.interpolate=ue,t.invariant=()=>{},t.invisibleValues=Lt,t.isAnimationControls=ra,t.isBezierDefinition=j,t.isCSSVariableName=z,t.isCSSVariableToken=Y,t.isControllingVariants=ua,t.isDeltaZero=cr,t.isDragActive=wl,t.isDragging=xl,t.isEasingArray=L,t.isElementKeyboardAccessible=gl,t.isElementTextInput=vl,t.isForcedMotionValue=ba,t.isGenerator=En,t.isHTMLElement=ds,t.isKeyframesTarget=Oi,t.isMotionValue=Ni,t.isNear=Uo,t.isNodeOrChild=Ol,t.isNumericalString=o,t.isObject=r,t.isPrimaryPointer=$a,t.isSVGElement=ps,t.isSVGSVGElement=Eo,t.isSVGTag=Ec,t.isTransitionDefined=Ai,t.isVariantLabel=aa,t.isVariantNode=ha,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&bn()||!e||"string"==typeof e&&(e in An||bn())||j(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ui,t.isZeroValueString=a,t.keyframes=fe,t.makeAnimationInstant=jn,t.mapEasingToNativeEasing=Pn,t.mapValue=function(t,e,n,i){const s=Yl(e,n,i);return Ql(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=uo,t.measureViewportBox=co,t.memo=l,t.microtask=wo,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Wt,t.mixImmediate=Et,t.mixLinearColor=Vt,t.mixNumber=kt,t.mixObject=It,t.mixValues=Ro,t.mixVisibility=Bt,t.motionValue=gi,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(Oc);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=c,t.number=q,t.numberValueTypes=je,t.optimizedAppearDataAttribute=Ki,t.optimizedAppearDataId="framerAppearId",t.originProps=bs,t.parseAnimateLayoutArgs=Ua,t.parseCSSVariable=Di,t.parseValueFromTransform=qe,t.percent=lt,t.pipe=u,t.pixelsToPercent=yr,t.positionalKeys=ji,t.prefersReducedMotion=pa,t.press=function(t,e,n={}){e=ys(e);const[i,s,o]=jl(t,n),r=t=>{const i=t.currentTarget;if(!Nl(t))return;if(Ul.has(t))return;Fl.add(i),n.stopPropagation&&Ul.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Fl.has(i)&&Fl.delete(i),Nl(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||Ol(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),ds(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Il(()=>{Fl.has(t)||(n=!0,Wl(t,"down"))}),s=Il(()=>{n&&(n=!1,Wl(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Wl(t,"cancel")},{...e,once:!0})})(t,s),s),gl(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=U.now())=>{if(I.isProcessing)return;const e=t-I.timestamp;I.delta=s.useManualTiming?e:Math.max(Math.min(e,40),1),U.set(I.timestamp=t),I.isProcessing=!0;for(const t in Yt)Yt[t].process(I);I.isProcessing=!1},t.progress=h,t.progressPercentage=dt,t.propEffect=xo,t.propagateDirtyNodes=jr,t.px=ct,t.readSVGValue=Is,t.readStyleValue=Ps,t.readTransformValue=_e,t.recordStats=function(){if(Ao.value)throw Ao.value=null,Ao.addProjectionMetrics=null,Ao.countProjection=void 0,new Error("Stats are already being measured");const t=Ao;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)};const e={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0};t.countProjection=n=>{void 0!==n?e[Gl[n]]++:(t.addProjectionMetrics(e),e.nodes=e.calculatedTargetDeltas=e.calculatedProjections=0)}},t.releaseElement=yo,t.removeAxisDelta=qo,t.removeAxisTransforms=_o,t.removeBoxTransforms=Qo,t.removeEffect=ls,t.removeItem=n,t.removePointDelta=Ho,t.renderHTML=Ta,t.renderSVG=kc,t.resize=il,t.resolveElements=vs,t.resolveMotionValue=ko,t.resolveTransition=yi,t.resolveVariant=Li,t.resolveVariantFromProps=Ri,t.reverseEasing=b,t.rgbUnit=nt,t.rgba=it,t.rootProjectionNode=ia,t.round=Me,t.sampleDelta=Rn,t.scale=Z,t.scaleCorrectors=So,t.scalePoint=Js,t.scopeMotion=function(...t){const e="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:vs(e)[0],transition:o,add:t=>(c.push(t),()=>n(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{yo(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=ms.current;ms.current=t;try{return e()}finally{ms.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(zl(t[e]));n.addEventListener("change",m),a.push([e,n])}}return fs(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=Sa,t.scrapeSVGMotionValuesFromProps=Vc,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return c;const o={axis:e,container:n||i,...s};if("function"==typeof t){const n=ys(t);return fs(Su(t=>n(t[e].progress,t),o))}return fs(Eu(t,o))},t.scrollInfo=Su,t.secondsToMilliseconds=p,t.setDragLock=Tl,t.setFeatureDefinitions=function(t){va=t},t.setStyle=yn,t.setTarget=Wi,t.spring=le,t.springValue=function(t,e){const n=gi(Ni(t)?t.get():t);return tc(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=F(i)(c/u)*u}return e+c}},t.startWaapiAnimation=Mn,t.statsBuffer=Ao,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=Es,t.styleSubjectEffect=Ms,t.supportedWaapiEasing=An,t.supportsBrowserAnimation=Un,t.supportsFlags=vn,t.supportsLinearEasing=bn,t.supportsPartialKeyframes=os,t.supportsScrollTimeline=wn,t.supportsViewTimeline=Tn,t.supportsWaapi=Nn,t.svgEffect=Ns,t.svgSubjectEffect=Ws,t.sync=Fc,t.testValueType=_i,t.time=U,t.toMediaQuery=zl,t.transform=Yl,t.transformAxis=ro,t.transformBox=lo,t.transformBoxPoints=zs,t.transformPropOrder=Ze,t.transformProps=Je,t.transformValue=Ql,t.transformValueTypes=Be,t.translateAxis=oo,t.updateMotionValuesFromProps=da,t.variantPriorityOrder=la,t.variantProps=ca,t.velocityPerSecond=f,t.vh=ut,t.visualElementStore=oa,t.vw=ht,t.warnOnce=y,t.warning=()=>{},t.wrap=v});
|
|
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;const s={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),r=t=>"object"==typeof t&&null!==t,a=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,u=(...t)=>t.reduce((t,e)=>n=>e(t(n))),h=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class d{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 p=t=>1e3*t,m=t=>t/1e3,f=(t,e)=>e?t*(1e3/e):0,g=new Set;function y(t,e,n){t||g.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)),g.add(e))}const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>t*(3*(1-t)*((1-t)*e+t*n)+t*t);function w(t,e,n,i){return t===e&&n===i?c:s=>{let o=0,r=1,a=s;for(let e=0;;e++){a>=o&&a<=r||(a=(o+r)/2);const i=x(a,t,n)-s;if(i*i<1e-28||40===e)break;i>0?r=a:o=a,a-=1e-7*i/(x(a+1e-7,t,n)-s-i)}return x(a,e,i)}}const T=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=w(.33,1.53,.69,.99),A=b(S),P=T(A),M=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=b(E),V=T(E),D=w(.42,0,1,1),C=w(0,0,.58,1),R=w(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return L(t)?t[v(0,t.length,e)]:t}const j=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:c,easeIn:D,easeInOut:R,easeOut:C,circIn:E,circInOut:V,circOut:k,backIn:A,backInOut:P,backOut:S,anticipate:M},F=t=>{if(j(t)){const[e,n,i,s]=t;return w(e,n,i,s)}return"string"==typeof t?O[t]:t},I={delta:0,timestamp:0,isProcessing:!1};let W;function N(){W=void 0}const U={now:()=>(void 0===W&&U.set(I.isProcessing||s.useManualTiming?I.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(N)}},$=t=>Math.round(1e5*t)/1e5,K=t=>e=>"string"==typeof e&&e.startsWith(t),z=K("--"),Y=K("var(--"),X=t=>!!Y(t)&&G.test(t.split("/*")[0].trim()),G=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function H(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...q,transform:t=>i(0,1,t)},Z={...q,default:1},J=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tt=(t,e)=>n=>Boolean("string"==typeof n&&Q.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),et=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(J);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},nt={...q,transform:t=>Math.round((t=>i(0,255,t))(t))},it={test:tt("rgb","red"),parse:et("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+$(_.transform(i))+")"},st=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const ot={test:tt("#"),parse:function(t){const e=t.length>5?2:1,n=st(t,3,e);return{red:parseInt(st(t,0,e),16),green:parseInt(st(t,1,e),16),blue:parseInt(st(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:it.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:tt("hsl","hue"),parse:et("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform($(e))+", "+lt.transform($(n))+", "+$(_.transform(i))+")"},mt={test:t=>it.test(t)||ot.test(t)||pt.test(t),parse:t=>it.test(t)?it.parse(t):pt.test(t)?pt.parse(t):ot.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?it.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=mt.parse(t);return e.alpha=0,mt.transform(e)}},ft=new RegExp(J.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 ft.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=>(mt.test(t)?(i.color.push(o),s.push(vt),n.push(mt.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?$(i[o]):t===vt?mt.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:mt.test(n)?mt.getAnimatableNone(n):n;var n};const At={test:function(t){return isNaN(t)&&"string"==typeof t&&(ft.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 Pt(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 Mt({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=Pt(a,i,t+1/3),o=Pt(a,i,t),r=Pt(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 Et(t,e){return n=>n>0?e:t}const kt=(t,e,n)=>t+(e-t)*n,Vt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,it,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=Mt(i)),i}const Rt=(t,e)=>{const n=Ct(t),i=Ct(e);if(!n||!i)return Et(t,e);const s={...n};return t=>(s.red=Vt(n.red,i.red,t),s.green=Vt(n.green,i.green,t),s.blue=Vt(n.blue,i.blue,t),s.alpha=kt(n.alpha,i.alpha,t),it.transform(s))},Lt=new Set(["none","hidden"]);function Bt(t,e){return Lt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function jt(t,e){return n=>kt(t,e,n)}function Ot(t){return"number"==typeof t?jt:"string"==typeof t?X(t)?Et:mt.test(t)?Rt:Wt:Array.isArray(t)?Ft:"object"==typeof t?mt.test(t)?Rt:It:Et}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 Wt=(t,e)=>{const n=Tt(t),i=Tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Lt.has(t)&&!i.values.length||Lt.has(e)&&!n.values.length?Bt(t,e):u(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}(n,i),i.values),bt(i)):Et(t,e)},Nt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return kt(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=Nt.exec(t);if(!n)return;const i=Nt.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),r=parseFloat(i[1]);return t=>$(kt(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 Kt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const r=()=>i=!0,a=$t.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=s.useManualTiming,a=r?n.timestamp:performance.now();i=!1,r||(n.delta=o?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),m.process(n),f.process(n),n.isProcessing=!1,i&&e&&(o=!1,t(g))};return{schedule:$t.reduce((e,s)=>{const r=a[s];return e[s]=(e,s=!1,a=!1)=>(i||(i=!0,o=!0,n.isProcessing||t(g)),r.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<$t.length;e++)a[$t[e]].cancel(t)},state:n,steps:a}}const{schedule:zt,cancel:Yt,steps:Xt}=Kt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0,I),Gt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>zt.update(e,t),stop:()=>Yt(e),now:()=>I.isProcessing?I.timestamp:U.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)})`},qt=2e4;function _t(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(_t(r),qt);return{type:"keyframes",ease:t=>r.next(a*t).value/e,duration:m(a)}}const Jt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function Qt(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 ne(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function te(t,e){return t*Math.sqrt(1-e*e)}const ee=12;function ne(t,e,n){let i=n;for(let n=1;n<ee;n++)i-=t(i)/e(i);return i}const ie=.001;const se=(t,e)=>(e?t>=0:t>0)&&t<1/0;function oe(t,e){if(se(t,e))return t}function re(t){const e=oe(t.stiffness),n=oe(t.damping,!0),s=oe(t.mass),o={...t,stiffness:e??100,damping:n??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(e??n??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=Jt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*Qt(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=800,bounce:e=.3}){let n,s;const o=Jt(e);t=i(.01,10,m(t)),o<1?(n=e=>{const n=e*o,i=n*t,s=te(e,o),r=Math.exp(-i);return ie-n/s*r},s=e=>{const i=e*o*t,s=o*o*e*e*t,r=Math.exp(-i),a=te(e*e,o);return(-n(e)+ie>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=ne(n,s,5/t),a=r*Qt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:p(t)}}(o)),o.isResolvedFromDuration=!0;se(o.stiffness)&&se(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function ae(t=.3,e=.3){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}=re({...n}),d=t=>h?0:-m(t),f=a/(2*Math.sqrt(r*l)),g=m(Math.sqrt(r/l)),y=f*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?.01:2),v.restDelta=n.restDelta||(t?.005:.5)};let w,T,b;if(x(),f<1){const t=te(g,f),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===f){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(f*f-1),e=y-t,n=y+t,i=t<1||h?1/0:300/t,s=(t,e)=>Math.exp(e>i?(y-t)*i-y*e:-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=>p(T(t)),next:t=>{const e=w(t);if(u)o.done=t>=c;else{const n=p(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(_t(A),qt),e=Ht(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}const le=Object.assign(ae,{applyToOptions:t=>{const e=Zt(t,100,ae);return t.ease=e.ease,t.duration=p(e.duration),t.type="keyframes",t}});function ce({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 m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=le({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 ue(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const a=t.length;if(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 d=function(t,e,n){const i=[],o=s.mix||Ut,r=t.length-1;for(let s=0;s<r;s++){let r=n?.(t[s],t[s+1])||o(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||c:e;r=u(t,r)}i.push(r)}return i}(e,o,r),p=d.length,m=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=h(t[i],t[i+1],n);return d[i](s)};return n?e=>m(i(t[0],t[a-1],e)):m}function he(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=h(0,e,i);t.push(kt(n,1,s))}}function de(t){const e=[0];return he(e,t.length-1),e}function pe(t,e){return t.map(t=>t*e)}function me(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut",mixer:o}){const r="number"==typeof e[0]?void 0:o,a=L(i)?i.map(F):F(i)||R,l={done:!1,value:e[0]};let c=-1;if(!r)for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]){if(c>=0){c=-2;break}c=t-1}if(c>=0){const i=n&&n.length===e.length?n:de(e),o=i[c]*t,r=i[c+1]*t,u=e[c],h=e[c+1],d=Array.isArray(a)?a[c]:a,p=(s.mix||Ut)(u,h),m=e.length-2;return{calculatedDuration:t,next:e=>(l.value=c&&e<o?p(0):c<m&&(e>=r||!t)?"number"==typeof h?h:p(1):p(d(e>=r||!t?1:e<=o?0:(e-o)/(r-o))),l.done=e>=t,l)}}const u=ue(pe(n&&n.length===e.length?n:de(e),t),e,{ease:Array.isArray(a)?a:me(e,a),mixer:r});return{calculatedDuration:t,next:e=>(l.value=u(e),l.done=e>=t,l)}}function ge(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 f(n-t(i),e-i)}(e=>t.next(e).value,e,t.next(e).value)}function ye(t,{repeat:e,repeatType:n="loop"},i,s=1){let o,r,a=0;for(let e=0;e<t.length;e++){const n=t[e];null!==n&&(a++||(o=n),r=n)}const l=s<0||e&&"loop"!==n&&e%2==1?0:a-1;return l&&void 0!==i?i:l?r:o}const ve={decay:ce,inertia:ce,tween:fe,keyframes:fe,spring:le};function xe(t){"string"==typeof t.type&&(t.type=ve[t.type])}const we=(t,e)=>e-t>40&&!s.useManualTiming?e:t;function Te(t,e){return{kind:t,animation:e,timestamp:U.now(),frameTimestamp:I.timestamp,frameIsProcessing:I.isProcessing}}function be(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Te("animation-start",t),options:n?{...e,...n}:e})}catch{}}class Se{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 Ae=t=>t/100,Pe=t=>Math.round(1e4*t)/1e4;class Me extends Se{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!==U.now()&&this.tick(U.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;xe(t);const{type:e=fe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||fe;this.mixKeyframes=void 0,a!==fe&&"number"!=typeof r[0]&&(this.mixKeyframes=u(Ae,t.mixer?.(r[0],r[1])||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=_t(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}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=we(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||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==ce&&(d.value=ye(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??Pe((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!==ce?ye(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,m=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&&(m=r)),p=i(0,1,o)*a}return e?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!e&&(d.value=o(d.value)),d}get duration(){return m(this.calculatedDuration)}get iterationDuration(){return this.duration+m(this.options.delay??0)}get time(){return m(this.currentTime)}set time(t){"finished"===this.state&&this.updateFinished(),t=p(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 ge(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(U.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(U.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}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 Ee=new Set(["brightness","contrast","saturate","opacity"]);function ke(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(J)||[];if(!i)return t;const s=n.replace(i,"");let o=Ee.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ve=/\b([a-z-]*)\(.*?\)/gu,De={...At,getAnimatableNone:t=>{const e=t.match(Ve);return e?e.map(ke).join(" "):t}},Ce={...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))}},Re={...q,transform:Math.round},Le={rotate:at,pathRotation:at,rotateX:at,rotateY:at,rotateZ:at,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,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:_,originX:dt,originY:dt,originZ:ct},Be={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,...Le,zIndex:Re,fillOpacity:_,strokeOpacity:_,numOctaves:Re},je={...Be,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:De,WebkitFilter:De,mask:Ce,WebkitMask:Ce},Oe=t=>je[t],Fe=new Set([De,Ce]);let Ie,We,Ne;function Ue(t,e){if(t===Ie&&e===We)return Ne;let n=Oe(t);return Fe.has(n)||(n=At),Ne=n.getAnimatableNone?n.getAnimatableNone(e):void 0,Ie=t,We=e,Ne}function $e(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ke=t=>180*t/Math.PI,ze=t=>{const e=Ke(Math.atan2(t[1],t[0]));return Xe(e)},Ye={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:ze,rotateZ:ze,skewX:t=>Ke(Math.atan(t[1])),skewY:t=>Ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Xe=t=>((t%=360)<0&&(t+=360),t),Ge=t=>Math.hypot(t[0],t[1]),He=t=>Math.hypot(t[4],t[5]),qe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ge,scaleY:He,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(Ge(t)+He(t))/2,rotateX:t=>Xe(Ke(Math.atan2(t[6],t[5]))),rotateY:t=>Xe(Ke(Math.atan2(-t[2],t[0]))),rotateZ:ze,rotate:ze,skewX:t=>Ke(Math.atan(t[4])),skewY:t=>Ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function _e(t){return t.includes("scale")?1:0}function Ze(t,e){if(!t||"none"===t)return _e(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return _e(e);const i=(n[1]?qe:Ye)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const Je=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ze(n,e)},Qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tn=(()=>new Set([...Qe,"pathRotation"]))(),en=t=>t===q||t===ct,nn=new Set(["x","y","z"]),sn=Qe.filter(t=>!nn.has(t));const on=new Set(["bottom","right"]);function rn(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 an=({transform:t})=>Ze(t,"x"),ln=({transform:t})=>Ze(t,"y"),cn={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>rn(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>rn(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:an,y:ln,translateX:an,translateY:ln},un=new Set;let hn=!1,dn=!1,pn=!1;function mn(){if(dn){const t=[],e=new Set,n=new Set;un.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),on.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return sn.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)})}dn=!1,hn=!1,un.forEach(t=>t.complete(pn)),un.clear()}function fn(){un.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(dn=!0)})}function gn(){pn=!0,fn(),mn(),pn=!1}class yn{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?(un.add(this),hn||(hn=!0,zt.read(fn),zt.resolveKeyframes(mn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=function(t,e,n){if("string"==typeof t){if(o(t)||a(t))return parseFloat(t);if(!At.test(t)&&At.test(n))return Ue(e,n)}return t??void 0}(n.readValue(e,r),e,r);void 0!==i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),i&&void 0===s&&i.set(t[0])}$e(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),un.delete(this)}cancel(){"scheduled"===this.state&&(un.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const vn=t=>t.startsWith("--");function xn(t,e,n){vn(e)?t.style.setProperty(e,n):t.style[e]=n}const wn={};function Tn(t,e){const n=l(t);return()=>wn[e]??n()}const bn=Tn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Sn=Tn(()=>void 0!==window.ViewTimeline,"viewTimeline"),An=Tn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pn([0,.65,.55,1]),circOut:Pn([.55,0,1,.45]),backIn:Pn([.31,.01,.66,-.59]),backOut:Pn([.33,1.53,.69,.99])};function En(t,e){return t?"function"==typeof t?An()?Ht(t,e):"ease-out":j(t)?Pn(t):Array.isArray(t)?t.map(t=>En(t,e)||Mn.easeOut):Mn[t]:void 0}function kn(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=En(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 Vn(t){return"function"==typeof t&&"applyToOptions"in t}function Dn({type:t,...e}){return Vn(t)&&An()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Cn extends Se{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;const l=Dn(t);this.animation=kn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!s){const t=ye(i,this.options,r,this.speed);this.updateMotionValue?.(t),xn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},be(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(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=p(t),e&&(this.animation.pause(),this.updateFinished())}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=this.onFinish=null,t&&bn()?(this.animation.timeline=t,e?.(this.animation),c):n(this)}}const Rn={anticipate:M,backInOut:P,circInOut:V};function Ln(t){"string"==typeof t.ease&&t.ease in Rn&&(t.ease=Rn[t.ease])}class Bn extends Cn{constructor(t){Ln(t),xe(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(U.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 Me({...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&&xn(n,s,l),e.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const jn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!At.test(t)&&"0"!==t||t.startsWith("url(")));function On(t){t.duration=0,t.type="keyframes"}const Fn=new Set(["opacity","clipPath","filter","transform"]),In=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Wn=({mixer:t,keyframes:e})=>t&&"number"!=typeof e[0]&&e.some((n,i)=>i&&t(e[i-1],n)),Nn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Un=()=>!s.useManualTiming&&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||!Fn.has(n)&&!Nn.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 Un()&&(Fn.has(n)||Nn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&In.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r&&!Wn(t)}const Kn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,zn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yn=Qe.length,Xn={},Gn=(t,e,n=Kn(e,Le[t]))=>(Xn[t]||(Xn[t]=(zn[t]||t)+"("))+n+")",Hn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function qn(t,e,n){let i="";for(let s=0;s<Yn;s++){const o=Qe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=Kn(r,Be[o]));Hn(o,r)||(i+=Gn(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=Gn("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const _n=new WeakMap,Zn=.001,Jn=100,Qn=new Set(["linear","easeIn","easeOut","easeInOut"]),ti=new WeakMap,ei=(t,e)=>Math.min(200,Math.max(2,Math.ceil((e-t)/10))),ni=(t,e)=>Math.abs(t-e)<=.001,ii=(t,e)=>t-e,si=(t,e,n)=>de(Array(n+1)).map(n=>kt(t,e,n)),oi=t=>t.motionValue.owner,ri=t=>_n.get(t),ai=({state:t})=>"idle"===t||"finished"===t,li=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class ci{constructor(t,e,n,i){this.element=t,this.update=e,this.makeDriver=n,this.animation=i}get js(){return this.driver||(this.driver=this.makeDriver(this.update))}now(){return this.driver||this.makeDriver!==Gt?this.js.now():I.isProcessing?I.timestamp:U.now()}start(t=!0){const e=ri(this.element);!e||e.isJS?this.js.start(t):e.schedule(!1,!t)}stopJS(){this.driver?.stop()}stop(){this.stopJS();const t=ri(this.element);t&&!t.isFinishing&&t.release(this.animation)}}let ui,hi;class di extends Me{constructor(t){const e=oi(t).current,{driver:n=Gt}=t;let i;const s=function(t){const e=oi(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(li(e,"transform")||"none")||li(e,"pathRotation")||e.projection?.isProjecting()||Wn(t))}(t);t.driver=t=>new ci(e,t,n,i),super(t),i=this;const o=this.driver;o&&(o.animation=this),this.canAccelerate=s;const{stop:r}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),r()}}offsets(){const{keyframes:t,times:e}=this.options;return e||(this.offsetsOf!==t&&(this.offsetsOf=t,this.cachedOffsets=de(t)),this.cachedOffsets)}get group(){return ri(oi(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}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(U.now()):void 0}tween(){const{keyframes:t,type:e,repeat:n,delay:i=0}=this.options;let s=-1;if(n||e!==fe||null!==this.holdTime)return;for(let e=1;e<t.length;e++)if(t[e]!==t[e-1]){if(s>=0)return;s=e-1}let{ease:o}=this.options;L(o)&&(o=o[s]);const r=this.offsets(),a=t=>this.startTime+(i+r[t]*this.totalDuration)/this.speed;if(s>=0){const t=j(o)?Pn(o):(t=>Qn.has(t))(o)?Mn[o]:F(o);return[a(s),a(s+1),"string"==typeof t||ni(t(0),0)&&ni(t(1),1)?t:void 0]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,type:u}=o,h=(u||fe)===fe?this.offsets():[0,1],d=n+r/i,p=[];if(null!==this.holdTime||!(s>0))return p;for(let n=Math.max(0,Math.floor((t-d)*i/s));n<=a;n++){const o=d+n*s/i;if(o>e)break;for(const r of h){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&p.push(a)}}return p}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=U.now(),e=this.sampleAt(t,!0);this.options.motionValue.setWithVelocity(null===this.holdTime?this.sampleAt(t-10,!0):e,e,10)}play(){this.isStopped||((this.group||function(t){const e=t.current,n=new Set,i=new Map;let s,o,r={},a=[],l=new Map,c=[],u=!1,d=!1,p=!1,m=!1,f=-1/0,g=1/0;const y=t=>{for(const e of n)if(e.name===t)return!0},v=(e,n)=>{const s={};for(const o of void 0===e?Qe:a){const a=i.get(o),l=void 0===e?li(t,o):a?a.sampleAt(n>e&&!a.timing()[1]?n:e):r[o];void 0!==l&&(s[o]=l)}return s},x=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&Hn(i,s)||(n+=Gn(i,s)+" ")}return(e?n.trim():n)||"none"},w=(t,e)=>x(v(t,e)),T=(t=v())=>{e.style.transform=x(t,!0)},b=t=>{t.onfinish=t.oncancel=null,t.cancel()},S=(t=!0)=>{clearTimeout(s),g=1/0,o=void 0,t&&T(),c.forEach(({animation:t})=>b(t)),c=[]},A=(t,n)=>new Animation(new KeyframeEffect(e,t,n)),P=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=U.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,c.some(t=>t.end===1/0)&&(b(t),c=c.filter(t=>t!==i)),O.schedule(!1)}),t.oncancel=()=>c.includes(i)&&O.demote(),c.push(i)},M=(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]:[]},E=(t,e,n,i)=>{const s=ei(e,n);if(4*i.length>s)return;let o;for(const i of t){const t=i.numberAt(e),s=(i.numberAt((e+n)/2)-t)/(i.numberAt(n)-t);if(s==s)if(void 0===o)o=s;else if(!ni(s,o))return}const r=si(e,n,s).concat(i).sort(ii),a=t=>h(e,n,t);let l,c;for(const n of t){const t=n.numberAt(e),i=r.map(e=>n.numberAt(e)-t),s=i[i.length-1],o=i.some(t=>Math.abs(t)*Zn>Math.abs(s))?0:s,a=i.map(t=>o?t/o:t);if(o&&!l)l=a,c=e=>(n.numberAt(e)-t)/o;else if(a.some((t,e)=>!ni(t,o&&l[e])))return}if(!l||l.every((t,e)=>ni(t,a(r[e]))))return"linear";const u=[],d=(t,e=c(t))=>u.push(Pe(e)+" "+Pe(100*a(t))+"%");return l.forEach((t,e)=>{e&&Math.abs(t-l[e-1])>.2&&M(c,r[e-1],r[e]).forEach(t=>d(t)),d(r[e],t)}),"linear("+u+")"},k=(t,e,n,i)=>{const s=[e],o=[];let r=n,a=e;for(const i of t){const t=i.tween();if("linear"!==t?.[2]){const[s,l]=i.timing(),[c,u]=t||[e,l?n:s];r=Math.min(r,c),a=Math.max(a,u),o.push(i)}}r=Math.max(e,r),a=Math.min(n,a);const l=(t,e)=>o.every(n=>!(Math.abs(n.numberAt((t+e)/2)-(n.numberAt(t)+n.numberAt(e))/2)>(n.name.startsWith("scale")?.001:.1))),c=(e,n,i)=>{if(n-e<1||l(e,n))s.push(n);else if(i<4)c(e,(e+n)/2,i+1),c((e+n)/2,n,i+1);else{for(const i of t)s.push(...M(t=>i.numberAt(t),e,n));s.push(n)}},u=a>r?si(r,a,Math.ceil((a-r)/100)):[];u.push(n);for(const t of i)u.push(t,Math.min(t+.01,n));let h=e;for(const t of u.sort(ii))t>h&&c(h,t,0),h=t;return s.sort(ii)},V=t=>{let e;for(const n of t){const t=n.tween();if(!t||e&&(Math.abs(t[0]-e[0])>1||Math.abs(t[1]-e[1])>1))return;e=[t[0],t[1],e&&t[2]!==e[2]?void 0:t[2]]}return e},D=(t,e,n,i,s={fill:"both"},o)=>{const r=i?[]:t.flatMap(t=>t.boundaries(e,n)),a=i||E(t,e,n,r),l=a?[e,n]:k(t,e,n,r),c=l.map(t=>w(t,o));let u={transform:c};return a||(u.offset=l.map(t=>h(e,n,t))),c.every(t=>t===c[0])&&(T(v(e,o)),u=null),A(u,{...s,duration:n-e,easing:a||"linear"})},C=t=>{const e=U.now()+t;e<g&&(clearTimeout(s),g=e,s=setTimeout(()=>{g=1/0,O.schedule(!1)},t))},R=e=>{let s=e,u=0,h=0;const d=[],p=[],m=new Set;i.clear(),l=new Map;for(const t of n){i.set(t.name,t);const[n,o]=t.timing(),r=n===1/0;if(l.set(t,[t.at(e),t.speed,r]),!r){if(t.speed<0)return;if(o){if(u){const t=(n-h)/o;if(Math.abs(o-u)>1||Math.abs(t-Math.round(t))*u>1)return}else u=o,h=n;p.push(t)}else m.add(n);d.push(t),s=Math.max(s,n)}}r={},a=Qe.filter(e=>{if(i.has(e))return!0;const n=r[e]=li(t,e);return void 0!==n&&!Hn(e,n)}),S(!1);const f=!u&&V(d);try{if(s>e){let t;if(f&&f[1]>e){const[n,i,r]=f;if(n-e>Jn)return d.forEach(t=>t.sync()),C(o=n-e-Jn),!0;t="string"==typeof r?r:r?((t,e)=>{let n=ti.get(t);return n?.[0]!==e&&(n=[e,"linear("+de(Array(e+1)).map(e=>Pe(t(e))+" "+Pe(100*e)+"%")+")"],ti.set(t,n)),n[1]})(r,ei(n,i)):E(d,n,i,[]),t&&P(D(d,n,i,t,{fill:"both",endDelay:s-i}),n-e,s-n)}t||P(D(d,e,s),0,s-e),m.forEach(t=>t<s-1&&P(A(null,{duration:t-e}),0,t-e))}if(u){const t=h+Math.floor((s-h)/u)*u;P(D(p,t,t+u,void 0,{iterations:1/0,iterationStart:(s-t)/u,fill:"forwards"},s),s-e)}}catch{return}return c.length||S(),!0},L=(t,e)=>{let i,s=0;for(const e of n){const n=l.get(e);if(!n)return!1;const[o,r,a]=n,u=e.at(t),h=e.timing()[0]===1/0;if(a){if(h&&(u===o||!c.length))continue;return!1}const d=(u-o)/r,p=h?0:e.speed/r;if(void 0===i)i=d,s=p;else if(Math.abs(d-i)>1||p!==s)return!1}if(void 0===i)return!0;if(!c.length){if(void 0===o||e&&s)return!1;if(s){const t=(o-i)/s;if(t<1)return!1;C(t)}return!0}for(const{offset:t,end:n,isDone:s}of c){const o=i-t;if(n<1/0&&(s?o<n-1:o<0&&(e||t<=0)||o>=n))return!1}for(const{animation:e,offset:n,isDone:o}of c){if(o)continue;const r=i-n;s&&e.updatePlaybackRate&&"running"===e.playState&&Math.abs(Number(e.currentTime)-r)<20?e.playbackRate!==s&&e.updatePlaybackRate(s):s?(e.playbackRate!==s&&(e.playbackRate=s),e.startTime=t-r/s):(e.startTime=null,e.currentTime=r)}return!0},B=()=>!n.size&&(p=!0,ri(e)===O&&_n.delete(e),O.isJS||S(),!0),j=()=>{const e=U.now();if(O.isJS||(O.isFinishing=!0,n.forEach(n=>{const[i,s]=n.timing();"running"===n.state&&n.speed>0&&!s&&i<=e+1&&(n.complete(),r[n.name]=li(t,n.name),l.has(n)||(u=!0))}),O.isFinishing=!1),d=!1,p)return;if(n.forEach(t=>ai(t)&&n.delete(t)),B())return;for(const t of n)if(!t.canAccelerate)return O.demote(!0);O.isJS&&(O.isJS=!1,u=!0,n.forEach(t=>t.stopJS()));const i=u,s=m;if(u=m=!1,i||!L(e,s)){if(s){if(e-f<100)return O.demote();f=e}if(!R(e))return O.demote()}else if(void 0!==o&&!s)return;n.forEach(t=>t.timing()[0]===1/0&&t.sync())},O={tracks:n,isJS:!1,isFinishing:!1,schedule(t,e){p||(u||(u=t),m||(m=!!e),d||(d=!0,I.isProcessing?zt.render(j,!1,!0):pi(j)))},release(t){ai(t)&&n.delete(t),B()||O.schedule(!0)},check(){if(!O.isJS)for(const e in r)if(li(t,e)!==r[e]&&!y(e))return O.schedule(!0,!0)},demote(t){if(!O.isJS&&!p)return n.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),O.isJS=!0,l=new Map,S(),n.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return _n.set(e,O),O}(oi(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&this.group.schedule(!1)}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.tick(U.now())}get time(){return this.isAccelerated()?m(i(0,this.totalDuration,this.at(U.now())-(this.options.delay||0))):super.time}set time(t){(ui??(ui=Object.getOwnPropertyDescriptor(Me.prototype,"time").set)).call(this,t)}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}const pi=t=>{hi||queueMicrotask(()=>{const t=hi;hi=void 0,t.forEach(t=>t())}),(hi||(hi=[])).push(t)};class mi extends Se{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=U.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||yn;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:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=U.now();const h=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=jn(s,e),a=jn(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||Vn(n))&&i)}(t,o,r,a);h||(!s.instantAnimations&&l||u?.(ye(t,n,e)),t[0]=t[t.length-1],On(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),m=!p&&(({name:t,motionValue:e})=>t&&Qe.includes(t)&&e?.owner?.current instanceof HTMLElement&&Un()&&An())(n);let f;if(i&&(p||m||this.resolvedAt!==this.createdAt)&&(n.startTime??(n.startTime=we(this.createdAt,this.resolvedAt))),p){n.element=n.motionValue?.owner?.current;try{f=new Bn(n)}catch{f=new Me(n)}}else f=m?new di(n):new Me(n);this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),gn()),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?.cancel(),this.keyframeResolver?.cancel()}}class fi{constructor(t){this.stop=()=>{for(const t of this.animations)t.stop()},this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}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){for(const e of this.animations)e.time=t}get speed(){return this.getAll("speed")}set speed(t){for(const e of this.animations)e.speed=t}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return gi(this.animations,"duration")}get iterationDuration(){return gi(this.animations,"iterationDuration")}play(){for(const t of this.animations)t.play()}pause(){for(const t of this.animations)t.pause()}cancel(){for(const t of this.animations)t.cancel()}complete(){for(const t of this.animations)t.complete()}}function gi(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 yi extends fi{then(t,e){return this.finished.finally(t).then(()=>{})}}class vi extends Cn{constructor(t){super(),this.animation=t,t.onfinish=this.onFinish=()=>{t.onfinish=null,this.finishedTime=this.time,this.notifyFinished()},be(this,{})}}const xi=new WeakMap,wi=(t,e="")=>`${t}:${e}`;function Ti(t){let e=xi.get(t);return e||(e=new Map,xi.set(t,e)),e}function bi(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 Si={current:void 0};class Ai{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=U.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),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=U.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 d)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new d,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(){zt.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){e&&(this.updatedAt=U.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){Si.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=U.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return new Promise(e=>this.run(t,e))}run(t,e){this.stop(),this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e?.()}),i||(this.animation=n),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Pi(t,e){return new Ai(t,e)}function Mi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ei(t,e){const n=t?.[e]??t?.default??t;return n!==t?Mi(n,t):n}const ki={type:"spring",stiffness:500,damping:25,restSpeed:10},Vi={type:"keyframes",duration:.8},Di={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ci=(t,{keyframes:e})=>e.length>2?Vi:tn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ki:Di,Ri=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function Li(t){for(const e in t)if(!Ri.has(e))return!0;return!1}const Bi=(t,e,n,i={},o,r)=>a=>{const l=Ei(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=p(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:o,hasOnUpdate:!!l.onUpdate};Li(l)||Object.assign(h,Ci(t,h)),h.duration&&(h.duration=p(h.duration)),h.repeatDelay&&(h.repeatDelay=p(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(On(h),0===h.delay&&(d=!0)),(s.instantAnimations||s.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,On(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=ye(h.keyframes,l);if(void 0!==t)return void zt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Me(h):new mi(h)};function ji(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Oi(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 Fi(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 Ii=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wi(t){const e=Ii.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Ni(t,e,n=1){const[i,s]=Wi(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return X(s)?Ni(s,e,n+1):s}function Ui(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 $i(t,e,n){return Ui(t.getProps(),e,n,t)}const Ki=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,zi=new Set(["width","height","top","left","right","bottom",...Qe]),Yi=t=>Array.isArray(t);function Xi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pi(n))}function Gi(t){return Yi(t)?t[t.length-1]||0:t}function Hi(t,e){const n=$i(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Xi(t,e,Gi(o[e]))}}const qi=t=>Boolean(t&&t.getVelocity);function _i(t){return Boolean(qi(t)&&t.add)}function Zi(t,e){const n=t.getValue("willChange");if(_i(n))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}}const Ji="data-framer-appear-id";function Qi(t){return t.props[Ji]}const ts="undefined"!=typeof window;function es({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function ns(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Mi(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&&es(d,e))continue;const r={delay:n,...Ei(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){zt.update(()=>i.set(s));continue}let p=!1;if(ts&&window.MotionHandoffAnimation){const n=Qi(t);if(n){const t=window.MotionHandoffAnimation(n,e,zt);null!==t&&(r.startTime=t,p=!0)}}Zi(t,e);const m=c??t.shouldReduceMotion;i.run(Bi(e,i,s,m&&zi.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>zt.update(()=>{r&&Hi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function is(t,e,n={}){const i=$i(t,e,Ki(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?ns(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(is(t,e,{...n,delay:i+("function"==typeof r?0:r)+bi(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 ss(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>is(t,e,n))):"string"==typeof e?is(t,e,n):Promise.all(ns(t,$i(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const os=t=>e=>e.test(t),rs=[q,ct,lt,at,ht,ut,{test:t=>"auto"===t,parse:t=>t}],as=t=>rs.find(os(t));function ls(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||a(t))}const cs=new Set(["auto","none","0"]);class us extends yn{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(H(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!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=Ni(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!zi.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=as(i),r=as(s);if(H(i)!==H(s)&&cn[n])this.needsMeasurement=!0;else if(o!==r)if(en(o)&&en(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else cn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ls(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&&!cs.has(e)&&wt(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=Ue(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return cn[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!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?.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.resolveNoneKeyframes()}}const hs=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ds=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...hs,"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 ps(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&ds.has(e)&&(t[n]=t[n]+"px")}const ms=l(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),fs=[];function gs(t){ys(t),fs.unshift(t)}function ys(t){n(fs,t)}function vs(t){return fs.find(e=>e.test(t))}function xs(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.run(Bi(r,c,l,a&&zi.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):zt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>zt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function ws(t,e,n,i,s){let o,r=!1;const a=xs(i=>{let a=o?.[i]??t.get(e,i);if(!a){let l;if(!s){const s=n[i];l=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}a=Pi(l,{owner:s}),r?t(e,{[i]:a}):(o||(o={}))[i]=a}return a},n,i,s);return r=!0,o&&t(e,o),a}function Ts(t){return r(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function bs(t){return r(t)&&"ownerSVGElement"in t}const Ss={};function As(t){return Ss.current?.add(t),t}function Ps(t){const e=Ss.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const Ms=t=>Ss.current?Ss.current.bind(t):t;function Es(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:Ss.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function ks(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=Es(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 Vs{constructor(t=zt.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 Ds(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Vs(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 Cs=new Set(["originX","originY","originZ"]),Rs=(t,e)=>Kn(t.get(e)?.get(),Be[e]),Ls=(t,e,n,i)=>{let s,o;if(tn.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)=>Qe.indexOf(t)-Qe.indexOf(e)))}e.get("transform")||(Ts(t)||e.get("transformBox")||Ls(t,e,"transformBox",new Ai("fill-box")),e.set("transform",new Ai("none"),()=>{_n.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&&(Hn(s,o)||(e+=(e&&" ")+Gn(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+Gn("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else Cs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new Ai(""),()=>{const n=Rs(e,"originX")??"50%",i=Rs(e,"originY")??"50%",s=Rs(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]=Kn(i.getCurrent(),Be[n])};return e.set(n,i,s,o)},Bs=(t,e)=>{if(tn.has(e))return Je(t,e);const n=getComputedStyle(t),i=vn(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},js=Ds(Ls,{test:t=>Ts(t)||bs(t),read:Bs}),Os=ks(js);function Fs(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Is(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(tn.has(t))r=!0;else if(z(t))s[t]=n;else{const e=Kn(n,Be[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 Ws={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ns={offset:"strokeDashoffset",array:"strokeDasharray"};function Us(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ws:Ns;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const $s=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ks(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Is(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 $s)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&&Us(h,s,o,r,!1)}const zs=(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=Fs(s));const r=Be[n]||Be[s],a=o?()=>{t[s]=Kn(i.get(),Be[n])}:()=>{const e=Kn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Ys=ks(Ds(zs));const Xs=(t,e,n,i)=>{if(n.startsWith("path")&&!tn.has(n))return function(t,e,n,i){return zt.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 Ai("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 zs(t,e,n,i,_s(n));if("d"===n)return e.set(n,i,()=>{const e=i.get()?.replace(/path\(|["')]/g,"");void 0===e?t.removeAttribute(n):t.setAttribute(n,e)});return(tn.has(n)||Cs.has(n)||vn(n)||n in t.style?Ls:zs)(t,e,n,i)},Gs=(t,e)=>tn.has(e)?Be[e]?.default||0:vn(e)||$s.includes(e)?Bs(t,e)||t.getAttribute(Fs(e))||0:(e=_s(e),t.getAttribute(Fs(e))??t.getAttribute(e)??void 0),Hs=Ds(Xs,{test:bs,read:Gs}),qs=ks(Hs);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 Js({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Qs(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 to(t){return void 0===t||1===t}function eo({scale:t,scaleX:e,scaleY:n}){return!to(t)||!to(e)||!to(n)}const no=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function io(t){return eo(t)||oo(t)||so(t)}function so(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function oo(t){return ro(t.x)||ro(t.y)}function ro(t){return t&&"0%"!==t}function ao(t,e,n){return n+e*(t-n)}function lo(t,e,n,i,s){return void 0!==s&&(t=ao(t,s,i)),ao(t,n,i)+e}function co(t,e=0,n=1,i,s){t.min=lo(t.min,e,n,i,s),t.max=lo(t.max,e,n,i,s)}function uo(t,{x:e,y:n}){co(t.x,e.translate,e.scale,e.originPoint),co(t.y,n.translate,n.scale,n.originPoint)}const ho=.999999999999,po=1.0000000000001;function mo(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,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(fo(t.x,-o.scroll.offset.x),fo(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,uo(t,r)),i&&(i.path?.[a]||i)!==o&&io(o.latestValues)&&vo(t,o.latestValues,o.layout?.layoutBox));e.x<po&&e.x>ho&&(e.x=1),e.y<po&&e.y>ho&&(e.y=1)}function fo(t,e){t.min+=e,t.max+=e}function go(t,e,n,i,s=.5){co(t,e,n,kt(t.min,t.max,s),i)}function yo(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function vo(t,e,n){const i=n??t;go(t.x,yo(e.x,i.x),e.scaleX,e.scale,e.originX),go(t.y,yo(e.y,i.y),e.scaleY,e.scale,e.originY)}function xo(t,e){return Zs(Qs(t.getBoundingClientRect(),e))}function wo(t,e,n){const i=xo(t,n),{scroll:s}=e;return s&&(fo(i.x,s.offset.x),fo(i.y,s.offset.y)),i}const To=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),bo={},So=t=>bs(t)?Hs:js;class Ao{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=us}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 xo(this.current)}getProps(){return bo}}function Po(t,e,n,i){if(Ss.current?.track(t),i)return xs(t=>i.getValue(t,null),e,n,i);const s=So(t);return ws(s,t,e,n,new Ao(s,t))}const Mo=t=>So(t).state(t)?.release();function Eo(t,e){const n=So(t).state(t);if(!n)return;const i=_n.get(t);i&&(i.demote(),_n.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const ko=Ds((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>r(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:Vo,cancel:Do}=Kt(queueMicrotask,!1);function Co(t,e,n){const i=qi(t)?t:Pi(t);return i.run(Bi("",i,e,n)),i.animation}const Ro={};const Lo={value:null,addProjectionMetrics:null,countProjection:void 0};function Bo(t,e){const n=U.now();t=Ms(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(Yt(i),t(o-e))};return zt.setup(i,!0),As(()=>Yt(i))}function jo(t,e){return Bo(t,p(e))}function Oo(t){return bs(t)&&"svg"===t.tagName}function Fo(t){return qi(t)?t.get():t}const Io=t=>"number"==typeof t?t:parseFloat(t),Wo=hs.length,No=t=>"number"==typeof t||ct.test(t);function Uo(t,e,n,i,s,o){s?(t.opacity=kt(0,n.opacity??1,Ko(i)),t.opacityExit=kt(e.opacity??1,0,zo(i))):o&&(t.opacity=kt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Wo;s++){const o=hs[s];let r=$o(e,o),a=$o(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||No(r)===No(a)?(t[o]=Math.max(kt(Io(r),Io(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<no.length;s++){const o=no[s];(e[o]||n[o])&&(t[o]=kt(e[o]||0,n[o]||0,i))}}function $o(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ko=Yo(0,.5,k),zo=Yo(.5,.95,c);function Yo(t,e,n){return i=>i<t?0:i>e?1:n(h(t,e,i))}function Xo(t,e){t.min=e.min,t.max=e.max}function Go(t,e){Xo(t.x,e.x),Xo(t.y,e.y)}function Ho(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function qo(t){return t.max-t.min}function _o(t,e,n){return Math.abs(t-e)<=n}function Zo(t,e,n,i=.5){t.origin=i,t.originPoint=kt(e.min,e.max,t.origin),t.scale=qo(n)/qo(e),t.translate=kt(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 Jo(t,e,n,i){Zo(t.x,e.x,n.x,i?.originX),Zo(t.y,e.y,n.y,i?.originY)}function Qo(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+qo(e)}function tr(t,e,n,i){Qo(t.x,e.x,n.x,i?.x),Qo(t.y,e.y,n.y,i?.y)}function er(t,e,n,i=0){const s=i?kt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+qo(e)}function nr(t,e,n,i){er(t.x,e.x,n.x,i?.x),er(t.y,e.y,n.y,i?.y)}function ir(t,e,n,i,s){return t=ao(t-=e,1/n,i),void 0!==s&&(t=ao(t,1/s,i)),t}function sr(t,e=0,n=1,i=.5,s,o=t,r=t){if(lt.test(e)){e=parseFloat(e);e=kt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=kt(o.min,o.max,i);t===o&&(a-=e),t.min=ir(t.min,e,n,a,s),t.max=ir(t.max,e,n,a,s)}function or(t,e,[n,i,s],o,r){sr(t,e[n],e[i],e[s],e.scale,o,r)}const rr=["x","scaleX","originX"],ar=["y","scaleY","originY"];function lr(t,e,n,i){or(t.x,e,rr,n?.x,i?.x),or(t.y,e,ar,n?.y,i?.y)}const cr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ur=cr("applewebkit/")&&!cr("chrome/")?Math.round:c;function hr(t){t.min=ur(t.min),t.max=ur(t.max)}function dr(t){hr(t.x),hr(t.y)}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}}),fr=()=>({min:0,max:0}),gr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function yr(t){return 0===t.translate&&1===t.scale}function vr(t){return yr(t.x)&&yr(t.y)}function xr(t,e){return t.min===e.min&&t.max===e.max}function wr(t,e){return xr(t.x,e.x)&&xr(t.y,e.y)}function Tr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function br(t,e){return Tr(t.x,e.x)&&Tr(t.y,e.y)}function Sr(t){return qo(t.x)/qo(t.y)}function Ar(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Pr{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)}}function Mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Er={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${Mr(t,e.target.x)}% ${Mr(t,e.target.y)}%`}},kr={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=kt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Vr={borderRadius:Object.assign({},Er,{applyTo:hs.slice()}),borderTopLeftRadius:Er,borderTopRightRadius:Er,borderBottomLeftRadius:Er,borderBottomRightRadius:Er,boxShadow:kr};function Dr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;(s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `);let a="";if(n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<no.length;t++){const e=no[t],i=n[e];i&&(a+=`${e}(${i}deg) `),!t&&n.pathRotation&&(a+=`rotate(${n.pathRotation}deg) `)}}if(a){1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),i+=a;const n=t.x.scale*e.x,s=t.y.scale*e.y;1===n&&1===s||(i+=`scale(${n}, ${s})`)}else 1!==t.x.scale||1!==t.y.scale?i+=`scale(${t.x.scale}, ${t.y.scale})`:i||1===e.x&&1===e.y||(i="scale(1, 1)");return i||"none"}function Cr(t){return[t("x"),t("y")]}const Rr=(t,e)=>t.depth-e.depth;class Lr{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(Rr),this.isDirty=!1,this.children.forEach(t)}}const Br={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jr=["z","skew","skewZ"];let Or=0;function Fr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const Ir=t=>t.instance&&_n.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Wr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Qi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",zt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Wr(i)}function Nr(t){if(t)return!1!==t.options.allowProjection?t.projection:Nr(t.parent)}function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return Object.assign(Ro,{...Vr,...Ro}),class{static create(t,e,n){const{layoutId:i,layout:s,drag:o,dragConstraints:r,layoutScroll:a,layoutRoot:l,layoutAnchor:c,layoutCrossfade:u}=e,h=t.projection=new this(t.latestValues,e["data-framer-portal-id"]?void 0:Nr(t.parent));var d;h.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(o)||r&&(d=r,d&&"object"==typeof d&&Object.prototype.hasOwnProperty.call(d,"current")),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:a,layoutRoot:l,layoutAnchor:c});const p=h.getStack()?.lead;p&&!h.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}constructor(t={},n=e?.()){this.id=Or++,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,this.nodes.forEach(zr),this.nodes.forEach(ta),this.nodes.forEach(ea),this.nodes.forEach(Yr),Lo.countProjection?.()},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 Lr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new d),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=bs(e)&&!Oo(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?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;zt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Bo(s,250),Br.hasAnimatedSinceResize&&(Br.hasAnimatedSinceResize=!1,this.nodes.forEach(Qr)))})}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()||ra,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!br(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={...Ei(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||Qr(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),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?.forEach(na),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?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Ir(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,Ir(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(Hr),void this.nodes.forEach(Gr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(qr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(_r),this.nodes.forEach(Zr),this.nodes.forEach(Jr),this.nodes.forEach($r),this.nodes.forEach(Kr)):this.nodes.forEach(qr),this.clearAllSnapshots();const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Xt.update.process(I),Xt.preRender.process(I),Xt.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xr),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||qo(this.snapshot.measuredBox.x)||qo(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?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:i}=this,{animationId:o}=this.root;if(this.options.layoutScroll&&i&&(!e||e.animationId!==o||e.phase!==t)){const r=s(i);this.scroll={animationId:o,phase:t,isRoot:r,offset:n(i),wasRoot:e?e.isRoot:r}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&Ir(this);const e=this.projectionDelta&&!vr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||io(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),dr(n),{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(ca))){const{scroll:t}=this.root;t&&(fo(e.x,t.offset.x),fo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Go(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&&Go(e,t),fo(e.x,s.offset.x),fo(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};Go(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(fo(o.x,-n.scroll.offset.x),fo(o.y,-n.scroll.offset.y)),io(n.latestValues)&&vo(o,n.latestValues,n.layout?.layoutBox)}return!i&&io(this.latestValues)&&vo(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Go(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!io(n.latestValues))continue;let i;n.instance&&(eo(n.latestValues)&&n.updateSnapshot(),i=gr(),Go(i,n.measurePageBox())),lr(e,n.latestValues,n.snapshot?.layoutBox,i)}return io(this.latestValues)&&lr(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!==I.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=I.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(),tr(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,!0):Go(this.target,this.layout.layoutBox),uo(this.target,this.targetDelta)):Go(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&(!o.resumingFrom==!this.resumingFrom||o.options.layoutRoot&&!o.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Lo.countProjection?.(1))}getClosestProjectingParent(){if(this.parent&&!eo(this.parent.latestValues)&&!oo(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}},nr(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Go(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===I.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Go(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;mo(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!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?(Ho(this.prevProjectionDelta.x,this.projectionDelta.x),Ho(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Jo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Ar(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ar(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),Lo.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.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?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(oa));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;ia(r.x,t.x,n),ia(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(nr(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,sa(c.x,m.x,f.x,g),sa(c.y,m.y,f.y,g),d&&wr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Go(d,this.relativeTarget)),l&&(this.animationValues=o,Uo(o,s,this.latestValues,n,h,u)),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=zt.update(()=>{Br.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Co(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({...Te("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?.(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&&la(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},aa(s.x,e.x,t.x),aa(s.y,e.y,t.y)}Go(e,s),vo(e,i),Jo(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Pr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity: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}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!so(e))return;const n={};for(let e=0;e<jr.length;e++)Fr(jr[e],t,n,this.animationValues);for(let e=0;e<no.length;e++)Fr(no[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Fo(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Fo(e?.pointerEvents)||""),void(this.hasProjected&&!io(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Dr(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ro){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=Ro[e],l="none"===o?s[e]:i(s[e],n);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=n===this?Fo(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(Gr),this.root.sharedNodes.clear()}}}function $r(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Cr(t=>fo(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Kr(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,r=(i,o)=>{if("size"===s)Cr(t=>{const e=qo(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Xo(i[t],o[t])}else la(s,e.layoutBox,n)&&Cr(e=>{const n=qo(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Jo(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Jo(c,o?t.applyTransform(i,!0):n,a);const u=!vr(l);let h=!1;const d=t.getClosestProjectingParent();if((!o||d?.options.layoutRoot&&t.resumeFrom?.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};nr(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};nr(c,n,s.layoutBox,a),o&&r(l,c),br(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function zr(t){Lo.countProjection?.(0),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 Yr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xr(t){t.clearSnapshot()}function Gr(t){t.clearMeasurements()}function Hr(t){t.isLayoutDirty=!0,t.updateLayout()}function qr(t){t.isLayoutDirty=!1}function _r(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Zr(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function Jr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Qr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ta(t){t.resolveTargetDelta()}function ea(t){t.calcProjection()}function na(t){t.resetSkewAndRotation()}function ia(t,e,n){t.translate=kt(e.translate,0,n),t.scale=kt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function sa(t,e,n,i){t.min=kt(e.min,n.min,i),t.max=kt(e.max,n.max,i)}function oa(t){return void 0!==t.animationValues?.opacityExit}const ra={duration:.45,ease:[.4,0,.1,1]};function aa(t,e,n){t.max=qo(n)+(t.min=e.min)}function la(t,e,n){return"position"===t||"preserve-aspect"===t&&!_o(Sr(e),Sr(n),.2)}function ca(t){return t!==t.root&&t.scroll?.wasRoot}function ua(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const ha=Ur({attachResizeListener:(t,e)=>ua(t,"resize",e),measureScroll:To,checkIsScrollRoot:()=>!0}),da={current:void 0},pa=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!da.current){const t=new ha({});t.mount(window),t.setOptions({layoutScroll:!0}),da.current=t}return da.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),ma=new WeakMap;function fa(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ga(t){return"string"==typeof t||Array.isArray(t)}const ya=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],va=["initial"].concat(ya);function xa(t){if(fa(t.animate))return!0;for(let e=0;e<va.length;e++)if(ga(t[va[e]]))return!0;return!1}function wa(t){return Boolean(xa(t)||t.variants)}function Ta(t,e,n){for(const i in e){const s=e[i],o=n[i];if(qi(s))t.addValue(i,s);else if(qi(o))t.addValue(i,Pi(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,Pi(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const ba={current:null},Sa={current:!1},Aa="undefined"!=typeof window;function Pa(){if(Sa.current=!0,Aa)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ba.current=t.matches;t.addEventListener("change",e),e()}else ba.current=!1}const Ma=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ea={};class ka{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=yn,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=U.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,zt.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=xa(e),this.isVariantNode=wa(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]&&qi(e)&&e.set(l[t])}}mount(t){const e=this.presenceContext;if(this.hasBeenMounted&&!1!==e?.isPresent&&!e?.keepValuesOnRemount)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,ma.set(t,this),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:(Sa.current||Pa(),this.shouldReduceMotion=ba.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Yt(this.notifyUpdate),Yt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.get(t)?.(),e.accelerate&&Fn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Cn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:p(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=tn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&zt.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),_n.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?.()})}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 Ea){const e=Ea[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)&&_n.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ma.length;e++){const n=Ma[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Ta(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}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),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=Pi(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&&(o(n)||a(n))?n=parseFloat(n):"number"!=typeof n&&!At.test(n)&&At.test(e)&&(n=Ue(t,e)),this.setBaseTarget(t,qi(n)?n.get():n)),qi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,e){return(this.events[t]||(this.events[t]=new d)).add(e)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){Vo.render(this.render)}}class Va extends ka{constructor(){super(...arguments),this.KeyframeResolver=us}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;qi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Da(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])}function Ca(t,{layout:e,layoutId:n}){return tn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ro[t]||"opacity"===t)}function Ra(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(qi(i[e])||s&&qi(s[e])||Ca(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class La extends Va{constructor(){super(...arguments),this.type="html",this.renderInstance=Da}mount(t){super.mount(t)}readValueFromInstance(t,e){if(tn.has(e))return this.projection?.isProjecting?_e(e):Je(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return xo(t,e)}build(t,e,n){Is(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ra(t,e,n)}}function Ba(t){let e=ma.get(t);return e||(e=new La({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Eo(t,e)),t.style.transform&&!io(e.latestValues)&&(t.style.transform=""),e}const ja={},Oa={updateScroll:()=>{Oa.scroll||(Oa.scroll={offset:To()})}},Fa=t=>{const e=Ba(t),n=new d,i={instance:t,root:Oa,path:[Oa],setOptions:c,isProjecting:c,applyProjectionStyles:c,removeElementScroll:t=>t,updateLayout:()=>{const s=wo(t,Oa,e.getTransformPagePoint());dr(s),i.layout={layoutBox:s},n.notify()},addEventListener:(t,e)=>"measure"===t?n.add(e):c,unmount:()=>{i.instance=void 0,e.projection===i&&(e.projection=void 0)}};return e.projection=i,e.current||e.mount(t),[i,i.unmount]},Ia=t=>{const e=ma.get(t)?.projection;return e?.instance?[e,c]:(ja.create||Fa)(t)},Wa="[data-layout],[data-layout-id]",Na=new WeakMap;let Ua;function $a(t){const e=[];return t instanceof HTMLElement&&t.matches(Wa)&&e.push(t),t.querySelectorAll(Wa).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function Ka(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 za(t,e){let n=Na.get(t);if(n)n.setOptions(Ka(t,e));else{const i=Ba(t);n=new pa(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Na.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Ka(t,e),visualElement:i}),n.mount(t),Na.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Ya(t){const e=za(t);return[e,()=>Na.get(t)===e&&Xa(t,e)]}function Xa(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Na.delete(t)}function Ga(){const t=Ua;if(!t)return;Ua=void 0,function(){if(I.isProcessing)return;const t=U.now();I.delta=i(0,1e3/60,t-I.timestamp),I.timestamp=t,I.isProcessing=!0,Xt.update.process(I),Xt.preRender.process(I),Xt.render.process(I),I.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=za(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(),Vo.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}ja.create=Ya;const Ha=Ga;class qa{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}),Ua||(Ua=[],queueMicrotask(Ga)),Ua.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 $a(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 $a(this.scope)){if(this.tracked.has(e))continue;const n=za(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?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Xa(n,e)}}),e.relegate())return;n.remove()}Xa(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 fi([...t]))}}function _a(t,e,n){if("function"==typeof t)return{scope:Ss.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:Es(t)[0]??document,updateDom:e,defaultOptions:n}}const Za=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Ja(t){return{point:{x:t.pageX,y:t.pageY}}}const Qa=t=>e=>Za(e)&&t(e,Ja(e));function tl(t,e,n,i){return ua(t,e,Qa(n),i)}const el=new WeakMap;let nl;const il=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:bs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],sl=il("inline","width","offsetWidth"),ol=il("block","height","offsetHeight");function rl({target:t,borderBoxSize:e}){el.get(t)?.forEach(n=>{n(t,{get width(){return sl(t,e)},get height(){return ol(t,e)}})})}function al(t){t.forEach(rl)}function ll(t,e){nl||"undefined"!=typeof ResizeObserver&&(nl=new ResizeObserver(al));const n=Es(t);return n.forEach(t=>{let n=el.get(t);n||(n=new Set,el.set(t,n)),n.add(e),nl?.observe(t)}),()=>{n.forEach(t=>{const n=el.get(t);n?.delete(e),n?.size||nl?.unobserve(t)})}}const cl=new Set;let ul;function hl(t){return cl.add(t),ul||(ul=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cl.forEach(e=>e(t))},window.addEventListener("resize",ul)),()=>{cl.delete(t),cl.size||"function"!=typeof ul||(window.removeEventListener("resize",ul),ul=void 0)}}function dl(t,e){return As("function"==typeof t?hl(t):ll(t,e))}const pl=(t,e)=>Math.abs(t-e);function ml(t,e){const n=pl(t.x,e.x),i=pl(t.y,e.y);return Math.sqrt(n**2+i**2)}const fl=new Set(["auto","scroll"]);class gl{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r,immediate:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vl(this.lastRawMoveEventInfo,this.transformPagePoint));const t=wl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ml(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:U.now()});const{onStart:s,onMove:o}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=vl(e,this.transformPagePoint),this.hasPendingMove=!0,zt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=wl("pointercancel"===t.type?this.lastMoveEventInfo:vl(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Za(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=a?0:o,this.contextWindow=i||window;const l=Ja(t),c=vl(l,this.transformPagePoint),{point:h}=c;this.history=[{...h,timestamp:U.now()}];const{onSessionStart:d}=e;d&&d(t,wl(c,this.history));const p={passive:!0,capture:!0};this.removeListeners=u(tl(this.contextWindow,"pointermove",this.handlePointerMove,p),tl(this.contextWindow,"pointerup",this.handlePointerUp,p),tl(this.contextWindow,"pointercancel",this.handlePointerUp,p)),r&&this.startScrollTracking(r),a&&(this.handlePointerMove(t,l),this.updatePoint())}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(fl.has(t.overflowX)||fl.has(t.overflowY))&&this.scrollPositions.set(e,yl(e)),e=e.parentElement}this.scrollPositions.set(window,yl(window)),this.removeScrollListeners=u(ua(window,"scroll",this.onElementScroll,{capture:!0}),ua(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=yl(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),zt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Yt(this.updatePoint)}}const yl=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function vl(t,e){return e?{point:e(t.point)}:t}function xl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function wl({point:t},e){return{point:t,delta:xl(t,bl(e)),offset:xl(t,Tl(e)),velocity:Sl(e,.1)}}function Tl(t){return t[0]}function bl(t){return t[t.length-1]}function Sl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=bl(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>p(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*p(e)&&(i=t[1]);const o=m(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}const Al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pl(t){return Al.has(t.tagName)||!0===t.isContentEditable}const Ml=new Set(["INPUT","SELECT","TEXTAREA"]);function El(t){return Ml.has(t.tagName)||!0===t.isContentEditable}const kl={x:!1,y:!1};function Vl(){return kl.x||kl.y}function Dl(t){return"x"===t||"y"===t?kl[t]?null:(kl[t]=!0,()=>{kl[t]=!1}):kl.x||kl.y?null:(kl.x=kl.y=!0,()=>{kl.x=kl.y=!1})}function Cl(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Rl(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Ll=.35;function Bl(t,e,n){return{min:jl(t,e),max:jl(t,n)}}function jl(t,e){return"number"==typeof t?t:t[e]||0}function Ol(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const Fl=new WeakMap;class Il{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,e={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:n}=this.getProps();this.panSession=new gl(t,{onSessionStart:t=>{e.snapToCursor&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragConstraints:i,dragPropagation:s,onDragStart:o}=this.getProps();if(n&&!s&&(this.openDragLock?.(),this.openDragLock=Dl(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:r}=this.visualElement;r&&(r.isAnimationBlocked=!0,r.target=void 0),Cr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(X(e)&&(e=Ni(e,this.visualElement.current)||0),ct.test(e))e=parseFloat(e);else if(lt.test(e)){const n=r?.layout?.layoutBox[t];n&&(e=qo(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),this.point="function"==typeof i&&i(this),o&&zt.update(()=>o(t,e),!1,!0),Zi(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.point&&this.point.move(),this.visualElement.render(),o&&zt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints||this.point)&&this.startAnimation({x:0,y:0})}},{...e,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&&zt.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!$l(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?kt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?kt(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),this.point?this.point[t]=s:i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Wl(t)?this.constraints&&this.scroll===Ol(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i||"object"!=typeof t)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Cl(t.x,n,s),y:Cl(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Ll){return!1===t?t=0:!0===t&&(t=Ll),{x:Bl(t,"left","right"),y:Bl(t,"top","bottom")}}(e),s!==this.constraints&&!Wl(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Cr(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Wl(t))return!1;const n=Nl(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Ol(i);const s=wo(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Rl(t.x,e.x),y:Rl(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(Js(o));this.hasMutatedConstraints=!!t,t&&(o=Zs(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l={bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o},c=s=>!i||this.point&&r||!$l(s,e||n,this.currentDirection)?0:t[s];if(this.point&&!r)return this.point.release({x:c("x"),y:c("y")},l).then(a);const u=this.constraints||{},h=Cr(t=>{if(!$l(t,e||n,this.currentDirection))return;let i=u[t]||{};!0!==r&&r!==t||(i={min:0,max:0});const s={type:"inertia",velocity:c(t),...l,...i};return this.startAxisValueAnimation(t,s)});return Promise.all(h).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Zi(this.visualElement,t),n.start(Bi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();Cr(t=>{if(!$l(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-kt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Wl(e)||!n||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};Cr(t=>{const e=this.getAxisMotionValue(t).get();o[t]=function(t,e){let n=.5;const s=qo(t),o=qo(e);return o>s?n=h(e.min,e.max-s,t.min):s>o&&(n=h(t.min,t.max-o,e.min)),i(0,1,n)}({min:e,max:e},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Cr(e=>{const n=this.getAxisMotionValue(e);if(!$l(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(kt(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Fl.set(this.visualElement,this);const t=this.visualElement.current,e=tl(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&El(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Wl(e)&&Nl(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=dl(t,Ul(n)),s=dl(e,Ul(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),zt.read(i);const r=ua(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cr(e=>{if(!$l(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=Ll,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Wl(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Nl=t=>"current"in t?t.current:t;function Ul(t){let e=!0;return()=>{e?e=!1:t()}}function $l(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Kl=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function zl(t,e){const n=Es(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},As(()=>i.abort())]}const Yl=(t,e)=>!!e&&(t===e||Yl(t,e.parentElement)),Xl=new WeakSet;function Gl(t){return e=>{"Enter"===e.key&&t(e)}}function Hl(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const ql=new WeakSet,_l=(t,e,n)=>Math.hypot(t.clientX-e.clientX,t.clientY-e.clientY)>n,Zl=t=>t.preventDefault();function Jl(t,e){const n=window.getComputedStyle(t);return vn(e)?n.getPropertyValue(e):n[e]}const Ql={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function tc(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Ql[t]||t;return e?`(not (${i}))`:i}).join(" and ")}const ec=["nodes","calculatedTargetDeltas","calculatedProjections"];function nc(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ue(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const ic=new Set,sc=({timestamp:t})=>{ic.forEach(e=>e.tick(t))};class oc extends Se{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():(ic.size||zt.update(sc,!0),ic.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=we(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 ge(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():U.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(ic.delete(this),ic.size||Yt(sc))}}function rc(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=Io(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Io(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 oc({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),qi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(ac(e,r),!1)):t.set(ac(e,r))},o=e.on("change",s),a=e.get();Io(a)-Io(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function ac(t,e){return e?t+e:t}function lc(t,e,n={}){const i={type:"spring",...n};return xe(i),i.type=i.type||fe,rc(t,e,i)}function cc(t){const e=[];Si.current=e;const n=t();Si.current=void 0;const i=Pi(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>zt.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 uc(t,e,n){return rc(t,e,{...n,type:le})}const hc=[...rs,mt,At];let dc=0;const pc=()=>"motion-view-"+dc++;function mc(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function fc(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 gc(t,e,n,i,s,o=[],r,a=[],l){const c=Es(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??pc();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),mc(t,s,o),fc(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=pc(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),mc(t,s,o),fc(t,d,r,a,l),d})}function yc(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let vc={},xc=null;const wc=(t,e)=>{vc[t]=e},Tc=()=>{xc||(xc=document.createElement("style"),xc.id="motion-view");let t="";for(const e in vc){const n=vc[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}xc.textContent=t,document.head.appendChild(xc),vc={}},bc=()=>{xc&&xc.parentElement&&xc.parentElement.removeChild(xc)};function Sc(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Ac(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const Pc=["layout","enter","exit","new","old"],Mc=t=>t.split(" ").every(t=>0===parseFloat(t)),Ec={group:["layout"],new:["new","enter"],old:["old","exit"]},kc={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function Vc(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 fi([])))();const c=new Map,u=[],h=[],d=[],m=new Set,f=new Map,g=new Set,v=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),p="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,Es(n)),g=gc(n,c,u,void 0,l,h,p,d,m),w.set(n,g);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);g=gc(o.get(n),c,u,w.get(n),l,h,p,d,m)}else g=gc(n,c,u,void 0,l,h,p,d,m);else g=[n];const y=s.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==y&&v.set(n,y);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=Dc(Ei(l,n),Ei(function(t,e){for(const n of Ec[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},P=t=>{const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=p(i.duration));const{delay:s=0,duration:o,ease:r}=Dn(i);return{delay:p(s),duration:o,ease:r}},M=new Map,E=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of hs)o[t]=n[t];const r=M.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},M.set(e,r)}}),k=t=>{const e=M.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},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||wc(":root",{"view-transition-name":"none"}),wc("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{wc(`::view-transition-group(${t})`,{overflow:"clip"}),wc(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{wc(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Tc()},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),bc()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(v.get(t)??k(t))&&g.add(t)})(),V()};let R;try{b("old"),E("old"),V(),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=Ac(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of Pc){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=yc(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:m}=t[o];for(let[f,g]of Object.entries(d)){if(null==g)continue;if("x"===f||"y"===f){y(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=Dc(Ei(l,f),Ei(m,f));if(!Array.isArray(g)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?kc[c]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=p(d.duration)),d.delay&&(d.delay=p(d.delay)),n.push(new Cn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:g})),i.add(`${e}:${c}`),"opacity"===f&&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=Sc(o);if(!r)continue;const a=f.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 vi(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}=P(r.layer);h={delay:t,duration:e,easing:En(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=p(i.duration)),i=Dn(i),h={delay:p(i.delay??0),duration:u&&void 0!==s?p(s):i.duration,easing:u?"linear":En(i.ease,i.duration)}}e.updateTiming(h),n.push(new vi(t))}M.forEach((t,e)=>{if(!g.has(e))return;const{delay:i,duration:s,ease:o}=P(e);for(const r of hs){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";Mc(a)&&Mc(l)||n.push(new Cn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new fi(n))}).catch(()=>R.updateCallbackDone.then(()=>t(new fi([])),e))})}function Dc(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 Cc=[],Rc=null;function Lc(){Rc=null;const[t]=Cc;var e;t&&(n(Cc,e=t),Rc=e,Vc(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(Lc))}function Bc(){for(let t=Cc.length-1;t>=0;t--){const e=Cc[t],{interrupt:n}=e.options;if("immediate"===n){const n=Cc.slice(0,t+1).map(t=>t.update),i=Cc.slice(t+1);e.update=()=>{n.forEach(t=>t())},Cc=[e,...i];break}}Rc&&"immediate"!==Cc[0]?.options.interrupt||Lc()}class jc{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=c,this.notifyReject=c,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(c),n=this,Cc.push(n),Vo.render(Bc)}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 Oc=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"]),Fc=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ic(t,e,n,i){Da(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Oc.has(n)?n:Fs(n),e.attrs[n])}function Wc(t,e,n){const i=Ra(t,e,n);for(const n in t)if("children"!==n&&(qi(t[n])||qi(e[n]))){i[-1!==Qe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Nc(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 Uc=[...ya].reverse(),$c=t=>!0===t?.out?t:t?.out;function Kc(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Nc(e,t)}function zc(){const t={};for(const e of ya)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const Yc=va.length;const Xc=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Gc=zt,Hc=$t.reduce((t,e)=>(t[e]=t=>Yt(t),t),{});function qc(t){return"object"==typeof t&&!Array.isArray(t)}function _c(t,e,n,i){return null==t?[]:"string"==typeof t&&qc(e)?Es(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Zc(t,e,n){return t*(e+1)+n*e}function Jc(t,e){if(e.has(t))return e.get(t);const[,n,i]=t.match(/^(.+?)([+-][\d.]+)$/)||[];return e.has(n)?Math.max(0,e.get(n)+parseFloat(i)):void 0}function Qc(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:kt(o,r,s[n]),easing:B(i,n)})}function tu(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function eu(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function nu(t,{defaultTransition:e={},...n}={},i,s,o){const r=e.duration||.3,a=new Map,l=new Map,c={},u=new Map;let d=0,m=0,f=0;const g=(t,n)=>{let o=n;const a=t=>"number"==typeof t?n+t:function(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))):Jc(e,i)??t}(m,t,d,u);for(let n=0;n<t.length;n++){const h=t[n];if("string"==typeof h){u.set(h,m);continue}if(!Array.isArray(h)){const t=void 0===h.at?m:a(h.at);"sequence"in h?(d=m=t,m=g(h.sequence,t),d=t,o=Math.max(o,m)):u.set(h.name,t);continue}let[y,v,x={}]=h;void 0!==x.at&&(m=a(x.at));let w=0;const T=(t,n,i,o=0,a=0)=>{const l=ou(t),{delay:c=0,times:u=de(l),type:h=e.type||"keyframes",repeat:d,repeatType:g,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:T}=n;i.mixer||(i.mixer=n.mixer);const S="function"==typeof c?c(o,a):c,A=l.length,P=Vn(h)?h:s?.[h||"keyframes"];if(A<=2&&P){let t=100;if(2===A&&lu(l)){const e=l[1]-l[0];t=Math.abs(e)}const n={...e,...v};void 0!==T&&(n.duration=p(T));const i=Zt(n,t,P);x=i.ease,T=i.duration}T??(T=r);const M=m+S;1===u.length&&0===u[0]&&(u[1]=1);const E=u.length-l.length;if(E>0&&he(u,E),1===l.length&&l.unshift(null),d&&d<20){const t=T>0?y/T:0;T=Zc(T,d,y);const e=[...l],n=[...u];x=Array.isArray(x)?[...x]:[x];const i=[...x],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a<d;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),x.push("linear")),l.push(...h);for(let t=0;t<h.length;t++)u.push(n[t]+p),x.push(0===t?"linear":B(d,t-1))}tu(u,d,t)}const k=M+T;Qc(i,l,x,u,M,k),w=Math.max(S+T,w),f=Math.max(k,f)};if(qi(y)){T(v,x,su("default",iu(y,l)))}else{const t=_c(y,v,i,c),e=t.length;for(let n=0;n<e;n++){const i=iu(t[n],l);for(const t in v)T(v[t],ru(x,t),su(t,i),n,e)}}d=m,m+=w,o=Math.max(o,m)}return o};g(t,0),o&&(o.duration=f,o.labels=u);const{type:y,...v}=e;return l.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(eu);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(h(0,f,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(i)||a.set(i,{keyframes:{},transition:{}});const u=a.get(i);u.keyframes[s]=r,u.transition[s]={...v,duration:f,ease:c,times:l,mixer:o.mixer||e.mixer,...n}}}),a}function iu(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function su(t,e){return e[t]||(e[t]=[]),e[t]}function ou(t){return Array.isArray(t)?t:[t]}function ru(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const au=t=>"number"==typeof t,lu=t=>t.every(au);function cu(t,e,n,i){const s=[];if(function(t,e){return qi(t)||"number"==typeof t||"string"==typeof t&&!qc(e)}(t,e))s.push(Co(t,qc(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=_c(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(...Po(i,e,a,ma.get(i))):s.push(...ws(vs(i)??ko,i,e,a))}}return s}let uu=0;function hu({repeat:t=0,repeatDelay:e=0,repeatType:n="loop",delay:i=0},s,o,r){const a=s+e,l=void 0===r;if(l){const e=Math.max(0,o-i);r=a&&e>0?Math.min(t,Math.ceil(e/a-1e-9)-1):0,o=Math.min(e-r*a,s)}return"loop"!==n&&r%2&&(o=s-o),[r,l?o:i+r*a+o]}const du=(t,e)=>void 0===e?t:{name:t,at:e};function pu(t){t.pause(),t.time=0,t.stop()}class mu{constructor(t=[],e={},n){this.options=e,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.motionScope=Ss.current,this.isKilled=!1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=!1===e.autoplay,this.newFinished(),t.forEach(t=>this.add(t)),n?(this.isDirty=!1,this.isWrapped=!0,this.group=new yi(n),this.watch()):(this.invalidate(),this.flush())}add(t,e){return t instanceof mu&&t.adopt(this),this.push({item:t,at:e})}call(t,e){return this.push({item:t,at:e,marker:{name:"_m"+uu++,time:0,callback:t}})}addPause(t,e){return this.push({item:e||{},at:t,marker:{name:"_m"+uu++,time:0,callback:e,pause:!0}})}move(t,e){return this.entries.forEach(n=>{n.item===t&&(n.at=e)}),this.invalidate()}remove(t){return t instanceof mu&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(t){return this.flush(),this.labels.get(t)}seek(t){return this.time=this.resolve(t),this}playTo(t){const e=this.resolve(t),n=this.iterationDuration,i=this.time,[s]=hu(this.options,n,i),o=hu(this.options,n,e,s)[1],r=Math.abs(this.speed);return this.speed=o<i?-r:r,this.stopAt=e,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(t){this.time=t*this.duration}get time(){return this.active()?.time??0}set time(t){this.flush(),this.prevTime=t,this.group&&(this.group.time=t),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(t){this.playbackSpeed=t,this.group&&(this.group.speed=t)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??"idle"}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(t){return this.flush(),this.scrollTimeline=t,this.detachScroll=this.group?.attachTimeline(t),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(t,e){return this.finished.then(t,e)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(t){return this.entries.push(t),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&!this.isKilled&&this.build()}adopt(t){this.group&&(pu(this.group),this.group=void 0),this.isDirty=!1,this.parent=t}build(){const t=this.isWrapped?this.group.iterationDuration:this.totalDuration;this.isDirty=!1,this.isWrapped=!1;const e=this.group;let n=0;e&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),e.cancel()):(n=e.animations.length?e.time:0,pu(e)),this.isRebuilding=!1);const{defaultTransition:i,onComplete:s,onUpdate:o,onRepeat:r,onReverseComplete:a,autoplay:l,scope:c,...u}=this.options,h={};void 0!==c?.reduceMotion&&(h.reduceMotion=c.reduceMotion),void 0!==c?.skipAnimations&&(h.skipAnimations=c.skipAnimations),Object.assign(h,u);const d=new Map,p={},m=Ss.current;let f;Ss.current=this.motionScope;try{f=function(t,e,n,i){const s=[],o=nu(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Pi(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:le},i),r=e?.reduceMotion??e?.defaultTransition?.reduceMotion;return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...cu(n,t,{...e,reduceMotion:r}))}),s}(this.toSequence(d),{defaultTransition:i,...h},c,p)}finally{Ss.current=m}const g=p.labels;let y=h.duration??p.duration;const v=p.duration?y/p.duration:1;if(g.forEach((t,e)=>g.set(e,t*v)),this.markers=[],d.forEach((t,e)=>{t.time=g.get(e),g.delete(e),y=Math.max(y,t.time),this.markers.push(t)}),this.markers.sort((t,e)=>t.time-e.time),this.labels=g,this.totalDuration=y,this.clock=this.clockAnimation=void 0,this.markers.length||void 0!==this.stopAt||o||r){const t=this.clock=Pi(0);t.on("change",e=>t===this.clock&&this.onClock(e)),f.unshift(this.clockAnimation=Co(t,[0,y],{...h,duration:y,ease:"linear"}))}const x=this.group=new yi(f),{delay:w=0,repeat:T=0,repeatDelay:b=0}=this.options,[S,A]=hu(this.options,t,n);n>w&&(n=hu(this.options,y,Math.min(A,y),S)[1]),this.isDone&&n<w+(T+1)*(y+b)-b&&this.newFinished(),this.scrollTimeline?this.detachScroll=x.attachTimeline(this.scrollTimeline):(x.speed=this.playbackSpeed,this.isPaused&&x.pause(),n&&(x.time=n)),this.repeatIndex=this.currentRepeat(),this.prevTime=n||-1,this.watch()}toSequence(t){return this.entries.map(({item:e,at:n,marker:i})=>i?(t.set(i.name,i),du(i.name,n)):e instanceof mu?{sequence:e.toSequence(t),at:n}:"string"==typeof e?du(e,n):void 0===n?e:Array.isArray(e)?function(t,e){const n=[...t],i="function"==typeof n[0]?Math.max(1,n.length-1):2;return n[i]={...n[i],at:e},n}(e,n):{...e,at:n})}resolve(t){return this.flush(),"number"==typeof t?t:Jc(t,this.labels)??this.time}currentRepeat(){return hu(this.options,this.totalDuration,this.clockAnimation?.time??0)[0]}onClock(t){let e=this.prevTime;if(this.prevTime=t,this.isRebuilding)return;const{onUpdate:n,onRepeat:i,repeatType:s="loop"}=this.options;n?.(t);const o=this.currentRepeat(),r=o>this.repeatIndex?1:-1;for(;o!==this.repeatIndex;){const t=this.speed>0==("loop"===s||!(this.repeatIndex%2)),n=t?this.totalDuration:0;if(this.cross(e,n))return;this.repeatIndex+=r,i?.(),e="loop"===s?t?-1:1/0:n}this.cross(e,t)}cross(t,e){if(t===e)return;const n=e>t,i=i=>n?i>t&&i<=e:i<t&&i>=e,s=n?this.markers:[...this.markers].reverse();for(const t of s)if(i(t.time)&&(t.callback?.(n?1:-1),t.pause))return this.pauseAt(t.time);return void 0!==this.stopAt&&i(this.stopAt)?(this.pauseAt(this.stopAt),this.stopAt=void 0,!0):void 0}pauseAt(t){return this.pause(),this.time=hu(this.options,this.totalDuration,t,this.repeatIndex)[1],!0}watch(){const t=this.group;t.finished.then(()=>{if(t!==this.group||this.isDone)return;this.isDone=!0;const{onComplete:e,onReverseComplete:n}=this.options,i=this.speed<0&&n||e,s=this.resolveFinished;i?.(),s()})}newFinished(){this.isDone=!1,this.finished=new Promise(t=>{this.resolveFinished=t});const{scope:t}=this.options,e=this.motionScope?.add(()=>{this.isKilled=!0,this.stop()});t?.animations.push(this),this.finished.then(()=>{e?.(),t&&n(t.animations,this)})}}function fu(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;return function(t,s,o){const r=Ss.current?.transition,a={};let l;if(void 0!==n&&(a.reduceMotion=n),void 0!==i&&(a.skipAnimations=i),c=t,Array.isArray(c)&&c.some(t=>Array.isArray(t)||t?.sequence)){const i={...a,...s,scope:e};r&&(i.defaultTransition={...r,...i.defaultTransition}),i.reduceMotion=s?.reduceMotion??i.defaultTransition?.reduceMotion??n,l=new mu(t,i)}else{const{onComplete:n,...i}=o||{},c={...a,...r,...i},{onUpdate:u}=i,h="number"==typeof t||"string"==typeof t&&("string"==typeof s||Array.isArray(s))?[u||(()=>{}),Array.isArray(s)?s:[t,s],{...c,onUpdate:void 0}]:[t,s,c];l=new mu([h],{...a,onComplete:n,scope:e},cu(t,s,c,e))}var c;return l}}const gu=Object.assign(fu(),{addEffect:gs,removeEffect:ys});function yu(t,e,n,i){const s=[];return function(t,e,n,i,s){if(null==e)return;const o=Es(e,s),r=o.length;for(let e=0;e<r;e++){const s=o[e],a={...i};"function"==typeof a.delay&&(a.delay=a.delay(e,r));for(const e in n){let i=n[e];Array.isArray(i)||(i=[i]);const o={...Ei(a,e)};o.duration&&(o.duration=p(o.duration)),o.delay&&(o.delay=p(o.delay));const r=Ti(s),l=wi(e,o.pseudoElement||""),c=r.get(l);c&&c.stop(),t.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:s,name:e,allowFlatten:!a.type&&!a.ease}})}}}(s,t,e,n,i),function(t){for(let e=0;e<t.length;e++){const{unresolvedKeyframes:n,options:i}=t[e],{element:s,name:o,pseudoElement:r}=i;r||null!==n[0]||(n[0]=Jl(s,o)),$e(n),ps(n,o),!r&&n.length<2&&n.unshift(Jl(s,o)),i.keyframes=n}const e=[];for(let n=0;n<t.length;n++){const{map:i,key:s,options:o}=t[n],r=new Cn(o);i.set(s,r),r.finished.finally(()=>i.delete(s)),e.push(r)}return e}(s)}const vu=t=>function(e,n,i){return new yi(yu(e,n,i,t))},xu=vu(),wu={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},Tu=new WeakMap;function bu(t,e,n,s){const o=n[e],{length:r,position:a}=wu[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=Tu.get(i);s||Tu.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,h(0,o.scrollLength,o.current));const d=s-c;o.velocity=d>50?0:f(o.current-l,d)}const Su={start:0,center:.5,end:1};function Au(t,e,n=0){let i=0;if(t in Su&&(t=Su[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 Pu=[0,0];function Mu(t,e,n,i){let s=Array.isArray(t)?t:Pu,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Su[t]?t:"0"]),o=Au(s[0],n,i),r=Au(s[1],e),o-r}const Eu=[[0,0],[1,1]];function ku(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+h(s(o),s(o+1),e))/n;return i?1-r:r}function Vu(t,e,n,s={}){const{target:o}=s,r=o||s.offset;return{measure:e=>{if(r){n.time=e.time;for(const t in wu){const i=t,{offset:s}=n[i];Object.assign(n[i],e[i]),n[i].offset=s}if(o&&o!==t){const e=function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Ts(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}(o,t),i=function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o);n.x.targetOffset=e.x,n.y.targetOffset=e.y,n.x.targetLength=i.width,n.y.targetLength=i.height}!function(t,{offset:e=Eu}){for(const n in wu){const s=t[n];s.offset.length=0;for(let t=0;t<e.length;t++)s.offset[t]=Mu(e[t],s.containerLength,s.targetLength,s.targetOffset);s.progress=i(0,1,ku(s.offset,s.current))}}(n,s)}},notify:t=>e(r?n:t)}}const Du=new WeakMap,Cu=new WeakMap,Ru=new WeakMap,Lu=new WeakMap,Bu=t=>t===document.scrollingElement?window:t;function ju(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return c;let s=Ru.get(e);s||(s=new Set,Ru.set(e,s));const o=Vu(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),!Du.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 wu)bu(t,i,e,n);e.time=n}(e,t,I.timestamp);for(const e of s)e.measure(t);zt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>zt.read(n);Du.set(e,o);const r=Bu(e);window.addEventListener("resize",o),e!==document.documentElement&&Cu.set(e,dl(e,o)),r.addEventListener("scroll",o),o()}if(n&&!Lu.has(e)){const t=Du.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=zt.read(i,!0);Lu.set(e,s)}const r=Du.get(e);return zt.read(r,!1,!0),()=>{Yt(r);const t=Ru.get(e);if(!t)return;if(t.delete(o),t.size)return;Ru.delete(e);const n=Du.get(e);Du.delete(e),n&&(Bu(e).removeEventListener("scroll",n),Cu.get(e)?.(),window.removeEventListener("resize",n));const i=Lu.get(e);i&&(Yt(i),Lu.delete(e))}}const Ou=new Map;const Fu=t=>{if(/v/u.test(t))return[];const e=Mu(t,0,0,0);return[Mu(t,0,1,0)-e,e-Mu(t,1,0,0),e]},Iu=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function Wu(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=Eu){if(2!==t.length)return;const[e,n]=t.map(Fu),i=[Iu(e),Iu(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?Sn():bn())}(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=Ou.get(t);i||(i=new Map,Ou.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=ju(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(dl(l),dl([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const Nu={some:0,all:1};t.AsyncMotionValueAnimation=mi,t.DOMKeyframesResolver=us,t.DOMVisualElement=Va,t.DocumentProjectionNode=ha,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Lr,t.GroupAnimation=fi,t.GroupAnimationWithThen=yi,t.HTMLProjectionNode=pa,t.HTMLVisualElement=La,t.JSAnimation=Me,t.KeyframeResolver=yn,t.LayoutAnimationBuilder=qa,t.MotionGlobalConfig=s,t.MotionValue=Ai,t.MotionValueState=Vs,t.NativeAnimation=Cn,t.NativeAnimationExtended=Bn,t.NativeAnimationWrapper=vi,t.NodeStack=Pr,t.ObjectVisualElement=class extends ka{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.PanSession=gl,t.SVGVisualElement=class extends Va{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gr}getBaseTargetFromProps(t,e){return tn.has(e)?super.getBaseTargetFromProps(t,e)??_e(e):t[e]}getDefaultValue(t){return tn.has(t)?this.latestValues[t]??_e(t):void 0}readValueFromInstance(t,e){if(tn.has(e)){const t=Oe(e);return t&&t.default||0}if($s.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Oc.has(e)?e:Fs(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Wc(t,e,n)}build(t,e,n){Ks(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Ic(t,e,0,i)}mount(t){this.isSVGTag=Fc(t.tagName),super.mount(t)}},t.SubscriptionManager=d,t.ViewTransitionBuilder=jc,t.VisualElement=ka,t.VisualElementDragControls=Il,t.acceleratedValues=Fn,t.acquireProjectionNode=function(t){const e=Na.get(t)||ma.get(t)?.projection;return e?.instance?[e,()=>{}]:Ya(t)},t.activeScope=Ss,t.addAttrValue=zs,t.addBuilderToScope=Ps,t.addDomEvent=ua,t.addEffect=gs,t.addPointerEvent=tl,t.addPointerInfo=Qa,t.addSVGValue=Xs,t.addScaleCorrector=function(t){for(const e in t)Ro[e]=t[e],z(e)&&(Ro[e].isCSSVariable=!0)},t.addStyleValue=Ls,t.addToScope=As,t.addUniqueItem=e,t.addValueToWillChange=Zi,t.alpha=_,t.analyseComplexValue=Tt,t.animate=gu,t.animateEffectSubject=ws,t.animateElement=Po,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=_a(t,e,n),r=new qa(i,s,{...Ss.current?.transition,...o});return Ps(r),r},t.animateMini=xu,t.animateMotionValue=Bi,t.animateSingleValue=Co,t.animateTarget=ns,t.animateValue=function(t){return new Me(t)},t.animateValues=xs,t.animateVariant=is,t.animateView=function(t,e={}){const n=new jc(t,e);return Ps(n),n},t.animateVisualElement=ss,t.animationMapKey=wi,t.anticipate=M,t.applyAxisDelta=co,t.applyBoxDelta=uo,t.applyGeneratorOptions=Dn,t.applyPointDelta=lo,t.applyPxDefaults=ps,t.applyTreeDeltas=mo,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=Fi(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=Fi(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?Oi(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?Oi(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?v(-180,180,d-h):0;return t=>{const e={x:ji(t,i.x,u.x,r.x),y:ji(t,i.y,u.y,r.y)};if(s){const n=Oi(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-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,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...Ei(i||{},"x")};delete g.path;const y=Pi(0);y.start(Bi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Sr,t.attachFollow=lc,t.attachSpring=uc,t.attrEffect=Ys,t.axisDeltaEquals=Ar,t.axisEquals=xr,t.axisEqualsRounded=Tr,t.backIn=A,t.backInOut=P,t.backOut=S,t.bindToScope=Ms,t.boxEquals=wr,t.boxEqualsRounded=br,t.buildHTMLStyles=Is,t.buildProjectionTransform=Dr,t.buildSVGAttrs=Ks,t.buildSVGPath=Us,t.buildTransform=qn,t.buildTransformer=bt,t.calcAxisDelta=Zo,t.calcBoxDelta=Jo,t.calcChildStagger=bi,t.calcGeneratorDuration=_t,t.calcLength=qo,t.calcRelativeAxis=Qo,t.calcRelativeAxisPosition=er,t.calcRelativeBox=tr,t.calcRelativePosition=nr,t.camelCaseAttributes=Oc,t.camelToDash=Fs,t.cancelFrame=Yt,t.cancelMicrotask=Do,t.cancelSync=Hc,t.checkVariantsDidChange=Kc,t.circIn=E,t.circInOut=V,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Yr,t.collectMotionValues=Si,t.color=mt,t.compareByDepth=Rr,t.complex=At,t.containsCSSVariable=H,t.convertBoundingBoxToBox=Zs,t.convertBoxToBoundingBox=Js,t.convertOffsetToTimes=pe,t.copyAxisDeltaInto=Ho,t.copyAxisInto=Xo,t.copyBoxInto=Go,t.correctBorderRadius=Er,t.correctBoxShadow=kr,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ss(t,e,n))),n=zc(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&$i(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&$c(d(c??(g&&g.props.initial))?.transition);if(Uc.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:ga(d)||!1===d?d:void 0,x=ga(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||fa(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const b=Kc(s.prevProp,v);let S=b||x&&(w&&!T||i>f),A=!1;const P=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of P){const{transition:i,transitionEnd:s,...o}=$i(t,n,Ki(t,e))||{};E={...E,...o,...s},M=$c(i)||M}const{prevResolvedValues:k}=s;for(const e in{...k,...E}){if(e in m)continue;const n=E[e],i=k[e],o=Array.isArray(n)&&Array.isArray(i)?!Nc(n,i)||b:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){S=!0,r=p.get(e)||y,p.delete(e)&&(A=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),S&&(!T||!b||A))for(const n of P){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=$i(a,n)?.transition?.delayChildren;i.delay=bi(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||qi(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):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=zc(),s=!0}}},t.createAxis=fr,t.createAxisDelta=pr,t.createBox=gr,t.createDelta=mr,t.createEffect=Ds,t.createGeneratorEasing=Zt,t.createProjectionNode=Ur,t.createRenderBatcher=Kt,t.createScopedAnimate=fu,t.cubicBezier=w,t.cubicBezierAsString=Pn,t.defaultEasing=me,t.defaultOffset=de,t.defaultTransformValue=_e,t.defaultValueTypes=je,t.degrees=at,t.delay=jo,t.delayInSeconds=jo,t.dimensionValueTypes=rs,t.distance=pl,t.distance2D=ml,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p,x:m,y:f})=>({drag:t||!0,_dragX:m||f&&Pi(0),_dragY:f||m&&Pi(0),dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=Ss.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=Es(t).map(t=>{i?.track(t);const[s,o]=Ia(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Il(ma.get(t),()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=Kl.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return Kl.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{Kl.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return As(()=>s.forEach(t=>t()))},t.eachAxis=Cr,t.easeIn=D,t.easeInOut=R,t.easeOut=C,t.easingDefinitionToFunction=F,t.elementDragControls=Fl,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Wl(t)&&!!e},t.extractEventInfo=Ja,t.fillOffset=he,t.fillWildcards=$e,t.findDimensionValueType=as,t.findEffect=vs,t.findValueType=t=>hc.find(os(t)),t.flushKeyframeResolvers=gn,t.flushLayoutSnapshots=Ha,t.followValue=function(t,e){const n=Pi(qi(t)?t.get():t);return lc(n,t,e),n},t.frame=zt,t.frameData=I,t.frameSteps=Xt,t.generateLinearEasing=Ht,t.getAnimatableNone=Ue,t.getAnimationMap=Ti,t.getComputedStyle=Jl,t.getDefaultTransition=Ci,t.getDefaultValueType=Oe,t.getEasingForSegment=B,t.getFeatureDefinitions=function(){return Ea},t.getFinalKeyframe=ye,t.getMixer=Ot,t.getOptimisedAppearId=Qi,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=Kn,t.getValueTransition=Ei,t.getVariableValue=Ni,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<Yc;t++){const i=va[t],s=e.props[i];(ga(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=Sc,t.getViewAnimations=Ac,t.globalProjectionState=Br,t.handOffElementState=Eo,t.has2DTranslate=oo,t.hasComplexValues=wt,t.hasReducedMotionListener=Sa,t.hasScale=eo,t.hasTransform=io,t.hasWarned=function(t){return g.has(t)},t.hex=ot,t.hover=function(t,e,n={}){e=Ms(e);const[i,s,o]=zl(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||Vl())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=Mt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Es(t);e=Ms(e);const 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:Nu[s]});return o.forEach(t=>a.observe(t)),As(()=>a.disconnect())},t.inertia=ce,t.initPrefersReducedMotion=Pa,t.interpolate=ue,t.invariant=()=>{},t.invisibleValues=Lt,t.isAnimationControls=fa,t.isBezierDefinition=j,t.isCSSVariableName=z,t.isCSSVariableToken=X,t.isControllingVariants=xa,t.isDeltaZero=vr,t.isDragActive=Vl,t.isDragging=kl,t.isEasingArray=L,t.isElementKeyboardAccessible=Pl,t.isElementTextInput=El,t.isForcedMotionValue=Ca,t.isGenerator=Vn,t.isHTMLElement=Ts,t.isKeyframesTarget=Yi,t.isMotionValue=qi,t.isNear=_o,t.isNodeOrChild=Yl,t.isNumericalString=o,t.isObject=r,t.isPrimaryPointer=Za,t.isSVGElement=bs,t.isSVGSVGElement=Oo,t.isSVGTag=Fc,t.isTransitionDefined=Li,t.isVariantLabel=ga,t.isVariantNode=wa,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&An()||!e||"string"==typeof e&&(e in Mn||An())||j(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=_i,t.isZeroValueString=a,t.keyframes=fe,t.makeAnimationInstant=On,t.mapEasingToNativeEasing=En,t.mapValue=function(t,e,n,i){const s=nc(e,n,i);return cc(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=wo,t.measureViewportBox=xo,t.memo=l,t.microtask=Vo,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=Ft,t.mixColor=Rt,t.mixComplex=Wt,t.mixImmediate=Et,t.mixLinearColor=Vt,t.mixNumber=kt,t.mixObject=It,t.mixValues=Uo,t.mixVisibility=Bt,t.motionValue=Pi,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(Xc);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=c,t.number=q,t.numberValueTypes=Be,t.optimizedAppearDataAttribute=Ji,t.optimizedAppearDataId="framerAppearId",t.originProps=Cs,t.parseAnimateLayoutArgs=_a,t.parseCSSVariable=Wi,t.parseValueFromTransform=Ze,t.percent=lt,t.pipe=u,t.pixelsToPercent=Mr,t.positionalKeys=zi,t.prefersReducedMotion=ba,t.press=function(t,e,n={}){e=Ms(e);const[i,s,o]=zl(t,n),r=new WeakMap,a=t=>{const i=t.currentTarget;if(!Za(t)||Vl())return;if(ql.has(t))return;n.stopPropagation&&ql.add(t);const{count:o=1,countTimeout:a=.3,hold:l=0,repeat:c}=n,u=U.now(),h=p(l),d=p(a);let m=r.get(i);m?.expire(_l(m.event,t,100))?m=void 0:m&&(Yt(m.expire),r.delete(i));const f=m?m.count+1:1,g=f>=o,y=g&&(l||c);let v,x=!l,w=0;if(Xl.add(i),m)v=m.handlers;else{const n=e(i,t);v="function"==typeof n?{onComplete:n}:n||{}}g&&x&&v.onActive?.();const T=p(c);let b=h||T,S=u+b,A=!0;const P=()=>{if(s.signal.aborted)return Yt(P);let t=Math.min(1-(S-U.now())/b,1);A&&t<1&&(t=0),A=!1,v.onHold?.(t),t<1||(x?v.onRepeat?.(++w):(x=!0,v.onActive?.()),c?(A=!0,S+=b=T):Yt(P))},M={...s,capture:!0},E=(e,n)=>{if(window.removeEventListener("pointerup",k,M),window.removeEventListener("pointercancel",V,M),window.removeEventListener("pointermove",D,M),i.removeEventListener("contextmenu",Zl),Yt(P),Xl.delete(i),Za(e))if(Vl()&&(n=!1),n&&!g){const n=U.now(),o=t=>{const a=s.signal.aborted;if(a||!0===t||U.now()-n>d)return Yt(o),r.delete(i),a||v.onComplete?.(e,{success:!1}),!0};r.set(i,{count:f,event:t,handlers:v,expire:o}),zt.update(o,!0)}else v.onComplete?.(e,{success:n&&x})},k=t=>{E(t,i===window||i===document||n.useGlobalTarget||Yl(i,t.target))},V=t=>{E(t,!1)},D=e=>{Za(e)&&((c||!x)&&_l(t,e,8)||o>1&&Vl())&&V(e)};window.addEventListener("pointerup",k,M),window.addEventListener("pointercancel",V,M),(y||o>1)&&window.addEventListener("pointermove",D,M),y&&(zt.update(P,!0),i.addEventListener("contextmenu",Zl,{...s,passive:!1}))};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,s),Ts(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=Gl(()=>{n||Xl.has(t)||(n=!0,Hl(t,"down"))}),s=Gl(()=>{n&&(n=!1,Hl(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Hl(t,"cancel")},{...e,once:!0})})(t,s),s),Pl(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=U.now())=>{if(I.isProcessing)return;const e=t-I.timestamp;I.delta=s.useManualTiming?e:Math.max(Math.min(e,40),1),U.set(I.timestamp=t),I.isProcessing=!0;for(const t in Xt)Xt[t].process(I);I.isProcessing=!1},t.progress=h,t.progressPercentage=dt,t.propEffect=ko,t.propagateDirtyNodes=zr,t.px=ct,t.readSVGValue=Gs,t.readStyleValue=Bs,t.readTransformValue=Je,t.recordStats=function(){if(Lo.value)throw Lo.value=null,Lo.addProjectionMetrics=null,Lo.countProjection=void 0,new Error("Stats are already being measured");const t=Lo;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)};const e={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0};t.countProjection=n=>{void 0!==n?e[ec[n]]++:(t.addProjectionMetrics(e),e.nodes=e.calculatedTargetDeltas=e.calculatedProjections=0)}},t.releaseElement=Mo,t.removeAxisDelta=sr,t.removeAxisTransforms=or,t.removeBoxTransforms=lr,t.removeEffect=ys,t.removeItem=n,t.removePointDelta=ir,t.renderHTML=Da,t.renderSVG=Ic,t.resize=dl,t.resolveElements=Es,t.resolveMotionValue=Fo,t.resolveTransition=Mi,t.resolveVariant=$i,t.resolveVariantFromProps=Ui,t.reverseEasing=b,t.rgbUnit=nt,t.rgba=it,t.rootProjectionNode=da,t.round=Pe,t.sampleDelta=10,t.scale=Z,t.scaleCorrectors=Ro,t.scalePoint=ao,t.scopeMotion=function(...t){const e="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:Es(e)[0],transition:o,add:t=>(c.push(t),()=>n(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{Mo(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=Ss.current;Ss.current=t;try{return e()}finally{Ss.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(tc(t[e]));n.addEventListener("change",m),a.push([e,n])}}return As(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=Ra,t.scrapeSVGMotionValuesFromProps=Wc,t.scroll=function(t,{axis:e="y",source:n,container:i=document.scrollingElement,...s}={}){if(!i)return c;const o={axis:e,container:n||i,...s};if("function"==typeof t){const n=Ms(t);return As(ju(t=>n(t[e].progress,t),o))}return As(Wu(t,o))},t.scrollInfo=ju,t.secondsToMilliseconds=p,t.setDragLock=Dl,t.setFeatureDefinitions=function(t){Ea=t},t.setStyle=xn,t.setTarget=Hi,t.spring=le,t.springValue=function(t,e){const n=Pi(qi(t)?t.get():t);return uc(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=F(i)(c/u)*u}return e+c}},t.startWaapiAnimation=kn,t.statsBuffer=Lo,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=Os,t.styleSubjectEffect=js,t.supportedWaapiEasing=Mn,t.supportsBrowserAnimation=$n,t.supportsFlags=wn,t.supportsLinearEasing=An,t.supportsPartialKeyframes=ms,t.supportsScrollTimeline=bn,t.supportsViewTimeline=Sn,t.supportsWaapi=Un,t.svgEffect=qs,t.svgSubjectEffect=Hs,t.sync=Gc,t.testValueType=os,t.time=U,t.toMediaQuery=tc,t.transform=nc,t.transformAxis=go,t.transformBox=vo,t.transformBoxPoints=Qs,t.transformPropOrder=Qe,t.transformProps=tn,t.transformValue=cc,t.transformValueTypes=Le,t.translateAxis=fo,t.updateMotionValuesFromProps=Ta,t.variantPriorityOrder=ya,t.variantProps=va,t.velocityPerSecond=f,t.vh=ut,t.visualElementStore=ma,t.vw=ht,t.warnOnce=y,t.warning=()=>{},t.wrap=v});
|