geekin-devtoys 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";const B=require("vue"),un=require("@vueuse/core");function kt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,i=Symbol(n);return[o=>{const a=B.inject(i,o);if(a===void 0)throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(B.provide(i,o),o),i]}function mo(t,e){const{layoutGroup:n,presenceContext:i,config:s}=e,r=n.id&&t.layoutId?`${n.id}-${t.layoutId}`:t.layoutId||void 0;return{...t,layoutId:r,transition:t.transition??s.transition,layoutGroup:n,motionConfig:s,inViewOptions:t.inViewOptions??s.inViewOptions,presenceContext:i,initial:i.initial===!1?i.initial:t.initial===!0?void 0:t.initial}}function We(t,e){t.indexOf(e)===-1&&t.push(e)}function _t(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;function ge(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Bt=()=>{},ht=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Bt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(ge(e,n))},ht=(t,e,n)=>{if(!t)throw new Error(ge(e,n))});const it={},Vi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ci=t=>typeof t=="object"&&t!==null,Mi=t=>/^0[^.\s]+$/u.test(t);function Ei(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,Ft=(...t)=>t.reduce((e,n)=>i=>n(e(i))),Et=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class Ge{constructor(){this.subscriptions=[]}add(e){return We(this.subscriptions,e),()=>_t(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const U=t=>t*1e3,W=t=>t/1e3,Di=(t,e)=>e?t*(1e3/e):0,cn=new Set;function Ri(t,e,n){t||cn.has(e)||(console.warn(ge(e,n)),cn.add(e))}const Li=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,yo=1e-7,go=12;function vo(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=Li(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>yo&&++a<go);return o}function Ot(t,e,n,i){if(t===e&&n===i)return G;const s=r=>vo(r,0,1,t,n);return r=>r===0||r===1?r:Li(s(r),e,i)}const ki=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Bi=t=>e=>1-t(1-e),Fi=Ot(.33,1.53,.69,.99),_e=Bi(Fi),Oi=ki(_e),ji=t=>t>=1?1:(t*=2)<1?.5*_e(t):.5*(2-Math.pow(2,-10*(t-1))),He=t=>1-Math.sin(Math.acos(t)),Ii=Bi(He),Ni=ki(He),xo=Ot(.42,0,1,1),To=Ot(0,0,.58,1),Ui=Ot(.42,0,.58,1),bo=t=>Array.isArray(t)&&typeof t[0]!="number",$i=t=>Array.isArray(t)&&typeof t[0]=="number",hn={linear:G,easeIn:xo,easeInOut:Ui,easeOut:To,circIn:He,circInOut:Ni,circOut:Ii,backIn:_e,backInOut:Oi,backOut:Fi,anticipate:ji},wo=t=>typeof t=="string",fn=t=>{if($i(t)){ht(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return Ot(e,n,i,s)}else if(wo(t))return ht(hn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),hn[t];return t},It=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function So(t){let e=new Set,n=new Set,i=!1,s=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){r.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,h=!1)=>{const d=h&&i?e:n;return u&&r.add(c),d.add(c),c},cancel:c=>{n.delete(c),r.delete(c)},process:c=>{if(o=c,i){s=!0;return}i=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(c))}};return l}const Po=40;function Ki(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=It.reduce((x,S)=>(x[S]=So(r),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:p}=o,y=()=>{const x=it.useManualTiming,S=x?s.timestamp:performance.now();n=!1,x||(s.delta=i?1e3/60:Math.max(Math.min(S-s.timestamp,Po),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),f.process(s),d.process(s),p.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))},m=()=>{n=!0,i=!0,s.isProcessing||t(y)};return{schedule:It.reduce((x,S)=>{const P=o[S];return x[S]=(E,C=!1,w=!1)=>(n||m(),P.schedule(E,C,w)),x},{}),cancel:x=>{for(let S=0;S<It.length;S++)o[It[S]].cancel(x)},state:s,steps:o}}const{schedule:A,cancel:st,state:F,steps:ie}=Ki(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let $t;function Ao(){$t=void 0}const I={now:()=>($t===void 0&&I.set(F.isProcessing||it.useManualTiming?F.timestamp:performance.now()),$t),set:t=>{$t=t,queueMicrotask(Ao)}},Wi=t=>e=>typeof e=="string"&&e.startsWith(t),ze=Wi("--"),Vo=Wi("var(--"),Ye=t=>Vo(t)?Co.test(t.split("/*")[0].trim()):!1,Co=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function dn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Tt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Dt={...Tt,transform:t=>J(0,1,t)},Nt={...Tt,default:1},Vt=t=>Math.round(t*1e5)/1e5,Xe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Mo(t){return t==null}const Eo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qe=(t,e)=>n=>!!(typeof n=="string"&&Eo.test(n)&&n.startsWith(t)||e&&!Mo(n)&&Object.prototype.hasOwnProperty.call(n,e)),Gi=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Xe);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Do=t=>J(0,255,t),se={...Tt,transform:t=>Math.round(Do(t))},lt={test:qe("rgb","red"),parse:Gi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+se.transform(t)+", "+se.transform(e)+", "+se.transform(n)+", "+Vt(Dt.transform(i))+")"};function Ro(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const ve={test:qe("#"),parse:Ro,transform:lt.transform},jt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=jt("deg"),Z=jt("%"),v=jt("px"),Lo=jt("vh"),ko=jt("vw"),pn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},pt={test:qe("hsl","hue"),parse:Gi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Z.transform(Vt(e))+", "+Z.transform(Vt(n))+", "+Vt(Dt.transform(i))+")"},L={test:t=>lt.test(t)||ve.test(t)||pt.test(t),parse:t=>lt.test(t)?lt.parse(t):pt.test(t)?pt.parse(t):ve.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?lt.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},Bo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fo(t){return isNaN(t)&&typeof t=="string"&&(t.match(Xe)?.length||0)+(t.match(Bo)?.length||0)>0}const _i="number",Hi="color",Oo="var",jo="var(",mn="${}",Io=/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 vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Io,l=>(L.test(l)?(i.color.push(r),s.push(Hi),n.push(L.parse(l))):l.startsWith(jo)?(i.var.push(r),s.push(Oo),n.push(l)):(i.number.push(r),s.push(_i),n.push(parseFloat(l))),++r,mn)).split(mn);return{values:n,split:a,indexes:i,types:s}}function No(t){return vt(t).values}function zi({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===_i?s+=Vt(i[r]):o===Hi?s+=L.transform(i[r]):s+=i[r]}return s}}function Uo(t){return zi(vt(t))}const $o=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,Ko=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:$o(t);function Wo(t){const e=vt(t);return zi(e)(e.values.map((i,s)=>Ko(i,e.split[s])))}const Y={test:Fo,parse:No,createTransformer:Uo,getAnimatableNone:Wo};function oe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Go({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=oe(l,a,t+1/3),r=oe(l,a,t),o=oe(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function Ht(t,e){return n=>n>0?e:t}const V=(t,e,n)=>t+(e-t)*n,re=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},_o=[ve,lt,pt],Ho=t=>_o.find(e=>e.test(t));function yn(t){const e=Ho(t);if(Bt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===pt&&(n=Go(n)),n}const gn=(t,e)=>{const n=yn(t),i=yn(e);if(!n||!i)return Ht(t,e);const s={...n};return r=>(s.red=re(n.red,i.red,r),s.green=re(n.green,i.green,r),s.blue=re(n.blue,i.blue,r),s.alpha=V(n.alpha,i.alpha,r),lt.transform(s))},xe=new Set(["none","hidden"]);function zo(t,e){return xe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Yo(t,e){return n=>V(t,e,n)}function Ze(t){return typeof t=="number"?Yo:typeof t=="string"?Ye(t)?Ht:L.test(t)?gn:Zo:Array.isArray(t)?Yi:typeof t=="object"?L.test(t)?gn:Xo:Ht}function Yi(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>Ze(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function Xo(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Ze(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function qo(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const Zo=(t,e)=>{const n=Y.createTransformer(e),i=vt(t),s=vt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?xe.has(t)&&!s.values.length||xe.has(e)&&!i.values.length?zo(t,e):Ft(Yi(qo(i,s),s.values),n):(Bt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ht(t,e))};function Xi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Ze(t)(t,e)}const Jo=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>A.update(e,n),stop:()=>st(e),now:()=>F.isProcessing?F.timestamp:I.now()}},qi=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},zt=2e4;function Je(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<zt;)e+=n,i=t.next(e);return e>=zt?1/0:e}function Qo(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Je(i),zt);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:W(s)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Te(t,e){return t*Math.sqrt(1-e*e)}const tr=12;function er(t,e,n){let i=n;for(let s=1;s<tr;s++)i=i-t(i)/e(i);return i}const ae=.001;function nr({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:i=R.mass}){let s,r;Bt(t<=U(R.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=J(R.minDamping,R.maxDamping,o),t=J(R.minDuration,R.maxDuration,W(t)),o<1?(s=c=>{const u=c*o,h=u*t,f=u-n,d=Te(c,o),p=Math.exp(-h);return ae-f/d*p},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),y=Te(Math.pow(c,2),o);return(-s(c)+ae>0?-1:1)*((f-d)*p)/y}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ae+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=er(s,r,a);if(t=U(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const ir=["duration","bounce"],sr=["stiffness","damping","mass"];function vn(t,e){return e.some(n=>t[n]!==void 0)}function or(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!vn(t,sr)&&vn(t,ir))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:R.mass,stiffness:s,damping:r}}else{const n=nr({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Yt(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=or({...n,velocity:-W(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),m=o-r,g=W(Math.sqrt(l/u)),T=Math.abs(m)<5;i||(i=T?R.restSpeed.granular:R.restSpeed.default),s||(s=T?R.restDelta.granular:R.restDelta.default);let x,S,P,E,C,w;if(y<1)P=Te(g,y),E=(p+y*g*m)/P,x=b=>{const D=Math.exp(-y*g*b);return o-D*(E*Math.sin(P*b)+m*Math.cos(P*b))},C=y*g*E+m*P,w=y*g*m-E*P,S=b=>Math.exp(-y*g*b)*(C*Math.sin(P*b)+w*Math.cos(P*b));else if(y===1){x=D=>o-Math.exp(-g*D)*(m+(p+g*m)*D);const b=p+g*m;S=D=>Math.exp(-g*D)*(g*b*D-p)}else{const b=g*Math.sqrt(y*y-1);x=H=>{const Q=Math.exp(-y*g*H),M=Math.min(b*H,300);return o-Q*((p+y*g*m)*Math.sinh(M)+b*m*Math.cosh(M))/b};const D=(p+y*g*m)/b,_=y*g*D-m*b,ft=y*g*m-D*b;S=H=>{const Q=Math.exp(-y*g*H),M=Math.min(b*H,300);return Q*(_*Math.sinh(M)+ft*Math.cosh(M))}}const O={calculatedDuration:d&&h||null,velocity:b=>U(S(b)),next:b=>{if(!d&&y<1){const _=Math.exp(-y*g*b),ft=Math.sin(P*b),H=Math.cos(P*b),Q=o-_*(E*ft+m*H),M=U(_*(C*ft+w*H));return a.done=Math.abs(M)<=i&&Math.abs(o-Q)<=s,a.value=a.done?o:Q,a}const D=x(b);if(d)a.done=b>=h;else{const _=U(S(b));a.done=Math.abs(_)<=i&&Math.abs(o-D)<=s}return a.value=a.done?o:D,a},toString:()=>{const b=Math.min(Je(O),zt),D=qi(_=>O.next(b*_).value,b,30);return b+"ms "+D},toTransition:()=>{}};return O}Yt.applyToOptions=t=>{const e=Qo(t,100,Yt);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};const rr=5;function Zi(t,e,n){const i=Math.max(e-rr,0);return Di(n-t(i),e-i)}function be({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=w=>a!==void 0&&w<a||l!==void 0&&w>l,p=w=>a===void 0?l:l===void 0||Math.abs(a-w)<Math.abs(l-w)?a:l;let y=n*e;const m=h+y,g=o===void 0?m:o(m);g!==m&&(y=g-h);const T=w=>-y*Math.exp(-w/i),x=w=>g+T(w),S=w=>{const O=T(w),b=x(w);f.done=Math.abs(O)<=c,f.value=f.done?g:b};let P,E;const C=w=>{d(f.value)&&(P=w,E=Yt({keyframes:[f.value,p(f.value)],velocity:Zi(x,w,f.value),damping:s,stiffness:r,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:w=>{let O=!1;return!E&&P===void 0&&(O=!0,S(w),C(w)),P!==void 0&&w>=P?E.next(w-P):(!O&&S(w),f)}}}function ar(t,e,n){const i=[],s=n||it.mix||Xi,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||G:e;a=Ft(l,a)}i.push(a)}return i}function lr(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(ht(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ar(e,i,s),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Et(t[h],t[h+1],u);return a[h](f)};return n?u=>c(J(t[0],t[r-1],u)):c}function ur(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Et(0,e,i);t.push(V(n,1,s))}}function cr(t){const e=[0];return ur(e,t.length-1),e}function hr(t,e){return t.map(n=>n*e)}function fr(t,e){return t.map(()=>e||Ui).splice(0,t.length-1)}function mt({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=bo(i)?i.map(fn):fn(i),r={done:!1,value:e[0]},o=hr(n&&n.length===e.length?n:cr(e),t),a=lr(o,e,{ease:Array.isArray(s)?s:fr(e,s)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const dr=t=>t!==null;function te(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(dr),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const pr={decay:be,inertia:be,tween:mt,keyframes:mt,spring:Yt};function Ji(t){typeof t.type=="string"&&(t.type=pr[t.type])}class Qe{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const mr=t=>t/100;class Xt extends Qe{constructor(e){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:n}=this.options;n&&n.updatedAt!==I.now()&&this.tick(I.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Ji(e);const{type:n=mt,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||mt;process.env.NODE_ENV!=="production"&&l!==mt&&ht(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==mt&&typeof a[0]!="number"&&(this.mixKeyframes=Ft(mr,Xi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Je(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,S=i;if(h){const w=Math.min(this.currentTime,s)/a;let O=Math.floor(w),b=w%1;!b&&w>=1&&(b=1),b===1&&O--,O=Math.min(O,h+1),O%2&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(S=o)),x=J(0,1,b)*a}let P;T?(this.delayState.value=u[0],P=this.delayState):P=S.next(x),r&&!T&&(P.value=r(P.value));let{done:E}=P;!T&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&p!==be&&(P.value=te(u,this.options,m,this.speed)),y&&y(P.value),C&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return W(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(this.currentTime)}set time(e){e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Zi(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(I.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=W(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Jo,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(I.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function yr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ut=t=>t*180/Math.PI,we=t=>{const e=ut(Math.atan2(t[1],t[0]));return Se(e)},gr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:we,rotateZ:we,skewX:t=>ut(Math.atan(t[1])),skewY:t=>ut(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Se=t=>(t=t%360,t<0&&(t+=360),t),xn=we,Tn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),vr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:bn,scale:t=>(Tn(t)+bn(t))/2,rotateX:t=>Se(ut(Math.atan2(t[6],t[5]))),rotateY:t=>Se(ut(Math.atan2(-t[2],t[0]))),rotateZ:xn,rotate:xn,skewX:t=>ut(Math.atan(t[4])),skewY:t=>ut(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Ae(t,e){if(!t||t==="none")return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=vr,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=gr,s=a}if(!s)return Pe(e);const r=i[e],o=s[1].split(",").map(Tr);return typeof r=="function"?r(o):o[r]}const xr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ae(n,e)};function Tr(t){return parseFloat(t.trim())}const bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wt=new Set([...bt,"pathRotation"]),wn=t=>t===Tt||t===v,br=new Set(["x","y","z"]),wr=bt.filter(t=>!br.has(t));function Sr(t){const e=[];return wr.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-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})=>Ae(e,"x"),y:(t,{transform:e})=>Ae(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ct=new Set;let Ve=!1,Ce=!1,Me=!1;function Qi(){if(Ce){const t=Array.from(ct).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Sr(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Ce=!1,Ve=!1,ct.forEach(t=>t.complete(Me)),ct.clear()}function ts(){ct.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ce=!0)})}function Pr(){Me=!0,ts(),Qi(),Me=!1}class tn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ct.add(this),Ve||(Ve=!0,A.read(ts),A.resolveKeyframes(Qi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}yr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ct.delete(this)}cancel(){this.state==="scheduled"&&(ct.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ar=t=>t.startsWith("--");function es(t,e,n){Ar(e)?t.style.setProperty(e,n):t.style[e]=n}const Vr={};function ns(t,e){const n=Ei(t);return()=>Vr[e]??n()}const Cr=ns(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),is=ns(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Sn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pt([0,.65,.55,1]),circOut:Pt([.55,0,1,.45]),backIn:Pt([.31,.01,.66,-.59]),backOut:Pt([.33,1.53,.69,.99])};function ss(t,e){if(t)return typeof t=="function"?is()?qi(t,e):"ease-out":$i(t)?Pt(t):Array.isArray(t)?t.map(n=>ss(n,e)||Sn.easeOut):Sn[t]}function Mr(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=ss(a,s);Array.isArray(h)&&(u.easing=h);const f={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function os(t){return typeof t=="function"&&"applyToOptions"in t}function Er({type:t,...e}){return os(t)&&is()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class rs extends Qe{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ht(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Er(e);this.animation=Mr(n,i,s,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=te(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),es(n,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return W(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+W(e)}get time(){return W(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=U(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Cr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),G):s(this)}}const as={anticipate:ji,backInOut:Oi,circInOut:Ni};function Dr(t){return t in as}function Rr(t){typeof t.ease=="string"&&Dr(t.ease)&&(t.ease=as[t.ease])}const le=10;class Lr extends rs{constructor(e){Rr(e),Ji(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Xt({...o,autoplay:!1}),l=Math.max(le,I.now()-this.startTime),c=J(0,le,l-le),u=a.sample(l).value,{name:h}=this.options;r&&h&&es(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Pn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Y.test(t)||t==="0")&&!t.startsWith("url("));function kr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Br(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Pn(s,e),a=Pn(r,e);return Bt(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:kr(t)||(n==="spring"||os(n))&&i}function Ee(t){t.duration=0,t.type="keyframes"}const ls=new Set(["opacity","clipPath","filter","transform"]),Fr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Or(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Fr.test(t[e]))return!0;return!1}const jr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ir=Ei(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Nr(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Ir()&&n&&(ls.has(n)||jr.has(n)&&Or(a))&&(n!=="transform"||!u)&&!c&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Ur=40;class $r extends Qe{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.now();const f={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||tn;this.keyframeResolver=new d(a,(p,y,m)=>this.onKeyframesResolved(p,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=I.now();let h=!0;Br(e,r,o,a)||(h=!1,(it.instantAnimations||!l)&&u?.(te(e,i,n)),e[0]=e[e.length-1],Ee(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Ur?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=h&&!c&&Nr(d),y=d.motionValue?.owner?.current;let m;if(p)try{m=new Lr({...d,element:y})}catch{m=new Xt(d)}else m=new Xt(d);m.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function us(t,e,n,i=0,s=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const An=30,Kr=t=>!isNaN(parseFloat(t));class Wr{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=I.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Kr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Ri(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ge);const i=this.events[e].add(n);return e==="change"?()=>{i(),A.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>An)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,An);return Di(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 xt(t,e){return new Wr(t,e)}function cs(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function en(t,e){const n=t?.[e]??t?.default??t;return n!==t?cs(n,t):n}const Gr={type:"spring",stiffness:500,damping:25,restSpeed:10},_r=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Hr={type:"keyframes",duration:.8},zr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yr=(t,{keyframes:e})=>e.length>2?Hr:wt.has(t)?t.startsWith("scale")?_r(e[1]):Gr:zr,Xr=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qr(t){for(const e in t)if(!Xr.has(e))return!0;return!1}const nn=(t,e,n,i={},s,r)=>o=>{const a=en(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-U(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};qr(a)||Object.assign(u,Yr(t,u)),u.duration&&(u.duration=U(u.duration)),u.repeatDelay&&(u.repeatDelay=U(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ee(u),u.delay===0&&(h=!0)),(it.instantAnimations||it.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ee(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=te(u.keyframes,a);if(f!==void 0){A.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Xt(u):new $r(u)},Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jr(t){const e=Zr.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}const Qr=4;function hs(t,e,n=1){ht(n<=Qr,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Jr(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Vi(o)?parseFloat(o):o}return Ye(s)?hs(s,e,n+1):s}function Vn(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function fs(t,e,n,i){if(typeof e=="function"){const[s,r]=Vn(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Vn(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function gt(t,e,n){const i=t.getProps();return fs(i,e,n!==void 0?n:i.custom,t)}const ds=new Set(["width","height","top","left","right","bottom",...bt]),ta=t=>Array.isArray(t);function ea(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xt(n))}function na(t){return ta(t)?t[t.length-1]||0:t}function ia(t,e){const n=gt(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=na(r[o]);ea(t,o,a)}}const j=t=>!!(t&&t.getVelocity);function sa(t){return!!(j(t)&&t.add)}function De(t,e){const n=t.getValue("willChange");if(sa(n))return n.add(e);if(!n&&it.WillChange){const i=new it.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function sn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const oa="framerAppearId",ra="data-"+sn(oa);function ps(t){return t.props[ra]}function aa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function ms(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?cs(r,l):l;const c=r?.reduceMotion,u=r?.skipAnimations;i&&(r=i);const h=[],f=s&&t.animationState&&t.animationState.getState()[s],d=r?.path;d&&d.animateVisualElement(t,a,r,n,h);for(const p in a){const y=t.getValue(p,t.latestValues[p]??null),m=a[p];if(m===void 0||f&&aa(f,p))continue;const g={delay:n,...en(r||{},p)};u&&(g.skipAnimations=!0);const T=y.get();if(T!==void 0&&!y.isAnimating()&&!Array.isArray(m)&&m===T&&!g.velocity){A.update(()=>y.set(m));continue}let x=!1;if(window.MotionHandoffAnimation){const E=ps(t);if(E){const C=window.MotionHandoffAnimation(E,p,A);C!==null&&(g.startTime=C,x=!0)}}De(t,p);const S=c??t.shouldReduceMotion;y.start(nn(p,y,m,S&&ds.has(p)?{type:!1}:g,t,x));const P=y.animation;P&&h.push(P)}if(o){const p=()=>A.update(()=>{o&&ia(t,o)});h.length?Promise.all(h).then(p):p()}return h}function Re(t,e,n={}){const i=gt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(ms(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=s;return la(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function la(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Re(l,e,{...o,delay:n+(typeof i=="function"?0:i)+us(t.variantChildren,l,i,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ua(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>Re(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=Re(t,e,n);else{const s=typeof e=="function"?gt(t,e,n.custom):e;i=Promise.all(ms(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const ca={test:t=>t==="auto",parse:t=>t},ys=t=>e=>e.test(t),gs=[Tt,v,Z,tt,ko,Lo,ca],Cn=t=>gs.find(ys(t));function ha(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Mi(t):!0}const fa=new Set(["brightness","contrast","saturate","opacity"]);function da(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Xe)||[];if(!i)return t;const s=n.replace(i,"");let r=fa.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const pa=/\b([a-z-]*)\(.*?\)/gu,Le={...Y,getAnimatableNone:t=>{const e=t.match(pa);return e?e.map(da).join(" "):t}},ke={...Y,getAnimatableNone:t=>{const e=Y.parse(t);return Y.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Mn={...Tt,transform:Math.round},ma={rotate:tt,pathRotation:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:tt,skewX:tt,skewY:tt,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:Dt,originX:pn,originY:pn,originZ:v},qt={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,top:v,right:v,bottom:v,left:v,inset:v,insetBlock:v,insetBlockStart:v,insetBlockEnd:v,insetInline:v,insetInlineStart:v,insetInlineEnd:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,paddingBlock:v,paddingBlockStart:v,paddingBlockEnd:v,paddingInline:v,paddingInlineStart:v,paddingInlineEnd:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,marginBlock:v,marginBlockStart:v,marginBlockEnd:v,marginInline:v,marginInlineStart:v,marginInlineEnd:v,fontSize:v,backgroundPositionX:v,backgroundPositionY:v,...ma,zIndex:Mn,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:Mn},ya={...qt,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:Le,WebkitFilter:Le,mask:ke,WebkitMask:ke},vs=t=>ya[t],ga=new Set([Le,ke]);function xs(t,e){let n=vs(t);return ga.has(n)||(n=Y),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const va=new Set(["auto","none","0"]);function xa(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!va.has(r)&&vt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=xs(n,s)}class Ta extends tn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Ye(h))){const f=hs(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ds.has(i)||e.length!==2)return;const[s,r]=e,o=Cn(s),a=Cn(r),l=dn(s),c=dn(r);if(l!==c&&nt[i]){this.needsMeasurement=!0;return}if(o!==a)if(wn(o)&&wn(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else nt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||ha(e[s]))&&i.push(s);i.length&&xa(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const on=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ts(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const Be=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ba(t){return Ci(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:bs}=Ki(queueMicrotask,!1),wa={y:!1};function Sa(){return wa.y}function ws(t,e){const n=Ts(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function Pa(t){return!(t.pointerType==="touch"||Sa())}function Aa(t,e,n={}){const[i,s,r]=ws(t,n);return i.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",p)},h=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(m))},d=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},p=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}h(m)}},y=m=>{if(!Pa(m))return;l=!1;const g=e(o,m);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",p,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",d,s)}),r}const Ss=(t,e)=>e?t===e?!0:Ss(t,e.parentElement):!1,Va=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ca=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ma(t){return Ca.has(t.tagName)||t.isContentEditable===!0}const Kt=new WeakSet;function En(t){return e=>{e.key==="Enter"&&t(e)}}function ue(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ea=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=En(()=>{if(Kt.has(n))return;ue(n,"down");const s=En(()=>{ue(n,"up")}),r=()=>ue(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Dn(t){return Va(t)&&!0}const Rn=new WeakSet;function Da(t,e,n={}){const[i,s,r]=ws(t,n),o=a=>{const l=a.currentTarget;if(!Dn(a)||Rn.has(a))return;Kt.add(l),n.stopPropagation&&Rn.add(a);const c=e(l,a),u={...s,capture:!0},h=(p,y)=>{window.removeEventListener("pointerup",f,u),window.removeEventListener("pointercancel",d,u),Kt.has(l)&&Kt.delete(l),Dn(p)&&typeof c=="function"&&c(p,{success:y})},f=p=>{h(p,l===window||l===document||n.useGlobalTarget||Ss(l,p.target))},d=p=>{h(p,!1)};window.addEventListener("pointerup",f,u),window.addEventListener("pointercancel",d,u)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),ba(a)&&(a.addEventListener("focus",c=>Ea(c,s)),!Ma(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Ps(t){return Ci(t)&&"ownerSVGElement"in t}function Ra(t){return Ps(t)&&t.tagName==="svg"}const La=[...gs,L,Y],ka=t=>La.find(ys(t)),Ln=()=>({translate:0,scale:1,origin:0,originPoint:0}),yt=()=>({x:Ln(),y:Ln()}),kn=()=>({min:0,max:0}),k=()=>({x:kn(),y:kn()}),Ba=new WeakMap;function rn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ee(t){return typeof t=="string"||Array.isArray(t)}const Fa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oa=["initial",...Fa];function As(t){return rn(t.animate)||Oa.some(e=>ee(t[e]))}function ja(t){return!!(As(t)||t.variants)}function Ia(t,e,n){for(const i in e){const s=e[i],r=n[i];if(j(s))t.addValue(i,s);else if(j(r))t.addValue(i,xt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,xt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Fe={current:null},Vs={current:!1},Na=typeof window<"u";function Ua(){if(Vs.current=!0,!!Na)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Fe.current=t.matches;t.addEventListener("change",e),e()}else Fe.current=!1}const Bn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fn={};class $a{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){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=tn,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 d=I.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,A.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=As(n),this.isVariantNode=ja(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];c[d]!==void 0&&j(p)&&p.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Ba.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Vs.current||Ua(),this.shouldReduceMotion=Fe.current),process.env.NODE_ENV!=="production"&&Ri(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),st(this.notifyUpdate),st(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&ls.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new rs({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:U(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const i=wt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&A.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Fn){const n=Fn[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Bn.length;i++){const s=Bn[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Ia(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=xt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Vi(i)||Mi(i))?i=parseFloat(i):!ka(i)&&Y.test(n)&&(i=xs(e,n)),this.setBaseTarget(e,j(i)?i.get():i)),j(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=fs(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!j(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ge),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){bs.render(this.render)}}class Cs extends $a{constructor(){super(...arguments),this.KeyframeResolver=Ta}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ms({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ka({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Wa(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 ce(t){return t===void 0||t===1}function Oe({scale:t,scaleX:e,scaleY:n}){return!ce(t)||!ce(e)||!ce(n)}function at(t){return Oe(t)||Es(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Es(t){return On(t.x)||On(t.y)}function On(t){return t&&t!=="0%"}function Zt(t,e,n){const i=t-n,s=e*i;return n+s}function jn(t,e,n,i,s){return s!==void 0&&(t=Zt(t,s,i)),Zt(t,n,i)+e}function je(t,e=0,n=1,i,s){t.min=jn(t.min,e,n,i,s),t.max=jn(t.max,e,n,i,s)}function Ds(t,{x:e,y:n}){je(t.x,e.translate,e.scale,e.originPoint),je(t.y,n.translate,n.scale,n.originPoint)}const In=.999999999999,Nn=1.0000000000001;function Ga(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(X(t.x,-r.scroll.offset.x),X(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ds(t,o)),i&&at(r.latestValues)&&Wt(t,r.latestValues,r.layout?.layoutBox))}e.x<Nn&&e.x>In&&(e.x=1),e.y<Nn&&e.y>In&&(e.y=1)}function X(t,e){t.min+=e,t.max+=e}function Un(t,e,n,i,s=.5){const r=V(t.min,t.max,s);je(t,e,n,r,i)}function $n(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Wt(t,e,n){const i=n??t;Un(t.x,$n(e.x,i.x),e.scaleX,e.scale,e.originX),Un(t.y,$n(e.y,i.y),e.scaleY,e.scale,e.originY)}function Rs(t,e){return Ms(Wa(t.getBoundingClientRect(),e))}function _a(t,e,n){const i=Rs(t,n),{scroll:s}=e;return s&&(X(i.x,s.offset.x),X(i.y,s.offset.y)),i}const Ha={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},za=bt.length;function Ya(t,e,n){let i="",s=!0;for(let o=0;o<za;o++){const a=bt[o],l=t[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=Be(l,qt[a]);if(!c){s=!1;const h=Ha[a]||a;i+=`${h}(${u}) `}n&&(e[a]=u)}}const r=t.pathRotation;return r&&(s=!1,i+=`rotate(${Be(r,qt.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function an(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(wt.has(l)){o=!0;continue}else if(ze(l)){s[l]=c;continue}else{const u=Be(c,qt[l]);l.startsWith("origin")?(a=!0,r[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=Ya(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;i.transformOrigin=`${l} ${c} ${u}`}}function Ls(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function Kn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const q={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;const n=Kn(t,e.target.x),i=Kn(t,e.target.y);return`${n}% ${i}%`}},ks={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Y.parse(t);if(s.length>5)return i;const r=Y.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=V(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),r(s)}},Rt={borderRadius:{...q,applyTo:[...on]},borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomLeftRadius:q,borderBottomRightRadius:q,boxShadow:ks};function Bs(t){for(const e in t)Rt[e]=t[e],ze(e)&&(Rt[e].isCSSVariable=!0)}function Xa(t,{layout:e,layoutId:n}){return wt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Rt[t]||t==="opacity")}function Fs(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(j(i[o])||s&&j(s[o])||Xa(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function qa(t){return window.getComputedStyle(t)}class Za extends Cs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ls}readValueFromInstance(e,n){if(wt.has(n))return this.projection?.isProjecting?Pe(n):xr(e,n);{const i=qa(e),s=(ze(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Rs(e,n)}build(e,n,i){an(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return Fs(e,n,i)}}const Ja={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qa={offset:"strokeDashoffset",array:"strokeDasharray"};function tl(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?Ja:Qa;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const el=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Os(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(an(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of el)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&tl(h,s,r,o,!1)}const ln=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"]),js=t=>typeof t=="string"&&t.toLowerCase()==="svg";function nl(t,e,n,i){Ls(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(ln.has(s)?s:sn(s),e.attrs[s])}function il(t,e,n){const i=Fs(t,e,n);for(const s in t)if(j(t[s])||j(e[s])){const r=bt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class sl extends Cs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(wt.has(n)){const i=vs(n);return i&&i.default||0}return n=ln.has(n)?n:sn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return il(e,n,i)}build(e,n,i){Os(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){nl(e,n,i,s)}mount(e){this.isSVGTag=js(e.tagName),super.mount(e)}}function Ie(t,e){t.min=e.min,t.max=e.max}function z(t,e){Ie(t.x,e.x),Ie(t.y,e.y)}function Wn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Is=1e-4,ol=1-Is,rl=1+Is,Ns=.01,al=0-Ns,ll=0+Ns;function N(t){return t.max-t.min}function ul(t,e,n){return Math.abs(t-e)<=n}function Gn(t,e,n,i=.5){t.origin=i,t.originPoint=V(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ol&&t.scale<=rl||isNaN(t.scale))&&(t.scale=1),(t.translate>=al&&t.translate<=ll||isNaN(t.translate))&&(t.translate=0)}function Ct(t,e,n,i){Gn(t.x,e.x,n.x,i?i.originX:void 0),Gn(t.y,e.y,n.y,i?i.originY:void 0)}function _n(t,e,n,i=0){const s=i?V(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+N(e)}function cl(t,e,n,i){_n(t.x,e.x,n.x,i?.x),_n(t.y,e.y,n.y,i?.y)}function Hn(t,e,n,i=0){const s=i?V(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+N(e)}function Jt(t,e,n,i){Hn(t.x,e.x,n.x,i?.x),Hn(t.y,e.y,n.y,i?.y)}function zn(t,e,n,i,s){return t-=e,t=Zt(t,1/n,i),s!==void 0&&(t=Zt(t,1/s,i)),t}function hl(t,e=0,n=1,i=.5,s,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,i);t===r&&(a-=e),t.min=zn(t.min,e,n,a,s),t.max=zn(t.max,e,n,a,s)}function Yn(t,e,[n,i,s],r,o){hl(t,e[n],e[i],e[s],e.scale,r,o)}const fl=["x","scaleX","originX"],dl=["y","scaleY","originY"];function Xn(t,e,n,i){Yn(t.x,e,fl,n?n.x:void 0,i?i.x:void 0),Yn(t.y,e,dl,n?n.y:void 0,i?i.y:void 0)}function qn(t){return t.translate===0&&t.scale===1}function Us(t){return qn(t.x)&&qn(t.y)}function Zn(t,e){return t.min===e.min&&t.max===e.max}function pl(t,e){return Zn(t.x,e.x)&&Zn(t.y,e.y)}function Jn(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function $s(t,e){return Jn(t.x,e.x)&&Jn(t.y,e.y)}function Qn(t){return N(t.x)/N(t.y)}function ti(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function K(t){return[t("x"),t("y")]}function ml(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:h,rotateX:f,rotateY:d,skewX:p,skewY:y}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotate(${h}deg) `),f&&(i+=`rotateX(${f}deg) `),d&&(i+=`rotateY(${d}deg) `),p&&(i+=`skewX(${p}deg) `),y&&(i+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const yl=on.length,ei=t=>typeof t=="string"?parseFloat(t):t,ni=t=>typeof t=="number"||v.test(t);function gl(t,e,n,i,s,r){s?(t.opacity=V(0,n.opacity??1,vl(i)),t.opacityExit=V(e.opacity??1,0,xl(i))):r&&(t.opacity=V(e.opacity??1,n.opacity??1,i));for(let o=0;o<yl;o++){const a=on[o];let l=ii(e,a),c=ii(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ni(l)===ni(c)?(t[a]=Math.max(V(ei(l),ei(c),i),0),(Z.test(c)||Z.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,i))}function ii(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const vl=Ks(0,.5,Ii),xl=Ks(.5,.95,G);function Ks(t,e,n){return i=>i<t?0:i>e?1:n(Et(t,e,i))}function Tl(t,e,n){const i=j(t)?t:xt(t);return i.start(nn("",i,e,n)),i.animation}function bl(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const wl=(t,e)=>t.depth-e.depth;class Sl{constructor(){this.children=[],this.isDirty=!1}add(e){We(this.children,e),this.isDirty=!0}remove(e){_t(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(wl),this.isDirty=!1,this.children.forEach(e)}}function Pl(t,e){const n=I.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(st(i),t(r-e))};return A.setup(i,!0),()=>st(i)}function he(t){return j(t)?t.get():t}class Al{constructor(){this.members=[]}add(e){We(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(_t(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(_t(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Gt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fe=["","X","Y","Z"],Vl=1e3;let Cl=0;function de(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ws(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ps(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",A,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ws(i)}function Gs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Cl++,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,this.nodes.forEach(Dl),this.nodes.forEach(Ol),this.nodes.forEach(jl),this.nodes.forEach(Rl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Sl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ge),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ps(o)&&!Ra(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;A.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=Pl(f,250),Gt.hasAnimatedSinceResize&&(Gt.hasAnimatedSinceResize=!1,this.nodes.forEach(ri)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Kl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),g=!this.targetLayout||!$s(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...en(p,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T,x.path)}else h||ri(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),st(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(Il),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ws(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(kl),this.nodes.forEach(si);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(oi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Bl),this.nodes.forEach(Fl),this.nodes.forEach(Ml),this.nodes.forEach(El)):this.nodes.forEach(oi),this.clearAllSnapshots();const a=I.now();F.delta=J(0,1e3/60,a-F.timestamp),F.timestamp=a,F.isProcessing=!0,ie.update.process(F),ie.preRender.process(F),ie.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ll),this.sharedNodes.forEach(Nl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Us(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||at(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Wl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gl))){const{scroll:c}=this.root;c&&(X(a.x,c.offset.x),X(a.y,c.offset.y))}return a}removeElementScroll(o){const a=k();if(z(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&z(a,o),X(a.x,u.offset.x),X(a.y,u.offset.y))}return a}applyTransform(o,a=!1,l){const c=l||k();z(c,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(X(c.x,-h.scroll.offset.x),X(c.y,-h.scroll.offset.y)),at(h.latestValues)&&Wt(c,h.latestValues,h.layout?.layoutBox)}return at(this.latestValues)&&Wt(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=k();z(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!at(c.latestValues))continue;let u;c.instance&&(Oe(c.latestValues)&&c.updateSnapshot(),u=k(),z(u,c.measurePageBox())),Xn(a,c.latestValues,c.snapshot?.layoutBox,u)}return at(this.latestValues)&&Xn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==F.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=F.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):z(this.target,this.layout.layoutBox),Ds(this.target,this.targetDelta)):z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Oe(this.parent.latestValues)||Es(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),Jt(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===F.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Ga(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wn(this.prevProjectionDelta.x,this.projectionDelta.x),Wn(this.prevProjectionDelta.y,this.projectionDelta.y)),Ct(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ti(this.projectionDelta.x,this.prevProjectionDelta.x)||!ti(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yt(),this.projectionDelta=yt(),this.projectionDeltaWithTransform=yt()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},f=yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=k(),p=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=p!==y,g=this.getStack(),T=!g||g.members.length<=1,x=!!(m&&!T&&this.options.crossfade===!0&&!this.path.some($l));this.animationProgress=0;let S;const P=l?.interpolateProjection(o);this.mixTargetDelta=E=>{const C=E/1e3,w=P?.(C);w?(f.x.translate=w.x,f.x.scale=V(o.x.scale,1,C),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=w.y,f.y.scale=V(o.y.scale,1,C),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(ai(f.x,o.x,C),ai(f.y,o.y,C)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ul(this.relativeTarget,this.relativeTargetOrigin,d,C),S&&pl(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=k()),z(S,this.relativeTarget)),m&&(this.animationValues=h,gl(h,u,this.latestValues,C,x,T)),w&&w.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=w.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(st(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=A.update(()=>{Gt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Tl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&_s(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||k();const h=N(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}z(a,l),Wt(a,u),Ct(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Al),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&de("z",o,c,this.animationValues);for(let u=0;u<fe.length;u++)de(`rotate${fe[u]}`,o,c,this.animationValues),de(`skew${fe[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=he(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=he(a?.pointerEvents)||""),this.hasProjected&&!at(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=ml(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Rt){if(u[p]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:g}=Rt[p],T=h==="none"?u[p]:y(u[p],c);if(m){const x=m.length;for(let S=0;S<x;S++)o[m[S]]=T}else g?this.options.visualElement.renderState.vars[p]=T:o[p]=T}this.options.layoutId&&(o.pointerEvents=c===this?he(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(si),this.root.sharedNodes.clear()}}}function Ml(t){t.updateLayout()}function El(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")K(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(h);h.min=n[u].min,h.max=h.min+f});else if(s==="x"||s==="y"){const u=s==="x"?"y":"x";Ie(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else _s(s,e.layoutBox,n)&&K(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const o=yt();Ct(o,n,e.layoutBox);const a=yt();r?Ct(a,t.applyTransform(i,!0),e.measuredBox):Ct(a,n,e.layoutBox);const l=!Us(o);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=t.options.layoutAnchor||void 0,p=k();Jt(p,e.layoutBox,h.layoutBox,d);const y=k();Jt(y,n,f.layoutBox,d),$s(p,y)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Dl(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Rl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ll(t){t.clearSnapshot()}function si(t){t.clearMeasurements()}function kl(t){t.isLayoutDirty=!0,t.updateLayout()}function oi(t){t.isLayoutDirty=!1}function Bl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Fl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ri(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ol(t){t.resolveTargetDelta()}function jl(t){t.calcProjection()}function Il(t){t.resetSkewAndRotation()}function Nl(t){t.removeLeadSnapshot()}function ai(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function li(t,e,n,i){t.min=V(e.min,n.min,i),t.max=V(e.max,n.max,i)}function Ul(t,e,n,i){li(t.x,e.x,n.x,i),li(t.y,e.y,n.y,i)}function $l(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Kl={duration:.45,ease:[.4,0,.1,1]},ui=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ci=ui("applewebkit/")&&!ui("chrome/")?Math.round:G;function hi(t){t.min=ci(t.min),t.max=ci(t.max)}function Wl(t){hi(t.x),hi(t.y)}function _s(t,e,n){return t==="position"||t==="preserve-aspect"&&!ul(Qn(e),Qn(n),.2)}function Gl(t){return t!==t.root&&t.scroll?.wasRoot}const _l=Gs({attachResizeListener:(t,e)=>bl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),pe={current:void 0},Hl=Gs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!pe.current){const t=new _l({});t.mount(window),t.setOptions({layoutScroll:!0}),pe.current=t}return pe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),zl={some:0,all:1};function Hs(t,e,{root:n,margin:i,amount:s="some"}={}){const r=Ts(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const f=e(u.target,u);typeof f=="function"?o.set(u.target,f):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:i,threshold:typeof s=="number"?s:zl[s]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}const fi=(t,e)=>Math.abs(t-e);function Yl(t,e){const n=fi(t.x,e.x),i=fi(t.y,e.y);return Math.sqrt(n**2+i**2)}function zs({current:t}){return t?t.ownerDocument.defaultView:null}function Ne(t){if(t)return t.nodeType===3||t.nodeType===8?Ne(t.nextSibling):t}const[Xl,ql]=kt("Motion"),[Zl]=kt("LayoutGroup"),Jl={reducedMotion:"never",transition:void 0,nonce:void 0},[Ql]=kt("MotionConfig");function Ys(){return Ql(B.computed(()=>Jl))}var Xs=function(){},ne=function(){};process.env.NODE_ENV!=="production"&&(Xs=function(t,e){!t&&typeof console<"u"&&console.warn(e)},ne=function(t,e){if(!t)throw new Error(e)});const qs={motionAttribute:"data-ap"},Ue=[];function Zs(t){for(const e of t)e&&!Ue.includes(e)&&Ue.push(e)}function Js(t,e,n){if(Array.isArray(t))return t.reduce((i,s)=>{const r=Js(s,e,n);return r?{...i,...r}:i},{});if(typeof t=="object")return t;if(t&&e){const i=e[t];return typeof i=="function"?i(n):i}}function tu(t,e,n){const i=Js(t,e,n);if(!i)return;const{transition:s,transitionEnd:r,...o}=i;return{...o,...r}}function eu(t,e){const n=(t.initial===void 0&&t.variants?e?.initial:t.initial)===!1?["initial","animate"]:["initial"],i=t.custom??t.presenceContext?.custom;return n.reduce((s,r)=>({...s,...tu(t[r]||e?.[r],t.variants,i)}),{})}function Qs(t,e){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}var nu=new Set(["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]);function to(t){return nu.has(t)}const $e=new WeakMap;var iu=class{constructor(t,e){this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.features=new Map,this._context=null,this.options=t,this.parent=e,e?.children?.add(this),this.latestValues=eu(t,this.context),this.type=to(this.options.as)?"svg":"html"}get context(){return this._context||(this._context=new Proxy({},{get:(t,e)=>{const n=this.options[e];return ee(n)||e==="initial"&&n===!1?n:this.parent?.context[e]}})),this._context}updateFeatures(){if(this.visualElement)for(const t of Ue){this.features.has(t.key)||this.features.set(t.key,new t(this));const e=this.features.get(t.key);this.isMounted()&&(e.isMount?e.update():(e.mount(),e.isMount=!0))}}updateOptions(t){this.options=t,this.visualElement?.update({...this.options,whileTap:this.options.whilePress},this.options.presenceContext??null)}mount(t){ne(!!t,"Animation state must be mounted with valid Element"),$e.set(t,this),this.element=t;const e=this.options.presenceContext?.presenceId;e!==void 0&&t.setAttribute(qs.motionAttribute,e),this.visualElement?.mount(t),this.updateFeatures()}beforeUnmount(){this.getSnapshot(this.options,!1)}unmount(){this.parent?.children?.delete(this),$e.delete(this.element),this.features.forEach(t=>t.unmount?.()),this.visualElement?.unmount()}beforeUpdate(){this.getSnapshot(this.options,void 0)}update(){this.updateFeatures(),this.didUpdate()}tryExitComplete(){this.isExiting||this.options?.layoutId&&this.visualElement.projection?.currentAnimation?.state==="running"||this.options.presenceContext?.onMotionExitComplete?.(this.presenceContainer,this)}setActive(t,e){t==="exit"&&e&&(this.isExiting=!0),this.visualElement?.animationState?.setActive(t,e).then(()=>{t==="exit"&&e&&(this.isExiting=!1,this.options?.layoutId?A.postRender(()=>this.tryExitComplete()):this.tryExitComplete())})}isMounted(){return!!this.element}initVisualElement(t){this.visualElement||(this.visualElement=t(this.options.as,{presenceContext:this.options.presenceContext??null,parent:this.parent?.visualElement,props:{...this.options,whileTap:this.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.latestValues}},reducedMotionConfig:this.options.motionConfig?.reducedMotion}),this.visualElement.parent?.addChild(this.visualElement),this.isMounted()&&this.visualElement.mount(this.element))}getSnapshot(t,e){}didUpdate(){}},et=class{constructor(t){this.state=t}mount(){}unmount(){}update(){}};const eo=["initial","animate","exit","whileHover","whileDrag","whileFocus","whilePress"];var su=eo.length;function no(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?no(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<su;n++){const i=eo[n],s=t.props[i];(ee(s)||s===!1)&&(e[i]=s)}return e}var io=["animate","whileInView","whileFocus","whileHover","whilePress","whileDrag","exit"],ou=[...io].reverse(),ru=io.length;function rt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function di(){return{animate:rt(!0),whileInView:rt(),whileHover:rt(),whilePress:rt(),whileDrag:rt(),whileFocus:rt(),exit:rt()}}function au(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qs(e,t):!1}function pi(t){return Array.isArray(t)}function lu(t){return e=>Promise.all(e.map(({animation:n,options:i})=>ua(t,n,i)))}function uu(t){let e=lu(t),n=di(),i=!0;const s=l=>(c,u)=>{const h=gt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...p}=h;c={...c,...p,...d}}return c};function r(l){e=l(t)}function o(l){const{props:c}=t,u=no(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let m=0;m<ru;m++){const g=ou[m],T=n[g],x=c[g]!==void 0?c[g]:u[g],S=ee(x),P=g===l?T.isActive:null;P===!1&&(p=m);let E=x===u[g]&&x!==c[g]&&S;if(E&&i&&t.manuallyAnimateOnMount&&(E=!1),T.protectedKeys={...d},!T.isActive&&P===null||!x&&!T.prevProp||rn(x)||typeof x=="boolean")continue;const C=au(T.prevProp,x);let w=C||g===l&&T.isActive&&!E&&S||m>p&&S,O=!1;const b=Array.isArray(x)?x:[x];let D=b.reduce(s(g),{});P===!1&&(D={});const{prevResolvedValues:_={}}=T,ft={..._,...D},H=M=>{w=!0,f.has(M)&&(O=!0,f.delete(M)),T.needsAnimating[M]=!0;const $=t.getValue(M);$&&($.liveStyle=!1)};for(const M in ft){const $=D[M],ot=_[M];if(Object.hasOwnProperty.call(d,M))continue;let dt=!1;pi($)&&pi(ot)?dt=!Qs($,ot):dt=$!==ot,dt?$!=null?H(M):f.add(M):$!==void 0&&f.has(M)?H(M):T.protectedKeys[M]=!0}T.prevProp=x,T.prevResolvedValues=D,T.isActive&&(d={...d,...D}),i&&t.blockInitialAnimation&&(w=!1);const Q=E&&C;w&&(!Q||O)&&h.push(...b.map(M=>{const $={type:g};if(typeof M=="string"&&i&&!Q&&t.manuallyAnimateOnMount&&t.parent){const{parent:ot}=t,dt=gt(ot,M);if(ot.enteringChildren&&dt){const{delayChildren:po}=dt.transition||{};$.delay=us(ot.enteringChildren,t,po)}}return{animation:M,options:$}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const g=gt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(m.transition=g.transition)}f.forEach(g=>{const T=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),m[g]=T??null}),h.push({animation:m})}let y=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),i=!1,y?e(h):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>{h.animationState?.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=di(),i=!0}}}function so(t){return t.style.display==="none"||t.offsetParent===null&&window.getComputedStyle(t).position!=="fixed"}var cu=class extends et{static#t=this.key="animation";constructor(t){super(t);const e=t.visualElement;e.animationState||=uu(e)}updateAnimationControlsSubscription(){const{animate:t}=this.state.options;rn(t)&&(this.unmountControls=t.subscribe(this.state.visualElement))}mount(){so(this.state.element)?this.state.setActive("exit",!0):this.state.visualElement.animationState?.animateChanges(),this.updateAnimationControlsSubscription()}update(){this.state.visualElement.animationState?.animateChanges();const{animate:t}=this.state.visualElement.getProps(),{animate:e}=this.state.visualElement.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.state.visualElement.animationState.reset(),this.unmountControls?.()}};function hu(t,e){return to(t)?new sl(e):new Za(e)}function mi(t){return{point:{x:t.pageX,y:t.pageY}}}var fu=class extends et{static#t=this.key="press";constructor(t){super(t)}isActive(){const{whilePress:t,onPress:e,onPressCancel:n,onPressStart:i}=this.state.options;return!!(t||e||n||i)}register(){const t=this.state.element;!t||!this.isActive()||(this.removePress?.(),this.removePress=Da(t,(e,n)=>{const i=this.state.options;return this.state.setActive("whilePress",!0),i.onPressStart&&A.postRender(()=>i.onPressStart(n,mi(n))),(s,{success:r})=>{this.state.setActive("whilePress",!1);const o=r?"onPress":"onPressCancel",a=this.state.options[o];a&&A.postRender(()=>a(s,mi(s)))}},{useGlobalTarget:this.state.options.globalPressTarget}))}mount(){this.register()}update(){const t=this.state.visualElement.prevProps;!(t?.whilePress||t?.whileTap||t?.onPress||t?.onPressCancel||t?.onPressStart)&&this.isActive()&&this.register()}unmount(){this.removePress?.(),this.removePress=void 0}};function oo(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function Lt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function du(t){return e=>oo(e)&&t(e,Lt(e))}var pu=class extends et{static#t=this.key="hover";constructor(t){super(t)}isActive(){const{whileHover:t,onHoverStart:e,onHoverEnd:n}=this.state.options;return!!(t||e||n)}register(){const t=this.state.element;!t||!this.isActive()||(this.removeHover?.(),this.removeHover=Aa(t,(e,n)=>{const i=this.state.options;return this.state.setActive("whileHover",!0),i.onHoverStart&&A.postRender(()=>i.onHoverStart(n,Lt(n))),s=>{this.state.setActive("whileHover",!1);const r=this.state.options.onHoverEnd;r&&A.postRender(()=>r(s,Lt(s)))}}))}mount(){this.register()}update(){const t=this.state.visualElement.prevProps;!(t?.whileHover||t?.onHoverStart||t?.onHoverEnd)&&this.isActive()&&this.register()}unmount(){this.removeHover?.(),this.removeHover=void 0}},mu=class extends et{static#t=this.key="inView";constructor(t){super(t)}isActive(){const{whileInView:t,onViewportEnter:e,onViewportLeave:n}=this.state.options;return!!(t||e||n)}startObserver(){const t=this.state.element;if(!t||!this.isActive())return;this.removeObserver?.();const{once:e,...n}=this.state.options.inViewOptions||{};this.removeObserver=Hs(t,(i,s)=>{const r=this.state.options;if(this.state.setActive("whileInView",!0),r.onViewportEnter&&A.postRender(()=>r.onViewportEnter(s)),!e)return()=>{this.state.setActive("whileInView",!1);const o=this.state.options.onViewportLeave;o&&A.postRender(()=>o(s))}},n)}mount(){this.startObserver()}update(){const{props:t,prevProps:e}=this.state.visualElement;["amount","margin","root"].some(n=>t.inViewOptions?.[n]!==e?.inViewOptions?.[n])&&this.startObserver()}unmount(){this.removeObserver?.(),this.removeObserver=void 0}};function Qt(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}var yu=class extends et{static#t=this.key="focus";constructor(t){super(t),this.isFocused=!1}onFocus(){let t=!1;try{t=this.state.element.matches(":focus-visible")}catch{t=!0}t&&(this.state.setActive("whileFocus",!0),this.isFocused=!0)}onBlur(){this.isFocused&&(this.state.setActive("whileFocus",!1),this.isFocused=!1)}mount(){const t=this.state.element;this.removeFocus=Ft(Qt(t,"focus",()=>this.onFocus()),Qt(t,"blur",()=>this.onBlur()))}unmount(){this.removeFocus?.(),this.removeFocus=void 0}};function ro(t){if(t)return t.options.allowProjection!==!1?t.projection:ro(t.parent)}const ao={borderRadius:{...q,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomLeftRadius:q,borderBottomRightRadius:q,boxShadow:ks};function At(t){return typeof t=="object"&&t!==null&&"nodeType"in t}const gu=typeof window>"u";var vu=class extends et{static#t=this.key="projection";constructor(t){super(t),Bs(ao),gu||this.initProjection()}initProjection(){const t=this.state.options;this.state.visualElement.projection=new Hl(this.state.visualElement.latestValues,t["data-framer-portal-id"]?void 0:ro(this.state.visualElement.parent)),this.projection=this.state.visualElement.projection,this.projection.isPresent=!0,this.setOptions()}setOptions(){const t=this.state.options,{layoutId:e,layout:n,drag:i=!1,dragConstraints:s=!1}=t;this.projection?.setOptions({layout:n,layoutId:e,alwaysMeasureLayout:!!e||!!i||s&&At(s),visualElement:this.state.visualElement,animationType:typeof t.layout=="string"?t.layout:"both",layoutRoot:t.layoutRoot,layoutScroll:t.layoutScroll,crossfade:t.crossfade,onExitComplete:()=>{!this.projection?.isPresent&&this.state.options.layoutId&&!this.state.isExiting&&queueMicrotask(()=>{this.state.options.presenceContext?.onMotionExitComplete?.(this.state.presenceContainer,this.state)})}})}update(){this.setOptions()}mount(){this.projection?.mount(this.state.element)}};function Mt(t,e,n,i){return Qt(t,e,du(n),i)}var yi=new Set(["auto","scroll"]),lo=class{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=u=>{this.handleScroll(u.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=ye(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=Yl(u.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:d}=u,{timestamp:p}=F;this.history.push({...d,timestamp:p});const{onStart:y,onMove:m}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=me(h,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:f,onSessionEnd:d,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ye(u.type==="pointercancel"?this.lastMoveEventInfo:me(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,y),d&&d(u,y)},!oo(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=me(Lt(t),this.transformPagePoint),{point:a}=o,{timestamp:l}=F;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=e;c&&c(t,ye(o,this.history)),this.removeListeners=Ft(Mt(this.contextWindow,"pointermove",this.handlePointerMove),Mt(this.contextWindow,"pointerup",this.handlePointerUp),Mt(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}isScrollable(t){const e=window.getComputedStyle(t);return e.overflow==="auto"||e.overflow==="scroll"||e.overflowX==="auto"||e.overflowX==="scroll"||e.overflowY==="auto"||e.overflowY==="scroll"}startScrollTracking(t){let e=t.parentElement;for(;e;){const n=getComputedStyle(e);(yi.has(n.overflowX)||yi.has(n.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,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),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},s={x:i.x-e.x,y:i.y-e.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),A.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners?.(),this.scrollPositions.clear(),st(this.updatePoint)}};function me(t,e){return e?{point:e(t.point)}:t}function gi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ye({point:t},e){return{point:t,delta:gi(t,uo(e)),offset:gi(t,xu(e)),velocity:Tu(e,.1)}}function xu(t){return t[0]}function uo(t){return t[t.length-1]}function Tu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=uo(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>U(e)));)n--;if(!i)return{x:0,y:0};const r=W(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function vi(t){return(e,n)=>{t&&A.postRender(()=>t(e,n))}}var bu=class extends et{constructor(...t){super(...t),this.removePointerDownListener=G}static#t=this.key="pan";onPointerDown(t){this.session=new lo(t,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:zs(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:vi((t,e)=>{const{onPanSessionStart:n}=this.state.options;n&&n(t,e)}),onStart:vi((t,e)=>{const{onPanStart:n}=this.state.options;n&&n(t,e)}),onMove:(t,e)=>{const{onPan:n}=this.state.options;n&&n(t,e)},onEnd:(t,e)=>{const{onPanEnd:n}=this.state.options;delete this.session,n&&A.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=Mt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};function co(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}var xi=co("dragHorizontal"),Ti=co("dragVertical");function wu(t){let e=!1;if(t==="y")e=Ti();else if(t==="x")e=xi();else{const n=xi(),i=Ti();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function Su(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?V(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?V(n,t,i.max):Math.min(t,n)),t}const Ke=.35;function Pu(t,{top:e,left:n,bottom:i,right:s}){return{x:bi(t.x,n,s),y:bi(t.y,e,i)}}function bi(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Au(t=Ke){return t===!1?t=0:t===!0&&(t=Ke),{x:wi(t,"left","right"),y:wi(t,"top","bottom")}}function wi(t,e,n){return{min:Si(t,e),max:Si(t,n)}}function Si(t,e){return typeof t=="number"?t:t[e]||0}function Vu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function Cu(t,e){return{x:Pi(t.x,e.x),y:Pi(t.y,e.y)}}function Pi(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}}function Mu(t,e){let n=.5;const i=N(t),s=N(e);return s>i?n=Et(e.min,e.max-i,t.min):i>s&&(n=Et(t.min,t.max-s,e.min)),J(0,1,n)}const Eu=new WeakMap;var Du=class{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.state=t}get visualElement(){return this.state.visualElement}start(t,{snapToCursor:e=!1}={}){const n=l=>{e?this.stopAnimation():this.pauseAnimation(),e&&this.snapToCursor(Lt(l,"page").point)},i=(l,c)=>{this.stopAnimation();const{drag:u,dragPropagation:h,onDragStart:f}=this.getProps();u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=wu(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(d=>{let p=this.getAxisMotionValue(d).get()||0;if(Z.test(p)){const{projection:y}=this.visualElement;if(y&&y.layout){const m=y.layout.layoutBox[d];m&&(p=N(m)*(parseFloat(p)/100))}}this.originPoint[d]=p}),f&&A.postRender(()=>f(l,c)),De(this.visualElement,"transform"),this.state.setActive("whileDrag",!0))},s=(l,c)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:f,onDrag:d}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(h&&this.currentDirection===null){this.currentDirection=Ru(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),d&&d(l,c)},r=(l,c)=>this.stop(l,c),o=()=>K(l=>this.getAnimationState(l)==="paused"&&this.getAxisMotionValue(l).animation?.play()),{dragSnapToOrigin:a}=this.getProps();this.panSession=new lo(t,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:r,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,contextWindow:zs(this.visualElement),element:this.state.element})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&A.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:e}=this.getProps();!e&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.state.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Ut(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=Su(r,this.constraints[t],this.elastic[t])),s.set(r)}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&&At(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Pu(n.layoutBox,t):this.constraints=!1,this.elastic=Au(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&K(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Vu(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!At(t))return!1;const n=t;ne(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=_a(n,i.root,this.visualElement.getTransformPagePoint());let r=Cu(i.layout.layoutBox,s);if(e){const o=e(Ka(r));this.hasMutatedConstraints=!!o,o&&(r=Ms(o))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=K(c=>{if(!Ut(c,e,this.currentDirection))return;let u=a&&a[c]||{};r&&(u={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,d={type:"inertia",velocity:n?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(c,d)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return De(this.visualElement,t),n.start(nn(t,n,0,e,this.visualElement,!1))}stopAnimation(){this.visualElement.projection?.isPresent&&K(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){K(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){K(e=>{const{drag:n}=this.getProps();if(!Ut(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:r,max:o}=i.layout.layoutBox[e];s.set(t[e]-V(r,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!At(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const o=this.getAxisMotionValue(r);if(o&&this.constraints!==!1){const a=o.get();i[r]=Mu({min:a,max:a},this.constraints[r])}});const{transformTemplate:s}=this.visualElement.getProps();this.state.element.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),K(r=>{if(!Ut(r,t,null))return;const o=this.getAxisMotionValue(r),{min:a,max:l}=this.constraints[r];o.set(V(a,l,i[r]))})}addListeners(){if(!this.state.element)return;Eu.set(this.visualElement,this);const t=this.state.element,e=Mt(t,"pointerdown",a=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(a)}),n=()=>{const{dragConstraints:a}=this.getProps();At(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(n);const r=Qt(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:l})=>{this.isDragging&&l&&(K(c=>{const u=this.getAxisMotionValue(c);u&&(this.originPoint[c]+=a[c].translate,u.set(u.get()+a[c].translate))}),this.visualElement.render())}));return()=>{r(),e(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=Ke,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:o}}};function Ut(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ru(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}var Lu=class extends et{static#t=this.key="drag";constructor(t){super(t),this.removeGroupControls=G,this.removeListeners=G,this.controls=new Du(t)}mount(){const{dragControls:t}=this.state.options;t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}unmount(){this.removeGroupControls(),this.removeListeners()}},St=!1,ku=class extends et{static#t=this.key="layout";constructor(t){super(t),this.hasMountSettled=!1,Bs(ao),t.getSnapshot=this.getSnapshot.bind(this),t.didUpdate=this.didUpdate.bind(this)}updatePrevLead(t){const e=t.getStack();e?.prevLead&&!e.prevLead.snapshot&&(e.prevLead.willUpdate(),St=!0)}didUpdate(){St&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(St=!1,this.state.visualElement.projection?.root?.didUpdate())}mount(){const t=this.state.options,e=this.state.options.layoutGroup;if(t.layout||t.layoutId){const n=this.state.visualElement.projection;if(t.layoutId){const i=!so(this.state.element);n.isPresent=i,i?n.promote():n.relegate(),this.updatePrevLead(n)}e?.group?.add(n),Gt.hasEverUpdated=!0}this.didUpdate(),A.postRender(()=>{this.hasMountSettled=!0})}unmount(){const t=this.state.options.layoutGroup,e=this.state.visualElement.projection;e&&(t?.group&&(this.state.options.layout||this.state.options.layoutId)&&t.group.remove(e),this.state.options.layoutId&&(St=!0),this.didUpdate())}getSnapshot(t,e){const n=this.state.visualElement.projection,{drag:i,layoutDependency:s,layout:r,layoutId:o}=t;if(!n||!r&&!o&&!i||!this.hasMountSettled)return;St=!0;const a=this.state.options;(i||a.layoutDependency!==s||s===void 0||un.isDef(e)&&n.isPresent!==e)&&n.willUpdate(),un.isDef(e)&&e!==n.isPresent&&(n.isPresent=e,e?(n.promote(),this.updatePrevLead(n)):n.relegate())}};const Bu={renderer:hu,features:[cu,fu,pu,mu,yu,vu,bu,Lu,ku]},[Fu]=kt("LazyMotionContext"),[Ou,ju]=kt("AnimatePresenceContext");function Iu(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function ho(){return{transform:{},transformOrigin:{},style:{},vars:{}}}function Nu(){return{...ho(),attrs:{}}}function Uu(t){const e=ho();an(e,t);const n={...e.style};for(const i in e.vars)n[i]=e.vars[i];return Object.keys(n).length===0?null:n}function $u(t,e,n){const i=Nu();Os(i,t,js(e),void 0,n);const s={};for(const r in i.attrs){const o=ln.has(r)?r:Iu(r);s[o]=i.attrs[r]}return{attrs:s,style:{...i.style,...i.vars}}}function Ku(t,e){const n=Xl(null),i=Zl({}),s=Ys(),r=Ou({}),o=Fu({features:B.ref({}),strict:!1});if(process.env.NODE_ENV!=="production"&&e&&o.strict){const d="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Xs(!1,d):ne(!1,d)}const a=B.useAttrs();function l(){return mo(t,{layoutGroup:i,presenceContext:r,config:s.value})}function c(){return{...a,...l()}}const u=new iu(c(),n);ql(u),e&&u.initVisualElement(e),B.watch(o.features,d=>{d.features?.length&&Zs(d.features),d.renderer&&u.initVisualElement(d.renderer),u.updateFeatures()},{immediate:!0,flush:"pre"});function h(){const d=u.type==="svg",p={...a};Object.keys(a).forEach(T=>{j(a[T])&&(p[T]=a[T].get())});const y=u.visualElement?.latestValues||u.latestValues;let m={...t.style,...d?{}:y};for(const T in m)j(m[T])&&(m[T]=m[T].get());if(d){const{attrs:T,style:x}=$u({...y,...m},u.options.as,t.style);Object.assign(p,T),m=x}t.drag&&t.dragListener!==!1&&Object.assign(m,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const g=Uu(m);return g&&(p.style=g),p}const f=B.getCurrentInstance().proxy;return B.onMounted(()=>{const d=Ne(f.$el);u.mount(d)}),B.onBeforeUnmount(()=>u.beforeUnmount()),B.onUnmounted(()=>{Ne(f.$el)?.isConnected||u.unmount()}),B.onBeforeUpdate(()=>{u.beforeUpdate(),u.updateOptions(c())}),B.onUpdated(()=>{u.update()}),{getProps:l,getAttrs:h,layoutGroup:i,state:u}}const Wu={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object]},whilePress:{type:[String,Array,Object]},whileInView:{type:[String,Array,Object]},whileFocus:{type:[String,Array,Object]},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};var Gu=new Map,_u=new Map;function Hu(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}var zu=["area","img","input"];function Yu(t,e,n){if(typeof t=="string"&&zu.includes(t))return B.h(t,e);if(t==="template"){if(!n.default)return null;const i=Hu(n.default()),s=i.findIndex(l=>l.type!==B.Comment);if(s===-1)return i;const r=i[s];delete r.props?.ref;const o=r.props?B.mergeProps(e,r.props):e;e.class&&r.props?.class&&delete r.props.class;const a=B.cloneVNode(r,o);for(const l in o)l.startsWith("on")&&(a.props||={},a.props[l]=o[l]);return i.length===1?a:(i[s]=a,i)}return null}function Ai(t,e={}){const n=typeof t=="string",i=n?t:t.name||"",s=e.renderer?Gu:_u;if(n&&s?.has(t))return s.get(t);const r=B.defineComponent({inheritAttrs:!1,props:{...Wu,as:{type:[String,Object],default:t||"div"}},name:i?`motion.${i}`:"Motion",setup(o,{slots:a}){const{getProps:l,getAttrs:c,state:u}=Ku(o,e.renderer);function h(){const f=u.element;if((typeof o.as!="object"||o.asChild)&&f){const{style:d}=c();if(d)for(const[p,y]of Object.entries(d))f.style[p]=y}}return()=>{const f=l(),d=c(),p=o.asChild?"template":o.as,y={...o.forwardMotionProps?f:{},...d,onVnodeUpdated:h},m=Yu(p,y,a);return m!==null?m:B.h(p,{...y},a)}}});return n&&s?.set(t,r),r}function Xu(t){const e=t?.renderer;return Zs(t?.features||[]),new Proxy({},{get(n,i){return i==="create"?(s,r)=>Ai(s,{...r,renderer:e}):Ai(i,{renderer:e})}})}const fo=Xu(Bu);fo.create("div");exports.frame=A;exports.inView=Hs;exports.motion=fo;exports.motionGlobalConfig=qs;exports.mountedStates=$e;exports.provideAnimatePresence=ju;exports.useMotionConfig=Ys;
package/lib/index.d.ts CHANGED
@@ -10,9 +10,11 @@ import { GPie3D } from './components/GPie3D';
10
10
  import { GRing } from './components/GRing';
11
11
  import { GInputTreeTag } from './components/GInputTreeTag';
12
12
  import { GFuzzyText } from './components/GFuzzyText';
13
- import { GCard } from './components/GCard';
13
+ import { GCard, cardPresets, CardPreset } from './components/GCard';
14
+ import { GScroller } from './components/GScroller';
14
15
  declare const _default: {
15
16
  install: (app: any) => void;
16
17
  };
17
18
  export default _default;
18
- export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo, GPie3D, GRing, GInputTreeTag, GFuzzyText, GCard };
19
+ export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo, GPie3D, GRing, GInputTreeTag, GFuzzyText, GCard, cardPresets, GScroller };
20
+ export type { CardPreset };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekin-devtoys",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "author": "leon",
5
5
  "license": "MIT",
6
6
  "description": "geekin-devtoys组件库",
@@ -13,13 +13,13 @@
13
13
  "lib": "vite build && node update-exports.js"
14
14
  },
15
15
  "peerDependencies": {
16
- "vue": "^3.5.0",
17
- "element-plus": "^2.0.0",
16
+ "@vueuse/core": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
18
17
  "axios": "^1.0.0",
19
18
  "crypto-js": "^4.0.0",
19
+ "element-plus": "^2.0.0",
20
20
  "jsencrypt": "^3.0.0",
21
21
  "sortablejs": "^1.15.0",
22
- "@vueuse/core": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0"
22
+ "vue": "^3.5.0"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "axios": {
@@ -38,7 +38,9 @@
38
38
  "optional": true
39
39
  }
40
40
  },
41
- "dependencies": {},
41
+ "dependencies": {
42
+ "motion-v": "^2.3.0"
43
+ },
42
44
  "devDependencies": {
43
45
  "@babel/core": "^7.12.16",
44
46
  "core-js": "^3.8.3",
@@ -152,6 +154,14 @@
152
154
  "import": "./lib/GScreen/style.css",
153
155
  "require": "./lib/GScreen/style.css"
154
156
  },
157
+ "./GScroller": {
158
+ "import": "./lib/GScroller/index.mjs",
159
+ "require": "./lib/GScroller/index.js"
160
+ },
161
+ "./GScroller/style": {
162
+ "import": "./lib/GScroller/style.css",
163
+ "require": "./lib/GScroller/style.css"
164
+ },
155
165
  "./GTable": {
156
166
  "import": "./lib/GTable/index.mjs",
157
167
  "require": "./lib/GTable/index.js"