framer-motion
Version:
A simple and powerful JavaScript animation library
2 lines • 192 kB
JavaScript
!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),P=b(S),A=T(P),M=t=>t>=1?1:(t*=2)<1?.5*P(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),V=b(E),k=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 j(t,e){return L(t)?t[v(0,t.length,e)]:t}const B=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:c,easeIn:D,easeInOut:R,easeOut:C,circIn:E,circInOut:k,circOut:V,backIn:P,backInOut:A,backOut:S,anticipate:M},I=t=>{if(B(t)){const[e,n,i,s]=t;return w(e,n,i,s)}return"string"==typeof t?O[t]:t},F={delta:0,timestamp:0,isProcessing:!1};let W;function N(){W=void 0}const U={now:()=>(void 0===W&&U.set(F.isProcessing||s.useManualTiming?F.timestamp:performance.now()),W),set:t=>{W=t,queueMicrotask(N)}},$=t=>Math.round(1e5*t)/1e5,z=t=>e=>"string"==typeof e&&e.startsWith(t),K=z("--"),Y=z("var(--"),X=t=>!!Y(t)&&G.test(t.split("/*")[0].trim()),G=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function q(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const H={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...H,transform:t=>i(0,1,t)},Z={...H,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={...H,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 Pt={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 At(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=At(a,i,t+1/3),o=At(a,i,t),r=At(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 Vt=(t,e,n)=>t+(e-t)*n,kt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Dt=[ot,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=kt(n.red,i.red,t),s.green=kt(n.green,i.green,t),s.blue=kt(n.blue,i.blue,t),s.alpha=Vt(n.alpha,i.alpha,t),it.transform(s))},Lt=new Set(["none","hidden"]);function jt(t,e){return Lt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Bt(t,e){return n=>Vt(t,e,n)}function Ot(t){return"number"==typeof t?Bt:"string"==typeof t?X(t)?Et:mt.test(t)?Rt:Wt:Array.isArray(t)?It:"object"==typeof t?mt.test(t)?Rt:Ft:Et}function It(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 Ft(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?jt(t,e):u(It(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 Vt(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=>$(Vt(o,r,t))+s}(t,e);if(n)return n}return Ot(t)(t,e)}const $t=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zt(t,e,n={delta:0,timestamp:0,isProcessing:!1}){let i=!1,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:Kt,cancel:Yt,steps:Xt}=zt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0,F),Gt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Kt.update(e,t),stop:()=>Yt(e),now:()=>F.isProcessing?F.timestamp:U.now()}},qt=(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)})`},Ht=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),Ht);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=>u?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,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,P={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(),P.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(P),Ht),e=qt(e=>P.next(t*e).value,t,30);return t+"ms "+e}};return P}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(Vt(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(I):I(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:F.timestamp,frameIsProcessing:F.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 Pe=t=>t/100,Ae=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,e=U.now();t&&t.updatedAt!==e&&this.tick(t.updatedAt=e),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(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=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??Ae((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 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=Ee.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ke=/\b([a-z-]*)\(.*?\)/gu,De={...Pt,getAnimatableNone:t=>{const e=t.match(ke);return e?e.map(Ve).join(" "):t}},Ce={...Pt,getAnimatableNone:t=>{const e=Pt.parse(t);return Pt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Re={...H,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},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,...Le,zIndex:Re,fillOpacity:_,strokeOpacity:_,numOctaves:Re},Be={...je,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=>Be[t],Ie=new Set([De,Ce]);let Fe,We,Ne;function Ue(t,e){if(t===Fe&&e===We)return Ne;let n=Oe(t);return Ie.has(n)||(n=Pt),Ne=n.getAnimatableNone?n.getAnimatableNone(e):void 0,Fe=t,We=e,Ne}function $e(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ze=t=>180*t/Math.PI,Ke=t=>{const e=ze(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:Ke,rotateZ:Ke,skewX:t=>ze(Math.atan(t[1])),skewY:t=>ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Xe=t=>((t%=360)<0&&(t+=360),t),Ge=t=>Math.hypot(t[0],t[1]),qe=t=>Math.hypot(t[4],t[5]),He={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ge,scaleY:qe,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(Ge(t)+qe(t))/2,rotateX:t=>Xe(ze(Math.atan2(t[6],t[5]))),rotateY:t=>Xe(ze(Math.atan2(-t[2],t[0]))),rotateZ:Ke,rotate:Ke,skewX:t=>ze(Math.atan(t[4])),skewY:t=>ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function _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]?He: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===H||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,Kt.read(fn),Kt.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(!Pt.test(t)&&Pt.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"),Pn=Tn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),An=([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:An([0,.65,.55,1]),circOut:An([.55,0,1,.45]),backIn:An([.31,.01,.66,-.59]),backOut:An([.33,1.53,.69,.99])};function En(t,e){return t?"function"==typeof t?Pn()?qt(t,e):"ease-out":B(t)?An(t):Array.isArray(t)?t.map(t=>En(t,e)||Mn.easeOut):Mn[t]:void 0}function Vn(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 kn(t){return"function"==typeof t&&"applyToOptions"in t}function Dn({type:t,...e}){return kn(t)&&Pn()?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=Vn(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:A,circInOut:k};function Ln(t){"string"==typeof t.ease&&t.ease in Rn&&(t.ease=Rn[t.ease])}class jn 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 Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Pt.test(t)&&"0"!==t||t.startsWith("url(")));function On(t){t.duration=0,t.type="keyframes"}const In=new Set(["opacity","clipPath","filter","transform"]),Fn=/^(?: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||!In.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()&&(In.has(n)||Nn.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&&!Wn(t)}const zn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Kn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yn=Qe.length,Xn={},Gn=(t,e,n=zn(e,Le[t]))=>(Xn[t]||(Xn[t]=(Kn[t]||t)+"("))+n+")",qn=(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<Yn;s++){const o=Qe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=zn(r,je[o]));qn(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=>Vt(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():F.isProcessing?F.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=B(o)?An(o):(t=>Qn.has(t))(o)?Mn[o]:I(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&&qn(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=[]},P=(t,n)=>new Animation(new KeyframeEffect(e,t,n)),A=(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(Ae(e)+" "+Ae(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+")"},V=(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)},k=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]:V(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),P(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&&!qn(e,n)}),S(!1);const f=!u&&k(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=>Ae(t(e))+" "+Ae(100*e)+"%")+")"],ti.set(t,n)),n[1]})(r,ei(n,i)):E(d,n,i,[]),t&&A(D(d,n,i,t,{fill:"both",endDelay:s-i}),n-e,s-n)}t||A(D(d,e,s),0,s-e),m.forEach(t=>t<s-1&&A(P(null,{duration:t-e}),0,t-e))}if(u){const t=h+Math.floor((s-h)/u)*u;A(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},j=()=>!n.size&&(p=!0,ri(e)===O&&_n.delete(e),O.isJS||S(),!0),B=()=>{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)),j())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,F.isProcessing?Kt.render(B,!1,!0):pi(B)))},release(t){ai(t)&&n.delete(t),j()||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=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||kn(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()&&Pn())(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 jn(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 Pi{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(){Kt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){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 Ai(t,e){return new Pi(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 Vi={type:"spring",stiffness:500,damping:25,restSpeed:10},ki={type:"keyframes",duration:.8},Di={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ci=(t,{keyframes:e})=>e.length>2?ki:tn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Vi: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 ji=(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 Kt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Me(h):new mi(h)};function Bi(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 Ii(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 Fi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wi(t){const e=Fi.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 zi=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,Ki=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,Ai(n))}function Gi(t){return Yi(t)?t[t.length-1]||0:t}function qi(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 Hi=t=>Boolean(t&&t.getVelocity);function _i(t){return Boolean(Hi(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){Kt.update(()=>i.set(s));continue}let p=!1;if(ts&&window.MotionHandoffAnimation){const n=Qi(t);if(n){const t=window.MotionHandoffAnimation(n,e,Kt);null!==t&&(r.startTime=t,p=!0)}}Zi(t,e);const m=c??t.shouldReduceMotion;i.run(ji(e,i,s,m&&Ki.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>Kt.update(()=>{r&&qi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function is(t,e,n={}){const i=$i(t,e,zi(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=[H,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(q(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(),!Ki.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(q(i)!==q(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(ji(r,c,l,a&&Ki.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):Kt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>Kt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function 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=Ai(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 Ps(t){return Ss.current?.add(t),t}function As(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 Vs(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 ks{constructor(t=Kt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function Ds(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new ks(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)=>zn(t.get(e)?.get(),je[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 Pi("fill-box")),e.set("transform",new Pi("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&&(qn(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 Pi(""),()=>{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]=zn(i.getCurrent(),je[n])};return e.set(n,i,s,o)},js=(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},Bs=Ds(Ls,{test:t=>Ts(t)||bs(t),read:js}),Os=Vs(Bs);function Is(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Fs(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(K(t))s[t]=n;else{const e=zn(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 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 zs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Fs(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 Ks=(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=Is(s));const r=je[n]||je[s],a=o?()=>{t[s]=zn(i.get(),je[n])}:()=>{const e=zn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},Ys=Vs(Ds(Ks));const Xs=(t,e,n,i)=>{if(n.startsWith("path")&&!tn.has(n))return function(t,e,n,i){return Kt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new Pi("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 Ks(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:Ks)(t,e,n,i)},Gs=(t,e)=>tn.has(e)?je[e]?.default||0:vn(e)||$s.includes(e)?js(t,e)||t.getAttribute(Is(e))||0:(e=_s(e),t.getAttribute(Is(e))??t.getAttribute(e)??void 0),qs=Ds(Xs,{test:bs,read:Gs}),Hs=Vs(qs);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,Vt(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)?qs:Bs;class Po{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 Ao(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 Po(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 Vo=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:ko,cancel:Do}=zt(queueMicrotask,!1);function Co(t,e,n){const i=Hi(t)?t:Ai(t);return i.run(ji("",i,e,n)),i.animation}const Ro={};const Lo={value:null,addProjectionMetrics:null,countProjection:void 0};function jo(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 Kt.setup(i,!0),Ps(()=>Yt(i))}function Bo(t,e){return jo(t,p(e))}function Oo(t){return bs(t)&&"svg"===t.tagName}function Io(t){return Hi(t)?t.get():t}const Fo=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=Vt(0,n.opacity??1,zo(i)),t.opacityExit=Vt(e.opacity??1,0,Ko(i))):o&&(t.opacity=Vt(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(Vt(Fo(r),Fo(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]=Vt(e[o]||0,n[o]||0,i))}}function $o(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const zo=Yo(0,.5,V),Ko=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 qo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ho(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=Vt(e.min,e.max,t.origin),t.scale=Ho(n)/Ho(e),t.translate=Vt(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?Vt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Ho(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?Vt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Ho(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=Vt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Vt(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 Ho(t.x)/Ho(t.y)}function Pr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ar{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)}%`}},Vr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Pt.parse(t);if(s.length>5)return i;const o=Pt.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=Vt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},kr={borderRadius:Object.assign({},Er,{applyTo:hs.slice()}),borderTopLeftRadius:Er,borderTopRightRadius:Er,borderBottomLeftRadius:Er,borderBottomRightRadius:Er,boxShadow:Vr};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 jr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Br=["z","skew","skewZ"];let Or=0;function Ir(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const Fr=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",Kt,!(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,{...kr,...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(Kr),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;Kt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=jo(s,250),jr.hasAnimatedSinceResize&&(jr.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()||aa,{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;Fr(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,Fr(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(qr),void this.nodes.forEach(Gr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Hr);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(zr)):this.nodes.forEach(Hr),this.clearAllSnapshots();const t=U.now();F.delta=i(0,1e3/60,t-F.timestamp),F.timestamp=t,F.isProcessing=!0,Xt.update.process(F),Xt.preRender.process(F),Xt.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ko.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,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ho(this.snapshot.measuredBox.x)||Ho(this.snapshot.measuredBox.y)||(this.snapshot=void 0),this.snapshot)){const{visualElement:t}=this.options,e="running"===this.currentAnimation?.state,n=e&&this.animationEdges;e&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);const i=n&&this.motionValue?.getVelocity()||0,s=[0,1,2,3,4,5].map(e=>(e<4?n&&(this.edgeValues?this.edgeVelocity(e):-n[e]*i/1e3):t?.getValue(e<5?"x":"y")?.getVelocity())||0);s.some(Boolean)&&(this.snapshot.velocity=s)}}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&&Fr(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(ua))){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!==F.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=F.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===F.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?(qo(this.prevProjectionDelta.x,this.projectionDelta.x),qo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Jo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Pr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Pr(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(ra));let d;this.animationProgress=0;const p=n?.interpolateProjection(t),m=this.layout?.layoutBox;let f=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((e,n)=>{const{translate:i,scale:s,originPoint:o}=t[n<2?"x":"y"];return(e-o)*(s-1)+i});f?.every(isFinite)||(f=void 0),this.animationEdges=f,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;const g=i?.velocity,y=i?.relativeVelocity||g;if(y?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=y),g&&f){const e=g.slice(0,4).map((t,e)=>t+(l?g[4+(e>>1)]:0));e.some(Boolean)&&(this.startVelocity=p?((t,e,{x:n,y:i})=>{const s=t*t+e*e;return s<1?0:-1e3*(n*t+i*e)/s})(t.x.translate,t.y.translate,{x:(e[0]+e[1])/2,y:(e[2]+e[3])/2}):e)}this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n),c=this.edgeValues;for(let e=0;e<2;e++){const i=e?"y":"x";c?ia(r[i],t[i],this.layout.layoutBox[i],c[2*e],c[2*e+1]):sa(r[i],t[i],n)}if(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);const t=this.relativeTargetOrigin,e=a;if(function(t,e,n,i){oa(t.x,e.x,n.x,i),oa(t.y,e.y,n.y,i)}(this.relativeTarget,t,e,n),this.isSpringLayout){const t=this.relativeTarget,e=this.impulse||0,n=this.relativeStart,i=U.now(),s=(i-this.relativeTime)/1e3;this.relativeTime=i;const o=this.relativeVelocity||(this.relativeVelocity=[0,0,0,0]);for(let i=0;i<4;i++){const r=i<2?"x":"y",a=1&i?"max":"min";n&&(t[r][a]+=n[i]*e),d&&s>0&&(o[i]=(t[r][a]-d[r][a])/s)}}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");const e=this.isSpringLayout="spring"===t.type;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&(Yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{jr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.motionValue.jump(0,!1);const n=this.startVelocity;this.startVelocity=void 0;let s=t,o=0;if(e){if("auto"===t.mass){const e=this.layout?.layoutBox;s=((t,e=300)=>{const n=i(.25,2,e/300),{stiffness:s,damping:o}=re({...t,duration:t.duration&&p(t.duration)});return{...t,stiffness:s,damping:o*Math.sqrt(n),mass:n}})(t,e&&Math.sqrt(Ho(e.x)*Ho(e.y)))}const e=this.relativeStart;if((n||e)&&!t.repeat)if("number"==typeof n)o=n;else{const t=n&&this.animationEdges;s={...s,type:i=>{const s=[i.velocity,...n||[]].map((e,n)=>le({...i,keyframes:n?[t[n-1],0]:i.keyframes,velocity:e})),o=s.length;e&&s.push(le({...i,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let r=0;const a=[],l={calculatedDuration:null,next:e=>{r=e;const n=s[0].next(e);let i=n.done;for(let t=1;t<s.length;t++){const{value:n,done:r}=s[t].next(e);t<o?a[t-1]=n:this.impulse=n/1e3,i=i&&r}return t&&(this.edgeValues=a),n.done=i,n}};return l.calculatedDuration=_t(l),l.next(0),this.edgeVelocity=t=>s[t+1].velocity(r),l}}}}const r=Co(this.motionValue,[0,1e3],{...s,velocity:o,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}});this.currentAnimation=r,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=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,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&&ca(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}},la(s.x,e.x,t.x),la(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 Ar);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<Br.length;e++)Ir(Br[e],t,n,this.animationValues);for(let e=0;e<no.length;e++)Ir(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=Io(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=Io(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?Io(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 zr(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=Ho(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 ca(s,e.layoutBox,n)&&Cr(e=>{const n=Ho(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 Kr(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 qr(t){t.isLayoutDirty=!0,t.updateLayout()}function Hr(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,i,s){const o=n.max-n.min,r=o?Math.max(0,(o+s-i)/o):1,a=t.originPoint=e.originPoint;t.origin=e.origin,t.scale=r,t.translate=n.min+i-(a+(n.min-a)*r)}function sa(t,e,n){t.translate=Vt(e.translate,0,n),t.scale=Vt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function oa(t,e,n,i){t.min=Vt(e.min,n.min,i),t.max=Vt(e.max,n.max,i)}function ra(t){return void 0!==t.animationValues?.opacityExit}const aa={duration:.45,ease:[.4,0,.1,1]};function la(t,e,n){t.max=Ho(n)+(t.min=e.min)}function ca(t,e,n){return"position"===t||"preserve-aspect"===t&&!_o(Sr(e),Sr(n),.2)}function ua(t){return t!==t.root&&t.scroll?.wasRoot}function ha(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const da=Ur({attachResizeListener:(t,e)=>ha(t,"resize",e),measureScroll:To,checkIsScrollRoot:()=>!0}),pa={current:void 0},ma=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!pa.current){const t=new da({});t.mount(window),t.setOptions({layoutScroll:!0}),pa.current=t}return pa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),fa=new WeakMap;function ga(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ya(t){return"string"==typeof t||Array.isArray(t)}const va=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","whilePinch","exit"],xa=["initial"].concat(va);function wa(t){if(ga(t.animate))return!0;for(let e=0;e<xa.length;e++)if(ya(t[xa[e]]))return!0;return!1}function Ta(t){return Boolean(wa(t)||t.variants)}function ba(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Hi(s))t.addValue(i,s);else if(Hi(o))t.addValue(i,Ai(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,Ai(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Sa={current:null},Pa={current:!1},Aa="undefined"!=typeof window;function Ma(){if(Pa.current=!0,Aa)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Sa.current=t.matches;t.addEventListener("change",e),e()}else Sa.current=!1}const Ea=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Va={};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,Kt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=wa(e),this.isVariantNode=Ta(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]&&Hi(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,fa.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:(Pa.current||Ma(),this.shouldReduceMotion=Sa.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&&In.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&&Kt.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 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)&&_n.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ea.length;e++){const n=Ea[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=ba(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=Ai(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&&!Pt.test(n)&&Pt.test(e)&&(n=Ue(t,e)),this.setBaseTarget(t,Hi(n)?n.get():n)),Hi(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(){ko.render(this.render)}}class Da 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;Hi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ca(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 Ra(t,{layout:e,layoutId:n}){return tn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ro[t]||"opacity"===t)}function La(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Hi(i[e])||s&&Hi(s[e])||Ra(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ja extends Da{constructor(){super(...arguments),this.type="html",this.renderInstance=Ca}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=(K(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){Fs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return La(t,e,n)}}function Ba(t){let e=fa.get(t);return e||(e=new ja({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 Oa={},Ia={updateScroll:()=>{Ia.scroll||(Ia.scroll={offset:To()})}},Fa=t=>{const e=Ba(t),n=new d,i={instance:t,root:Ia,path:[Ia],setOptions:c,isProjecting:c,applyProjectionStyles:c,removeElementScroll:t=>t,updateLayout:()=>{const s=wo(t,Ia,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]},Wa=t=>{const e=fa.get(t)?.projection;return e?.instance?[e,c]:(Oa.create||Fa)(t)},Na="[data-layout],[data-layout-id]",Ua=new WeakMap;let $a;function za(t){const e=[];return t instanceof HTMLElement&&t.matches(Na)&&e.push(t),t.querySelectorAll(Na).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 Ya(t,e){let n=Ua.get(t);if(n)n.setOptions(Ka(t,e));else{const i=Ba(t);n=new ma(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Ua.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...Ka(t,e),visualElement:i}),n.mount(t),Ua.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Xa(t){const e=Ya(t);return[e,()=>Ua.get(t)===e&&Ga(t,e)]}function Ga(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Ua.delete(t)}function qa(){const t=$a;if(!t)return;$a=void 0,function(){if(F.isProcessing)return;const t=U.now();F.delta=i(0,1e3/60,t-F.timestamp),F.timestamp=t,F.isProcessing=!0,Xt.update.process(F),Xt.preRender.process(F),Xt.render.process(F),F.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=Ya(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(),ko.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}Oa.create=Xa;const Ha=qa;class _a{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}),$a||($a=[],queueMicrotask(qa)),$a.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 za(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 za(this.scope)){if(this.tracked.has(e))continue;const n=Ya(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(),Ga(n,e)}}),e.relegate())return;n.remove()}Ga(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 Za(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 Ja=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Qa(t){return{point:{x:t.pageX,y:t.pageY}}}const tl=t=>e=>Ja(e)&&t(e,Qa(e));function el(t,e,n,i){return ha(t,e,tl(n),i)}const nl=new WeakMap;let il;const sl=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:bs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],ol=sl("inline","width","offsetWidth"),rl=sl("block","height","offsetHeight");function al({target:t,borderBoxSize:e}){nl.get(t)?.forEach(n=>{n(t,{get width(){return ol(t,e)},get height(){return rl(t,e)}})})}function ll(t){t.forEach(al)}function cl(t,e){il||"undefined"!=typeof ResizeObserver&&(il=new ResizeObserver(ll));const n=Es(t);return n.forEach(t=>{let n=nl.get(t);n||(n=new Set,nl.set(t,n)),n.add(e),il?.observe(t)}),()=>{n.forEach(t=>{const n=nl.get(t);n?.delete(e),n?.size||il?.unobserve(t)})}}const ul=new Set;let hl;function dl(t){return ul.add(t),hl||(hl=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ul.forEach(e=>e(t))},window.addEventListener("resize",hl)),()=>{ul.delete(t),ul.size||"function"!=typeof hl||(window.removeEventListener("resize",hl),hl=void 0)}}function pl(t,e){return Ps("function"==typeof t?dl(t):cl(t,e))}const ml=(t,e)=>Math.abs(t-e);function fl(t,e){const n=ml(t.x,e.x),i=ml(t.y,e.y);return Math.sqrt(n**2+i**2)}const gl=new Set(["auto","scroll"]);class yl{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=xl(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Tl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=fl(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=xl(e,this.transformPagePoint),this.hasPendingMove=!0,Kt.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=Tl("pointercancel"===t.type?this.lastMoveEventInfo:xl(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Ja(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=a?0:o,this.contextWindow=i||window;const l=Qa(t),c=xl(l,this.transformPagePoint),{point:h}=c;this.history=[{...h,timestamp:U.now()}];const{onSessionStart:d}=e;d&&d(t,Tl(c,this.history));const p={passive:!0,capture:!0};this.removeListeners=u(el(this.contextWindow,"pointermove",this.handlePointerMove,p),el(this.contextWindow,"pointerup",this.handlePointerUp,p),el(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);(gl.has(t.overflowX)||gl.has(t.overflowY))&&this.scrollPositions.set(e,vl(e)),e=e.parentElement}this.scrollPositions.set(window,vl(window)),this.removeScrollListeners=u(ha(window,"scroll",this.onElementScroll,{capture:!0}),ha(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=vl(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),Kt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Yt(this.updatePoint)}}const vl=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function xl(t,e){return e?{point:e(t.point)}:t}function wl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Tl({point:t},e){return{point:t,delta:wl(t,Sl(e)),offset:wl(t,bl(e)),velocity:Pl(e,.1)}}function bl(t){return t[0]}function Sl(t){return t[t.length-1]}function Pl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Sl(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 Ml(t){return Al.has(t.tagName)||!0===t.isContentEditable}const El=new Set(["INPUT","SELECT","TEXTAREA"]);function Vl(t){return El.has(t.tagName)||!0===t.isContentEditable}const kl={x:!1,y:!1};function Dl(){return kl.x||kl.y}function Cl(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 Rl(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Vt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Vt(n,t,i.max):Math.min(t,n)),t}function Ll(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 jl(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 Bl=.35;function Ol(t,e,n){return{min:Il(t,e),max:Il(t,n)}}function Il(t,e){return"number"==typeof t?t:t[e]||0}function Fl(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 Wl=new WeakMap;class Nl{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 yl(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=Cl(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=Ho(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),this.point="function"==typeof i&&i(this),o&&Kt.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&&Kt.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&&Kt.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||!Kl(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=Rl(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;Ul(t)?this.constraints&&this.scroll===Fl(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i||"object"!=typeof t)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ll(t.x,n,s),y:Ll(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Bl){return!1===t?t=0:!0===t&&(t=Bl),{x:Ol(t,"left","right"),y:Ol(t,"top","bottom")}}(e),s!==this.constraints&&!Ul(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(!Ul(t))return!1;const n=$l(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Fl(i);const s=wo(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:jl(t.x,e.x),y:jl(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||!Kl(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(!Kl(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(ji(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(!Kl(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Vt(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ul(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=Ho(t),o=Ho(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(!Kl(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Vt(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Wl.set(this.visualElement,this);const t=this.visualElement.current,e=el(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=Ul(e)&&$l(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=pl(t,zl(n)),s=pl(e,zl(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),Kt.read(i);const r=ha(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cr(e=>{if(!Kl(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=Bl,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Ul(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const $l=t=>"current"in t?t.current:t;function zl(t){let e=!0;return()=>{e?e=!1:t()}}function Kl(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Yl=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Xl(t,e){const n=Es(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},Ps(()=>i.abort())]}const Gl=(t,e)=>{const n=t.get();"string"==typeof n&&t.set(parseFloat(n)*(n.endsWith("%")?e/100:1))},ql=t=>"object"==typeof t?t:{},Hl=(t=Bl)=>{const e=t=>!0===t?Bl:+(t||0);return"object"==typeof t?{min:e(t.min),max:e(t.max)}:{min:e(t),max:e(t)}},_l=({pan:t,origin:e})=>!1!==t||!!e,Zl=(t,{min:e=-1/0,max:n=1/0})=>i(e,n,t),Jl=(t,e,n)=>{const i=Zl(t,ql(e)),s=n[t<i?"min":"max"];return s?i+(t-i)/s:t};function Ql(t,e,n,s){const o=new Map,r={x:0,y:0,l:0,a:0},a={...r},l={...r};let c,u,h,d,p=0,m=0,f=0,g=0,y=0,v=0,x=!1,w=0,T={},b=1,S=0,P=()=>{},A={};const M=()=>A=n()||A,E=()=>({point:{x:r.x,y:r.y},offset:{x:r.x-a.x,y:r.y-a.y},scale:Math.exp(r.l-a.l),rotate:r.a-a.a}),V=()=>{const n=t.getBoundingClientRect(),{left:i,top:s}=n,{scale:o,rotate:r,elastic:a}=M(),[l,c,u,d]=h=e(),x=Hl(a);!1!==o&&l.stop(),!1!==r&&c.stop(),b=Jl(l.get(),o,x),S=Jl(c.get(),r,x),f=t.offsetWidth??n.width,g=t.offsetHeight??n.height,_l(A)&&(u.stop(),d.stop(),Gl(u,f),Gl(d,g)),y=u.get(),v=d.get(),p=i+n.width/2-y,m=s+n.height/2-v},k=(t,e,n,i,s)=>{const{origin:o}=A;if("object"!=typeof o)return t;const r=n*Math.PI/180,a=(o.x-.5)*f*e,l=(o.y-.5)*g*e;return{x:p+i+Math.cos(r)*a-Math.sin(r)*l,y:m+s+Math.sin(r)*a+Math.cos(r)*l}},D=()=>Wl.get(fa.get(t)),C=()=>{const{scale:t,rotate:e,snapToOrigin:n,transition:i}=A,[s,o,a,l]=h,c=s.get(),u=o.get(),d=a.get(),f=l.get(),{snap:g}=ql(e);let y=Zl(c,ql(t)),v=Zl(g?Math.round((u+.2*o.getVelocity())/g)*g:u,ql(e));n&&(y=1,v=360*Math.round(u/360));const x=_l(A)&&!D()?.isDragging,w=k(r,c,u,d,f),T=p+d-w.x,b=m+f-w.y;if(!c||y===c&&v===u&&(!n||!x||!d&&!f))return;const S=le({keyframes:[0,1],stiffness:200,damping:40,...i}),M=U.now(),E=()=>{const{value:i,done:r}=S.next(U.now()-M);r&&P();const[h,p,m,g]=(t=>{const e=Vt(c,y,t),n=Vt(u,v,t),i=(n-u)*Math.PI/180,s=Math.cos(i)*e/c,o=Math.sin(i)*e/c;return[e,n,d+s*T-o*b-T,f+o*T+s*b-b]})(i);!1!==t&&s.set(h),!1!==e&&o.set(p),x&&!D()?.isDragging&&(a.set(n?Vt(d,0,i):m),l.set(n?Vt(f,0,i):g))};P=()=>Yt(E),Kt.update(E,!0)},R=()=>{if(!h||!x)return;x=!1;const{rotate:t,scale:e,pan:n,elastic:s}=M(),[o,a,c,d]=h,f=Hl(s),g=o.get(),w=D(),P=w?.isDragging;P||(y=c.get(),v=d.get());const V=k(l,g,a.get(),y,v);let C=0,R=1;const L=(t,e)=>{const n=ql(e),i=Zl(t,n);return f[t<i?"min":"max"]?[Rl(t,n,f),t]:[i,i]};if(!1!==e&&g){const[t,n]=L(i(1e-9,1e9,b*Math.exp(r.l-l.l)),e);b=n,R=t/g,o.set(t)}if(!1!==t){const[e,n]=L(S+r.a-l.a,t);S=n,C=e-a.get(),C&&a.set(e)}if(_l(A)){c.stop(),d.stop();const t=C*Math.PI/180,e=Math.cos(t)*R,i=Math.sin(t)*R,s=V.x-p-y,o=V.y-m-v,a=!1!==n?r.x-l.x:0,u=!1!==n?r.y-l.y:0;if(y+=s+a-(e*s-i*o),v+=o+u-(i*s+e*o),P){const t=w.panSession.history;t.splice(0,t.length-1),t[0].timestamp=-1/0,w.originPoint.x=y,w.originPoint.y=v}c.set(y),d.set(v)}Object.assign(l,r),T.onPinch?.(u,E())},L=()=>{if(!n())return B(u);R(),"wheel"===c&&U.now()-w>150&&B(u)},j=(e,i)=>{if(!n())return;P(),c=i,u=e,x=!1,h=void 0,T={},Object.assign(a,r),Object.assign(l,r),Kt.read(V),Kt.preRender(L,!0);const o=s(t,e,E());T="function"==typeof o?{onComplete:o}:o||{}},B=t=>{c&&(Yt(V),Yt(L),n()&&(R(),h&&C()),c=void 0,T.onComplete?.(t,E()))},O=t=>{u=t,x=!0},I=()=>{const[t,e]=o.values(),n=180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI-r.a;r.x=(t.x+e.x)/2,r.y=(t.y+e.y)/2,r.l=Math.log(Math.hypot(e.x-t.x,e.y-t.y)||1),r.a+=n-360*Math.round(n/360)},F=t=>o.set(t.pointerId,{x:t.clientX,y:t.clientY}),W=t=>{o.has(t.pointerId)&&(F(t),"pointer"===c&&(I(),O(t)))},N=t=>{o.delete(t.pointerId)&&("pointer"===c&&B(t),o.size||(K(),z()))},$=e=>{c||o.size>1||o.has(e.pointerId)||"mouse"===e.pointerType||(o.size||K(!0),F(e),2===o.size&&(I(),j(e,"pointer"),!c||d||Wl.get(fa.get(t))||(d=Cl(!0))))},z=()=>{const t=d;d=void 0,t&&Kt.postRender(t)},K=t=>{const e=t?"addEventListener":"removeEventListener";window[e]("pointerdown",$),window[e]("pointermove",W),window[e]("pointerup",N),window[e]("pointercancel",N)},Y=t=>{if(!(o.size||c&&"gesture"!==c)){const{scale:e,rotation:n,clientX:i,clientY:s}=t;r.x=i,r.y=s,r.l=Math.log(e),r.a=n,c?(O(t),"gestureend"===t.type&&B(t)):"gesturestart"===t.type&&j(t,"gesture")}c&&t.preventDefault()},X={pointerdown:$,wheel:t=>{!t.ctrlKey||c&&"wheel"!==c||(r.x=t.clientX,r.y=t.clientY,(c||(r.l=0,j(t,"wheel"),c))&&(t.preventDefault(),r.l-=i(-50,50,t.deltaY*(t.deltaMode?16:1))/100,w=U.now(),O(t)))},gesturestart:Y,gesturechange:Y,gestureend:Y};for(const e in X)t.addEventListener(e,X[e],{passive:!1});return()=>{for(const e in X)t.removeEventListener(e,X[e]);K(),B(u),P(),o.clear(),z()}}const tc=["scale","rotate","x","y"];const ec=(t,e)=>!!e&&(t===e||ec(t,e.parentElement)),nc=new WeakSet;function ic(t){return e=>{"Enter"===e.key&&t(e)}}function sc(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const oc=new WeakSet,rc=(t,e,n)=>Math.hypot(t.clientX-e.clientX,t.clientY-e.clientY)>n,ac=t=>t.preventDefault();function lc(t,e){const n=window.getComputedStyle(t);return vn(e)?n.getPropertyValue(e):n[e]}const cc={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 uc(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"})`:cc[t]||t;return e?`(not (${i}))`:i}).join(" and ")}const hc=["nodes","calculatedTargetDeltas","calculatedProjections"];function dc(...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 pc=new Set,mc=({timestamp:t})=>{pc.forEach(e=>e.tick(t))};class fc 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():(pc.size||Kt.update(mc,!0),pc.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():(pc.delete(this),pc.size||Yt(mc))}}function gc(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=Fo(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Fo(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 fc({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),Hi(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(yc(e,r),!1)):t.set(yc(e,r))},o=e.on("change",s),a=e.get();Fo(a)-Fo(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function yc(t,e){return e?t+e:t}function vc(t,e,n={}){const i={type:"spring",...n};return xe(i),i.type=i.type||fe,gc(t,e,i)}function xc(t){const e=[];Si.current=e;const n=t();Si.current=void 0;const i=Ai(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>Kt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),Yt(i)})}(e,i,t),i}function wc(t,e,n){return gc(t,e,{...n,type:le})}const Tc=[...rs,mt,Pt];let bc=0;const Sc=()=>"motion-view-"+bc++;function Pc(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Ac(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 Mc(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]??Sc();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Pc(t,s,o),Ac(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=Sc(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Pc(t,s,o),Ac(t,d,r,a,l),d})}function Ec(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let Vc={},kc=null;const Dc=(t,e)=>{Vc[t]=e},Cc=()=>{kc||(kc=document.createElement("style"),kc.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"}kc.textContent=t,document.head.appendChild(kc),Vc={}},Rc=()=>{kc&&kc.parentElement&&kc.parentElement.removeChild(kc)};function Lc(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function jc(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const Bc=["layout","enter","exit","new","old"],Oc=t=>t.split(" ").every(t=>0===parseFloat(t)),Ic={group:["layout"],new:["new","enter"],old:["old","exit"]},Fc={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function Wc(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=Mc(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=Mc(o.get(n),c,u,w.get(n),l,h,p,d,m)}else g=Mc(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]},P=(t,e,n,i,s)=>{const o=Nc(Ei(l,n),Ei(function(t,e){for(const n of Ic[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},A=t=>{const[e,n]=S(t,"group"),i=P(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)}}),V=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},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Dc(":root",{"view-transition-name":"none"}),Dc("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{Dc(`::view-transition-group(${t})`,{overflow:"clip"}),Dc(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{Dc(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Cc()},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),Rc()},C=async()=>{await e(),b("new"),E("new"),(()=>{g.clear();for(const t of x.keys())"root"!==t&&(v.get(t)??V(t))&&g.add(t)})(),k()};let R;try{b("old"),E("old"),k(),R=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return R.finished.finally(D),new Promise((t,e)=>{R.ready.then(()=>{const e=jc(),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 Bc){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Ec(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=Nc(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?Fc[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=Lc(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}=A(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=P(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}=A(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";Oc(a)&&Oc(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 Nc(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 Uc=[],$c=null;function zc(){$c=null;const[t]=Uc;var e;t&&(n(Uc,e=t),$c=e,Wc(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(zc))}function Kc(){for(let t=Uc.length-1;t>=0;t--){const e=Uc[t],{interrupt:n}=e.options;if("immediate"===n){const n=Uc.slice(0,t+1).map(t=>t.update),i=Uc.slice(t+1);e.update=()=>{n.forEach(t=>t())},Uc=[e,...i];break}}$c&&"immediate"!==Uc[0]?.options.interrupt||zc()}class Yc{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,Uc.push(n),ko.render(Kc)}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 Xc=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"]),Gc=t=>"string"==typeof t&&"svg"===t.toLowerCase();function qc(t,e,n,i){Ca(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Xc.has(n)?n:Is(n),e.attrs[n])}function Hc(t,e,n){const i=La(t,e,n);for(const n in t)if("children"!==n&&(Hi(t[n])||Hi(e[n]))){i[-1!==Qe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function _c(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 Zc=[...va].reverse(),Jc=t=>!0===t?.out?t:t?.out;function Qc(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!_c(e,t)}function tu(){const t={};for(const e of va)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const eu=xa.length;const nu=t=>!t.isLayoutDirty&&t.willUpdate(!1);const iu=Kt,su=$t.reduce((t,e)=>(t[e]=t=>Yt(t),t),{});function ou(t){return"object"==typeof t&&!Array.isArray(t)}function ru(t,e,n,i){return null==t?[]:"string"==typeof t&&ou(e)?Es(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function au(t,e,n){return t*(e+1)+n*e}function lu(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 cu(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:Vt(o,r,s[n]),easing:j(i,n)})}function uu(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function hu(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function du(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))):lu(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=fu(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,P=l.length,A=kn(h)?h:s?.[h||"keyframes"];if(P<=2&&A){let t=100;if(2===P&&vu(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,A);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=au(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":j(d,t-1))}uu(u,d,t)}const V=M+T;cu(i,l,x,u,M,V),w=Math.max(S+T,w),f=Math.max(V,f)};if(Hi(y)){T(v,x,mu("default",pu(y,l)))}else{const t=ru(y,v,i,c),e=t.length;for(let n=0;n<e;n++){const i=pu(t[n],l);for(const t in v)T(v[t],gu(x,t),mu(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(hu);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 pu(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function mu(t,e){return e[t]||(e[t]=[]),e[t]}function fu(t){return Array.isArray(t)?t:[t]}function gu(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const yu=t=>"number"==typeof t,vu=t=>t.every(yu);function xu(t,e,n,i){const s=[];if(function(t,e){return Hi(t)||"number"==typeof t||"string"==typeof t&&!ou(e)}(t,e))s.push(Co(t,ou(e)&&e.default||e,n&&n.default||n));else{if(null==t)return s;const o=ru(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(...Ao(i,e,a,fa.get(i))):s.push(...ws(vs(i)??Vo,i,e,a))}}return s}let wu=0;function Tu({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 bu=(t,e)=>void 0===e?t:{name:t,at:e};function Su(t){t.pause(),t.time=0,t.stop()}class Pu{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 Pu&&t.adopt(this),this.push({item:t,at:e})}call(t,e){return this.push({item:t,at:e,marker:{name:"_m"+wu++,time:0,callback:t}})}addPause(t,e){return this.push({item:e||{},at:t,marker:{name:"_m"+wu++,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 Pu&&(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]=Tu(this.options,n,i),o=Tu(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&&(Su(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,Su(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=du(t.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Ai(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(...xu(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=Ai(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,P]=Tu(this.options,t,n);n>w&&(n=Tu(this.options,y,Math.min(P,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),bu(i.name,n)):e instanceof Pu?{sequence:e.toSequence(t),at:n}:"string"==typeof e?bu(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:lu(t,this.labels)??this.time}currentRepeat(){return Tu(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=Tu(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 Au(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 Pu(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 Pu([h],{...a,onComplete:n,scope:e},xu(t,s,c,e))}var c;return l}}const Mu=Object.assign(Au(),{addEffect:gs,removeEffect:ys});function Eu(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]=lc(s,o)),$e(n),ps(n,o),!r&&n.length<2&&n.unshift(lc(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(Eu(e,n,i,t))},ku=Vu(),Du={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},Cu=new WeakMap;function Ru(t,e,n,s){const o=n[e],{length:r,position:a}=Du[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 Lu={start:0,center:.5,end:1};function ju(t,e,n=0){let i=0;if(t in Lu&&(t=Lu[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 Bu=[0,0];function Ou(t,e,n,i){let s=Array.isArray(t)?t:Bu,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Lu[t]?t:"0"]),o=ju(s[0],n,i),r=ju(s[1],e),o-r}const Iu=[[0,0],[1,1]];function Fu(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 Wu(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 Du){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=Iu}){for(const n in Du){const s=t[n];s.offset.length=0;for(let t=0;t<e.length;t++)s.offset[t]=Ou(e[t],s.containerLength,s.targetLength,s.targetOffset);s.progress=i(0,1,Fu(s.offset,s.current))}}(n,s)}},notify:t=>e(r?n:t)}}const Nu=new WeakMap,Uu=new WeakMap,$u=new WeakMap,zu=new WeakMap,Ku=t=>t===document.scrollingElement?window:t;function Yu(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return c;let s=$u.get(e);s||(s=new Set,$u.set(e,s));const o=Wu(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),!Nu.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 Du)Ru(t,i,e,n);e.time=n}(e,t,F.timestamp);for(const e of s)e.measure(t);Kt.preUpdate(i)},i=()=>{for(const e of s)e.notify(t)},o=()=>Kt.read(n);Nu.set(e,o);const r=Ku(e);window.addEventListener("resize",o),e!==document.documentElement&&Uu.set(e,pl(e,o)),r.addEventListener("scroll",o),o()}if(n&&!zu.has(e)){const t=Nu.get(e),n={width:e.scrollWidth,height:e.scrollHeight},i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=Kt.read(i,!0);zu.set(e,s)}const r=Nu.get(e);return Kt.read(r,!1,!0),()=>{Yt(r);const t=$u.get(e);if(!t)return;if(t.delete(o),t.size)return;$u.delete(e);const n=Nu.get(e);Nu.delete(e),n&&(Ku(e).removeEventListener("scroll",n),Uu.get(e)?.(),window.removeEventListener("resize",n));const i=zu.get(e);i&&(Yt(i),zu.delete(e))}}const Xu=new Map;const Gu=t=>{if(/v/u.test(t))return[];const e=Ou(t,0,0,0);return[Ou(t,0,1,0)-e,e-Ou(t,1,0,0),e]},qu=([t,e,n])=>!n&&(0===e||1===e)&&`${e?"entry":"exit"}-crossing ${100*t}%`;function Hu(t,e){const{target:n,container:i,axis:s}=e,o=n&&function(t=Iu){if(2!==t.length)return;const[e,n]=t.map(Gu),i=[qu(e),qu(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=Xu.get(t);i||(i=new Map,Xu.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=Yu(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(pl(l),pl([n,i],l))}return()=>{d.forEach(t=>t()),c?.()}}const _u={some:0,all:1};t.AsyncMotionValueAnimation=mi,t.DOMKeyframesResolver=us,t.DOMVisualElement=Da,t.DocumentProjectionNode=da,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Lr,t.GroupAnimation=fi,t.GroupAnimationWithThen=yi,t.HTMLProjectionNode=ma,t.HTMLVisualElement=ja,t.JSAnimation=Me,t.KeyframeResolver=yn,t.LayoutAnimationBuilder=_a,t.MotionGlobalConfig=s,t.MotionValue=Pi,t.MotionValueState=ks,t.NativeAnimation=Cn,t.NativeAnimationExtended=jn,t.NativeAnimationWrapper=vi,t.NodeStack=Ar,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=yl,t.SVGVisualElement=class extends Da{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=Xc.has(e)?e:Is(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Hc(t,e,n)}build(t,e,n){zs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){qc(t,e,0,i)}mount(t){this.isSVGTag=Gc(t.tagName),super.mount(t)}},t.SubscriptionManager=d,t.ViewTransitionBuilder=Yc,t.VisualElement=ka,t.VisualElementDragControls=Nl,t.acceleratedValues=In,t.acquireProjectionNode=function(t){const e=Ua.get(t)||fa.get(t)?.projection;return e?.instance?[e,()=>{}]:Xa(t)},t.activeScope=Ss,t.addAttrValue=Ks,t.addBuilderToScope=As,t.addDomEvent=ha,t.addEffect=gs,t.addPinchListeners=Ql,t.addPointerEvent=el,t.addPointerInfo=tl,t.addSVGValue=Xs,t.addScaleCorrector=function(t){for(const e in t)Ro[e]=t[e],K(e)&&(Ro[e].isCSSVariable=!0)},t.addStyleValue=Ls,t.addToScope=Ps,t.addUniqueItem=e,t.addValueToWillChange=Zi,t.alpha=_,t.analyseComplexValue=Tt,t.animate=Mu,t.animateEffectSubject=ws,t.animateElement=Ao,t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Za(t,e,n),r=new _a(i,s,{...Ss.current?.transition,...o});return As(r),r},t.animateMini=ku,t.animateMotionValue=ji,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 Yc(t,e);return As(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=Ii(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=Ii(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:Bi(t,i.x,u.x,r.x),y:Bi(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=Ai(0);y.start(ji("",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=vc,t.attachSpring=wc,t.attrEffect=Ys,t.axisDeltaEquals=Pr,t.axisEquals=xr,t.axisEqualsRounded=Tr,t.backIn=P,t.backInOut=A,t.backOut=S,t.bindToScope=Ms,t.boxEquals=wr,t.boxEqualsRounded=br,t.buildHTMLStyles=Fs,t.buildProjectionTransform=Dr,t.buildSVGAttrs=zs,t.buildSVGPath=Us,t.buildTransform=Hn,t.buildTransformer=bt,t.calcAxisDelta=Zo,t.calcBoxDelta=Jo,t.calcChildStagger=bi,t.calcGeneratorDuration=_t,t.calcLength=Ho,t.calcRelativeAxis=Qo,t.calcRelativeAxisPosition=er,t.calcRelativeBox=tr,t.calcRelativePosition=nr,t.camelCaseAttributes=Xc,t.camelToDash=Is,t.cancelFrame=Yt,t.cancelMicrotask=Do,t.cancelSync=su,t.checkVariantsDidChange=Qc,t.circIn=E,t.circInOut=k,t.circOut=V,t.clamp=i,t.cleanDirtyNodes=Yr,t.collectMotionValues=Si,t.color=mt,t.compareByDepth=Rr,t.complex=Pt,t.containsCSSVariable=q,t.convertBoundingBoxToBox=Zs,t.convertBoxToBoundingBox=Js,t.convertOffsetToTimes=pe,t.copyAxisDeltaInto=qo,t.copyAxisInto=Xo,t.copyBoxInto=Go,t.correctBorderRadius=Er,t.correctBoxShadow=Vr,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ss(t,e,n))),n=tu(),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&&Jc(d(c??(g&&g.props.initial))?.transition);if(Zc.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:ya(d)||!1===d?d:void 0,x=ya(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||ga(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const b=Qc(s.prevProp,v);let S=b||x&&(w&&!T||i>f),P=!1;const A=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of A){const{transition:i,transitionEnd:s,...o}=$i(t,n,zi(t,e))||{};E={...E,...o,...s},M=Jc(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!_c(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)&&(P=!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||P))for(const n of A){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||Hi(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=tu(),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=zt,t.createScopedAnimate=Au,t.cubicBezier=w,t.cubicBezierAsString=An,t.defaultEasing=me,t.defaultOffset=de,t.defaultTransformValue=_e,t.defaultValueTypes=Be,t.degrees=at,t.delay=Bo,t.delayInSeconds=Bo,t.dimensionValueTypes=rs,t.distance=ml,t.distance2D=fl,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&&Ai(0),_dragY:f||m&&Ai(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]=Wa(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Nl(fa.get(t),()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=Yl.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return Yl.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{Yl.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 Ps(()=>s.forEach(t=>t()))},t.eachAxis=Cr,t.easeIn=D,t.easeInOut=R,t.easeOut=C,t.easingDefinitionToFunction=I,t.elementDragControls=Wl,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Ul(t)&&!!e},t.extractEventInfo=Qa,t.fillOffset=he,t.fillWildcards=$e,t.findDimensionValueType=as,t.findEffect=vs,t.findValueType=t=>Tc.find(os(t)),t.flushKeyframeResolvers=gn,t.flushLayoutSnapshots=Ha,t.followValue=function(t,e){const n=Ai(Hi(t)?t.get():t);return vc(n,t,e),n},t.frame=Kt,t.frameData=F,t.frameSteps=Xt,t.generateLinearEasing=qt,t.getAnimatableNone=Ue,t.getAnimationMap=Ti,t.getComputedStyle=lc,t.getDefaultTransition=Ci,t.getDefaultValueType=Oe,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Va},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.getSpringOptions=re,t.getValueAsType=zn,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<eu;t++){const i=xa[t],s=e.props[i];(ya(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=Lc,t.getViewAnimations=jc,t.globalProjectionState=jr,t.handOffElementState=Eo,t.has2DTranslate=oo,t.hasComplexValues=wt,t.hasReducedMotionListener=Pa,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]=Xl(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||Dl())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:_u[s]});return o.forEach(t=>a.observe(t)),Ps(()=>a.disconnect())},t.inertia=ce,t.initPrefersReducedMotion=Ma,t.interpolate=ue,t.invariant=()=>{},t.invisibleValues=Lt,t.isAnimationControls=ga,t.isBezierDefinition=B,t.isCSSVariableName=K,t.isCSSVariableToken=X,t.isControllingVariants=wa,t.isDeltaZero=vr,t.isDragActive=Dl,t.isDragging=kl,t.isEasingArray=L,t.isElementKeyboardAccessible=Ml,t.isElementTextInput=Vl,t.isForcedMotionValue=Ra,t.isGenerator=kn,t.isHTMLElement=Ts,t.isKeyframesTarget=Yi,t.isMotionValue=Hi,t.isNear=_o,t.isNodeOrChild=ec,t.isNumericalString=o,t.isObject=r,t.isPrimaryPointer=Ja,t.isSVGElement=bs,t.isSVGSVGElement=Oo,t.isSVGTag=Gc,t.isTransitionDefined=Li,t.isVariantLabel=ya,t.isVariantNode=Ta,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Pn()||!e||"string"==typeof e&&(e in Mn||Pn())||B(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=dc(e,n,i);return xc(()=>s(t.get()))},t.maxGeneratorDuration=Ht,t.measurePageBox=wo,t.measureViewportBox=xo,t.memo=l,t.microtask=ko,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=It,t.mixColor=Rt,t.mixComplex=Wt,t.mixImmediate=Et,t.mixLinearColor=kt,t.mixNumber=Vt,t.mixObject=Ft,t.mixValues=Uo,t.mixVisibility=jt,t.motionValue=Ai,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(nu);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=H,t.numberValueTypes=je,t.optimizedAppearDataAttribute=Ji,t.optimizedAppearDataId="framerAppearId",t.originProps=Cs,t.parseAnimateLayoutArgs=Za,t.parseCSSVariable=Wi,t.parseValueFromTransform=Ze,t.percent=lt,t.pinch=function(t,e,n={}){let i=()=>{};"function"==typeof e?i=e:e&&(n=e);const s=Ss.current;if(s){const t=s.bind(i);i=(e,n)=>{const i=t(e,n);if("object"!=typeof i)return i;const o={};for(const t in i){const e=t,n=i[e];o[e]=n&&s.bind(n)}return o}}const o=Es(t).map(t=>{s?.track(t);const{style:e}=t,o=e.touchAction;e.touchAction="none";const r=Ql(t,()=>(t=>{const e=fa.get(t),n=bs(t)?qs:Bs;return tc.map(i=>{if(e)return e.getValue(i,"scale"===i?1:0);let s=n.get(t,i);return s||(s=Ai(js(t,i)),n(t,{[i]:s})),s})})(t),()=>n,i);return()=>{r(),e.touchAction=o}});return Ps(()=>o.forEach(t=>t()))},t.pipe=u,t.pixelsToPercent=Mr,t.positionalKeys=Ki,t.prefersReducedMotion=Sa,t.press=function(t,e,n={}){e=Ms(e);const[i,s,o]=Xl(t,n),r=new WeakMap,a=t=>{const i=t.currentTarget;if(!Ja(t)||Dl())return;if(oc.has(t))return;n.stopPropagation&&oc.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(rc(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(nc.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,P=!0;const A=()=>{if(s.signal.aborted)return Yt(A);let t=Math.min(1-(S-U.now())/b,1);P&&t<1&&(t=0),P=!1,v.onHold?.(t),t<1||(x?v.onRepeat?.(++w):(x=!0,v.onActive?.()),c?(P=!0,S+=b=T):Yt(A))},M={...s,capture:!0},E=(e,n)=>{if(Ja(e))if(window.removeEventListener("pointerup",V,M),window.removeEventListener("pointercancel",k,M),window.removeEventListener("pointermove",D,M),i.removeEventListener("contextmenu",ac),Yt(A),nc.delete(i),Dl()&&(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}),Kt.update(o,!0)}else v.onComplete?.(e,{success:n&&x})},V=t=>{E(t,i===window||i===document||n.useGlobalTarget||ec(i,t.target))},k=t=>{E(t,!1)},D=e=>{Ja(e)&&((c||!x)&&rc(t,e,8)||o>1&&Dl())&&k(e)};window.addEventListener("pointerup",V,M),window.addEventListener("pointercancel",k,M),(y||o>1)&&window.addEventListener("pointermove",D,M),y&&(Kt.update(A,!0),i.addEventListener("contextmenu",ac,{...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=ic(()=>{n||nc.has(t)||(n=!0,sc(t,"down"))}),s=ic(()=>{n&&(n=!1,sc(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&sc(t,"cancel")},{...e,once:!0})})(t,s),s),Ml(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=U.now())=>{if(F.isProcessing)return;const e=t-F.timestamp;F.delta=s.useManualTiming?e:Math.max(Math.min(e,40),1),U.set(F.timestamp=t),F.isProcessing=!0;for(const t in Xt)Xt[t].process(F);F.isProcessing=!1},t.progress=h,t.progressPercentage=dt,t.propEffect=Vo,t.propagateDirtyNodes=Kr,t.px=ct,t.readSVGValue=Gs,t.readStyleValue=js,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[hc[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=Ca,t.renderSVG=qc,t.resize=pl,t.resolveElements=Es,t.resolveMotionValue=Io,t.resolveTransition=Mi,t.resolveVariant=$i,t.resolveVariantFromProps=Ui,t.reverseEasing=b,t.rgbUnit=nt,t.rgba=it,t.rootProjectionNode=pa,t.round=Ae,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(uc(t[e]));n.addEventListener("change",m),a.push([e,n])}}return Ps(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=La,t.scrapeSVGMotionValuesFromProps=Hc,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 Ps(Yu(t=>n(t[e].progress,t),o))}return Ps(Hu(t,o))},t.scrollInfo=Yu,t.secondsToMilliseconds=p,t.setDragLock=Cl,t.setFeatureDefinitions=function(t){Va=t},t.setStyle=xn,t.setTarget=qi,t.spring=le,t.springValue=function(t,e){const n=Ai(Hi(t)?t.get():t);return wc(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i,grid:s}={}){const o={};return(r,a)=>{let l=o[a];if(!l){const[t,e]=s||[1/0,1],i=Math.min(t,a)-1,r=Math.max(e,Math.ceil(a/t))-1,c="number"==typeof n,u="first"===n?0:"last"===n?1:.5,h=c?n%t:i*u,d=c?Math.floor(n/t):r*u;l=o[a]=[];for(let e=0;e<a;e++){const s=e%t,o=Math.floor(e/t),a=Math.min(s,i-s),c=Math.min(o,r-o);if("random"===n){const t=Math.random()*(e+1)|0;l[e]=l[t],l[t]=e}else l[e]="edges"===n?Math.min(i?a:c,r?c:a):Math.hypot(s-h,o-d)}l.push(s?Math.max(...l):a)}let c=t*l[r];const u=t*l[a];if(i&&u){c=I(i)(c/u)*u}return e+c}},t.startWaapiAnimation=Vn,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=Bs,t.supportedWaapiEasing=Mn,t.supportsBrowserAnimation=$n,t.supportsFlags=wn,t.supportsLinearEasing=Pn,t.supportsPartialKeyframes=ms,t.supportsScrollTimeline=bn,t.supportsViewTimeline=Sn,t.supportsWaapi=Un,t.svgEffect=Hs,t.svgSubjectEffect=qs,t.sync=iu,t.testValueType=os,t.time=U,t.toMediaQuery=uc,t.transform=dc,t.transformAxis=go,t.transformBox=vo,t.transformBoxPoints=Qs,t.transformPropOrder=Qe,t.transformProps=tn,t.transformValue=xc,t.transformValueTypes=Le,t.translateAxis=fo,t.updateMotionValuesFromProps=ba,t.variantPriorityOrder=va,t.variantProps=xa,t.velocityPerSecond=f,t.vh=ut,t.visualElementStore=fa,t.vw=ht,t.warnOnce=y,t.warning=()=>{},t.wrap=v});