2 lines
178 KiB
JavaScript
2 lines
178 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),o=React,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,o={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:r,ref:c,props:o,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...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,[o]=t.splice(e,1);t.splice(i,0,o)}return t}const S=(t,e,n)=>n>e?e:n<t?t:n;function b(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(b(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(b(e,n))});const P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function A(t){return"object"==typeof t&&null!==t}const M=t=>/^0[^.\s]+$/u.test(t);function C(t){let e;return()=>(void 0===e&&(e=t()),e)}const V=t=>t,k=(t,e)=>n=>e(t(n)),R=(...t)=>t.reduce(k),D=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class L{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(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 o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const B=t=>1e3*t,j=t=>t/1e3;function I(t,e){return e?t*(1e3/e):0}const O=new Set;const F=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},W=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function U(t,e,n,i){if(t===e&&n===i)return V;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=W(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:W(o(t),e,i)}const N=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$=t=>e=>1-t(1-e),z=U(.33,1.53,.69,.99),Y=$(z),H=N(Y),X=t=>t>=1?1:(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),G=t=>1-Math.sin(Math.acos(t)),K=$(G),_=N(G),q=U(.42,0,1,1),Z=U(0,0,.58,1),J=U(.42,0,.58,1);const Q=t=>Array.isArray(t)&&"number"!=typeof t[0];function tt(t,e){return Q(t)?t[F(0,t.length,e)]:t}const et=t=>Array.isArray(t)&&"number"==typeof t[0],nt={linear:V,easeIn:q,easeInOut:J,easeOut:Z,circIn:G,circInOut:_,circOut:K,backIn:Y,backInOut:H,backOut:z,anticipate:X},it=e=>{if(et(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,o,s]=e;return U(n,i,o,s)}return"string"==typeof e?(t.invariant(void 0!==nt[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nt[e]):e},ot=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],st={value:null,addProjectionMetrics:null};function rt(t,e){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=ot.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,o=!1,s=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,s=!1)=>{const a=s&&o?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,o)return void(s=!0);o=!0;const r=n;n=i,i=r,n.forEach(u),e&&st.value&&st.value.frameloop[e].push(l),l=0,n.clear(),o=!1,s&&(s=!1,c.process(t))}};return c}(s,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const s=P.useManualTiming,r=s?o.timestamp:performance.now();n=!1,s||(o.delta=i?1e3/60:Math.max(Math.min(r-o.timestamp,40),1)),o.timestamp=r,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),h.process(o),d.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:ot.reduce((e,s)=>{const a=r[s];return e[s]=(e,s=!1,r=!1)=>(n||(n=!0,i=!0,o.isProcessing||t(f)),a.schedule(e,s,r)),e},{}),cancel:t=>{for(let e=0;e<ot.length;e++)r[ot[e]].cancel(t)},state:o,steps:r}}const{schedule:at,cancel:lt,state:ut,steps:ct}=rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:V,!0);let ht;function dt(){ht=void 0}const pt={now:()=>(void 0===ht&&pt.set(ut.isProcessing||P.useManualTiming?ut.timestamp:performance.now()),ht),set:t=>{ht=t,queueMicrotask(dt)}},mt={layout:0,mainThread:0,waapi:0},ft=t=>e=>"string"==typeof e&&e.startsWith(t),gt=ft("--"),yt=ft("var(--"),vt=t=>!!yt(t)&&xt.test(t.split("/*")[0].trim()),xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const Tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},St={...Tt,transform:t=>S(0,1,t)},bt={...Tt,default:1},Pt=t=>Math.round(1e5*t)/1e5,Et=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const At=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mt=(t,e)=>n=>Boolean("string"==typeof n&&At.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ct=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[o,s,r,a]=i.match(Et);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Vt={...Tt,transform:t=>Math.round((t=>S(0,255,t))(t))},kt={test:Mt("rgb","red"),parse:Ct("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Vt.transform(t)+", "+Vt.transform(e)+", "+Vt.transform(n)+", "+Pt(St.transform(i))+")"};const Rt={test:Mt("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:kt.transform},Dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Lt=Dt("deg"),Bt=Dt("%"),jt=Dt("px"),It=Dt("vh"),Ot=Dt("vw"),Ft=(()=>({...Bt,parse:t=>Bt.parse(t)/100,transform:t=>Bt.transform(100*t)}))(),Wt={test:Mt("hsl","hue"),parse:Ct("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Bt.transform(Pt(e))+", "+Bt.transform(Pt(n))+", "+Pt(St.transform(i))+")"},Ut={test:t=>kt.test(t)||Rt.test(t)||Wt.test(t),parse:t=>kt.test(t)?kt.parse(t):Wt.test(t)?Wt.parse(t):Rt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?kt.transform(t):Wt.transform(t),getAnimatableNone:t=>{const e=Ut.parse(t);return e.alpha=0,Ut.transform(e)}},Nt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $t="number",zt="color",Yt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ht(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},o=[];let s=0;const r=e.replace(Yt,t=>(Ut.test(t)?(i.color.push(s),o.push(zt),n.push(Ut.parse(t))):t.startsWith("var(")?(i.var.push(s),o.push("var"),n.push(t)):(i.number.push(s),o.push($t),n.push(parseFloat(t))),++s,"${}")).split("${}");return{values:n,split:r,indexes:i,types:o}}function Xt({split:t,types:e}){const n=t.length;return i=>{let o="";for(let s=0;s<n;s++)if(o+=t[s],void 0!==i[s]){const t=e[s];o+=t===$t?Pt(i[s]):t===zt?Ut.transform(i[s]):i[s]}return o}}const Gt=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Ut.test(n)?Ut.getAnimatableNone(n):n;var n};const Kt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Et)?.length||0)+(t.match(Nt)?.length||0)>0},parse:function(t){return Ht(t).values},createTransformer:function(t){return Xt(Ht(t))},getAnimatableNone:function(t){const e=Ht(t);return Xt(e)(e.values.map((t,n)=>Gt(t,e.split[n])))}};function _t(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 qt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=_t(a,i,t+1/3),s=_t(a,i,t),r=_t(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}function Zt(t,e){return n=>n>0?e:t}const Jt=(t,e,n)=>t+(e-t)*n,Qt=(t,e,n)=>{const i=t*t,o=n*(e*e-i)+i;return o<0?0:Math.sqrt(o)},te=[Rt,kt,Wt];function ee(e){const n=(i=e,te.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let o=n.parse(e);return n===Wt&&(o=qt(o)),o}const ne=(t,e)=>{const n=ee(t),i=ee(e);if(!n||!i)return Zt(t,e);const o={...n};return t=>(o.red=Qt(n.red,i.red,t),o.green=Qt(n.green,i.green,t),o.blue=Qt(n.blue,i.blue,t),o.alpha=Jt(n.alpha,i.alpha,t),kt.transform(o))},ie=new Set(["none","hidden"]);function oe(t,e){return ie.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function se(t,e){return n=>Jt(t,e,n)}function re(t){return"number"==typeof t?se:"string"==typeof t?vt(t)?Zt:Ut.test(t)?ne:ue:Array.isArray(t)?ae:"object"==typeof t?Ut.test(t)?ne:le:Zt}function ae(t,e){const n=[...t],i=n.length,o=t.map((t,n)=>re(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=o[e](t);return n}}function le(t,e){const n={...t,...e},i={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=re(t[o])(t[o],e[o]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const ue=(e,n)=>{const i=Kt.createTransformer(n),o=Ht(e),s=Ht(n);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?ie.has(e)&&!s.values.length||ie.has(n)&&!o.values.length?oe(e,n):R(ae(function(t,e){const n=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],r=t.indexes[s][i[s]],a=t.values[r]??0;n[o]=a,i[s]++}return n}(o,s),s.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Zt(e,n))};function ce(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Jt(t,e,n);return re(t)(t,e)}const he=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>at.update(e,t),stop:()=>lt(e),now:()=>ut.isProcessing?ut.timestamp:pt.now()}},de=(t,e,n=10)=>{let i="";const o=Math.max(Math.round(e/n),2);for(let e=0;e<o;e++)i+=Math.round(1e4*t(e/(o-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pe=2e4;function me(t){let e=0;let n=t.next(e);for(;!n.done&&e<pe;)e+=50,n=t.next(e);return e>=pe?1/0:e}function fe(t,e=100,n){const i=n({...t,keyframes:[0,e]}),o=Math.min(me(i),pe);return{type:"keyframes",ease:t=>i.next(o*t).value/e,duration:j(o)}}const ge=100,ye=10,ve=1,xe=0,we=800,Te=.3,Se=.3,be={granular:.01,default:2},Pe={granular:.005,default:.5},Ee=.01,Ae=10,Me=.05,Ce=1;function Ve(t,e){return t*Math.sqrt(1-e*e)}const ke=.001;const Re=["duration","bounce"],De=["stiffness","damping","mass"];function Le(t,e){return e.some(e=>void 0!==t[e])}function Be(e){let n={velocity:xe,stiffness:ge,damping:ye,mass:ve,isResolvedFromDuration:!1,...e};if(!Le(e,De)&&Le(e,Re))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,i=2*Math.PI/(1.2*t),o=i*i,s=2*S(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:ve,stiffness:o,damping:s}}else{const i=function({duration:e=we,bounce:n=Te,velocity:i=xe,mass:o=ve}){let s,r;t.warning(e<=B(Ae),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=S(Me,Ce,a),e=S(Ee,Ae,j(e)),a<1?(s=t=>{const n=t*a,o=n*e,s=n-i,r=Ve(t,a),l=Math.exp(-o);return ke-s/r*l},r=t=>{const n=t*a*e,o=n*i+i,r=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),u=Ve(Math.pow(t,2),a);return(-s(t)+ke>0?-1:1)*((o-r)*l)/u}):(s=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(i-t)));const l=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,r,5/e);if(e=B(e),isNaN(l))return{stiffness:ge,damping:ye,duration:e};{const t=Math.pow(l,2)*o;return{stiffness:t,damping:2*a*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...i,mass:ve},n.isResolvedFromDuration=!0}return n}function je(t=Se,e=Te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:o}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=Be({...n,velocity:-j(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-s,y=j(Math.sqrt(l/c)),v=Math.abs(g)<5;let x,w,T,S,b,P;if(i||(i=v?be.granular:be.default),o||(o=v?Pe.granular:Pe.default),f<1)T=Ve(y,f),S=(m+f*y*g)/T,x=t=>{const e=Math.exp(-f*y*t);return r-e*(S*Math.sin(T*t)+g*Math.cos(T*t))},b=f*y*S+g*T,P=f*y*g-S*T,w=t=>Math.exp(-f*y*t)*(b*Math.sin(T*t)+P*Math.cos(T*t));else if(1===f){x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);const t=m+y*g;w=e=>Math.exp(-y*e)*(y*t*e-m)}else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(m+f*y*g)/t,n=f*y*e-g*t,i=f*y*g-e*t;w=e=>{const o=Math.exp(-f*y*e),s=Math.min(t*e,300);return o*(n*Math.sinh(s)+i*Math.cosh(s))}}const E={calculatedDuration:p&&h||null,velocity:t=>B(w(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*y*t),n=Math.sin(T*t),s=Math.cos(T*t),l=r-e*(S*n+g*s),u=B(e*(b*n+P*s));return a.done=Math.abs(u)<=i&&Math.abs(r-l)<=o,a.value=a.done?r:l,a}const e=x(t);if(p)a.done=t>=h;else{const n=B(w(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=o}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(me(E),pe),e=de(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}je.applyToOptions=t=>{const e=fe(t,100,je);return t.ease=e.ease,t.duration=B(e.duration),t.type="keyframes",t};function Ie(t,e,n){const i=Math.max(e-5,0);return I(n-t(i),e-i)}function Oe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){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=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let w,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,T=je({keyframes:[d.value,p(d.value)],velocity:Ie(v,t,d.value),damping:o,stiffness:s,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),S(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function Fe(e,n,{clamp:i=!0,ease:o,mixer:s}={}){const r=e.length;if(t.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),n=[...n].reverse());const l=function(t,e,n){const i=[],o=n||P.mix||ce,s=t.length-1;for(let n=0;n<s;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||V:e;s=R(t,s)}i.push(s)}return i}(n,o,s),u=l.length,c=t=>{if(a&&t<e[0])return n[0];let i=0;if(u>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const o=D(e[i],e[i+1],t);return l[i](o)};return i?t=>c(S(e[0],e[r-1],t)):c}function We(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const o=D(0,e,i);t.push(Jt(n,1,o))}}function Ue(t){const e=[0];return We(e,t.length-1),e}function Ne(t,e){return t.map(t=>t*e)}function $e(t,e){return t.map(()=>e||J).splice(0,t.length-1)}function ze({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const o=Q(i)?i.map(it):it(i),s={done:!1,value:e[0]},r=Fe(Ne(n&&n.length===e.length?n:Ue(e),t),e,{ease:Array.isArray(o)?o:$e(e,o)});return{calculatedDuration:t,next:e=>(s.value=r(e),s.done=e>=t,s)}}const Ye=t=>null!==t;function He(t,{repeat:e,repeatType:n="loop"},i,o=1){const s=t.filter(Ye),r=o<0||e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}const Xe={decay:Oe,inertia:Oe,tween:ze,keyframes:ze,spring:je};function Ge(t){"string"==typeof t.type&&(t.type=Xe[t.type])}class Ke{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const _e=t=>t/100;class qe extends Ke{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==pt.now()&&this.tick(pt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},mt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ge(t);const{type:e=ze,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:r}=t;const a=e||ze;a!==ze&&"number"!=typeof r[0]&&(this.mixKeyframes=R(_e,ce(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===o&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=me(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v,x=this.currentTime,w=n;if(c){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(w=s)),x=S(0,1,n)*r}y?(this.delayState.value=u[0],v=this.delayState):v=w.next(x),o&&!y&&(v.value=o(v.value));let{done:T}=v;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return b&&p!==Oe&&(v.value=He(u,this.options,f,this.speed)),m&&m(v.value),b&&this.finish(),v}then(t,e){return this.finished.then(t,e)}get duration(){return j(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(this.currentTime)}set time(t){t=B(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(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return Ie(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(pt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=j(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=he,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(pt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,mt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ze(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Je=t=>180*t/Math.PI,Qe=t=>{const e=Je(Math.atan2(t[1],t[0]));return en(e)},tn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qe,rotateZ:Qe,skewX:t=>Je(Math.atan(t[1])),skewY:t=>Je(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},en=t=>((t%=360)<0&&(t+=360),t),nn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),on=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nn,scaleY:on,scale:t=>(nn(t)+on(t))/2,rotateX:t=>en(Je(Math.atan2(t[6],t[5]))),rotateY:t=>en(Je(Math.atan2(-t[2],t[0]))),rotateZ:Qe,rotate:Qe,skewX:t=>Je(Math.atan(t[4])),skewY:t=>Je(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function rn(t){return t.includes("scale")?1:0}function an(t,e){if(!t||"none"===t)return rn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=sn,o=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tn,o=e}if(!o)return rn(e);const s=i[e],r=o[1].split(",").map(un);return"function"==typeof s?s(r):r[s]}const ln=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return an(n,e)};function un(t){return parseFloat(t.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hn=(()=>new Set(cn))(),dn=t=>t===Tt||t===jt,pn=new Set(["x","y","z"]),mn=cn.filter(t=>!pn.has(t));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>an(e,"x"),y:(t,{transform:e})=>an(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let yn=!1,vn=!1,xn=!1;function wn(){if(vn){const t=Array.from(gn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return mn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}vn=!1,yn=!1,gn.forEach(t=>t.complete(xn)),gn.clear()}function Tn(){gn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function Sn(){xn=!0,Tn(),wn(),xn=!1}class bn{constructor(t,e,n,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(gn.add(this),yn||(yn=!0,at.read(Tn),at.resolveKeyframes(wn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const o=i?.get(),s=t[t.length-1];if(void 0!==o)t[0]=o;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===o&&i.set(t[0])}Ze(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),gn.delete(this)}cancel(){"scheduled"===this.state&&(gn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Pn=t=>t.startsWith("--");function En(t,e,n){Pn(e)?t.style.setProperty(e,n):t.style[e]=n}const An={};function Mn(t,e){const n=C(t);return()=>An[e]??n()}const Cn=Mn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Vn=Mn(()=>void 0!==window.ViewTimeline,"viewTimeline"),kn=Mn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Rn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function Ln(t,e){return t?"function"==typeof t?kn()?de(t,e):"ease-out":et(t)?Rn(t):Array.isArray(t)?t.map(t=>Ln(t,e)||Dn.easeOut):Dn[t]:void 0}function Bn(t,e,n,{delay:i=0,duration:o=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ln(a,o);Array.isArray(h)&&(c.easing=h),st.value&&mt.waapi++;const d={delay:i,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return st.value&&p.finished.finally(()=>{mt.waapi--}),p}function jn(t){return"function"==typeof t&&"applyToOptions"in t}function In({type:t,...e}){return jn(t)&&kn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class On extends Ke{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:o,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=In(e);this.animation=Bn(n,i,o,u,s),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=He(o,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),En(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return j(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=B(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Cn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),V):i(this)}}const Fn={anticipate:X,backInOut:H,circInOut:_};function Wn(t){"string"==typeof t.ease&&t.ease in Fn&&(t.ease=Fn[t.ease])}class Un extends On{constructor(t){Wn(t),Ge(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:o,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new qe({...s,autoplay:!1}),a=Math.max(10,pt.now()-this.startTime),l=S(0,10,a-10),u=r.sample(a).value,{name:c}=this.options;o&&c&&En(o,c,u),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,u,l),r.stop()}}const Nn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Kt.test(t)&&"0"!==t||t.startsWith("url(")));function $n(t){t.duration=0,t.type="keyframes"}const zn=new Set(["opacity","clipPath","filter","transform"]),Yn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Hn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Xn=C(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:o,damping:s,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=e.owner.getProps();return Xn()&&n&&(zn.has(n)||Hn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Yn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!c)&&!u&&!i&&"mirror"!==o&&0!==s&&"inertia"!==r}class Kn extends Ke{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=pt.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:o,repeatType:s,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||bn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,o){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=pt.now();let h=!0;(function(e,n,i,o){const s=e[0];if(null===s)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Nn(s,n),l=Nn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${s}" to "${r}". "${a?r:s}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(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}(e)||("spring"===i||jn(i))&&o)})(e,s,r,a)||(h=!1,!P.instantAnimations&&l||c?.(He(e,i,n)),e[0]=e[e.length-1],$n(i),i.repeat=0);const d={startTime:o?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=h&&!u&&Gn(d),m=d.motionValue?.owner?.current;let f;if(p)try{f=new Un({...d,element:m})}catch{f=new qe(d)}else f=new qe(d);f.finished.then(()=>{this.notifyFinished()}).catch(V),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Sn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class _n{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return qn(this.animations,"duration")}get iterationDuration(){return qn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function qn(t,e){let n=0;for(let i=0;i<t.length;i++){const o=t[i][e];null!==o&&o>n&&(n=o)}return n}class Zn extends _n{then(t,e){return this.finished.finally(t).then(()=>{})}}class Jn extends On{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Qn=new WeakMap,ti=(t,e="")=>`${t}:${e}`;function ei(t){let e=Qn.get(t);return e||(e=new Map,Qn.set(t,e)),e}function ni(t,e,n,i=0,o=1){const s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(s,r):1===o?s*i:a-s*i}const ii=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oi(t){const e=ii.exec(t);if(!e)return[,];const[,n,i,o]=e;return[`--${n??i}`,o]}function si(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=oi(e);if(!o)return;const r=window.getComputedStyle(n).getPropertyValue(o);if(r){const t=r.trim();return E(t)?parseFloat(t):t}return vt(s)?si(s,n,i+1):s}const ri={type:"spring",stiffness:500,damping:25,restSpeed:10},ai={type:"keyframes",duration:.8},li={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ui=(t,{keyframes:e})=>e.length>2?ai:hn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ri:li;function ci(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function hi(t,e){const n=t?.[e]??t?.default??t;return n!==t?ci(n,t):n}const di=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function pi(t){for(const e in t)if(!di.has(e))return!0;return!1}const mi=(t,e,n,i={},o,s)=>r=>{const a=hi(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:o};pi(a)||Object.assign(c,ui(t,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&($n(c),0===c.delay&&(h=!0)),(P.instantAnimations||P.skipAnimations||o?.shouldSkipAnimations)&&(h=!0,$n(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!s&&void 0!==e.get()){const t=He(c.keyframes,a);if(void 0!==t)return void at.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new qe(c):new Kn(c)};function fi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function gi(t,e,n,i){if("function"==typeof e){const[o,s]=fi(i);e=e(void 0!==n?n:t.custom,o,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[o,s]=fi(i);e=e(void 0!==n?n:t.custom,o,s)}return e}function yi(t,e,n){const i=t.getProps();return gi(i,e,void 0!==n?n:i.custom,t)}const vi=new Set(["width","height","top","left","right","bottom",...cn]),xi={current:void 0};class wi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=pt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=pt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new L);const n=this.events[t].add(e);return"change"===t?()=>{n(),at.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return xi.current&&xi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=pt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return I(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ti(t,e){return new wi(t,e)}const Si=t=>Array.isArray(t);function bi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ti(n))}function Pi(t){return Si(t)?t[t.length-1]||0:t}function Ei(t,e){const n=yi(t,e);let{transitionEnd:i={},transition:o={},...s}=n||{};s={...s,...i};for(const e in s){bi(t,e,Pi(s[e]))}}const Ai=t=>Boolean(t&&t.getVelocity);function Mi(t){return Boolean(Ai(t)&&t.add)}function Ci(t,e){const n=t.getValue("willChange");if(Mi(n))return n.add(e);if(!n&&P.WillChange){const n=new P.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Vi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ki="framerAppearId",Ri="data-"+Vi(ki);function Di(t){return t.props[Ri]}function Li({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Bi(t,e,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:s,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();s=s?ci(s,l):l;const u=s?.reduceMotion;i&&(s=i);const c=[],h=o&&t.animationState&&t.animationState.getState()[o];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),o=a[e];if(void 0===o||h&&Li(h,e))continue;const r={delay:n,...hi(s||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(o)&&o===l&&!r.velocity){at.update(()=>i.set(o));continue}let d=!1;if(window.MotionHandoffAnimation){const n=Di(t);if(n){const t=window.MotionHandoffAnimation(n,e,at);null!==t&&(r.startTime=t,d=!0)}}Ci(t,e);const p=u??t.shouldReduceMotion;i.start(mi(e,i,o,p&&vi.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&c.push(m)}if(r){const e=()=>at.update(()=>{r&&Ei(t,r)});c.length?Promise.all(c).then(e):e()}return c}function ji(t,e,n={}){const i=yi(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Bi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,o=0,s=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(ji(l,e,{...r,delay:n+("function"==typeof i?0:i)+ni(t.variantChildren,l,i,o,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,s,r,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[t,e]="beforeChildren"===a?[s,r]:[r,s];return t().then(()=>e())}return Promise.all([s(),r(n.delay)])}function Ii(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>ji(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=ji(t,e,n);else{const o="function"==typeof e?yi(t,e,n.custom):e;i=Promise.all(Bi(t,o,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Oi=t=>e=>e.test(t),Fi=[Tt,jt,Bt,Lt,Ot,It,{test:t=>"auto"===t,parse:t=>t}],Wi=t=>Fi.find(Oi(t));function Ui(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||M(t))}const Ni=new Set(["brightness","contrast","saturate","opacity"]);function $i(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Et)||[];if(!i)return t;const o=n.replace(i,"");let s=Ni.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const zi=/\b([a-z-]*)\(.*?\)/gu,Yi={...Kt,getAnimatableNone:t=>{const e=t.match(zi);return e?e.map($i).join(" "):t}},Hi={...Kt,getAnimatableNone:t=>{const e=Kt.parse(t);return Kt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Xi={...Tt,transform:Math.round},Gi={rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:bt,scaleX:bt,scaleY:bt,scaleZ:bt,skew:Lt,skewX:Lt,skewY:Lt,distance:jt,translateX:jt,translateY:jt,translateZ:jt,x:jt,y:jt,z:jt,perspective:jt,transformPerspective:jt,opacity:St,originX:Ft,originY:Ft,originZ:jt},Ki={borderWidth:jt,borderTopWidth:jt,borderRightWidth:jt,borderBottomWidth:jt,borderLeftWidth:jt,borderRadius:jt,borderTopLeftRadius:jt,borderTopRightRadius:jt,borderBottomRightRadius:jt,borderBottomLeftRadius:jt,width:jt,maxWidth:jt,height:jt,maxHeight:jt,top:jt,right:jt,bottom:jt,left:jt,inset:jt,insetBlock:jt,insetBlockStart:jt,insetBlockEnd:jt,insetInline:jt,insetInlineStart:jt,insetInlineEnd:jt,padding:jt,paddingTop:jt,paddingRight:jt,paddingBottom:jt,paddingLeft:jt,paddingBlock:jt,paddingBlockStart:jt,paddingBlockEnd:jt,paddingInline:jt,paddingInlineStart:jt,paddingInlineEnd:jt,margin:jt,marginTop:jt,marginRight:jt,marginBottom:jt,marginLeft:jt,marginBlock:jt,marginBlockStart:jt,marginBlockEnd:jt,marginInline:jt,marginInlineStart:jt,marginInlineEnd:jt,fontSize:jt,backgroundPositionX:jt,backgroundPositionY:jt,...Gi,zIndex:Xi,fillOpacity:St,strokeOpacity:St,numOctaves:Xi},_i={...Ki,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:Yi,WebkitFilter:Yi,mask:Hi,WebkitMask:Hi},qi=t=>_i[t],Zi=new Set([Yi,Hi]);function Ji(t,e){let n=qi(t);return Zi.has(n)||(n=Kt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Qi=new Set(["auto","none","0"]);class to extends bn{constructor(t,e,n,i,o){super(t,e,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),vt(i))){const o=si(i,e.current);void 0!==o&&(t[n]=o),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!vi.has(n)||2!==t.length)return;const[i,o]=t,s=Wi(i),r=Wi(o);if(wt(i)!==wt(o)&&fn[n])this.needsMeasurement=!0;else if(s!==r)if(dn(s)&&dn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else fn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Ui(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,o=0;for(;o<t.length&&!i;){const e=t[o];"string"==typeof e&&!Qi.has(e)&&Ht(e).values.length&&(i=t[o]),o++}if(i&&n)for(const o of e)t[o]=Ji(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,s=n[o];n[o]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const eo=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","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 no(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&eo.has(e)&&(t[n]=t[n]+"px")}const io=C(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function oo(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const o=n?.[t]??i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(t=>null!=t)}function so(t){return(e,n)=>{const i=oo(e),o=[];for(const e of i){const i=t(e,n);o.push(i)}return()=>{for(const t of o)t()}}}const ro=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ao{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,o=!0){const s=this.values.get(t);s&&s.onRemove();const r=()=>{const i=e.get();this.latest[t]=o?ro(i,Ki[t]):i,n&&at.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&<(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function lo(t){const e=new WeakMap;return(n,i)=>{const o=e.get(n)??new ao;e.set(n,o);const s=[];for(const e in i){const r=i[e],a=t(n,o,e,r);s.push(a)}return()=>{for(const t of s)t()}}}const uo=(t,e,n,i)=>{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,n),s=o?n:n.startsWith("data")||n.startsWith("aria")?Vi(n):n,r=o?()=>{t[s]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(s):t.setAttribute(s,String(i))};return e.set(n,i,r)},co=so(lo(uo)),ho=lo((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function po(t){return A(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const mo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const fo=new Set(["originX","originY","originZ"]),go=(t,e,n,i)=>{let o,s;return hn.has(n)?(e.get("transform")||(po(t)||e.get("transformBox")||go(t,e,"transformBox",new wi("fill-box")),e.set("transform",new wi("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<cn.length;i++){const o=cn[i],s=t.latest[o];if(void 0===s)continue;let r=!0;if("number"==typeof s)r=s===(o.startsWith("scale")?1:0);else{const t=parseFloat(s);r=o.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${mo[o]||o}(${s}) `)}return n?"none":e.trim()}(e)})),s=e.get("transform")):fo.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new wi(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",o=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${o}`}),s=e.get("transformOrigin")):o=Pn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,o,s)},yo=so(lo(go));const vo=so(lo((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return at.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new wi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;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 uo(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?go:uo)(t,e,n,i)}));const{schedule:xo,cancel:wo}=rt(queueMicrotask,!1),To={x:!1,y:!1};function So(){return To.x||To.y}function bo(t){return"x"===t||"y"===t?To[t]?null:(To[t]=!0,()=>{To[t]=!1}):To.x||To.y?null:(To.x=To.y=!0,()=>{To.x=To.y=!1})}function Po(t,e){const n=oo(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Eo(t,e,n={}){const[i,o,s]=Po(t,n);return i.forEach(t=>{let n,i=!1,s=!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),s&&(s=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?s=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||So())return;s=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,o))},o),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",a,o)},o)}),s}const Ao=(t,e)=>!!e&&(t===e||Ao(t,e.parentElement)),Mo=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Co=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vo(t){return Co.has(t.tagName)||!0===t.isContentEditable}const ko=new Set(["INPUT","SELECT","TEXTAREA"]);function Ro(t){return ko.has(t.tagName)||!0===t.isContentEditable}const Do=new WeakSet;function Lo(t){return e=>{"Enter"===e.key&&t(e)}}function Bo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function jo(t){return Mo(t)&&!So()}const Io=new WeakSet;function Oo(t,e,n={}){const[i,o,s]=Po(t,n),r=t=>{const i=t.currentTarget;if(!jo(t))return;if(Io.has(t))return;Do.add(i),n.stopPropagation&&Io.add(t);const s=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Do.has(i)&&Do.delete(i),jo(t)&&"function"==typeof s&&s(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Ao(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,o),po(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Lo(()=>{if(Do.has(n))return;Bo(n,"down");const t=Lo(()=>{Bo(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bo(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,o)),Vo(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}function Fo(t,e){const n=window.getComputedStyle(t);return Pn(e)?n.getPropertyValue(e):n[e]}function Wo(t){return A(t)&&"ownerSVGElement"in t}const Uo=new WeakMap;let No;const $o=(t,e,n)=>(i,o)=>o&&o[0]?o[0][t+"Size"]:Wo(i)&&"getBBox"in i?i.getBBox()[e]:i[n],zo=$o("inline","width","offsetWidth"),Yo=$o("block","height","offsetHeight");function Ho({target:t,borderBoxSize:e}){Uo.get(t)?.forEach(n=>{n(t,{get width(){return zo(t,e)},get height(){return Yo(t,e)}})})}function Xo(t){t.forEach(Ho)}function Go(t,e){No||"undefined"!=typeof ResizeObserver&&(No=new ResizeObserver(Xo));const n=oo(t);return n.forEach(t=>{let n=Uo.get(t);n||(n=new Set,Uo.set(t,n)),n.add(e),No?.observe(t)}),()=>{n.forEach(t=>{const n=Uo.get(t);n?.delete(e),n?.size||No?.unobserve(t)})}}const Ko=new Set;let _o;function qo(t){return Ko.add(t),_o||(_o=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ko.forEach(e=>e(t))},window.addEventListener("resize",_o)),()=>{Ko.delete(t),Ko.size||"function"!=typeof _o||(window.removeEventListener("resize",_o),_o=void 0)}}function Zo(t,e){return"function"==typeof t?qo(t):Go(t,e)}function Jo(t,e){let n;const i=()=>{const{currentTime:i}=e,o=(null===i?0:i.value)/100;n!==o&&t(o),n=o};return at.preUpdate(i,!0),()=>lt(i)}function Qo(){const{value:t}=st;null!==t?(t.frameloop.rate.push(ut.delta),t.animations.mainThread.push(mt.mainThread),t.animations.waapi.push(mt.waapi),t.animations.layout.push(mt.layout)):lt(Qo)}function ts(t){return t.reduce((t,e)=>t+e,0)/t.length}function es(t,e=ts){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ns=t=>Math.round(1e3/t);function is(){st.value=null,st.addProjectionMetrics=null}function os(){const{value:t}=st;if(!t)throw new Error("Stats are not being measured");is(),lt(Qo);const e={frameloop:{setup:es(t.frameloop.setup),rate:es(t.frameloop.rate),read:es(t.frameloop.read),resolveKeyframes:es(t.frameloop.resolveKeyframes),preUpdate:es(t.frameloop.preUpdate),update:es(t.frameloop.update),preRender:es(t.frameloop.preRender),render:es(t.frameloop.render),postRender:es(t.frameloop.postRender)},animations:{mainThread:es(t.animations.mainThread),waapi:es(t.animations.waapi),layout:es(t.animations.layout)},layoutProjection:{nodes:es(t.layoutProjection.nodes),calculatedTargetDeltas:es(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:es(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ns(n.min),n.max=ns(n.max),n.avg=ns(n.avg),[n.min,n.max]=[n.max,n.min],e}function ss(t){return Wo(t)&&"svg"===t.tagName}function rs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function as(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],o=Fe(t[1+n],t[2+n],t[3+n]);return e?o(i):o}function ls(t,e){const n=Ti(Ai(t)?t.get():t);return us(n,t,e),n}function us(t,e,n={}){const i=t.get();let o,s=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{s&&(s.stop(),s=null),t.animation=void 0},u=()=>{(()=>{const e=hs(t.get()),i=hs(r);if(e===i)return void l();const a=s?s.getGeneratorVelocity():t.getVelocity();l(),s=new qe({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})})(),t.animation=s??void 0,t.events.animationStart?.notify(),s?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,o=t=>e(cs(t,a)),at.postRender(u)},l),Ai(e)){let i=!0===n.skipInitialAnimation;const o=e.on("change",e=>{i?(i=!1,t.jump(cs(e,a),!1)):t.set(cs(e,a))}),s=t.on("destroy",o);return()=>{o(),s()}}return l}function cs(t,e){return e?t+e:t}function hs(t){return"number"==typeof t?t:parseFloat(t)}function ds(t){const e=[];xi.current=e;const n=t();xi.current=void 0;const i=Ti(n);return function(t,e,n){const i=()=>e.set(n()),o=()=>at.preRender(i,!1,!0),s=t.map(t=>t.on("change",o));e.on("destroy",()=>{s.forEach(t=>t()),lt(i)})}(e,i,t),i}const ps=[...Fi,Ut,Kt],ms=t=>ps.find(Oi(t));function fs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let gs={},ys=null;const vs=(t,e)=>{gs[t]=e},xs=()=>{ys||(ys=document.createElement("style"),ys.id="motion-view");let t="";for(const e in gs){const n=gs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ys.textContent=t,document.head.appendChild(ys),gs={}},ws=()=>{ys&&ys.parentElement&&ys.parentElement.removeChild(ys)};function Ts(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Ss(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function bs(){return document.getAnimations().filter(Ss)}const Ps=["layout","enter","exit","new","old"];function Es(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new _n([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||vs(":root",{"view-transition-name":"none"}),vs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),xs();const o=document.startViewTransition(async()=>{await e()});return o.finished.finally(()=>{ws()}),new Promise(t=>{o.ready.then(()=>{const e=bs(),o=[];n.forEach((t,e)=>{for(const n of Ps){if(!t[n])continue;const{keyframes:s,options:r}=t[n];for(let[t,a]of Object.entries(s)){if(!a)continue;const s={...hi(i,t),...hi(r,t)},l=fs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof s.delay&&(s.delay=s.delay(0,1)),s.duration&&(s.duration=B(s.duration)),s.delay&&(s.delay=B(s.delay));const u=new On({...s,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});o.push(u)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:s}=e;if(!s)continue;const r=Ts(s);if(!r)continue;const a=n.get(r.layer);if(a)As(a,"enter")&&As(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?o.push(new Jn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let s={...hi(i,n)};s.duration&&(s.duration=B(s.duration)),s=In(s);const a=Ln(s.ease,s.duration);e.updateTiming({delay:B(s.delay??0),duration:s.duration,easing:a}),o.push(new Jn(t))}}t(new _n(o))})})}function As(t,e){return t?.[e]?.keyframes.opacity}let Ms=[],Cs=null;function Vs(){Cs=null;const[t]=Ms;var e;t&&(w(Ms,e=t),Cs=e,Es(e).then(t=>{e.notifyReady(t),t.finished.finally(Vs)}))}function ks(){for(let t=Ms.length-1;t>=0;t--){const e=Ms[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ms.slice(0,t+1).map(t=>t.update),i=Ms.slice(t+1);e.update=()=>{n.forEach(t=>t())},Ms=[e,...i];break}}Cs&&"immediate"!==Ms[0]?.options.interrupt||Vs()}class Rs{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=V,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Ms.push(n),xo.render(ks)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:o}=this;o.has(i)||o.set(i,{});o.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ls=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Bs=()=>({min:0,max:0}),js=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Is=new WeakMap;function Os(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Fs(t){return"string"==typeof t||Array.isArray(t)}const Ws=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Us=["initial",...Ws];function Ns(t){return Os(t.animate)||Us.some(e=>Fs(t[e]))}function $s(t){return Boolean(Ns(t)||t.variants)}function zs(t,e,n){for(const i in e){const o=e[i],s=n[i];if(Ai(o))t.addValue(i,o);else if(Ai(s))t.addValue(i,Ti(o,{owner:t}));else if(s!==o)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(o):e.hasAnimated||e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Ti(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Ys={current:null},Hs={current:!1},Xs="undefined"!=typeof window;function Gs(){if(Hs.current=!0,Xs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ys.current=t.matches;t.addEventListener("change",e),e()}else Ys.current=!1}const Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _s={};function qs(t){_s=t}function Zs(){return _s}class Js{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,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=bn,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=pt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,at.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=a,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Ns(e),this.isVariantNode=$s(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Ai(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Is.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Hs.current||Gs(),this.shouldReduceMotion=Ys.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&zn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:o,ease:s,duration:r}=e.accelerate,a=new On({element:this.current,name:t,keyframes:i,times:o,ease:s,duration:B(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=hn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&at.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in _s){const e=_s[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ks.length;e++){const n=Ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=zs(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ti(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(E(n)||M(n))?n=parseFloat(n):!ms(n)&&Kt.test(e)&&(n=Ji(t,e)),this.setBaseTarget(t,Ai(n)?n.get():n)),Ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=gi(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Ai(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new L),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){xo.render(this.render)}}class Qs extends Js{constructor(){super(...arguments),this.KeyframeResolver=to}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;Ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function er({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function nr({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ir(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 or(t){return void 0===t||1===t}function sr({scale:t,scaleX:e,scaleY:n}){return!or(t)||!or(e)||!or(n)}function rr(t){return sr(t)||ar(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ar(t){return lr(t.x)||lr(t.y)}function lr(t){return t&&"0%"!==t}function ur(t,e,n){return n+e*(t-n)}function cr(t,e,n,i,o){return void 0!==o&&(t=ur(t,o,i)),ur(t,n,i)+e}function hr(t,e=0,n=1,i,o){t.min=cr(t.min,e,n,i,o),t.max=cr(t.max,e,n,i,o)}function dr(t,{x:e,y:n}){hr(t.x,e.translate,e.scale,e.originPoint),hr(t.y,n.translate,n.scale,n.originPoint)}const pr=.999999999999,mr=1.0000000000001;function fr(t,e,n,i=!1){const o=n.length;if(!o)return;let s,r;e.x=e.y=1;for(let a=0;a<o;a++){s=n[a],r=s.projectionDelta;const{visualElement:o}=s.options;o&&o.props.style&&"contents"===o.props.style.display||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(gr(t.x,-s.scroll.offset.x),gr(t.y,-s.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,dr(t,r)),i&&rr(s.latestValues)&&xr(t,s.latestValues,s.layout?.layoutBox))}e.x<mr&&e.x>pr&&(e.x=1),e.y<mr&&e.y>pr&&(e.y=1)}function gr(t,e){t.min+=e,t.max+=e}function yr(t,e,n,i,o=.5){hr(t,e,n,Jt(t.min,t.max,o),i)}function vr(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function xr(t,e,n){const i=n??t;yr(t.x,vr(e.x,i.x),e.scaleX,e.scale,e.originX),yr(t.y,vr(e.y,i.y),e.scaleY,e.scale,e.originY)}function wr(t,e){return er(ir(t.getBoundingClientRect(),e))}function Tr(t,e,n){const i=wr(t,n),{scroll:o}=e;return o&&(gr(i.x,o.offset.x),gr(i.y,o.offset.y)),i}const Sr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},br=cn.length;function Pr(t,e,n){let i="",o=!0;for(let s=0;s<br;s++){const r=cn[s],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=ro(a,Ki[r]);if(!l){o=!1;i+=`${Sr[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,o?"":i):o&&(i="none"),i}function Er(t,e,n){const{style:i,vars:o,transformOrigin:s}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(hn.has(t))r=!0;else if(gt(t))o[t]=n;else{const e=ro(n,Ki[t]);t.startsWith("origin")?(a=!0,s[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Pr(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=s;i.transformOrigin=`${t} ${e} ${n}`}}function Ar(t,{style:e,vars:n},i,o){const s=t.style;let r;for(r in e)s[r]=e[r];for(r in o?.applyProjectionStyles(s,i),n)s.setProperty(r,n[r])}function Mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Cr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!jt.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,o=Kt.parse(t);if(o.length>5)return i;const s=Kt.createTransformer(t),r="number"!=typeof o[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+r]/=a,o[1+r]/=l;const u=Jt(a,l,.5);return"number"==typeof o[2+r]&&(o[2+r]/=u),"number"==typeof o[3+r]&&(o[3+r]/=u),s(o)}},kr={borderRadius:{...Cr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cr,borderTopRightRadius:Cr,borderBottomLeftRadius:Cr,borderBottomRightRadius:Cr,boxShadow:Vr};function Rr(t,{layout:e,layoutId:n}){return hn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!kr[t]||"opacity"===t)}function Dr(t,e,n){const i=t.style,o=e?.style,s={};if(!i)return s;for(const e in i)(Ai(i[e])||o&&Ai(o[e])||Rr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(s[e]=i[e]);return s}class Lr extends Qs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ar}readValueFromInstance(t,e){if(hn.has(e))return this.projection?.isProjecting?rn(e):ln(t,e);{const i=(n=t,window.getComputedStyle(n)),o=(gt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return wr(t,e)}build(t,e,n){Er(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Dr(t,e,n)}}class Br extends Js{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}}const jr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ir={offset:"strokeDashoffset",array:"strokeDasharray"};function Or(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?jr:Ir;t[s.offset]=""+-i,t[s.array]=`${e} ${n}`}const Fr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Wr(t,{attrX:e,attrY:n,attrScale:i,pathLength:o,pathSpacing:s=1,pathOffset:r=0,...a},l,u,c){if(Er(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const t of Fr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==o&&Or(h,o,s,r,!1)}const Ur=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"]),Nr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function $r(t,e,n,i){Ar(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ur.has(n)?n:Vi(n),e.attrs[n])}function zr(t,e,n){const i=Dr(t,e,n);for(const n in t)if(Ai(t[n])||Ai(e[n])){i[-1!==cn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Yr extends Qs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=js}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(hn.has(e)){const t=qi(e);return t&&t.default||0}return e=Ur.has(e)?e:Vi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return zr(t,e,n)}build(t,e,n){Wr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){$r(t,e,0,i)}mount(t){this.isSVGTag=Nr(t.tagName),super.mount(t)}}const Hr=Us.length;function Xr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Xr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Hr;n++){const i=Us[n],o=t.props[i];(Fs(o)||!1===o)&&(e[i]=o)}return e}function Gr(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 Kr=[...Ws].reverse(),_r=Ws.length;function qr(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ii(t,e,n)))}(t),n=Qr(),i=!0,o=!1;const s=e=>(n,i)=>{const o=yi(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Xr(t.parent)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<_r;e++){const p=Kr[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=Fs(f),y=p===r?m.isActive:null;!1===y&&(d=e);let v=f===l[p]&&f!==a[p]&&g;if(v&&(i||o)&&t.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...h},!m.isActive&&null===y||!f&&!m.prevProp||Os(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==y){m.prevResolvedValues&&(h={...h,...m.prevResolvedValues});continue}const x=Zr(m.prevProp,f);let w=x||p===r&&m.isActive&&!v&&g||e>d&&g,T=!1;const S=Array.isArray(f)?f:[f];let b=S.reduce(s(p),{});!1===y&&(b={});const{prevResolvedValues:P={}}=m,E={...P,...b},A=e=>{w=!0,c.has(e)&&(T=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in E){const e=b[t],n=P[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Si(e)&&Si(n)?!Gr(e,n):e!==n,i?null!=e?A(t):c.add(t):void 0!==e&&c.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=b,m.isActive&&(h={...h,...b}),(i||o)&&t.blockInitialAnimation&&(w=!1);const M=v&&x;w&&(!M||T)&&u.push(...S.map(e=>{const n={type:p};if("string"==typeof e&&(i||o)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,o=yi(i,e);if(i.enteringChildren&&o){const{delayChildren:e}=o.transition||{};n.delay=ni(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof a.initial){const n=yi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),o=t.getValue(n);o&&(o.liveStyle=!0),e[n]=i??null}),u.push({animation:e})}let p=Boolean(u.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,o=!1,p?e(u):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const o=r(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Qr(),o=!0}}}function Zr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Gr(e,t)}function Jr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qr(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function ta(t,e){t.min=e.min,t.max=e.max}function ea(t,e){ta(t.x,e.x),ta(t.y,e.y)}function na(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ia(t){return t.max-t.min}function oa(t,e,n){return Math.abs(t-e)<=n}function sa(t,e,n,i=.5){t.origin=i,t.originPoint=Jt(e.min,e.max,t.origin),t.scale=ia(n)/ia(e),t.translate=Jt(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 ra(t,e,n,i){sa(t.x,e.x,n.x,i?i.originX:void 0),sa(t.y,e.y,n.y,i?i.originY:void 0)}function aa(t,e,n,i=0){const o=i?Jt(n.min,n.max,i):n.min;t.min=o+e.min,t.max=t.min+ia(e)}function la(t,e,n,i){aa(t.x,e.x,n.x,i?.x),aa(t.y,e.y,n.y,i?.y)}function ua(t,e,n,i=0){const o=i?Jt(n.min,n.max,i):n.min;t.min=e.min-o,t.max=t.min+ia(e)}function ca(t,e,n,i){ua(t.x,e.x,n.x,i?.x),ua(t.y,e.y,n.y,i?.y)}function ha(t,e,n,i,o){return t=ur(t-=e,1/n,i),void 0!==o&&(t=ur(t,1/o,i)),t}function da(t,e=0,n=1,i=.5,o,s=t,r=t){if(Bt.test(e)){e=parseFloat(e);e=Jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Jt(s.min,s.max,i);t===s&&(a-=e),t.min=ha(t.min,e,n,a,o),t.max=ha(t.max,e,n,a,o)}function pa(t,e,[n,i,o],s,r){da(t,e[n],e[i],e[o],e.scale,s,r)}const ma=["x","scaleX","originX"],fa=["y","scaleY","originY"];function ga(t,e,n,i){pa(t.x,e,ma,n?n.x:void 0,i?i.x:void 0),pa(t.y,e,fa,n?n.y:void 0,i?i.y:void 0)}function ya(t){return 0===t.translate&&1===t.scale}function va(t){return ya(t.x)&&ya(t.y)}function xa(t,e){return t.min===e.min&&t.max===e.max}function wa(t,e){return xa(t.x,e.x)&&xa(t.y,e.y)}function Ta(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Sa(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function ba(t){return ia(t.x)/ia(t.y)}function Pa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ea(t){return[t("x"),t("y")]}function Aa(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y,r=n?.z||0;if((o||s||r)&&(i=`translate3d(${o}px, ${s}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:o,rotateY:s,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),o&&(i+=`rotateX(${o}deg) `),s&&(i+=`rotateY(${s}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Ma=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ca=Ma.length,Va=t=>"string"==typeof t?parseFloat(t):t,ka=t=>"number"==typeof t||jt.test(t);function Ra(t,e,n,i,o,s){o?(t.opacity=Jt(0,n.opacity??1,La(i)),t.opacityExit=Jt(e.opacity??1,0,Ba(i))):s&&(t.opacity=Jt(e.opacity??1,n.opacity??1,i));for(let o=0;o<Ca;o++){const s=Ma[o];let r=Da(e,s),a=Da(n,s);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ka(r)===ka(a)?(t[s]=Math.max(Jt(Va(r),Va(a),i),0),(Bt.test(a)||Bt.test(r))&&(t[s]+="%")):t[s]=a}(e.rotate||n.rotate)&&(t.rotate=Jt(e.rotate||0,n.rotate||0,i))}function Da(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const La=ja(0,.5,K),Ba=ja(.5,.95,V);function ja(t,e,n){return i=>i<t?0:i>e?1:n(D(t,e,i))}function Ia(t,e,n){const i=Ai(t)?t:Ti(t);return i.start(mi("",i,e,n)),i.animation}function Oa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Fa=(t,e)=>t.depth-e.depth;class Wa{constructor(){this.children=[],this.isDirty=!1}add(t){x(this.children,t),this.isDirty=!0}remove(t){w(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fa),this.isDirty=!1,this.children.forEach(t)}}function Ua(t,e){const n=pt.now(),i=({timestamp:o})=>{const s=o-n;s>=e&&(lt(i),t(s-e))};return at.setup(i,!0),()=>lt(i)}function Na(t){return Ai(t)?t.get():t}class $a{constructor(){this.members=[]}add(t){x(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(w(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(w(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:o}=t.options;void 0!==i&&i===o||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const za={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ya={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ha=["","X","Y","Z"];let Xa=0;function Ga(t,e,n,i){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ka(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Di(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",at,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ka(i)}function _a({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Xa++,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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.value&&(Ya.nodes=Ya.calculatedTargetDeltas=Ya.calculatedProjections=0),this.nodes.forEach(Ja),this.nodes.forEach(al),this.nodes.forEach(ll),this.nodes.forEach(Qa),st.addProjectionMetrics&&st.addProjectionMetrics(Ya)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 Wa)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new L),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Wo(e)&&!ss(e),this.instance=e;const{layoutId:n,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const o=()=>this.root.updateBlockedByResize=!1;at.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Ua(o,250),za.hasAnimatedSinceResize&&(za.hasAnimatedSinceResize=!1,this.nodes.forEach(rl)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||ml,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Sa(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...hi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||rl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ul),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ka(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}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(nl),void this.nodes.forEach(el)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(il);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ol),this.nodes.forEach(sl),this.nodes.forEach(qa),this.nodes.forEach(Za)):this.nodes.forEach(il),this.clearAllSnapshots();const t=pt.now();ut.delta=S(0,1e3/60,t-ut.timestamp),ut.timestamp=t,ut.isProcessing=!0,ct.update.process(ut),ct.preRender.process(ut),ct.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tl),this.sharedNodes.forEach(cl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ia(this.snapshot.measuredBox.x)||ia(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!va(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||rr(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),yl((i=n).x),yl(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xl))){const{scroll:t}=this.root;t&&(gr(e.x,t.offset.x),gr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ea(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:o,options:s}=i;i!==this.root&&o&&s.layoutScroll&&(o.wasRoot&&ea(e,t),gr(e.x,o.offset.x),gr(e.y,o.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};ea(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(gr(i.x,-n.scroll.offset.x),gr(i.y,-n.scroll.offset.y)),rr(n.latestValues)&&xr(i,n.latestValues,n.layout?.layoutBox)}return rr(this.latestValues)&&xr(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ea(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!rr(n.latestValues))continue;let i;n.instance&&(sr(n.latestValues)&&n.updateSnapshot(),i=js(),ea(i,n.measurePageBox())),ga(e,n.latestValues,n.snapshot?.layoutBox,i)}return rr(this.latestValues)&&ga(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.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:o}=this.options;if(!this.layout||!i&&!o)return;this.resolvedRelativeTargetAt=ut.timestamp;const s=this.getClosestProjectingParent();s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.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(),la(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):ea(this.target,this.layout.layoutBox),dr(this.target,this.targetDelta)):ea(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&s&&Boolean(s.resumingFrom)===Boolean(this.resumingFrom)&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0),st.value&&Ya.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!sr(this.parent.latestValues)&&!ar(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.linkedParentVersion=t.layoutVersion,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}},ca(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),ea(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===ut.timestamp&&(n=!1),n)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;ea(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,r=this.treeScale.y;fr(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(na(this.prevProjectionDelta.x,this.projectionDelta.x),na(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ra(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===s&&this.treeScale.y===r&&Pa(this.projectionDelta.x,this.prevProjectionDelta.x)&&Pa(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),st.value&&Ya.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},o={...this.latestValues},s={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 r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(pl));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;hl(s.x,t.x,n),hl(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ca(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(t,e,n,i){dl(t.x,e.x,n.x,i),dl(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&wa(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ea(h,this.relativeTarget)),a&&(this.animationValues=o,Ra(o,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{za.hasAnimatedSinceResize=!0,mt.layout++,this.motionValue||(this.motionValue=Ti(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ia(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{mt.layout--},onComplete:()=>{mt.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&vl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ia(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ia(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ea(e,n),xr(e,o),ra(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new $a);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Ga("z",t,i,this.animationValues);for(let e=0;e<Ha.length;e++)Ga(`rotate${Ha[e]}`,t,i,this.animationValues),Ga(`skew${Ha[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Na(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Na(e?.pointerEvents)||""),void(this.hasProjected&&!rr(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const o=i.animationValues||i.latestValues;this.applyTransformsToTarget();let s=Aa(this.projectionDeltaWithTransform,this.treeScale,o);n&&(s=n(o,s)),t.transform=s;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=i===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in kr){if(void 0===o[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=kr[e],l="none"===s?o[e]:n(o[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?Na(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function qa(t){t.updateLayout()}function Za(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:o}=t.options,s=e.source!==t.layout.source;if("size"===o)Ea(t=>{const i=s?e.measuredBox[t]:e.layoutBox[t],o=ia(i);i.min=n[t].min,i.max=i.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";ta(s?e.measuredBox[t]:e.layoutBox[t],n[t])}else vl(o,e.layoutBox,n)&&Ea(i=>{const o=s?e.measuredBox[i]:e.layoutBox[i],r=ia(n[i]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ra(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?ra(a,t.applyTransform(i,!0),e.measuredBox):ra(a,n,e.layoutBox);const l=!va(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:o,layout:s}=i;if(o&&s){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};ca(a,e.layoutBox,o.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};ca(l,n,s.layoutBox,r),Sa(a,l)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ja(t){st.value&&Ya.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Qa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tl(t){t.clearSnapshot()}function el(t){t.clearMeasurements()}function nl(t){t.isLayoutDirty=!0,t.updateLayout()}function il(t){t.isLayoutDirty=!1}function ol(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function sl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function al(t){t.resolveTargetDelta()}function ll(t){t.calcProjection()}function ul(t){t.resetSkewAndRotation()}function cl(t){t.removeLeadSnapshot()}function hl(t,e,n){t.translate=Jt(e.translate,0,n),t.scale=Jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function dl(t,e,n,i){t.min=Jt(e.min,n.min,i),t.max=Jt(e.max,n.max,i)}function pl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ml={duration:.45,ease:[.4,0,.1,1]},fl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),gl=fl("applewebkit/")&&!fl("chrome/")?Math.round:V;function yl(t){t.min=gl(t.min),t.max=gl(t.max)}function vl(t,e,n){return"position"===t||"preserve-aspect"===t&&!oa(ba(e),ba(n),.2)}function xl(t){return t!==t.root&&t.scroll?.wasRoot}const wl=_a({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Tl=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Sl(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Tl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const o=e.get(i);o&&(o(),e.delete(i)),n()},dirty:n}}const bl={current:void 0},Pl=_a({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!bl.current){const t=new wl({});t.mount(window),t.setOptions({layoutScroll:!0}),bl.current=t}return bl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),El="[data-layout], [data-layout-id]",Al=()=>{};function Ml(t){const e=Array.from(t.querySelectorAll(El));return t instanceof Element&&t.matches(El)&&(e.includes(t)||e.unshift(t)),e}function Cl(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Vl(t,e,n){const i=Is.get(t),o=i??new Lr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&o.projection||(o.projection=new Pl(o.latestValues,e)),o.projection.setOptions({...n,visualElement:o}),o.current?o.projection.instance||o.projection.mount(t):o.mount(t),i||Is.set(t,o),{element:t,visualElement:o,projection:o.projection}}function kl(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Rl=at,Dl=ot.reduce((t,e)=>(t[e]=t=>lt(t),t),{}),Ll=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Bl(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function jl(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Bl(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():Bl(t[e],null)}}}}(...t),t)}class Il extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(po(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,n=po(t)&&t.offsetWidth||0,i=po(t)&&t.offsetHeight||0,o=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=n-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ol({children:t,isPresent:n,anchorX:o,anchorY:s,root:r,pop:a}){const l=e.useId(),u=e.useRef(null),c=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=e.useContext(Ll),p=t.props?.ref??t?.ref,m=jl(u,p);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:d,right:p,bottom:m}=c.current;if(n||!1===a||!u.current||!t||!e)return;const f="left"===o?`left: ${d}`:`right: ${p}`,g="bottom"===s?`bottom: ${m}`:`top: ${i}`;u.current.dataset.motionPopId=l;const y=document.createElement("style");h&&(y.nonce=h);const v=r??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n ${g}px !important;\n }\n `),()=>{u.current?.removeAttribute("data-motion-pop-id"),v.contains(y)&&v.removeChild(y)}},[n]),d(Il,{isPresent:n,childRef:u,sizeRef:c,pop:a,children:!1===a?t:i.cloneElement(t,{ref:m})})}const Fl=({children:t,initial:n,isPresent:o,onExitComplete:s,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u,anchorY:c,root:h})=>{const p=f(Wl),m=e.useId();let g=!0,y=e.useMemo(()=>(g=!1,{id:m,initial:n,isPresent:o,custom:r,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;s&&s()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[o,p,s]);return a&&g&&(y={...y}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[o]),i.useEffect(()=>{!o&&!p.size&&s&&s()},[o]),t=d(Ol,{pop:"popLayout"===l,isPresent:o,anchorX:u,anchorY:c,root:h,children:t}),d(v.Provider,{value:y,children:t})};function Wl(){return new Map}function Ul(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:o,register:s}=n,r=e.useId();e.useEffect(()=>{if(t)return s(r)},[t]);const a=e.useCallback(()=>t&&o&&o(r),[r,o,t]);return!i&&o?[!1,a]:[!0]}const Nl=t=>t.key||"";function $l(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const zl=e.createContext(null);function Yl(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),o=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>at.postRender(o),[o]),n]}const Hl=t=>!0===t,Xl=({children:t,id:n,inherit:i=!0})=>{const o=e.useContext(m),s=e.useContext(zl),[r,a]=Yl(),l=e.useRef(null),u=o.id||s;null===l.current&&((t=>Hl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:Hl(i)&&o.group||Sl()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Gl=e.createContext({strict:!1}),Kl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let _l=!1;function ql(){return function(){if(_l)return;const t={};for(const e in Kl)t[e]={isEnabled:t=>Kl[e].some(e=>!!t[e])};qs(t),_l=!0}(),Zs()}function Zl(t){const e=ql();for(const n in t)e[n]={...e[n],...t[n]};qs(e)}function Jl(t){return"function"==typeof t}const Ql=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function tu(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ql.has(t)}let eu=t=>!tu(t);function nu(t){"function"==typeof t&&(eu=e=>e.startsWith("on")?!tu(e):t(e))}try{nu(require("@emotion/is-prop-valid").default)}catch{}function iu(t,e,n){const i={};for(const o in t)"values"===o&&"object"==typeof t.values||Ai(t[o])||(eu(o)||!0===n&&tu(o)||!e&&!tu(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}const ou=e.createContext(null),su=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ru(t){return"string"==typeof t&&!t.includes("-")&&!!(su.indexOf(t)>-1||/[A-Z]/u.test(t))}const au=(t,n)=>n.isSVG??ru(t)?new Yr(n):new Lr(n,{allowProjection:t!==e.Fragment}),lu=e.createContext({});function uu(t){const{initial:n,animate:i}=function(t,e){if(Ns(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Fs(e)?e:void 0,animate:Fs(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(lu));return e.useMemo(()=>({initial:n,animate:i}),[cu(n),cu(i)])}function cu(t){return Array.isArray(t)?t.join(" "):t}const hu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function du(t,e,n){for(const i in e)Ai(e[i])||Rr(i,n)||(t[i]=e[i])}function pu(t,n){const i={};return du(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Er(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function mu(t,e){const n={},i=pu(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const fu=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function gu(t,n,i,o){const s=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Wr(e,n,Nr(o),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};du(e,t.style,t),s.style={...e,...s.style}}return s}function yu(t,n,i,{latestValues:o},s,r=!1,a){const l=(a??ru(t)?gu:mu)(n,o,s,t),u=iu(n,"string"==typeof t,r),c=t!==e.Fragment?{...u,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>Ai(h)?h.get():h,[h]);return e.createElement(t,{...c,children:d})}function vu(t,e,n,i){const o={},s=i(t,{});for(const t in s)o[t]=Na(s[t]);let{initial:r,animate:a}=t;const l=Ns(t),u=$s(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!Os(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=gi(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[t]=e)}for(const e in t)o[e]=t[e]}}}return o}const xu=t=>(n,i)=>{const o=e.useContext(lu),s=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,o){return{latestValues:vu(n,i,o,t),renderState:e()}}(t,n,o,s);return i?r():f(r)},wu=xu({scrapeMotionValuesFromProps:Dr,createRenderState:hu}),Tu=xu({scrapeMotionValuesFromProps:zr,createRenderState:fu}),Su=Symbol.for("motionComponentSymbol");function bu(t,n,i){const o=e.useRef(i);e.useInsertionEffect(()=>{o.current=i});const s=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const i=o.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):i(e);else i&&(i.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Pu=e.createContext({});function Eu(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Au(t,n,i,o,s,r){const{visualElement:a}=e.useContext(lu),l=e.useContext(Gl),u=e.useContext(v),c=e.useContext(Ll),h=c.reducedMotion,d=c.skipAnimations,p=e.useRef(null),m=e.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:h,skipAnimations:d,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Pu);!f||f.projection||!s||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:o,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Mu(t.parent)),t.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:Boolean(r)||a&&Eu(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(p.current,i,s,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,u)});const w=i[Ri],T=e.useRef(Boolean(w)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return y(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),T.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!T.current&&f.animationState&&f.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),T.current=!1),f.enteringChildren=void 0)}),f}function Mu(t){if(t)return!1!==t.options.allowProjection?t.projection:Mu(t.parent)}function Cu(t,{forwardMotionProps:n=!1,type:i}={},o,s){o&&Zl(o);const r=i?"svg"===i:ru(t),a=r?Tu:wu;function l(i,o){let l;const u={...e.useContext(Ll),...i,layoutId:Vu(i)},{isStatic:c}=u,h=uu(i),m=a(i,c);if(!c&&"undefined"!=typeof window){e.useContext(Gl).strict;const n=function(t){const e=ql(),{drag:n,layout:i}=e;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(u);l=n.MeasureLayout,h.visualElement=Au(t,m,u,s,n.ProjectionNode,r)}return p(lu.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...u}):null,yu(t,i,bu(m,h.visualElement,o),m,c,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const u=e.forwardRef(l);return u[Su]=t,u}function Vu({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function ku(t,e){if("undefined"==typeof Proxy)return Cu;const n=new Map,i=(n,i)=>Cu(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(o,s)=>"create"===s?i:(n.has(s)||n.set(s,Cu(s,void 0,t,e)),n.get(s))})}let Ru=0;const Du={animation:{Feature:class extends tr{constructor(t){super(t),t.animationState||(t.animationState=qr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends tr{constructor(){super(...arguments),this.id=Ru++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){const n=yi(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Lu(t){return{point:{x:t.pageX,y:t.pageY}}}const Bu=t=>e=>Mo(e)&&t(e,Lu(e));function ju(t,e,n,i){return Oa(t,e,Bu(n),i)}const Iu=({current:t})=>t?t.ownerDocument.defaultView:null,Ou=(t,e)=>Math.abs(t-e);function Fu(t,e){const n=Ou(t.x,e.x),i=Ou(t.y,e.y);return Math.sqrt(n**2+i**2)}const Wu=new Set(["auto","scroll"]);class Uu{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Nu(this.lastRawMoveEventInfo,this.transformPagePoint));const t=zu(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Fu(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=ut;this.history.push({...i,timestamp:o});const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Nu(e,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=zu("pointercancel"===t.type?this.lastMoveEventInfo:Nu(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Mo(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=i||window;const a=Nu(Lu(t),this.transformPagePoint),{point:l}=a,{timestamp:u}=ut;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=e;c&&c(t,zu(a,this.history)),this.removeListeners=R(ju(this.contextWindow,"pointermove",this.handlePointerMove),ju(this.contextWindow,"pointerup",this.handlePointerUp),ju(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Wu.has(t.overflowX)||Wu.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o=i.x-e.x,s=i.y-e.y;0===o&&0===s||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=s):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=s),this.scrollPositions.set(t,i),at.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function Nu(t,e){return e?{point:e(t.point)}:t}function $u(t,e){return{x:t.x-e.x,y:t.y-e.y}}function zu({point:t},e){return{point:t,delta:$u(t,Hu(e)),offset:$u(t,Yu(e)),velocity:Xu(e,.1)}}function Yu(t){return t[0]}function Hu(t){return t[t.length-1]}function Xu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=Hu(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>B(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&o.timestamp-i.timestamp>2*B(e)&&(i=t[1]);const s=j(o.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Gu(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 Ku(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 _u=.35;function qu(t,e,n){return{min:Zu(t,e),max:Zu(t,n)}}function Zu(t,e){return"number"==typeof t?t:t[e]||0}const Ju=new WeakMap;class Qu{constructor(t){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}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new Uu(t,{onSessionStart:t=>{e&&this.snapToCursor(Lu(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:o}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bo(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ea(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Bt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=ia(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&at.update(()=>o(t,e),!1,!0),Ci(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return 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),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),s&&at.update(()=>s(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.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Iu(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!n)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&at.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!ec(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Jt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Jt(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Eu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:Gu(t.x,n,o),y:Gu(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=_u){return!1===t?t=0:!0===t&&(t=_u),{x:qu(t,"left","right"),y:qu(t,"top","bottom")}}(e),i!==this.constraints&&!Eu(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ea(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}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Eu(e))return!1;const i=e.current;t.invariant(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Tr(i,o.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Ku(t.x,e.x),y:Ku(t.y,e.y)}}(o.layout.layoutBox,s);if(n){const t=n(nr(r));this.hasMutatedConstraints=!!t,t&&(r=er(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ea(r=>{if(!ec(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==s&&s!==r||(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ci(this.visualElement,t),n.start(mi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ea(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ea(e=>{const{drag:n}=this.getProps();if(!ec(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e],r=o.get()||0;o.set(t[e]-Jt(n,s,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Eu(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ea(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=ia(t),o=ia(e);return o>i?n=D(e.min,e.max-i,t.min):i>o&&(n=D(t.min,t.max-o,e.min)),S(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ea(e=>{if(!ec(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:s}=this.constraints[e];n.set(Jt(o,s,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ju.set(this.visualElement,this);const t=this.visualElement.current,e=ju(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),o=e.target,s=o!==t&&Ro(o);n&&i&&!s&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();Eu(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Zo(t,tc(n)),o=Zo(e,tc(n));return()=>{i(),o()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),at.read(i);const r=Oa(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ea(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),s(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=_u,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function tc(t){let e=!0;return()=>{e?e=!1:t()}}function ec(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const nc=t=>(e,n)=>{t&&at.update(()=>t(e,n),!1,!0)};let ic=!1;class oc extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),ic&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),za.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,{projection:s}=n;return s?(s.isPresent=o,t.layoutDependency!==e&&s.setOptions({...s.options,layoutDependency:e}),ic=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||at.postRender(()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),xo.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;ic=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function sc(t){const[n,i]=Ul(),o=e.useContext(m);return d(oc,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Pu),isPresent:n,safeToRemove:i})}const rc={pan:{Feature:class extends tr{constructor(){super(...arguments),this.removePointerDownListener=V}onPointerDown(t){this.session=new Uu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Iu(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:nc(t),onStart:nc(e),onMove:nc(n),onEnd:(t,e)=>{delete this.session,i&&at.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=ju(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends tr{constructor(t){super(t),this.removeGroupControls=V,this.removeListeners=V,this.controls=new Qu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||V}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Pl,MeasureLayout:sc}};function ac(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const o=i["onHover"+n];o&&at.postRender(()=>o(e,Lu(e)))}function lc(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const o=i["onTap"+("End"===n?"":n)];o&&at.postRender(()=>o(e,Lu(e)))}const uc=new WeakMap,cc=new WeakMap,hc=t=>{const e=uc.get(t.target);e&&e(t)},dc=t=>{t.forEach(hc)};function pc(t,e,n){const i=function({root:t,...e}){const n=t||document;cc.has(n)||cc.set(n,{});const i=cc.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(dc,{root:t,...e})),i[o]}(e);return uc.set(t,n),i.observe(t),()=>{uc.delete(t),i.unobserve(t)}}const mc={some:0,all:1};const fc={inView:{Feature:class extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:o}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:mc[i]};this.stopObserver=pc(this.node.current,s,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends tr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Oo(t,(t,e)=>(lc(this.node,e,"Start"),(t,{success:e})=>lc(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=R(Oa(this.node.current,"focus",()=>this.onFocus()),Oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=Eo(t,(t,e)=>(ac(this.node,e,"Start"),t=>ac(this.node,t,"End"))))}unmount(){}}}},gc={layout:{ProjectionNode:Pl,MeasureLayout:sc}},yc=ku({...Du,...fc,...rc,...gc},au);function vc({children:n,as:i="ul",axis:o="y",onReorder:s,values:r,...a},l){const u=f(()=>yc[i]),c=[],h=e.useRef(!1),p=e.useRef(null);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const m={axis:o,groupRef:p,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[o]:c.push({value:t,layout:e[o]}),c.sort(wc)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const o=t.findIndex(t=>t.value===e);if(-1===o)return t;const s=i>0?1:-1,r=t[o+s];if(!r)return t;const a=t[o],l=r.layout,u=Jt(l.min,l.max,.5);return 1===s&&a.layout.max+n>u||-1===s&&a.layout.min+n<u?T(t,o,o+s):t}(c,t,e,n);if(c!==i){h.current=!0;const t=[...r];for(let e=0;e<i.length;e++)if(c[e].value!==i[e].value){const n=r.indexOf(c[e].value),o=r.indexOf(i[e].value);-1!==n&&-1!==o&&([t[n],t[o]]=[t[o],t[n]]);break}s(t)}}};e.useEffect(()=>{h.current=!1});const g={overflowAnchor:"none",...a.style};return d(u,{...a,style:g,ref:t=>{p.current=t,"function"==typeof l?l(t):l&&(l.current=t)},ignoreStrict:!0,children:d(ou.Provider,{value:m,children:n})})}const xc=e.forwardRef(vc);function wc(t,e){return t.layout.min-e.layout.min}function Tc(t){const n=f(()=>Ti(t)),{isStatic:i}=e.useContext(Ll);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Sc(t,e){const n=Tc(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>at.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),lt(i)}}),n}function bc(t,e,n,i){if("function"==typeof t)return function(t){xi.current=[],t();const e=Sc(xi.current,t);return xi.current=void 0,e}(t);if(void 0!==n&&!Array.isArray(n)&&"function"!=typeof e)return function(t,e,n,i){const o=f(()=>Object.keys(n)),s=f(()=>({}));for(const r of o)s[r]=bc(t,e,n[r],i);return s}(t,e,n,i);const o="function"==typeof e?e:as(e,n,i),s=Array.isArray(t)?Pc(t,o):Pc([t],([t])=>o(t)),r=Array.isArray(t)?void 0:t.accelerate;return r&&!r.isTransformed&&"function"!=typeof e&&Array.isArray(n)&&!1!==i?.clamp&&(s.accelerate={...r,times:e,keyframes:n,isTransformed:!0,...i?.ease?{ease:i.ease}:{}}),s}function Pc(t,e){const n=f(()=>[]);return Sc(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}const Ec=new Set(["auto","scroll"]),Ac=new WeakMap,Mc=new WeakMap;let Cc=null;function Vc(t,e){const n=getComputedStyle(t),i="x"===e?n.overflowX:n.overflowY,o=t===document.body||t===document.documentElement;return Ec.has(i)||o}function kc(t,e){let n=t?.parentElement;for(;n;){if(Vc(n,e))return n;n=n.parentElement}return null}function Rc(t,e,n,i){if(!t)return;Cc=t;const o=kc(t,n);if(!o)return;const s=e-("x"===n?window.scrollX:window.scrollY),{amount:r,edge:a}=function(t,e,n){const i=e.getBoundingClientRect(),o=t-("x"===n?Math.max(0,i.left):Math.max(0,i.top)),s=("x"===n?Math.min(window.innerWidth,i.right):Math.min(window.innerHeight,i.bottom))-t;if(o<50){const t=1-o/50;return{amount:-25*t*t,edge:"start"}}if(s<50){const t=1-s/50;return{amount:25*t*t,edge:"end"}}return{amount:0,edge:null}}(s,o,n);if(null===a)return Mc.delete(o),void Ac.delete(o);const l=Mc.get(o),u=o===document.body||o===document.documentElement;if(l!==a){if(!("start"===a&&i<0||"end"===a&&i>0))return;Mc.set(o,a);const t="x"===n?o.scrollWidth-(u?window.innerWidth:o.clientWidth):o.scrollHeight-(u?window.innerHeight:o.clientHeight);Ac.set(o,t)}if(r>0){const t=Ac.get(o);if(("x"===n?u?window.scrollX:o.scrollLeft:u?window.scrollY:o.scrollTop)>=t)return}"x"===n?u?window.scrollBy({left:r}):o.scrollLeft+=r:u?window.scrollBy({top:r}):o.scrollTop+=r}function Dc(t,e=0){return Ai(t)?t:Tc(e)}function Lc({children:n,style:i={},value:o,as:s="li",onDrag:r,onDragEnd:a,layout:l=!0,...u},c){const h=f(()=>yc[s]),p=e.useContext(ou),m={x:Dc(i.x),y:Dc(i.y)},g=bc([m.x,m.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(p),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:y,registerItem:v,updateOrder:x,groupRef:w}=p;return d(h,{drag:y,...u,dragSnapToOrigin:!0,style:{...i,x:m.x,y:m.y,zIndex:g},layout:l,onDrag:(t,e)=>{const{velocity:n,point:i}=e,s=m[y].get();x(o,s,n[y]),Rc(w.current,i[y],y,n[y]),r&&r(t,e)},onDragEnd:(t,e)=>{!function(){if(Cc){const t=kc(Cc,"y");t&&(Mc.delete(t),Ac.delete(t));const e=kc(Cc,"x");e&&e!==t&&(Mc.delete(e),Ac.delete(e)),Cc=null}}(),a&&a(t,e)},onLayoutMeasure:t=>{v(o,t)},ref:c,ignoreStrict:!0,children:n})}const Bc=e.forwardRef(Lc);var jc=Object.freeze({__proto__:null,Group:xc,Item:Bc});function Ic(t){return"object"==typeof t&&!Array.isArray(t)}function Oc(t,e,n,i){return null==t?[]:"string"==typeof t&&Ic(e)?oo(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Fc(t,e,n){return t*(e+1)}function Wc(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function Uc(t,e,n,i,o,s){!function(t,e,n){for(let i=0;i<t.length;i++){const o=t[i];o.at>e&&o.at<n&&(w(t,o),i--)}}(t,o,s);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Jt(o,s,i[r]),easing:tt(n,r)})}function Nc(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function $c(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function zc(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Yc(t,e){return e[t]||(e[t]=[]),e[t]}function Hc(t){return Array.isArray(t)?t:[t]}function Xc(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Gc=t=>"number"==typeof t,Kc=t=>t.every(Gc);function _c(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Wo(t)&&!ss(t)?new Yr(e):new Lr(e);n.mount(t),Is.set(t,n)}function qc(t){const e=new Br({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Is.set(t,e)}function Zc(e,n,i,o){const s=[];if(function(t,e){return Ai(t)||"number"==typeof t||"string"==typeof t&&!Ic(e)}(e,n))s.push(Ia(e,Ic(n)&&n.default||n,i&&i.default||i));else{if(null==e)return s;const r=Oc(e,n,o),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],o=e instanceof Element?_c:qc;Is.has(e)||o(e);const l=Is.get(e),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,a)),s.push(...Bi(l,{...n,transition:u},{}))}}return s}function Jc(e,n,i){const o=[],s=function(e,{defaultTransition:n={},...i}={},o,s){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,p=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,Wc(d,a.at,h,c));continue}let[m,f,g={}]=a;void 0!==g.at&&(d=Wc(d,g.at,h,c));let y=0;const v=(e,i,o,a=0,l=0)=>{const u=Hc(e),{delay:c=0,times:h=Ue(u),type:m=n.type||"keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const S="function"==typeof c?c(a,l):c,b=u.length,P=jn(m)?m:s?.[m||"keyframes"];if(b<=2&&P){let t=100;if(2===b&&Kc(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...n,...x};void 0!==T&&(e.duration=B(T));const i=fe(e,t,P);w=i.ease,T=i.duration}T??(T=r);const E=d+S;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-u.length;if(A>0&&We(h,A),1===u.length&&u.unshift(null),f){t.invariant(f<20,"Repeat count too high, must be less than 20","repeat-count-high"),T=Fc(T,f);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<f;t++){u.push(...e);for(let o=0;o<e.length;o++)h.push(n[o]+(t+1)),w.push(0===o?"linear":tt(i,o-1))}Nc(h,f)}const M=E+T;Uc(o,u,w,h,E,M),y=Math.max(S+T,y),p=Math.max(M,p)};if(Ai(m))v(f,g,Yc("default",zc(m,l)));else{const t=Oc(m,f,o,u),e=t.length;for(let n=0;n<e;n++){const i=zc(t[n],l);for(const t in f)v(f[t],Xc(g,t),Yc(t,i),n,e)}}h=d,d+=y}return l.forEach((t,e)=>{for(const o in t){const s=t[o];s.sort($c);const r=[],l=[],u=[];for(let t=0;t<s.length;t++){const{at:e,value:n,easing:i}=s[t];r.push(n),l.push(D(0,p,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[o]=r;const{type:h,...d}=n;c.transition[o]={...d,duration:p,ease:u,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Ti(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}),n,i,{spring:je});return s.forEach(({keyframes:t,transition:e},n)=>{o.push(...Zc(n,t,e))}),o}function Qc(t={}){const{scope:e,reduceMotion:n}=t;return function(t,i,o){let s,r=[];if(a=t,Array.isArray(a)&&a.some(Array.isArray)){const{onComplete:o,...a}=i||{};"function"==typeof o&&(s=o),r=Jc(t,void 0!==n?{reduceMotion:n,...a}:a,e)}else{const{onComplete:a,...l}=o||{};"function"==typeof a&&(s=a),r=Zc(t,i,void 0!==n?{reduceMotion:n,...l}:l,e)}var a;const l=new Zn(r);return s&&l.finished.then(s),e&&(e.animations.push(l),l.finished.then(()=>{w(e.animations,l)})),l}}const th=Qc();const eh=e=>function(n,i,o){return new Zn(function(e,n,i,o){if(null==e)return[];const s=oo(e,o),r=s.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=s[t],o={...i};"function"==typeof o.delay&&(o.delay=o.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const s={...hi(o,t)};s.duration&&(s.duration=B(s.duration)),s.delay&&(s.delay=B(s.delay));const r=ei(e),l=ti(t,s.pseudoElement||""),u=r.get(l);u&&u.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...s,element:e,name:t,allowFlatten:!o.type&&!o.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:o,pseudoElement:s}=n;s||null!==e[0]||(e[0]=Fo(i,o)),Ze(e),no(e,o),!s&&e.length<2&&e.unshift(Fo(i,o)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],o=new On(i);e.set(n,o),o.finished.finally(()=>e.delete(n)),l.push(o)}return l}(n,i,o,e))},nh=eh();function ih(t){return"undefined"!=typeof window&&(t?Vn():Cn())}const oh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function sh(t,e,n,i){const o=n[e],{length:s,position:r}=oh[e],a=o.current,l=n.time;o.current=Math.abs(t[`scroll${r}`]),o.scrollLength=t[`scroll${s}`]-t[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=D(0,o.scrollLength,o.current);const u=i-l;o.velocity=u>50?0:I(o.current-a,u)}const rh={start:0,center:.5,end:1};function ah(t,e,n=0){let i=0;if(t in rh&&(t=rh[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 lh=[0,0];function uh(t,e,n,i){let o=Array.isArray(t)?t:lh,s=0,r=0;return"number"==typeof t?o=[t,t]:"string"==typeof t&&(o=(t=t.trim()).includes(" ")?t.split(" "):[t,rh[t]?t:"0"]),s=ah(o[0],n,i),r=ah(o[1],e),s-r}const ch={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},hh={x:0,y:0};function dh(t,e,n){const{offset:i=ch.All}=n,{target:o=t,axis:s="y"}=n,r="y"===s?"height":"width",a=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(po(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 o=null,s=i.parentNode;for(;!o;)"svg"===s.tagName&&(o=s),s=i.parentNode;i=o}}return n}(o,t):hh,l=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[s].offset.length=0;let c=!e[s].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=uh(i[t],u[r],l[r],a[s]);c||n===e[s].interpolatorOffsets[t]||(c=!0),e[s].offset[t]=n}c&&(e[s].interpolate=Fe(e[s].offset,Ue(i),{clamp:!1}),e[s].interpolatorOffsets=[...e[s].offset]),e[s].progress=S(0,1,e[s].interpolate(e[s].current))}function ph(t,e,n,i={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){sh(t,"x",e,n),sh(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&dh(t,n,i)},notify:()=>e(n)}}const mh=new WeakMap,fh=new WeakMap,gh=new WeakMap,yh=new WeakMap,vh=new WeakMap,xh=t=>t===document.scrollingElement?window:t;function wh(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return V;let o=gh.get(e);o||(o=new Set,gh.set(e,o));const s=ph(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(o.add(s),!mh.has(e)){const t=()=>{for(const t of o)t.measure(ut.timestamp);at.preUpdate(n)},n=()=>{for(const t of o)t.notify()},i=()=>at.read(t);mh.set(e,i);const s=xh(e);window.addEventListener("resize",i),e!==document.documentElement&&fh.set(e,Zo(e,i)),s.addEventListener("scroll",i),i()}if(n&&!vh.has(e)){const t=mh.get(e),n={width:e.scrollWidth,height:e.scrollHeight};yh.set(e,n);const i=()=>{const i=e.scrollWidth,o=e.scrollHeight;n.width===i&&n.height===o||(t(),n.width=i,n.height=o)},o=at.read(i,!0);vh.set(e,o)}const r=mh.get(e);return at.read(r,!1,!0),()=>{lt(r);const t=gh.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=mh.get(e);mh.delete(e),n&&(xh(e).removeEventListener("scroll",n),fh.get(e)?.(),window.removeEventListener("resize",n));const i=vh.get(e);i&&(lt(i),vh.delete(e)),yh.delete(e)}}const Th=[[ch.Enter,"entry"],[ch.Exit,"exit"],[ch.Any,"cover"],[ch.All,"contain"]],Sh={start:0,end:1};function bh(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=Sh[e[0]],i=Sh[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function Ph(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=bh(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],o=e[t];if(i[0]!==o[0]||i[1]!==o[1])return!1}return!0}function Eh(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of Th)if(Ph(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Ah=new Map;function Mh(t){const e={value:0},n=wh(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Ch({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let o=Ah.get(e);o||(o=new Map,Ah.set(e,o));const s=n.target??"self";let r=o.get(s);r||(r={},o.set(s,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&ih(n.target)){const t=Eh(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):Mh({container:e,...n})}else ih()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=Mh({container:e,...n});return r[a]}function Vh(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return V;const o={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?wh(n=>{t(n[e.axis].progress,n)},e):Jo(t,Ch(e))}(t,o):function(t,e){const n=Ch(e),i=e.target?Eh(e.offset):void 0,o=e.target?ih(e.target)&&!!i:ih();return t.attachTimeline({timeline:o?n:void 0,...i&&o&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Jo(e=>{t.time=t.iterationDuration*e},n))})}(t,o)}const kh={some:0,all:1};function Rh(t,e,{root:n,margin:i,amount:o="some"}={}){const s=oo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof o?o:kh[o]});return s.forEach(t=>a.observe(t)),()=>a.disconnect()}const Dh=ku();function Lh(t){return e.useEffect(()=>()=>t(),[])}const Bh={renderer:au,...Du,...fc},jh={...Bh,...rc,...gc},Ih={renderer:au,...Du};function Oh(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const Fh=()=>({scrollX:Ti(0),scrollY:Ti(0),scrollXProgress:Ti(0),scrollYProgress:Ti(0)}),Wh=t=>!!t&&!t.current;function Uh(t,e,n,i){return{factory:o=>Vh(o,{...e,axis:t,container:n?.current||void 0,target:i?.current||void 0}),times:[0,1],keyframes:[0,1],ease:t=>t,duration:1}}function Nh({container:n,target:i,...o}={}){const s=f(Fh);(function(t,e){return"undefined"!=typeof window&&(t?Vn()&&!!Eh(e):Cn())})(i,o.offset)&&(s.scrollXProgress.accelerate=Uh("x",o,n,i),s.scrollYProgress.accelerate=Uh("y",o,n,i));const r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=Vh((t,{x:e,y:n})=>{s.scrollX.set(e.current),s.scrollXProgress.set(e.progress),s.scrollY.set(n.current),s.scrollYProgress.set(n.progress)},{...o,container:n?.current||void 0,target:i?.current||void 0}),()=>{r.current?.()}),[n,i,JSON.stringify(o.offset)]);return y(()=>(a.current=!1,Wh(n)||Wh(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>a.current?(t.invariant(!Wh(n),"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!Wh(i),"Target ref is defined but not hydrated","use-scroll-ref"),l()):void 0,[l]),s}function $h(t,n={}){const{isStatic:i}=e.useContext(Ll),o=()=>Ai(t)?t.get():t;if(i)return bc(o);const s=Tc(o());return e.useInsertionEffect(()=>us(s,t,n),[s,JSON.stringify(n)]),s}function zh(t){const n=e.useRef(0),{isStatic:i}=e.useContext(Ll);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return at.update(e,!0),()=>lt(e)},[t])}class Yh extends wi{constructor(){super(...arguments),this.isEnabled=!1}add(t){(hn.has(t)||zn.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function Hh(){!Hs.current&&Gs();const[t]=e.useState(Ys.current);return t}function Xh(){const t=Hh(),{reducedMotion:n}=e.useContext(Ll);return"never"!==n&&("always"===n||t)}function Gh(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Ei(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Gh(t,e)})})}function Kh(){let e=!1;const n=new Set,i={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(i,o){t.invariant(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const s=[];return n.forEach(t=>{s.push(Ii(t,i,{transitionOverride:o}))}),Promise.all(s)},set:i=>(t.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(t=>{!function(t,e){Array.isArray(e)?Gh(t,e):"string"==typeof e?Gh(t,[e]):Ei(t,e)}(t,i)})),stop(){n.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(e=!0,()=>{e=!1,i.stop()})};return i}function _h(){const t=f(Kh);return y(t.mount,[]),t}const qh=_h;class Zh{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const Jh=()=>new Zh;function Qh(t){return null!==t&&"object"==typeof t&&Su in t}function td(){return ed}function ed(t){bl.current&&(bl.current.isUpdating=!1,bl.current.blockUpdate(),t&&t())}const nd=new Map,id=new Map,od=(t,e)=>`${t}: ${hn.has(e)?"transform":e}`;function sd(t,e,n){const i=od(t,e),o=nd.get(i);if(!o)return null;const{animation:s,startTime:r}=o;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return s.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let rd,ad;const ld=new Set;function ud(){ld.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),ld.clear()}const cd=()=>({});class hd extends Js{constructor(){super(...arguments),this.measureInstanceViewportBox=js}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const dd=xu({scrapeMotionValuesFromProps:cd,createRenderState:cd});let pd=0;const md=t=>t>.001?1/t:1e5;let fd=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[p,g]=Ul(a),v=e.useMemo(()=>$l(t),[t]),x=a&&!p?[]:v.map(Nl),w=e.useRef(!0),T=e.useRef(v),S=f(()=>new Map),b=e.useRef(new Set),[P,E]=e.useState(v),[A,M]=e.useState(v);y(()=>{w.current=!1,T.current=v;for(let t=0;t<A.length;t++){const e=Nl(A[t]);x.includes(e)?(S.delete(e),b.current.delete(e)):!0!==S.get(e)&&S.set(e,!1)}},[A,x.length,x.join("-")]);const C=[];if(v!==P){let t=[...v];for(let e=0;e<A.length;e++){const n=A[e],i=Nl(n);x.includes(i)||(t.splice(e,0,n),C.push(n))}return"wait"===r&&C.length&&(t=C),M($l(t)),E(v),null}const{forceRender:V}=e.useContext(m);return d(h,{children:A.map(t=>{const e=Nl(t),h=!(a&&!p)&&(v===A||x.includes(e));return d(Fl,{isPresent:h,initial:!(w.current&&!i)&&void 0,custom:n,presenceAffectsLayout:s,mode:r,root:c,onExitComplete:h?void 0:()=>{if(b.current.has(e))return;if(!S.has(e))return;b.current.add(e),S.set(e,!0);let t=!0;S.forEach(e=>{e||(t=!1)}),t&&(V?.(),M(T.current),a&&g?.(),o&&o())},anchorX:l,anchorY:u,children:t},e)})})},t.AnimateSharedLayout=({children:e})=>(i.useEffect(()=>{t.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),d(Xl,{id:f(()=>"asl-"+pd++),children:e})),t.AsyncMotionValueAnimation=Kn,t.DOMKeyframesResolver=to,t.DOMVisualElement=Qs,t.DeprecatedLayoutGroupContext=zl,t.DocumentProjectionNode=wl,t.DragControls=Zh,t.Feature=tr,t.FlatTree=Wa,t.GroupAnimation=_n,t.GroupAnimationWithThen=Zn,t.HTMLProjectionNode=Pl,t.HTMLVisualElement=Lr,t.JSAnimation=qe,t.KeyframeResolver=bn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Al,this.rejectReady=Al,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),at.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Ml(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return ea(n,e),ea(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=Ml(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,o=n.style.transform;i&&o&&i===o&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const o=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);o?.didUpdate(),await new Promise(t=>{at.postRender(()=>t())});const s=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new _n(s)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=kl(i,n,this.scope),{layout:o,layoutId:s}=Cl(i),r=(s?this.sharedTransitions.get(s):void 0)||this.defaultOptions,a=Vl(i,t?.projection,{layout:o,layoutId:s,animationType:"string"==typeof o?o:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),Is.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.LayoutGroup=Xl,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!Jl(n)),s=e.useRef(void 0);if(!Jl(n)){const{renderer:t,...e}=n;s.current=t,Zl(e)}return e.useEffect(()=>{Jl(n)&&n().then(({renderer:t,...e})=>{Zl(e),s.current=t,o(!0)})},[]),d(Gl.Provider,{value:{renderer:s.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&nu(n);const o=e.useContext(Ll);(i={...o,...i}).transition=ci(i.transition,o.transition),i.isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion,i.skipAnimations]);return d(Ll.Provider,{value:s,children:t})},t.MotionConfigContext=Ll,t.MotionContext=lu,t.MotionGlobalConfig=P,t.MotionValue=wi,t.NativeAnimation=On,t.NativeAnimationExtended=Un,t.NativeAnimationWrapper=Jn,t.NodeStack=$a,t.ObjectVisualElement=Br,t.PopChild=Ol,t.PresenceChild=Fl,t.PresenceContext=v,t.Reorder=jc,t.SVGVisualElement=Yr,t.SubscriptionManager=L,t.SwitchLayoutGroupContext=Pu,t.ViewTransitionBuilder=Rs,t.VisualElement=Js,t.WillChangeMotionValue=Yh,t.acceleratedValues=zn,t.activeAnimations=mt,t.addAttrValue=uo,t.addDomEvent=Oa,t.addPointerEvent=ju,t.addPointerInfo=Bu,t.addScaleCorrector=function(t){for(const e in t)kr[e]=t[e],gt(e)&&(kr[e].isCSSVariable=!0)},t.addStyleValue=go,t.addUniqueItem=x,t.addValueToWillChange=Ci,t.alpha=St,t.analyseComplexValue=Ht,t.animate=th,t.animateMini=nh,t.animateMotionValue=mi,t.animateSingleValue=Ia,t.animateTarget=Bi,t.animateValue=function(t){return new qe(t)},t.animateVariant=ji,t.animateView=function(t,e={}){return new Rs(t,e)},t.animateVisualElement=Ii,t.animationControls=Kh,t.animationMapKey=ti,t.animations=Du,t.anticipate=X,t.applyAxisDelta=hr,t.applyBoxDelta=dr,t.applyGeneratorOptions=In,t.applyPointDelta=cr,t.applyPxDefaults=no,t.applyTreeDeltas=fr,t.aspectRatio=ba,t.attachFollow=us,t.attachSpring=function(t,e,n){return us(t,e,{type:"spring",...n})},t.attrEffect=co,t.axisDeltaEquals=Pa,t.axisEquals=xa,t.axisEqualsRounded=Ta,t.backIn=Y,t.backInOut=H,t.backOut=z,t.boxEquals=wa,t.boxEqualsRounded=Sa,t.buildHTMLStyles=Er,t.buildProjectionTransform=Aa,t.buildSVGAttrs=Wr,t.buildSVGPath=Or,t.buildTransform=Pr,t.calcAxisDelta=sa,t.calcBoxDelta=ra,t.calcChildStagger=ni,t.calcGeneratorDuration=me,t.calcLength=ia,t.calcRelativeAxis=aa,t.calcRelativeAxisPosition=ua,t.calcRelativeBox=la,t.calcRelativePosition=ca,t.camelCaseAttributes=Ur,t.camelToDash=Vi,t.cancelFrame=lt,t.cancelMicrotask=wo,t.cancelSync=Dl,t.checkVariantsDidChange=Zr,t.circIn=G,t.circInOut=_,t.circOut=K,t.clamp=S,t.cleanDirtyNodes=Qa,t.collectMotionValues=xi,t.color=Ut,t.compareByDepth=Fa,t.complex=Kt,t.containsCSSVariable=wt,t.convertBoundingBoxToBox=er,t.convertBoxToBoundingBox=nr,t.convertOffsetToTimes=Ne,t.copyAxisDeltaInto=na,t.copyAxisInto=ta,t.copyBoxInto=ea,t.correctBorderRadius=Cr,t.correctBoxShadow=Vr,t.correctParentTransform=function(t){return e=>{const n=t.current;if(!n)return e;const i=function(t){const{transform:e}=getComputedStyle(t);if(!e||"none"===e)return null;const n=e.match(/^matrix3d\((.*)\)$/u)||e.match(/^matrix\((.*)\)$/u);if(!n)return null;const i=n[1].split(",").map(Number),o=e.startsWith("matrix3d"),s=i[0],r=i[1],a=o?i[4]:i[2],l=o?i[5]:i[3],u=s*l-r*a;return Math.abs(u)<1e-10?null:{a:l/u,b:-r/u,c:-a/u,d:s/u}}(n);if(!i)return e;const o=n.getBoundingClientRect(),s=o.left+window.scrollX+o.width/2,r=o.top+window.scrollY+o.height/2,a=e.x-s,l=e.y-r;return{x:s+i.a*a+i.c*l,y:r+i.b*a+i.d*l}}},t.createAnimationState=qr,t.createAxis=Bs,t.createAxisDelta=Ds,t.createBox=js,t.createDelta=Ls,t.createGeneratorEasing=fe,t.createProjectionNode=_a,t.createRenderBatcher=rt,t.createScopedAnimate=Qc,t.cubicBezier=U,t.cubicBezierAsString=Rn,t.defaultEasing=$e,t.defaultOffset=Ue,t.defaultTransformValue=rn,t.defaultValueTypes=_i,t.degrees=Lt,t.delay=Ua,t.delayInSeconds=function(t,e){return Ua(t,B(e))},t.dimensionValueTypes=Fi,t.disableInstantTransitions=function(){P.instantAnimations=!1},t.distance=Ou,t.distance2D=Fu,t.domAnimation=Bh,t.domMax=jh,t.domMin=Ih,t.eachAxis=Ea,t.easeIn=q,t.easeInOut=J,t.easeOut=Z,t.easingDefinitionToFunction=it,t.fillOffset=We,t.fillWildcards=Ze,t.filterProps=iu,t.findDimensionValueType=Wi,t.findValueType=ms,t.flushKeyframeResolvers=Sn,t.followValue=ls,t.frame=at,t.frameData=ut,t.frameSteps=ct,t.generateLinearEasing=de,t.getAnimatableNone=Ji,t.getAnimationMap=ei,t.getComputedStyle=Fo,t.getDefaultTransition=ui,t.getDefaultValueType=qi,t.getEasingForSegment=tt,t.getFeatureDefinitions=Zs,t.getFinalKeyframe=He,t.getMixer=re,t.getOptimisedAppearId=Di,t.getOriginIndex=rs,t.getValueAsType=ro,t.getValueTransition=hi,t.getVariableValue=si,t.getVariantContext=Xr,t.getViewAnimationLayerInfo=Ts,t.getViewAnimations=bs,t.globalProjectionState=za,t.has2DTranslate=ar,t.hasReducedMotionListener=Hs,t.hasScale=sr,t.hasTransform=rr,t.hasWarned=function(t){return O.has(t)},t.hex=Rt,t.hover=Eo,t.hsla=Wt,t.hslaToRgba=qt,t.inView=Rh,t.inertia=Oe,t.initPrefersReducedMotion=Gs,t.interpolate=Fe,t.invisibleValues=ie,t.isAnimationControls=Os,t.isBezierDefinition=et,t.isBrowser=g,t.isCSSVariableName=gt,t.isCSSVariableToken=vt,t.isControllingVariants=Ns,t.isDeltaZero=va,t.isDragActive=So,t.isDragging=To,t.isEasingArray=Q,t.isElementKeyboardAccessible=Vo,t.isElementTextInput=Ro,t.isForcedMotionValue=Rr,t.isGenerator=jn,t.isHTMLElement=po,t.isKeyframesTarget=Si,t.isMotionComponent=Qh,t.isMotionValue=Ai,t.isNear=oa,t.isNodeOrChild=Ao,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Mo,t.isSVGElement=Wo,t.isSVGSVGElement=ss,t.isSVGTag=Nr,t.isTransitionDefined=pi,t.isValidMotionProp=tu,t.isVariantLabel=Fs,t.isVariantNode=$s,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&kn()||!e||"string"==typeof e&&(e in Dn||kn())||et(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Mi,t.isZeroValueString=M,t.keyframes=ze,t.m=Dh,t.makeAnimationInstant=$n,t.makeUseVisualState=xu,t.mapEasingToNativeEasing=Ln,t.mapValue=function(t,e,n,i){const o=as(e,n,i);return ds(()=>o(t.get()))},t.maxGeneratorDuration=pe,t.measurePageBox=Tr,t.measureViewportBox=wr,t.memo=C,t.microtask=xo,t.millisecondsToSeconds=j,t.mirrorEasing=N,t.mix=ce,t.mixArray=ae,t.mixColor=ne,t.mixComplex=ue,t.mixImmediate=Zt,t.mixLinearColor=Qt,t.mixNumber=Jt,t.mixObject=le,t.mixValues=Ra,t.mixVisibility=oe,t.motion=yc,t.motionValue=Ti,t.moveItem=T,t.nodeGroup=Sl,t.noop=V,t.number=Tt,t.numberValueTypes=Ki,t.observeTimeline=Jo,t.optimizedAppearDataAttribute=Ri,t.optimizedAppearDataId=ki,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:oo(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=oi,t.parseValueFromTransform=an,t.percent=Bt,t.pipe=R,t.pixelsToPercent=Mr,t.positionalKeys=vi,t.prefersReducedMotion=Ys,t.press=Oo,t.progress=D,t.progressPercentage=Ft,t.propEffect=ho,t.propagateDirtyNodes=Ja,t.px=jt,t.readTransformValue=ln,t.recordStats=function(){if(st.value)throw is(),new Error("Stats are already being measured");const t=st;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},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)},at.postRender(Qo,!0),os},t.removeAxisDelta=da,t.removeAxisTransforms=pa,t.removeBoxTransforms=ga,t.removeItem=w,t.removePointDelta=ha,t.renderHTML=Ar,t.renderSVG=$r,t.resize=Zo,t.resolveElements=oo,t.resolveMotionValue=Na,t.resolveTransition=ci,t.resolveVariant=yi,t.resolveVariantFromProps=gi,t.reverseEasing=$,t.rgbUnit=Vt,t.rgba=kt,t.rootProjectionNode=bl,t.scale=bt,t.scaleCorrectors=kr,t.scalePoint=ur,t.scrapeHTMLMotionValuesFromProps=Dr,t.scrapeSVGMotionValuesFromProps=zr,t.scroll=Vh,t.scrollInfo=wh,t.secondsToMilliseconds=B,t.setDragLock=bo,t.setFeatureDefinitions=qs,t.setStyle=En,t.setTarget=Ei,t.spring=je,t.springValue=function(t,e){return ls(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(o,s)=>{const r="number"==typeof n?n:rs(n,s),a=Math.abs(r-o);let l=t*a;if(i){const e=s*t;l=it(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,o){if(window.MotionIsMounted)return;const s=t.dataset[ki];if(!s)return;window.MotionHandoffAnimation=sd;const r=od(s,e);ad||(ad=Bn(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),nd.set(r,{animation:ad,startTime:null}),window.MotionHandoffAnimation=sd,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return id.has(t);const n=od(t,e);return Boolean(nd.get(n))},window.MotionHandoffMarkAsComplete=t=>{id.has(t)&&id.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===id.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const o=od(t,e),s=nd.get(o);s&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{s.animation.cancel()})}):s.animation.cancel(),n&&i?(ld.add(s),n.render(ud)):(nd.delete(o),nd.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Di(t);if(!i)return;const o=window.MotionHasOptimisedAnimation?.(i,e),s=t.props.values?.[e];if(!o||!s)return;const r=n.on("change",t=>{s.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())});return r});const a=()=>{ad.cancel();const s=Bn(t,e,n,i);void 0===rd&&(rd=performance.now()),s.startTime=rd,nd.set(r,{animation:s,startTime:rd}),o&&o(s)};id.set(s,!1),ad.ready?ad.ready.then(a).catch(V):a()},t.startWaapiAnimation=Bn,t.statsBuffer=st,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(i):Math.ceil(i);return S(0,1,o/t)}},t.styleEffect=yo,t.supportedWaapiEasing=Dn,t.supportsBrowserAnimation=Gn,t.supportsFlags=An,t.supportsLinearEasing=kn,t.supportsPartialKeyframes=io,t.supportsScrollTimeline=Cn,t.supportsViewTimeline=Vn,t.svgEffect=vo,t.sync=Rl,t.testValueType=Oi,t.time=pt,t.transform=as,t.transformAxis=yr,t.transformBox=xr,t.transformBoxPoints=ir,t.transformPropOrder=cn,t.transformProps=hn,t.transformValue=ds,t.transformValueTypes=Gi,t.transformViewBoxPoint=function(t){return e=>{const n=t.current;if(!n)return e;const i=n.viewBox?.baseVal;if(!i||0===i.width&&0===i.height)return e;const o=n.getBoundingClientRect();if(0===o.width||0===o.height)return e;const s=i.width/o.width,r=i.height/o.height,a=o.left+window.scrollX,l=o.top+window.scrollY;return{x:(e.x-a)*s+a,y:(e.y-l)*r+l}}},t.translateAxis=gr,t.unwrapMotionComponent=function(t){if(Qh(t))return t[Su]},t.updateMotionValuesFromProps=zs,t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),n=Xh()??void 0,i=e.useMemo(()=>Qc({scope:t,reduceMotion:n}),[t,n]);return Lh(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,i]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>eh(t));return Lh(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=qh,t.useAnimationControls=_h,t.useAnimationFrame=zh,t.useComposedRefs=jl,t.useCycle=function(...t){const n=e.useRef(0),[i,o]=e.useState(t[n.current]),s=e.useCallback(e=>{n.current="number"!=typeof e?F(0,t.length,n.current+1):e,o(t[n.current])},[t.length,...t]);return[i,s]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),o=dd({},!1),s=f(()=>new hd({props:{onUpdate:t=>{i({...t})}},visualState:o,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(s.mount({}),()=>s.unmount()),[s]),[n,f(()=>t=>Ii(s,t))]},t.useDeprecatedInvertedScale=function(n){let i=Tc(1),o=Tc(1);const{visualElement:s}=e.useContext(lu);return t.invariant(!(!n&&!s),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(fd,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),fd=!0,n?(i=n.scaleX||i,o=n.scaleY||o):s&&(i=s.getValue("scaleX",1),o=s.getValue("scaleY",1)),{scaleX:bc(i,md),scaleY:bc(o,md)}},t.useDomEvent=function(t,n,i,o){e.useEffect(()=>{const e=t.current;if(i&&e)return Oa(e,n,i,o)},[t,n,i,o])},t.useDragControls=function(){return f(Jh)},t.useElementScroll=function(t){return Nh({container:t})},t.useFollowValue=$h,t.useForceUpdate=Yl,t.useInView=function(t,{root:n,margin:i,amount:o,once:s=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||s&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:o};return Rh(t.current,()=>(l(!0),s?void 0:()=>l(!1)),e)},[n,t,i,s,o]),a},t.useInstantLayoutTransition=td,t.useInstantTransition=function(){const[t,n]=Yl(),i=td(),o=e.useRef(-1);return e.useEffect(()=>{at.postRender(()=>at.postRender(()=>{n===o.current&&(P.instantAnimations=!1)}))},[n]),e=>{i(()=>{P.instantAnimations=!0,t(),e(),o.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Sc(e.filter(Ai),function(){let i="";for(let o=0;o<n;o++){i+=t[o];const n=e[o];n&&(i+=Ai(n)?n.get():n)}return i})},t.useMotionValue=Tc,t.useMotionValueEvent=Oh,t.usePageInView=function(){const[t,n]=e.useState(!0);return e.useEffect(()=>{const t=()=>n(!document.hidden);return document.hidden&&t(),document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[]),t},t.usePresence=Ul,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Hh,t.useReducedMotionConfig=Xh,t.useResetProjection=function(){return e.useCallback(()=>{const t=bl.current;t&&t.resetTree()},[])},t.useScroll=Nh,t.useSpring=function(t,e={}){return $h(t,{type:"spring",...e})},t.useTime=function(){const t=Tc(0);return zh(e=>t.set(e)),t},t.useTransform=bc,t.useUnmountEffect=Lh,t.useVelocity=function(t){const e=Tc(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&at.update(n)};return Oh(t,"change",()=>{at.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Nh()},t.useWillChange=function(){return f(()=>new Yh("auto"))},t.variantPriorityOrder=Ws,t.variantProps=Us,t.velocityPerSecond=I,t.vh=It,t.visualElementStore=Is,t.vw=Ot,t.warnOnce=function(t,e,n){t||O.has(e)||(console.warn(b(e,n)),O.add(e))},t.wrap=F});
|