motion-dom 14.8.0 → 14.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +76 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/animation/NativeAnimation.mjs +8 -5
- package/dist/es/animation/NativeAnimation.mjs.map +1 -1
- package/dist/es/animation/NativeAnimationWrapper.mjs +2 -1
- package/dist/es/animation/NativeAnimationWrapper.mjs.map +1 -1
- package/dist/es/animation/waapi/transforms/TransformAnimation.mjs +16 -5
- package/dist/es/animation/waapi/transforms/TransformAnimation.mjs.map +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +35 -19
- package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -1
- package/dist/es/gestures/drag/index.mjs.map +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +7 -4
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -1
- package/dist/es/render/VisualElement.mjs +7 -2
- package/dist/es/render/VisualElement.mjs.map +1 -1
- package/dist/index.d.ts +1667 -1610
- package/dist/motion-dom.dev.js +76 -37
- package/dist/motion-dom.js +1 -1
- package/package.json +2 -2
package/dist/motion-dom.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n={delta:0,timestamp:0,isProcessing:!1};let i;function s(){i=void 0}const o={now:()=>(void 0===i&&o.set(n.isProcessing||e.MotionGlobalConfig.useManualTiming?n.timestamp:performance.now()),i),set:t=>{i=t,queueMicrotask(s)}},r=t=>Math.round(1e5*t)/1e5,a=t=>e=>"string"==typeof e&&e.startsWith(t),l=a("--"),c=a("var(--"),u=t=>!!c(t)&&h.test(t.split("/*")[0].trim()),h=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function d(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const p={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...p,transform:t=>e.clamp(0,1,t)},f={...p,default:1},g=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v=(t,e)=>n=>Boolean("string"==typeof n&&y.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),x=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(g);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},w={...p,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},T={test:v("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+w.transform(t)+", "+w.transform(e)+", "+w.transform(n)+", "+r(m.transform(i))+")"},S=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const b={test:v("#"),parse:function(t){const e=t.length>5?2:1,n=S(t,3,e);return{red:parseInt(S(t,0,e),16),green:parseInt(S(t,1,e),16),blue:parseInt(S(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:T.transform},P=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=P("deg"),M=P("%"),E=P("px"),V=P("vh"),D=P("vw"),k=(()=>({...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)}))(),C={test:v("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+M.transform(r(e))+", "+M.transform(r(n))+", "+r(m.transform(i))+")"},R={test:t=>T.test(t)||b.test(t)||C.test(t),parse:t=>T.test(t)?T.parse(t):C.test(t)?C.parse(t):b.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?T.transform(t):C.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},B=new RegExp(g.source),j=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const L="number",O="color",F=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function I(t){const e=t.toString();return B.test(e)||j.test(e)}function U(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(F,t=>(R.test(t)?(i.color.push(o),s.push(O),n.push(R.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(L),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function N({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===L?r(i[o]):t===O?R.transform(i[o]):i[o]}return s}}const W=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:R.test(n)?R.getAnimatableNone(n):n;var n};const $={test:function(t){return isNaN(t)&&"string"==typeof t&&(B.test(t)||j.test(t))},parse:function(t){return U(t).values},createTransformer:function(t){return N(U(t))},getAnimatableNone:function(t){const e=U(t);return N(e)(e.values.map((t,n)=>W(t,e.split[n])))}};function K(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function z({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=K(a,i,t+1/3),o=K(a,i,t),r=K(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function G(t,e){return n=>n>0?e:t}const Y=(t,e,n)=>t+(e-t)*n,X=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},q=[b,T,C];function H(t){const e=(n=t,q.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===C&&(i=z(i)),i}const _=(t,e)=>{const n=H(t),i=H(e);if(!n||!i)return G(t,e);const s={...n};return t=>(s.red=X(n.red,i.red,t),s.green=X(n.green,i.green,t),s.blue=X(n.blue,i.blue,t),s.alpha=Y(n.alpha,i.alpha,t),T.transform(s))},Z=new Set(["none","hidden"]);function J(t,e){return Z.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Q(t,e){return n=>Y(t,e,n)}function tt(t){return"number"==typeof t?Q:"string"==typeof t?u(t)?G:R.test(t)?_:it:Array.isArray(t)?et:"object"==typeof t?R.test(t)?_:nt:G}function et(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>tt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function nt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=tt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const it=(t,n)=>{const i=U(t),s=U(n);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?Z.has(t)&&!s.values.length||Z.has(n)&&!i.values.length?J(t,n):e.pipe(et(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),N(s)):G(t,n)},st=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ot(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Y(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=st.exec(t);if(!n)return;const i=st.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),a=parseFloat(i[1]);return t=>r(Y(o,a,t))+s}(t,e);if(n)return n}return tt(t)(t,e)}const rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function at(t,n,i={delta:0,timestamp:0,isProcessing:!1}){let s=!1,o=!0;const r=()=>s=!0,a=rt.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=e.MotionGlobalConfig.useManualTiming,a=r?i.timestamp:performance.now();s=!1,r||(i.delta=o?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),m.process(i),f.process(i),i.isProcessing=!1,s&&n&&(o=!1,t(g))};return{schedule:rt.reduce((e,n)=>{const r=a[n];return e[n]=(e,n=!1,a=!1)=>(s||(s=!0,o=!0,i.isProcessing||t(g)),r.schedule(e,n,a)),e},{}),cancel:t=>{for(let e=0;e<rt.length;e++)a[rt[e]].cancel(t)},state:i,steps:a}}const{schedule:lt,cancel:ct,steps:ut}=at("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0,n),ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>lt.update(e,t),stop:()=>ct(e),now:()=>n.isProcessing?n.timestamp:o.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pt=2e4;function mt(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function ft(t,n=100,i){const{keyframes:s,velocity:o}=t,r=s&&s[s.length-1]-s[0],a=i({...t,velocity:o&&r?o*n/r:o,keyframes:[0,n]}),l=Math.min(mt(a),pt);return{type:"keyframes",ease:t=>a.next(l*t).value/n,duration:e.millisecondsToSeconds(l)}}const gt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function yt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return wt(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function vt(t,e){return t*Math.sqrt(1-e*e)}const xt=12;function wt(t,e,n){let i=n;for(let n=1;n<xt;n++)i-=t(i)/e(i);return i}const Tt=.001;const St=(t,e)=>(e?t>=0:t>0)&&t<1/0;function bt(t,e){if(St(t,e))return t}function Pt(t){const n=bt(t.stiffness),i=bt(t.damping,!0),s=bt(t.mass),o={...t,stiffness:n??100,damping:i??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??i??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=gt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*yt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:n=.3}){let i,s;const o=gt(n);t=e.clamp(.01,10,e.millisecondsToSeconds(t)),o<1?(i=e=>{const n=e*o,i=n*t,s=vt(e,o),r=Math.exp(-i);return Tt-n/s*r},s=e=>{const n=e*o*t,s=o*o*e*e*t,r=Math.exp(-n),a=vt(e*e,o);return(-i(e)+Tt>0?-1:1)*-s*r/a}):(i=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=wt(i,s,5/t),a=r*yt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:e.secondsToMilliseconds(t)}}(o)),o.isResolvedFromDuration=!0;St(o.stiffness)&&St(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function At(t=.3,n=.3){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,isResolvedFromDuration:h,isTimeDefined:d}=Pt({...i}),p=t=>d?0:-e.millisecondsToSeconds(t),m=l/(2*Math.sqrt(a*c)),f=e.millisecondsToSeconds(Math.sqrt(a/c)),g=m*f,y={target:o,delta:o-s,velocity:p(i.velocity||0)||0,restSpeed:0,restDelta:0},v=()=>{const t=Math.abs(y.delta)<5;y.restSpeed=i.restSpeed||(t?.01:2),y.restDelta=i.restDelta||(t?.005:.5)};let x,w,T;if(v(),m<1){const t=vt(f,m),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=()=>{e.A=(y.velocity+g*y.delta)/t,e.sinC=g*e.A+y.delta*t,e.cosC=g*y.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-g*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};x=t=>(n(t),y.target-e.env*(e.A*e.sin+y.delta*e.cos)),w=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===m){x=t=>y.target-Math.exp(-f*t)*(y.delta+(y.velocity+f*y.delta)*t);const t={C:0};T=()=>{t.C=y.velocity+f*y.delta},w=e=>Math.exp(-f*e)*(f*t.C*e-y.velocity)}else{const t=f*Math.sqrt(m*m-1),e=g-t,n=g+t,i=t<1||d?1/0:300/t,s=(t,e)=>Math.exp(e>i?(g-t)*i-g*e:-t*e),o={S:0,F:0};T=()=>{const e=(y.velocity+g*y.delta)/t;o.S=(y.delta+e)/2,o.F=(y.delta-e)/2},x=t=>y.target-o.S*s(e,t)-o.F*s(n,t),w=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}T();const S=h&&u||null,b={calculatedDuration:S,retarget:(t,e)=>{y.target=t[t.length-1],y.delta=y.target-t[0],y.velocity=p(e),i.restSpeed&&i.restDelta||v(),b.calculatedDuration=S,r.done=!1,T()},velocity:t=>e.secondsToMilliseconds(w(t)),next:t=>{const n=x(t);if(h)r.done=t>=u;else{const i=e.secondsToMilliseconds(w(t));r.done=Math.abs(i)<=y.restSpeed&&Math.abs(y.target-n)<=y.restDelta}return r.value=r.done?y.target:n,r},toString:()=>{const t=Math.min(mt(b),pt),e=dt(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}const Mt=Object.assign(At,{applyToOptions:t=>{const n=ft(t,100,At);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t}});function Et({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=Mt({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function Vt(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=e.MotionGlobalConfig.mix||ot,r=t.length-1;for(let a=0;a<r;a++){let r=i?.(t[a],t[a+1])||o(t[a],t[a+1]);if(n){const t=Array.isArray(n)?n[a]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),c=l.length,u=i=>{if(a&&i<t[0])return n[0];let s=0;if(c>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>u(e.clamp(t[0],t[r-1],n)):u}function Dt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(Y(i,1,o))}}function kt(t){const e=[0];return Dt(e,t.length-1),e}function Ct(t,e){return t.map(t=>t*e)}function Rt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut",mixer:o}){const r="number"==typeof n[0]?void 0:o,a=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s)||e.easeInOut,l={done:!1,value:n[0]};if(!r&&2===n.length&&!Array.isArray(a)&&(!i||2!==i.length||0===i[0]&&1===i[1])){const[i,s]=n,o=i===s?void 0:(e.MotionGlobalConfig.mix||ot)(i,s);return{calculatedDuration:t,next:n=>(l.value=o?o(a(t>0?e.clamp(0,1,n/t):1)):s,l.done=n>=t,l)}}const c=Vt(Ct(i&&i.length===n.length?i:kt(n),t),n,{ease:Array.isArray(a)?a:Rt(n,a),mixer:r});return{calculatedDuration:t,next:e=>(l.value=c(e),l.done=e>=t,l)}}function jt(t,n,i=0){return n<=0?i:t.velocity?t.velocity(n):function(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}(e=>t.next(e).value,n,t.next(n).value)}const Lt=t=>null!==t;function Ot(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Lt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ft={decay:Et,inertia:Et,tween:Bt,keyframes:Bt,spring:Mt};function It(t){"string"==typeof t.type&&(t.type=Ft[t.type])}const Ut=(t,n)=>n-t>40&&!e.MotionGlobalConfig.useManualTiming?n:t;function Nt(t,e){return{kind:t,animation:e,timestamp:o.now(),frameTimestamp:n.timestamp,frameIsProcessing:n.isProcessing}}function Wt(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Nt("animation-start",t),options:n?{...e,...n}:e})}catch{}}class $t{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Kt=t=>t/100,zt=t=>Math.round(1e4*t)/1e4;class Gt extends $t{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==o.now()&&this.tick(o.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Wt(this,this.options)}initAnimation(){const{options:t}=this;It(t);const{type:n=Bt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Bt;this.mixKeyframes=void 0,l!==Bt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(Kt,t.mixer?.(a[0],a[1])||ot(a[0],a[1])),a=[0,100]);const c=l(a===t.keyframes?t:{...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===c.calculatedDuration&&(c.calculatedDuration=mt(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Ut(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==Et&&(d.value=Ot(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??zt((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==Et?Ot(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,n){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=i;if(c){const n=Math.min(t,s)/a;let i=Math.floor(n),o=n%1;!o&&n>=1&&(o=1),1===o&&i--,i=Math.min(i,c+1);Boolean(i%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=e.clamp(0,1,o)*a}return n?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!n&&(d.value=o(d.value)),d}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){return this.duration+e.millisecondsToSeconds(this.options.delay??0)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return jt(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(o.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(o.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Yt=new Set(["brightness","contrast","saturate","opacity"]);function Xt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(g)||[];if(!i)return t;const s=n.replace(i,"");let o=Yt.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const qt=/\b([a-z-]*)\(.*?\)/gu,Ht={...$,getAnimatableNone:t=>{const e=t.match(qt);return e?e.map(Xt).join(" "):t}},_t={...$,getAnimatableNone:t=>{const e=$.parse(t);return $.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Zt={...p,transform:Math.round},Jt={rotate:A,pathRotation:A,rotateX:A,rotateY:A,rotateZ:A,scale:f,scaleX:f,scaleY:f,scaleZ:f,skew:A,skewX:A,skewY:A,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:m,originX:k,originY:k,originZ:E},Qt={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...Jt,zIndex:Zt,fillOpacity:m,strokeOpacity:m,numOctaves:Zt},te={...Qt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Ht,WebkitFilter:Ht,mask:_t,WebkitMask:_t},ee=t=>te[t],ne=new Set([Ht,_t]);function ie(t,e){let n=ee(t);return ne.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function se(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const oe=t=>180*t/Math.PI,re=t=>{const e=oe(Math.atan2(t[1],t[0]));return le(e)},ae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:re,rotateZ:re,skewX:t=>oe(Math.atan(t[1])),skewY:t=>oe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},le=t=>((t%=360)<0&&(t+=360),t),ce=t=>Math.hypot(t[0],t[1]),ue=t=>Math.hypot(t[4],t[5]),he={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ce,scaleY:ue,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(ce(t)+ue(t))/2,rotateX:t=>le(oe(Math.atan2(t[6],t[5]))),rotateY:t=>le(oe(Math.atan2(-t[2],t[0]))),rotateZ:re,rotate:re,skewX:t=>oe(Math.atan(t[4])),skewY:t=>oe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function de(t){return t.includes("scale")?1:0}function pe(t,e){if(!t||"none"===t)return de(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return de(e);const i=(n[1]?he:ae)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const me=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return pe(n,e)},fe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=(()=>new Set([...fe,"pathRotation"]))(),ye=t=>t===p||t===E,ve=new Set(["x","y","z"]),xe=fe.filter(t=>!ve.has(t));const we=new Set(["bottom","right"]);function Te(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const Se=({transform:t})=>pe(t,"x"),be=({transform:t})=>pe(t,"y"),Pe={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>Te(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>Te(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:Se,y:be,translateX:Se,translateY:be},Ae=new Set;let Me=!1,Ee=!1,Ve=!1;function De(){if(Ee){const t=[],e=new Set,n=new Set;Ae.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),we.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return xe.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ee=!1,Me=!1,Ae.forEach(t=>t.complete(Ve)),Ae.clear()}function ke(){Ae.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function Ce(){Ve=!0,ke(),De(),Ve=!1}class Re{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ae.add(this),Me||(Me=!0,lt.read(ke),lt.resolveKeyframes(De))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(null===t[0]){const o=s?.get(),r=t[t.length-1];if(void 0!==o)t[0]=o;else if(i&&n){const s=function(t,n,i){if("string"==typeof t){if(e.isNumericalString(t)||e.isZeroValueString(t))return parseFloat(t);if(!$.test(t)&&$.test(i))return ie(n,i)}return t??void 0}(i.readValue(n,r),n,r);void 0!==s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===o&&s.set(t[0])}se(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ae.delete(this)}cancel(){"scheduled"===this.state&&(Ae.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Be=t=>t.startsWith("--");function je(t,e,n){Be(e)?t.style.setProperty(e,n):t.style[e]=n}const Le={};function Oe(t,n){const i=e.memo(t);return()=>Le[n]??i()}const Fe=Oe(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ie=Oe(()=>void 0!==window.ViewTimeline,"viewTimeline"),Ue=Oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ne=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,We={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ne([0,.65,.55,1]),circOut:Ne([.55,0,1,.45]),backIn:Ne([.31,.01,.66,-.59]),backOut:Ne([.33,1.53,.69,.99])};function $e(t,n){return t?"function"==typeof t?Ue()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ne(t):Array.isArray(t)?t.map(t=>$e(t,n)||We.easeOut):We[t]:void 0}function Ke(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=$e(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function ze(t){return"function"==typeof t&&"applyToOptions"in t}function Ge({type:t,...e}){return ze(t)&&Ue()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ye extends $t{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=Ge(t);this.animation=Ke(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ot(i,this.options,r,this.speed);this.updateMotionValue?.(t),je(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Wt(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){const n=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Fe()?(this.animation.timeline=t,n?.(this.animation),e.noop):i(this)}}const Xe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function qe(t){"string"==typeof t.ease&&t.ease in Xe&&(t.ease=Xe[t.ease])}const He=10;class _e extends Ye{constructor(t){qe(t),It(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(o.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Gt({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:n,element:i,name:s}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?e.clamp(0,10,r):0,l=this.sample(r);i&&s&&je(i,s,l),n.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Ze=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$.test(t)&&"0"!==t||t.startsWith("url(")));function Je(t){t.duration=0,t.type="keyframes"}const Qe=new Set(["opacity","clipPath","filter","transform"]),tn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const en=({mixer:t,keyframes:e})=>t&&"number"!=typeof e[0]&&e.some((n,i)=>i&&t(e[i-1],n)),nn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sn=()=>!e.MotionGlobalConfig.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function on(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Qe.has(n)&&!nn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return sn()&&(Qe.has(n)||nn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&tn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r&&!en(t)}const rn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,an={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ln=fe.length,cn={},un=(t,e,n=rn(e,Jt[t]))=>(cn[t]||(cn[t]=(an[t]||t)+"("))+n+")",hn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function dn(t,e,n){let i="";for(let s=0;s<ln;s++){const o=fe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=rn(r,Qt[o]));hn(o,r)||(i+=un(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=un("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const pn=new WeakMap,mn=.001,fn=(t,e)=>Math.abs(t-e)<=.001,gn=(t,e)=>t-e,yn=(t,e,n)=>kt(Array(n+1)).map(n=>Y(t,e,n)),vn=t=>t.motionValue.owner,xn=t=>pn.get(t),wn=({state:t})=>"idle"===t||"finished"===t,Tn=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class Sn extends Gt{constructor(t){const e=vn(t).current,{driver:n=ht}=t;let i;const s=function(t){const e=vn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(Tn(e,"transform")||"none")||Tn(e,"pathRotation")||e.projection?.isProjecting()||en(t))}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=xn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=xn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return xn(vn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(o.now()):void 0}tween(){const{keyframes:t,type:n,ease:i,times:s,repeat:o,delay:r=0}=this.options,a=e.isBezierDefinition(i)?Ne(i):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(i)&&We[i];if(a&&!o&&!s&&2===t.length&&n===Bt&&null===this.holdTime){const t=this.startTime+r/this.speed;return[t,t+this.resolvedDuration/this.speed,a]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||Bt)===Bt?u||kt(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=o.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const i=t.current,s=new Set,r=new Map;let a={},l=[],c=new Map,u=[],h=!1,d=!1,p=!1,m=!1,f=-1/0;const g=t=>{for(const e of s)if(e.name===t)return!0},y=(e,n)=>{const i={};for(const s of void 0===e?fe:l){const o=r.get(s),l=void 0===e?Tn(t,s):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):a[s];void 0!==l&&(i[s]=l)}return i},v=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&hn(i,s)||(n+=un(i,s)+" ")}return(e?n.trim():n)||"none"},x=(t,e)=>v(y(t,e)),w=(t=y())=>{i.style.transform=v(t,!0)},T=(t=!0)=>{t&&w(),u.forEach(({animation:t})=>t.cancel()),u=[]},S=(t,e)=>new Animation(new KeyframeEffect(i,t,e)),b=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=o.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,u.some(t=>t.end===1/0)&&(t.cancel(),u=u.filter(t=>t!==i)),B.schedule(!1)}),t.oncancel=()=>u.includes(i)&&B.demote(),u.push(i)},P=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},A=(t,n,i,s)=>{const o=Math.min(200,Math.max(2,Math.ceil((i-n)/He)));if(4*s.length>o)return;const r=yn(n,i,o).concat(s).sort(gn),a=t=>e.progress(n,i,t);let l,c;for(const e of t){const t=e.numberAt(n),i=r.map(n=>e.numberAt(n)-t),s=i[i.length-1],o=i.some(t=>Math.abs(t)*mn>Math.abs(s))?0:s,a=i.map(t=>o?t/o:t);if(o&&!l)l=a,c=n=>(e.numberAt(n)-t)/o;else if(a.some((t,e)=>!fn(t,o&&l[e])))return}if(!l||l.every((t,e)=>fn(t,a(r[e]))))return"linear";const u=[],h=(t,e=c(t))=>u.push(zt(e)+" "+zt(100*a(t))+"%");return l.forEach((t,e)=>{e&&Math.abs(t-l[e-1])>.2&&P(c,r[e-1],r[e]).forEach(t=>h(t)),h(r[e],t)}),"linear("+u+")"},M=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...P(t=>i.numberAt(t),e,n));s.push(n)}},a=yn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(gn))t>l&&r(l,t,0),l=t;return s.sort(gn)},E=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},V=(t,n,i,s,o={fill:"both"},r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=s||A(t,n,i,a),c=l?[n,i]:M(t,n,i,a),u=c.map(t=>x(t,r));let h={transform:u};return l||(h.offset=c.map(t=>e.progress(n,i,t))),u.every(t=>t===u[0])&&(w(y(n,r)),h=null),S(h,{...o,duration:i-n,easing:l||"linear"})},D=e=>{let n=e,i=0,o=0;const h=[],d=[],p=new Set;r.clear(),c=new Map;for(const t of s){r.set(t.name,t);const[s,a]=t.timing(),l=s===1/0;if(c.set(t,[t.at(e),t.speed,l]),l)t.sync();else{if(t.speed<0)return;if(a){if(i){const t=(s-o)/a;if(Math.abs(a-i)>1||Math.abs(t-Math.round(t))*i>1)return}else i=a,o=s;d.push(t)}else p.add(s);h.push(t),n=Math.max(n,s)}}a={},l=fe.filter(e=>{if(r.has(e))return!0;const n=a[e]=Tn(t,e);return void 0!==n&&!hn(e,n)}),T(!1);const m=!i&&E(h);try{if(m&&m[1]>e){const[t,n,i]=m;b(V(h,t,n,i),t-e,n-t)}else n>e&&(b(V(h,e,n),0,n-e),p.forEach(t=>t<n-1&&b(S(null,{duration:t-e}),0,t-e)));if(i){const t=o+Math.floor((n-o)/i)*i;b(V(d,t,t+i,void 0,{iterations:1/0,iterationStart:(n-t)/i,fill:"forwards"},n),n-e)}}catch{return}return u.length||T(),!0},k=t=>{let e,n=0;for(const i of s){const s=c.get(i);if(!s)return!1;const[o,r,a]=s,l=i.at(t),u=i.timing()[0]===1/0;if(a){if(u&&l===o)continue;return!1}const h=(l-o)/r,d=u?0:i.speed/r;if(void 0===e)e=h,n=d;else if(Math.abs(h-e)>1||d!==n)return!1}if(void 0===e)return!0;if(!u.length)return!1;for(const{offset:t,end:n,isDone:i}of u){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:i,offset:s,isDone:o}of u){if(o)continue;const r=e-s;n&&i.updatePlaybackRate&&"running"===i.playState&&Math.abs(Number(i.currentTime)-r)<20?i.playbackRate!==n&&i.updatePlaybackRate(n):n?(i.playbackRate=n,i.startTime=t-r/n):(i.startTime=null,i.currentTime=r)}return!0},C=()=>!s.size&&(p=!0,xn(i)===B&&pn.delete(i),B.isJS||T(),!0),R=()=>{const e=o.now();if(B.isJS||(B.isFinishing=!0,s.forEach(n=>{const[i,s]=n.timing();"running"===n.state&&n.speed>0&&!s&&i<=e+1&&(n.complete(),a[n.name]=Tn(t,n.name),c.has(n)||(h=!0))}),B.isFinishing=!1),d=!1,p)return;if(s.forEach(t=>wn(t)&&s.delete(t)),C())return;for(const t of s)if(!t.canAccelerate)return B.demote(!0);B.isJS&&(B.isJS=!1,h=!0,s.forEach(t=>t.js?.stop()));const n=h,i=m;if(h=m=!1,n||!k(e)){if(i){if(e-f<100)return B.demote();f=e}if(!D(e))return B.demote()}},B={tracks:s,isJS:!1,isFinishing:!1,schedule(t,e){p||(h||(h=t),m||(m=!!e),d||(d=!0,n.isProcessing?lt.render(R,!1,!0):queueMicrotask(R)))},release(t){wn(t)&&s.delete(t),C()||B.schedule(!0)},check(){if(!B.isJS)for(const e in a)if(Tn(t,e)!==a[e]&&!g(e))return B.schedule(!0,!0)},demote(t){if(!B.isJS&&!p)return s.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),B.isJS=!0,c=new Map,T(),s.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return pn.set(i,B),B}(vn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(o.now())}get time(){return this.isAccelerated()?e.millisecondsToSeconds(e.clamp(0,this.totalDuration,this.at(o.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class bn extends $t{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=o.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,r=t;r.autoplay??(r.autoplay=!0),r.delay??(r.delay=0),r.type??(r.type="keyframes"),r.repeat??(r.repeat=0),r.repeatDelay??(r.repeatDelay=0),r.repeatType??(r.repeatType="loop");const a=s?.KeyframeResolver||Re;this.keyframeResolver=new a(e,(t,e,n)=>this.onKeyframesResolved(t,e,r,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=o.now();const d=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Ze(s,e),a=Ze(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||ze(n))&&i)}(t,r,a,l);d||(!e.MotionGlobalConfig.instantAnimations&&c||h?.(Ot(t,i,n)),t[0]=t[t.length-1],Je(i),i.repeat=0);const{onComplete:p}=i;i.finalKeyframe=n,i.keyframes=t,i.onComplete=()=>{p?.(),this.notifyFinished()};const m=d&&!u&&on(i),f=!m&&(({name:t,motionValue:e})=>t&&fe.includes(t)&&e?.owner?.current instanceof HTMLElement&&sn()&&Ue())(i);let g;if(s&&(m||f||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=Ut(this.createdAt,this.resolvedAt))),m){i.element=i.motionValue?.owner?.current;try{g=new _e(i)}catch{g=new Gt(i)}}else g=f?new Sn(i):new Gt(i);this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ce()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class Pn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return An(this.animations,"duration")}get iterationDuration(){return An(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function An(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Mn extends Ye{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()},Wt(this,{})}}const En=new WeakMap;function Vn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Dn={current:void 0};class kn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=o.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=o.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){var i;return"change"===t?this.onChangeSubscribe(n):((i=this.events)[t]||(i[t]=new e.SubscriptionManager)).add(n)}onChangeSubscribe(t){const{events:n}=this;return n.change||this.changeSubscriber?(n.change||(n.change=new e.SubscriptionManager,n.change.add(this.changeSubscriber),this.changeSubscriber=void 0),n.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:n.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){lt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){e&&(this.updatedAt=o.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){Dn.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=o.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Cn(t,e){return new kn(t,e)}function Rn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Bn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Rn(n,t):n}const jn={type:"spring",stiffness:500,damping:25,restSpeed:10},Ln={type:"keyframes",duration:.8},On={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fn=(t,{keyframes:e})=>e.length>2?Ln:ge.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:jn:On,In=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function Un(t){for(const e in t)if(!In.has(e))return!0;return!1}const Nn=(t,n,i,s={},o,r)=>a=>{const l=Bn(s,t)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u-=e.secondsToMilliseconds(c);const h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...l,delay:-u,onUpdate:t=>{n.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:n,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};Un(l)||Object.assign(h,Fn(t,h)),h.duration&&(h.duration=e.secondsToMilliseconds(h.duration)),h.repeatDelay&&(h.repeatDelay=e.secondsToMilliseconds(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Je(h),0===h.delay&&(d=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Je(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==n.get()){const t=Ot(h.keyframes,l);if(void 0!==t)return void lt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Gt(h):new bn(h)};function Wn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function $n(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Kn(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const zn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gn(t){const e=zn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Yn(t,n,i=1){const[s,o]=Gn(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return u(o)?Yn(o,n,i+1):o}function Xn(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function qn(t,e,n){return Xn(t.getProps(),e,n,t)}const Hn=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,_n=new Set(["width","height","top","left","right","bottom",...fe]),Zn=t=>Array.isArray(t);function Jn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Cn(n))}function Qn(t){return Zn(t)?t[t.length-1]||0:t}function ti(t,e){const n=qn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Jn(t,e,Qn(o[e]))}}const ei=t=>Boolean(t&&t.getVelocity);function ni(t){return Boolean(ei(t)&&t.add)}function ii(t,n){const i=t.getValue("willChange");if(ni(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}const si="data-framer-appear-id";function oi(t){return t.props[si]}const ri="undefined"!=typeof window;function ai({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function li(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Rn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&ai(d,e))continue;const r={delay:n,...Bn(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){lt.update(()=>i.set(s));continue}let p=!1;if(ri&&window.MotionHandoffAnimation){const n=oi(t);if(n){const t=window.MotionHandoffAnimation(n,e,lt);null!==t&&(r.startTime=t,p=!0)}}ii(t,e);const m=c??t.shouldReduceMotion;i.start(Nn(e,i,s,m&&_n.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>lt.update(()=>{r&&ti(t,r)});h.length?Promise.all(h).then(e):e()}return h}function ci(t,e,n={}){const i=qn(t,e,Hn(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?li(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(ci(t,e,{...n,delay:i+("function"==typeof r?0:r)+Vn(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ui(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>ci(t,e,n))):"string"==typeof e?ci(t,e,n):Promise.all(li(t,qn(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const hi=t=>e=>e.test(t),di=[p,E,M,A,D,V,{test:t=>"auto"===t,parse:t=>t}],pi=t=>di.find(hi(t));function mi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const fi=new Set(["auto","none","0"]);class gi extends Re{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(d(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=Yn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!_n.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=pi(i),r=pi(s);if(d(i)!==d(s)&&Pe[n])this.needsMeasurement=!0;else if(o!==r)if(ye(o)&&ye(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Pe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||mi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!fi.has(e)&&I(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=ie(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return Pe[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const yi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],vi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...yi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);const xi=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),wi=[];function Ti(t){e.removeItem(wi,t)}function Si(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Nn(r,c,l,a&&_n.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):lt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>lt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function bi(t,e,n,i,s){return Si(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=Cn(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function Pi(t){return e.isObject(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function Ai(t){return e.isObject(t)&&"ownerSVGElement"in t}const Mi={};function Ei(t){return Mi.current?.add(t),t}function Vi(t){const e=Mi.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const Di=t=>Mi.current?Mi.current.bind(t):t;function ki(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:Mi.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ci(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=ki(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Ri{constructor(t=lt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function Bi(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Ri(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const ji=new Set(["originX","originY","originZ"]),Li=(t,e)=>rn(t.get(e)?.get(),Qt[e]),Oi=(t,e,n,i)=>{let s,o;if(ge.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>fe.indexOf(t)-fe.indexOf(e)))}e.get("transform")||(Pi(t)||e.get("transformBox")||Oi(t,e,"transformBox",new kn("fill-box")),e.set("transform",new kn("none"),()=>{pn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(hn(s,o)||(e+=(e&&" ")+un(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+un("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else ji.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new kn(""),()=>{const n=Li(e,"originX")??"50%",i=Li(e,"originY")??"50%",s=Li(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Be(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=rn(i.getCurrent(),Qt[n])};return e.set(n,i,s,o)},Fi=(t,e)=>{if(ge.has(e))return me(t,e);const n=getComputedStyle(t),i=Be(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Ii=Bi(Oi,{test:t=>Pi(t)||Ai(t),read:Fi}),Ui=Ci(Ii);function Ni(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Wi(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ge.has(t))r=!0;else if(l(t))s[t]=n;else{const e=rn(n,Qt[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=dn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const $i={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ki={offset:"strokeDashoffset",array:"strokeDasharray"};function zi(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?$i:Ki;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Gi=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yi(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Wi(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Gi)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&zi(h,s,o,r,!1)}const Xi=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Ni(s));const r=Qt[n]||Qt[s],a=o?()=>{t[s]=rn(i.get(),Qt[n])}:()=>{const e=rn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},qi=Ci(Bi(Xi));const Hi=(t,e,n,i)=>{if(n.startsWith("path")&&!ge.has(n))return function(t,e,n,i){return lt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new kn("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Xi(t,e,n,i,Qi(n));if("d"===n)return e.set(n,i,()=>{const e=i.get()?.replace(/path\(|["')]/g,"");void 0===e?t.removeAttribute(n):t.setAttribute(n,e)});return(ge.has(n)||ji.has(n)||Be(n)||n in t.style?Oi:Xi)(t,e,n,i)},_i=(t,e)=>ge.has(e)?Qt[e]?.default||0:Be(e)||Gi.includes(e)?Fi(t,e)||t.getAttribute(Ni(e))||0:(e=Qi(e),t.getAttribute(Ni(e))??t.getAttribute(e)??void 0),Zi=Bi(Hi,{test:Ai,read:_i}),Ji=Ci(Zi);function Qi(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function ts({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function es({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ns(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 is(t){return void 0===t||1===t}function ss({scale:t,scaleX:e,scaleY:n}){return!is(t)||!is(e)||!is(n)}const os=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function rs(t){return ss(t)||ls(t)||as(t)}function as(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function ls(t){return cs(t.x)||cs(t.y)}function cs(t){return t&&"0%"!==t}function us(t,e,n){return n+e*(t-n)}function hs(t,e,n,i,s){return void 0!==s&&(t=us(t,s,i)),us(t,n,i)+e}function ds(t,e=0,n=1,i,s){t.min=hs(t.min,e,n,i,s),t.max=hs(t.max,e,n,i,s)}function ps(t,{x:e,y:n}){ds(t.x,e.translate,e.scale,e.originPoint),ds(t.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,fs=1.0000000000001;function gs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++)o=n[a],r=o.projectionDelta,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ys(t.x,-o.scroll.offset.x),ys(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ps(t,r)),i&&(i.path?.[a]||i)!==o&&rs(o.latestValues)&&ws(t,o.latestValues,o.layout?.layoutBox));e.x<fs&&e.x>ms&&(e.x=1),e.y<fs&&e.y>ms&&(e.y=1)}function ys(t,e){t.min+=e,t.max+=e}function vs(t,e,n,i,s=.5){ds(t,e,n,Y(t.min,t.max,s),i)}function xs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ws(t,e,n){const i=n??t;vs(t.x,xs(e.x,i.x),e.scaleX,e.scale,e.originX),vs(t.y,xs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Ts(t,e){return ts(ns(t.getBoundingClientRect(),e))}function Ss(t,e,n){const i=Ts(t,n),{scroll:s}=e;return s&&(ys(i.x,s.offset.x),ys(i.y,s.offset.y)),i}const bs=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),Ps={},As=t=>Ai(t)?Zi:Ii;class Ms{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=gi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return Ts(this.current)}getProps(){return Ps}}const Es=t=>As(t).state(t)?.release();function Vs(t,e){const n=As(t).state(t);if(!n)return;const i=pn.get(t);i&&(i.demote(),pn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const Ds=Bi((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>e.isObject(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:ks,cancel:Cs}=at(queueMicrotask,!1);function Rs(t,e,n){const i=ei(t)?t:Cn(t);return i.start(Nn("",i,e,n)),i.animation}const Bs={};function js(t,{layout:e,layoutId:n}){return ge.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Bs[t]||"opacity"===t)}const Ls={value:null,addProjectionMetrics:null,countProjection:void 0};function Os(t,e){const n=o.now();t=Di(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(ct(i),t(o-e))};return lt.setup(i,!0),Ei(()=>ct(i))}function Fs(t){return Ai(t)&&"svg"===t.tagName}function Is(t){return ei(t)?t.get():t}const Us=t=>"number"==typeof t?t:parseFloat(t),Ns=yi.length,Ws=t=>"number"==typeof t||E.test(t);function $s(t,e,n,i,s,o){s?(t.opacity=Y(0,n.opacity??1,zs(i)),t.opacityExit=Y(e.opacity??1,0,Gs(i))):o&&(t.opacity=Y(e.opacity??1,n.opacity??1,i));for(let s=0;s<Ns;s++){const o=yi[s];let r=Ks(e,o),a=Ks(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ws(r)===Ws(a)?(t[o]=Math.max(Y(Us(r),Us(a),i),0),(M.test(a)||M.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<os.length;s++){const o=os[s];(e[o]||n[o])&&(t[o]=Y(e[o]||0,n[o]||0,i))}}function Ks(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const zs=Ys(0,.5,e.circOut),Gs=Ys(.5,.95,e.noop);function Ys(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function Xs(t,e){t.min=e.min,t.max=e.max}function qs(t,e){Xs(t.x,e.x),Xs(t.y,e.y)}function Hs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function _s(t){return t.max-t.min}function Zs(t,e,n){return Math.abs(t-e)<=n}function Js(t,e,n,i=.5){t.origin=i,t.originPoint=Y(e.min,e.max,t.origin),t.scale=_s(n)/_s(e),t.translate=Y(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Qs(t,e,n,i){Js(t.x,e.x,n.x,i?.originX),Js(t.y,e.y,n.y,i?.originY)}function to(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+_s(e)}function eo(t,e,n,i){to(t.x,e.x,n.x,i?.x),to(t.y,e.y,n.y,i?.y)}function no(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+_s(e)}function io(t,e,n,i){no(t.x,e.x,n.x,i?.x),no(t.y,e.y,n.y,i?.y)}function so(t,e,n,i,s){return t=us(t-=e,1/n,i),void 0!==s&&(t=us(t,1/s,i)),t}function oo(t,e=0,n=1,i=.5,s,o=t,r=t){if(M.test(e)){e=parseFloat(e);e=Y(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Y(o.min,o.max,i);t===o&&(a-=e),t.min=so(t.min,e,n,a,s),t.max=so(t.max,e,n,a,s)}function ro(t,e,[n,i,s],o,r){oo(t,e[n],e[i],e[s],e.scale,o,r)}const ao=["x","scaleX","originX"],lo=["y","scaleY","originY"];function co(t,e,n,i){ro(t.x,e,ao,n?.x,i?.x),ro(t.y,e,lo,n?.y,i?.y)}const uo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ho=uo("applewebkit/")&&!uo("chrome/")?Math.round:e.noop;function po(t){t.min=ho(t.min),t.max=ho(t.max)}function mo(t){po(t.x),po(t.y)}const fo=()=>({translate:0,scale:1,origin:0,originPoint:0}),go=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),yo=()=>({min:0,max:0}),vo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xo(t){return 0===t.translate&&1===t.scale}function wo(t){return xo(t.x)&&xo(t.y)}function To(t,e){return t.min===e.min&&t.max===e.max}function So(t,e){return To(t.x,e.x)&&To(t.y,e.y)}function bo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Po(t,e){return bo(t.x,e.x)&&bo(t.y,e.y)}function Ao(t){return _s(t.x)/_s(t.y)}function Mo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Eo{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(e.removeItem(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function Vo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Do={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!E.test(t))return t;t=parseFloat(t)}return`${Vo(t,e.target.x)}% ${Vo(t,e.target.y)}%`}},ko={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$.parse(t);if(s.length>5)return i;const o=$.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Y(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Co={borderRadius:Object.assign({},Do,{applyTo:yi.slice()}),borderTopLeftRadius:Do,borderTopRightRadius:Do,borderBottomLeftRadius:Do,borderBottomRightRadius:Do,boxShadow:ko};function Ro(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<os.length;t++){const e=os[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function Bo(t){return[t("x"),t("y")]}const jo=(t,e)=>t.depth-e.depth;class Lo{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jo),this.isDirty=!1,this.children.forEach(t)}}const Oo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fo=["z","skew","skewZ"];let Io=0;function Uo(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const No=t=>t.instance&&pn.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Wo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=oi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Wo(i)}function $o(t){if(t)return!1!==t.options.allowProjection?t.projection:$o(t.parent)}function Ko({attachResizeListener:t,defaultParent:i,measureScroll:s,checkIsScrollRoot:r,resetTransform:a}){return Object.assign(Bs,{...Co,...Bs}),class{static create(t,e,n){const{layoutId:i,layout:s,drag:o,dragConstraints:r,layoutScroll:a,layoutRoot:l,layoutAnchor:c,layoutCrossfade:u}=e,h=t.projection=new this(t.latestValues,e["data-framer-portal-id"]?void 0:$o(t.parent));var d;h.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(o)||r&&(d=r,d&&"object"==typeof d&&Object.prototype.hasOwnProperty.call(d,"current")),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:a,layoutRoot:l,layoutAnchor:c});const p=h.getStack()?.lead;p&&!h.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}constructor(t={},e=i?.()){this.id=Io++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Yo),this.nodes.forEach(nr),this.nodes.forEach(ir),this.nodes.forEach(Xo),Ls.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lo)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Ai(e)&&!Fs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;lt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Os(s,250),Oo.hasAnimatedSinceResize&&(Oo.hasAnimatedSinceResize=!1,this.nodes.forEach(er)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||lr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!Po(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Bn(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||er(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,ct(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(sr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;No(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,No(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(_o),void this.nodes.forEach(Ho)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Zo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jo),this.nodes.forEach(Qo),this.nodes.forEach(tr),this.nodes.forEach(zo),this.nodes.forEach(Go)):this.nodes.forEach(Zo),this.clearAllSnapshots();const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ks.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qo),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||_s(this.snapshot.measuredBox.x)||_s(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:n}=this,{animationId:i}=this.root;if(this.options.layoutScroll&&n&&(!e||e.animationId!==i||e.phase!==t)){const o=r(n);this.scroll={animationId:i,phase:t,isRoot:o,offset:s(n),wasRoot:e?e.isRoot:o}}}resetTransform(){if(!a)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&No(this);const e=this.projectionDelta&&!wo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||rs(this.latestValues)||s)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),mo(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hr))){const{scroll:t}=this.root;t&&(ys(e.x,t.offset.x),ys(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(qs(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&qs(e,t),ys(e.x,s.offset.x),ys(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};qs(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ys(o.x,-n.scroll.offset.x),ys(o.y,-n.scroll.offset.y)),rs(n.latestValues)&&ws(o,n.latestValues,n.layout?.layoutBox)}return!i&&rs(this.latestValues)&&ws(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};qs(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!rs(n.latestValues))continue;let i;n.instance&&(ss(n.latestValues)&&n.updateSnapshot(),i=vo(),qs(i,n.measurePageBox())),co(e,n.latestValues,n.snapshot?.layoutBox,i)}return rs(this.latestValues)&&co(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=n.timestamp;const r=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):qs(this.target,this.layout.layoutBox),ps(this.target,this.targetDelta)):qs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&(!r.resumingFrom==!this.resumingFrom||r.options.layoutRoot&&!r.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),Ls.countProjection?.(1))}getClosestProjectingParent(){if(this.parent&&!ss(this.parent.latestValues)&&!ls(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},io(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),qs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===n.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;qs(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;gs(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Hs(this.prevProjectionDelta.x,this.projectionDelta.x),Hs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Qs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&Mo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Mo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Ls.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(ar));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;or(r.x,t.x,n),or(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(io(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,rr(c.x,m.x,f.x,g),rr(c.y,m.y,f.y,g),d&&So(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),qs(d,this.relativeTarget)),l&&(this.animationValues=o,$s(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Oo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Rs(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Nt("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&ur(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},cr(s.x,e.x,t.x),cr(s.y,e.y,t.y)}qs(e,s),ws(e,i),Qs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Eo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!as(e))return;const n={};for(let e=0;e<Fo.length;e++)Uo(Fo[e],t,n,this.animationValues);for(let e=0;e<os.length;e++)Uo(os[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Is(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Is(e?.pointerEvents)||""),void(this.hasProjected&&!rs(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Ro(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Bs){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=Bs[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Is(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ho),this.root.sharedNodes.clear()}}}function zo(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;Bo(t=>ys(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Go(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)Bo(t=>{const e=_s(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Xs(i[t],o[t])}else ur(s,e.layoutBox,n)&&Bo(e=>{const n=_s(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Qs(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Qs(c,o?t.applyTransform(i,!0):n,a);const u=!wo(l);let h=!1;const d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};io(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};io(c,n,s.layoutBox,a),o&&r(l,c),Po(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Yo(t){Ls.countProjection?.(0),t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Xo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function qo(t){t.clearSnapshot()}function Ho(t){t.clearMeasurements()}function _o(t){t.isLayoutDirty=!0,t.updateLayout()}function Zo(t){t.isLayoutDirty=!1}function Jo(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Qo(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function tr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function er(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nr(t){t.resolveTargetDelta()}function ir(t){t.calcProjection()}function sr(t){t.resetSkewAndRotation()}function or(t,e,n){t.translate=Y(e.translate,0,n),t.scale=Y(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function rr(t,e,n,i){t.min=Y(e.min,n.min,i),t.max=Y(e.max,n.max,i)}function ar(t){return void 0!==t.animationValues?.opacityExit}const lr={duration:.45,ease:[.4,0,.1,1]};function cr(t,e,n){t.max=_s(n)+(t.min=e.min)}function ur(t,e,n){return"position"===t||"preserve-aspect"===t&&!Zs(Ao(e),Ao(n),.2)}function hr(t){return t!==t.root&&t.scroll?.wasRoot}function dr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const pr=Ko({attachResizeListener:(t,e)=>dr(t,"resize",e),measureScroll:bs,checkIsScrollRoot:()=>!0}),mr={current:void 0},fr=Ko({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!mr.current){const t=new pr({});t.mount(window),t.setOptions({layoutScroll:!0}),mr.current=t}return mr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),gr=new WeakMap;function yr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function vr(t){return"string"==typeof t||Array.isArray(t)}const xr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wr=["initial"].concat(xr);function Tr(t){if(yr(t.animate))return!0;for(let e=0;e<wr.length;e++)if(vr(t[wr[e]]))return!0;return!1}function Sr(t){return Boolean(Tr(t)||t.variants)}function br(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ei(s))t.addValue(i,s);else if(ei(o))t.addValue(i,Cn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Cn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Pr={current:null},Ar={current:!1},Mr="undefined"!=typeof window;function Er(){if(Ar.current=!0,Mr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pr.current=t.matches;t.addEventListener("change",e),e()}else Pr.current=!1}const Vr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Dr={};class kr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:r,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=Re,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=o.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,lt.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=e.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Tr(e),this.isVariantNode=Sr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==c[t]&&ei(e)&&e.set(c[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,gr.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ar.current||Er(),this.shouldReduceMotion=Pr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.get(t)?.(),n.accelerate&&Qe.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:s,times:o,ease:r,duration:a}=n.accelerate,l=new Ye({element:this.current,name:t,keyframes:s,times:o,ease:r,duration:e.secondsToMilliseconds(a)}),c=i(l);return void this.valueSubscriptions.set(t,()=>{c(),l.cancel()})}const i=ge.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&<.preRender(this.notifyUpdate),i&&(this.projection&&(this.projection.isTransformDirty=!0),pn.get(this.current)?.check()),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Dr){const e=Dr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&pn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Vr.length;e++){const n=Vr[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=br(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=Cn(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):"number"!=typeof i&&!$.test(i)&&$.test(n)&&(i=ie(t,n)),this.setBaseTarget(t,ei(i)?i.get():i)),ei(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,n){return(this.events[t]||(this.events[t]=new e.SubscriptionManager)).add(n)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){ks.render(this.render)}}class Cr extends kr{constructor(){super(...arguments),this.KeyframeResolver=gi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ei(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Rr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function Br(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ei(i[e])||s&&ei(s[e])||js(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class jr extends Cr{constructor(){super(...arguments),this.type="html",this.renderInstance=Rr}mount(t){super.mount(t)}readValueFromInstance(t,e){if(ge.has(e))return this.projection?.isProjecting?de(e):me(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(l(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ts(t,e)}build(t,e,n){Wi(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Br(t,e,n)}}function Lr(t){let e=gr.get(t);return e||(e=new jr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Vs(t,e)),t.style.transform&&!rs(e.latestValues)&&(t.style.transform=""),e}const Or={},Fr={updateScroll:()=>{Fr.scroll||(Fr.scroll={offset:bs()})}},Ir=t=>{const n=Lr(t),i=new e.SubscriptionManager,s={instance:t,root:Fr,path:[Fr],setOptions:e.noop,isProjecting:e.noop,applyProjectionStyles:e.noop,removeElementScroll:t=>t,updateLayout:()=>{const e=Ss(t,Fr,n.getTransformPagePoint());mo(e),s.layout={layoutBox:e},i.notify()},addEventListener:(t,n)=>"measure"===t?i.add(n):e.noop,unmount:()=>{s.instance=void 0,n.projection===s&&(n.projection=void 0)}};return n.projection=s,n.current||n.mount(t),[s,s.unmount]},Ur=t=>{const n=gr.get(t)?.projection;return n?.instance?[n,e.noop]:(Or.create||Ir)(t)},Nr="[data-layout],[data-layout-id]",Wr=new WeakMap;let $r;function Kr(t){const e=[];return t instanceof HTMLElement&&t.matches(Nr)&&e.push(t),t.querySelectorAll(Nr).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function zr(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Gr(t,e){let n=Wr.get(t);if(n)n.setOptions(zr(t,e));else{const i=Lr(t);n=new fr(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Wr.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...zr(t,e),visualElement:i}),n.mount(t),Wr.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Yr(t){const e=Gr(t);return[e,()=>Wr.get(t)===e&&Xr(t,e)]}function Xr(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Wr.delete(t)}function qr(){const t=$r;if(!t)return;$r=void 0,function(){if(n.isProcessing)return;const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}();const i=new Map;for(const e of t)for(const t of e.collectTargets()){const n=i.get(t);n?n.push(e):i.set(t,[e])}const s=new Map;for(const t of(r=i.keys(),[...r].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const e=i.get(t),n=Gr(t,e[e.length-1].transitionFor(t));for(const i of e)i.adopt(t,n);s.set(t,n)}var r;s.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const a=[];for(const e of t){const t=e.runUpdate();t&&a.push(t)}const l=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let n;s.forEach(t=>n||(n=t.root));for(const e of t)n||(n=e.getRoot());n?.didUpdate(),ks.render(()=>{for(const e of t)e.finalize()})};a.length?Promise.all(a).then(l):l()}Or.create=Yr;const Hr=qr;class _r{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),$r||($r=[],queueMicrotask(qr)),$r.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Kr(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Kr(this.scope)){if(this.tracked.has(e))continue;const n=Gr(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Xr(n,e)}}),e.relegate())return;n.remove()}Xr(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Pn([...t]))}}function Zr(t,e,n){if("function"==typeof t)return{scope:Mi.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:ki(t)[0]??document,updateDom:e,defaultOptions:n}}const Jr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Qr(t){return{point:{x:t.pageX,y:t.pageY}}}const ta=t=>e=>Jr(e)&&t(e,Qr(e));function ea(t,e,n,i){return dr(t,e,ta(n),i)}const na=new WeakMap;let ia;const sa=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ai(i)&&"getBBox"in i?i.getBBox()[e]:i[n],oa=sa("inline","width","offsetWidth"),ra=sa("block","height","offsetHeight");function aa({target:t,borderBoxSize:e}){na.get(t)?.forEach(n=>{n(t,{get width(){return oa(t,e)},get height(){return ra(t,e)}})})}function la(t){t.forEach(aa)}function ca(t,e){ia||"undefined"!=typeof ResizeObserver&&(ia=new ResizeObserver(la));const n=ki(t);return n.forEach(t=>{let n=na.get(t);n||(n=new Set,na.set(t,n)),n.add(e),ia?.observe(t)}),()=>{n.forEach(t=>{const n=na.get(t);n?.delete(e),n?.size||ia?.unobserve(t)})}}const ua=new Set;let ha;function da(t){return ua.add(t),ha||(ha=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ua.forEach(e=>e(t))},window.addEventListener("resize",ha)),()=>{ua.delete(t),ua.size||"function"!=typeof ha||(window.removeEventListener("resize",ha),ha=void 0)}}function pa(t,e){return Ei("function"==typeof t?da(t):ca(t,e))}const ma=(t,e)=>Math.abs(t-e);function fa(t,e){const n=ma(t.x,e.x),i=ma(t.y,e.y);return Math.sqrt(n**2+i**2)}const ga=new Set(["auto","scroll"]);class ya{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=xa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Ta(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=fa(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:o.now()});const{onStart:s,onMove:r}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=xa(e,this.transformPagePoint),this.hasPendingMove=!0,lt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ta("pointercancel"===t.type?this.lastMoveEventInfo:xa(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Jr(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const c=xa(Qr(t),this.transformPagePoint),{point:u}=c;this.history=[{...u,timestamp:o.now()}];const{onSessionStart:h}=n;h&&h(t,Ta(c,this.history));const d={passive:!0,capture:!0};this.removeListeners=e.pipe(ea(this.contextWindow,"pointermove",this.handlePointerMove,d),ea(this.contextWindow,"pointerup",this.handlePointerUp,d),ea(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const t=getComputedStyle(n);(ga.has(t.overflowX)||ga.has(t.overflowY))&&this.scrollPositions.set(n,va(n)),n=n.parentElement}this.scrollPositions.set(window,va(window)),this.removeScrollListeners=e.pipe(dr(window,"scroll",this.onElementScroll,{capture:!0}),dr(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=va(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),lt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),ct(this.updatePoint)}}const va=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function xa(t,e){return e?{point:e(t.point)}:t}function wa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ta({point:t},e){return{point:t,delta:wa(t,ba(e)),offset:wa(t,Sa(e)),velocity:Pa(e,.1)}}function Sa(t){return t[0]}function ba(t){return t[t.length-1]}function Pa(t,n){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=ba(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>e.secondsToMilliseconds(n)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>2*e.secondsToMilliseconds(n)&&(s=t[1]);const r=e.millisecondsToSeconds(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const Aa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ma(t){return Aa.has(t.tagName)||!0===t.isContentEditable}const Ea=new Set(["INPUT","SELECT","TEXTAREA"]);function Va(t){return Ea.has(t.tagName)||!0===t.isContentEditable}const Da={x:!1,y:!1};function ka(){return Da.x||Da.y}function Ca(t){return"x"===t||"y"===t?Da[t]?null:(Da[t]=!0,()=>{Da[t]=!1}):Da.x||Da.y?null:(Da.x=Da.y=!0,()=>{Da.x=Da.y=!1})}function Ra(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ba(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const ja=.35;function La(t,e,n){return{min:Oa(t,e),max:Oa(t,n)}}function Oa(t,e){return"number"==typeof t?t:t[e]||0}function Fa(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const Ia=new WeakMap;class Ua{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ya(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=Ca(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),Bo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(u(e)&&(e=Yn(e,this.visualElement.current)||0),E.test(e))e=parseFloat(e);else if(M.test(e)){const n=o?.layout?.layoutBox[t];n&&(e=_s(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),s&<.update(()=>s(t,e),!1,!0),ii(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.visualElement.render(),o&<.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&<.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Ka(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Y(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Y(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Na(t)?this.constraints&&this.scroll===Fa(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ra(t.x,n,s),y:Ra(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=ja){return!1===t?t=0:!0===t&&(t=ja),{x:La(t,"left","right"),y:La(t,"top","bottom")}}(e),s!==this.constraints&&!Na(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Bo(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Na(t))return!1;const n=Wa(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Fa(i);const s=Ss(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ba(t.x,e.x),y:Ba(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(es(o));this.hasMutatedConstraints=!!t,t&&(o=ts(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bo(a=>{if(!Ka(a,e||n,this.currentDirection))return;let c=l[a]||{};!0!==r&&r!==a||(c={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,d={type:"inertia",velocity:i?t[a]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,d)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return ii(this.visualElement,t),n.start(Nn(t,n,0,e,this.visualElement,!1))}stopAnimation(){Bo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();Bo(t=>{if(!Ka(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Y(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Na(n)||!i||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};Bo(t=>{const n=this.getAxisMotionValue(t).get();o[t]=function(t,n){let i=.5;const s=_s(t),o=_s(n);return o>s?i=e.progress(n.min,n.max-s,t.min):s>o&&(i=e.progress(t.min,t.max-o,n.min)),e.clamp(0,1,i)}({min:n,max:n},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Bo(e=>{const n=this.getAxisMotionValue(e);if(!Ka(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Y(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ia.set(this.visualElement,this);const t=this.visualElement.current,e=ea(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&Va(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Na(e)&&Wa(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=pa(t,$a(n)),s=pa(e,$a(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),lt.read(i);const r=dr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Bo(e=>{if(!Ka(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=ja,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Na(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Wa=t=>"current"in t?t.current:t;function $a(t){let e=!0;return()=>{e?e=!1:t()}}function Ka(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const za=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Ga(t,e){const n=ki(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},Ei(()=>i.abort())]}const Ya=(t,e)=>!!e&&(t===e||Ya(t,e.parentElement)),Xa=new WeakSet;function qa(t){return e=>{"Enter"===e.key&&t(e)}}function Ha(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function _a(t){return Jr(t)&&!ka()}const Za=new WeakSet;const Ja={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Qa(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Ja[t]||t;return e?`(not (${i}))`:i}).join(" and ")}const tl=["nodes","calculatedTargetDeltas","calculatedProjections"];function el(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Vt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const nl=new Set,il=({timestamp:t})=>{nl.forEach(e=>e.tick(t))};class sl extends $t{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(nl.size||lt.update(il,!0),nl.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Ut(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return jt(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():o.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(nl.delete(this),nl.size||ct(il))}}function ol(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Us(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Us(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new sl({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),ei(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(rl(e,r),!1)):t.set(rl(e,r))},o=e.on("change",s),a=e.get();Us(a)-Us(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function rl(t,e){return e?t+e:t}function al(t,e,n={}){const i={type:"spring",...n};return It(i),i.type=i.type||Bt,ol(t,e,i)}function ll(t){const e=[];Dn.current=e;const n=t();Dn.current=void 0;const i=Cn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>lt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),ct(i)})}(e,i,t),i}function cl(t,e,n){return ol(t,e,{...n,type:Mt})}const ul=[...di,R,$];let hl=0;const dl=()=>"motion-view-"+hl++;function pl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function ml(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function fl(t,e,n,i,s,o=[],r,a=[],l){const c=ki(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??dl();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),pl(t,s,o),ml(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=dl(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),pl(t,s,o),ml(t,d,r,a,l),d})}function gl(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let yl={},vl=null;const xl=(t,e)=>{yl[t]=e},wl=()=>{vl||(vl=document.createElement("style"),vl.id="motion-view");let t="";for(const e in yl){const n=yl[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}vl.textContent=t,document.head.appendChild(vl),yl={}},Tl=()=>{vl&&vl.parentElement&&vl.parentElement.removeChild(vl)};function Sl(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function bl(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const Pl=["layout","enter","exit","new","old"],Al=t=>t.split(" ").every(t=>0===parseFloat(t)),Ml={group:["layout"],new:["new","enter"],old:["old","exit"]},El={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function Vl(t){const{update:n,targets:i,resolveDefs:s,cropOverride:o,pairs:r,classNames:a,flatGroups:l,options:c}=t;if(!document.startViewTransition)return(async()=>(await n(),new Pn([])))();const u=new Map,h=[],d=[],p=[],m=new Set,f=new Map,g=new Set,y=new Map,v=new Map,x=new Map,w=new Map,T=t=>{i.forEach((e,n)=>{const i=a.get(n),c="root"!==n&&s.has(n)?l.has(n)?"none":"contain":void 0;let g;if("root"!==n&&s.has(n))if(r.has(n))if("old"===t)w.set(n,ki(n)),g=fl(n,u,h,void 0,i,d,c,p,m),x.set(n,g);else{for(const t of w.get(n)??[])t.style?.removeProperty("view-transition-name"),u.delete(t);g=fl(r.get(n),u,h,x.get(n),i,d,c,p,m)}else g=fl(n,u,h,void 0,i,d,c,p,m);else g=[n];const T=o.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==T&&y.set(n,T);const o=v.get(n)??{};o[t]=[i,g.length],v.set(n,o)})})},S=(t,e)=>{const n=v.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},b=(t,e,n,i,s)=>{const o=Dl(Bn(c,n),Bn(function(t,e){for(const n of Ml[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[n,i]=S(t,"group"),s=b(f.get(t),"group","layout",-1===n?0:n,i);s.duration&&(s.duration=e.secondsToMilliseconds(s.duration));const{delay:o=0,duration:r,ease:a}=Ge(s);return{delay:e.secondsToMilliseconds(o),duration:r,ease:a}},A=new Map,M=t=>u.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of yi)o[t]=n[t];const r=A.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},A.set(e,r)}}),E=t=>{const e=A.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||xl(":root",{"view-transition-name":"none"}),xl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{xl(`::view-transition-group(${t})`,{overflow:"clip"}),xl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{xl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),wl()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(h,d,p),Tl()},k=async()=>{await n(),T("new"),M("new"),(()=>{g.clear();for(const t of v.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),V()};let C;try{T("old"),M("old"),V(),C=document.startViewTransition(k)}catch(t){return D(),Promise.reject(t)}return C.finished.finally(D),new Promise((t,n)=>{C.ready.then(()=>{const n=bl(),i=[],s=new Set,o=new Set;f.forEach((t,n)=>{const r=v.get(n),a=!!r?.new&&!r?.old,l=!!r?.old&&!r?.new;for(const r of Pl){if(!t[r])continue;if("enter"===r&&!a)continue;if("exit"===r&&!l)continue;const u=gl(r),[h,d]=S(n,u);if(-1===h)continue;const{keyframes:p,options:m}=t[r];for(let[f,g]of Object.entries(p)){if(null==g)continue;if("x"===f||"y"===f){e.warnOnce(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===r&&a&&null!=t.enter?.keyframes[f])continue;if("old"===r&&l&&null!=t.exit?.keyframes[f])continue;const p=Dl(Bn(c,f),Bn(m,f));if(!Array.isArray(g)){const e="enter"===r?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===u?a:l),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?El[u]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof p.delay&&(p.delay=p.delay(h,d)),p.duration&&(p.duration=e.secondsToMilliseconds(p.duration)),p.delay&&(p.delay=e.secondsToMilliseconds(p.delay)),i.push(new Ye({...p,element:document.documentElement,name:f,pseudoElement:`::view-transition-${u}(${n})`,keyframes:g})),s.add(`${n}:${u}`),"opacity"===f&&o.add(`${n}:${u}`)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=Sl(r);if(!a)continue;const l=f.get(a.layer);if(s.has(`${a.layer}:${a.type}`)){o.has(`${a.layer}:new`)&&o.has(`${a.layer}:old`)&&n.getKeyframes().some(t=>t.mixBlendMode)?i.push(new Mn(t)):t.cancel();continue}const c="old"===a.type?"new":"new"===a.type?"old":void 0;if(c&&s.has(`${a.layer}:${c}`)&&!o.has(`${a.layer}:${c}`)){t.cancel();continue}const u=v.get(a.layer),h=!("old"!==a.type&&"new"!==a.type||!u?.old||!u?.new);let d;if(a.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(a.layer);d={delay:t,duration:e,easing:$e(n,e)}}else{const t=h?"group":a.type,[n,i]=S(a.layer,t);let s=b(l,t,"group"===t?"layout":"",-1===n?0:n,i);const o=s.visualDuration;s.duration&&(s.duration=e.secondsToMilliseconds(s.duration)),s=Ge(s),d={delay:e.secondsToMilliseconds(s.delay??0),duration:h&&void 0!==o?e.secondsToMilliseconds(o):s.duration,easing:h?"linear":$e(s.ease,s.duration)}}n.updateTiming(d),i.push(new Mn(t))}A.forEach((t,e)=>{if(!g.has(e))return;const{delay:n,duration:s,ease:o}=P(e);for(const r of yi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";Al(a)&&Al(l)||i.push(new Ye({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:n,duration:s,ease:o}))}}),t(new Pn(i))}).catch(()=>C.updateCallbackDone.then(()=>t(new Pn([])),n))})}function Dl(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let kl=[],Cl=null;function Rl(){Cl=null;const[t]=kl;var n;t&&(n=t,e.removeItem(kl,n),Cl=n,Vl(n).then(t=>(n.notifyReady(t),t.finished)).catch(t=>n.notifyReject(t)).finally(Rl))}function Bl(){for(let t=kl.length-1;t>=0;t--){const e=kl[t],{interrupt:n}=e.options;if("immediate"===n){const n=kl.slice(0,t+1).map(t=>t.update),i=kl.slice(t+1);e.update=()=>{n.forEach(t=>t())},kl=[e,...i];break}}Cl&&"immediate"!==kl[0]?.options.interrupt||Rl()}class jl{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=e.noop,this.notifyReject=e.noop,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...n},this.readyPromise.catch(e.noop),i=this,kl.push(i),ks.render(Bl)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ll=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"]),Ol=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Fl(t,e,n,i){Rr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ll.has(n)?n:Ni(n),e.attrs[n])}function Il(t,e,n){const i=Br(t,e,n);for(const n in t)if("children"!==n&&(ei(t[n])||ei(e[n]))){i[-1!==fe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Ul(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Nl=[...xr].reverse(),Wl=t=>!0===t?.out?t:t?.out;function $l(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ul(e,t)}function Kl(){const t={};for(const e of xr)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const zl=wr.length;const Gl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Yl=lt,Xl=rt.reduce((t,e)=>(t[e]=t=>ct(t),t),{});t.AsyncMotionValueAnimation=bn,t.DOMKeyframesResolver=gi,t.DOMVisualElement=Cr,t.DocumentProjectionNode=pr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Lo,t.GroupAnimation=Pn,t.GroupAnimationWithThen=class extends Pn{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=fr,t.HTMLVisualElement=jr,t.JSAnimation=Gt,t.KeyframeResolver=Re,t.LayoutAnimationBuilder=_r,t.MotionValue=kn,t.MotionValueState=Ri,t.NativeAnimation=Ye,t.NativeAnimationExtended=_e,t.NativeAnimationWrapper=Mn,t.NodeStack=Eo,t.ObjectVisualElement=class extends kr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=ya,t.SVGVisualElement=class extends Cr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vo}getBaseTargetFromProps(t,e){return ge.has(e)?super.getBaseTargetFromProps(t,e)??de(e):t[e]}getDefaultValue(t){return ge.has(t)?this.latestValues[t]??de(t):void 0}readValueFromInstance(t,e){if(ge.has(e)){const t=ee(e);return t&&t.default||0}if(Gi.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Ll.has(e)?e:Ni(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Il(t,e,n)}build(t,e,n){Yi(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Fl(t,e,0,i)}mount(t){this.isSVGTag=Ol(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=jl,t.VisualElement=kr,t.VisualElementDragControls=Ua,t.acceleratedValues=Qe,t.acquireProjectionNode=function(t){const e=Wr.get(t)||gr.get(t)?.projection;return e?.instance?[e,()=>{}]:Yr(t)},t.activeScope=Mi,t.addAttrValue=Xi,t.addBuilderToScope=Vi,t.addDomEvent=dr,t.addEffect=function(t){Ti(t),wi.unshift(t)},t.addPointerEvent=ea,t.addPointerInfo=ta,t.addSVGValue=Hi,t.addScaleCorrector=function(t){for(const e in t)Bs[e]=t[e],l(e)&&(Bs[e].isCSSVariable=!0)},t.addStyleValue=Oi,t.addToScope=Ei,t.addValueToWillChange=ii,t.alpha=m,t.analyseComplexValue=U,t.animateEffectSubject=bi,t.animateElement=function(t,e,n,i){if(Mi.current?.track(t),i)return Si(t=>i.getValue(t,null),e,n,i);const s=As(t);return bi(s,t,e,n,new Ms(s,t))},t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Zr(t,e,n),r=new _r(i,s,{...Mi.current?.transition,...o});return Vi(r),r},t.animateMotionValue=Nn,t.animateSingleValue=Rs,t.animateTarget=li,t.animateValue=function(t){return new Gt(t)},t.animateValues=Si,t.animateVariant=ci,t.animateView=function(t,e={}){const n=new jl(t,e);return Vi(n),n},t.animateVisualElement=ui,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=ds,t.applyBoxDelta=ps,t.applyGeneratorOptions=Ge,t.applyPointDelta=hs,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&vi.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=gs,t.arc=function(t={}){const n=function({strength:t=.5,peak:n=.5,direction:i,rotate:s=!1}={}){const o=!0===s?1:"number"==typeof s?s:0;let r;return(s,a)=>{const l=a.x-s.x,c=a.y-s.y;let u;u="cw"===i?-t:"ccw"===i?t:(Math.abs(l)>=Math.abs(c)?l:c)<0?-t:t;let h=Kn(s.x,s.y,a.x,a.y,u,n);if(void 0===i){const t=Math.abs(l)<Math.abs(c),e=s.x+l*n,i=s.y+c*n,o=t?Math.sign(h.x-e):Math.sign(h.y-i);void 0!==r&&0!==o&&o!==r?(u=-u,h=Kn(s.x,s.y,a.x,a.y,u,n)):0!==o&&(r=o)}const d=o?$n(0,s.x,h.x,a.x,s.y,h.y,a.y):0,p=o?$n(1,s.x,h.x,a.x,s.y,h.y,a.y):0,m=o?e.wrap(-180,180,p-d):0;return t=>{const n={x:Wn(t,s.x,h.x,a.x),y:Wn(t,s.y,h.y,a.y)};if(o){const i=$n(t,s.x,h.x,a.x,s.y,h.y,a.y),r=d+m*t;n.rotate=e.wrap(-180,180,i-r)*o}return n}}}(t),i={interpolateProjection(t){const e=t.x.translate,i=t.y.translate;if(!(Math.sqrt(e*e+i*i)<20))return n({x:e,y:i},{x:0,y:0})},animateValues(t,e,i,s,o){if(!("x"in e)&&!("y"in e))return;const r=t("x"),a=t("y"),l=e.x,c=e.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=n({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...Bn(i||{},"x")};delete g.path;const y=Cn(0);y.start(Nn("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete e.x,delete e.y}};return i},t.aspectRatio=Ao,t.attachFollow=al,t.attachSpring=cl,t.attrEffect=qi,t.axisDeltaEquals=Mo,t.axisEquals=To,t.axisEqualsRounded=bo,t.bindToScope=Di,t.boxEquals=So,t.boxEqualsRounded=Po,t.buildHTMLStyles=Wi,t.buildProjectionTransform=Ro,t.buildSVGAttrs=Yi,t.buildSVGPath=zi,t.buildTransform=dn,t.buildTransformer=N,t.calcAxisDelta=Js,t.calcBoxDelta=Qs,t.calcChildStagger=Vn,t.calcGeneratorDuration=mt,t.calcLength=_s,t.calcRelativeAxis=to,t.calcRelativeAxisPosition=no,t.calcRelativeBox=eo,t.calcRelativePosition=io,t.camelCaseAttributes=Ll,t.camelToDash=Ni,t.cancelFrame=ct,t.cancelMicrotask=Cs,t.cancelSync=Xl,t.checkVariantsDidChange=$l,t.cleanDirtyNodes=Xo,t.collectMotionValues=Dn,t.color=R,t.compareByDepth=jo,t.complex=$,t.containsCSSVariable=d,t.convertBoundingBoxToBox=ts,t.convertBoxToBoundingBox=es,t.convertOffsetToTimes=Ct,t.copyAxisDeltaInto=Hs,t.copyAxisInto=Xs,t.copyBoxInto=qs,t.correctBorderRadius=Do,t.correctBoxShadow=ko,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ui(t,e,n))),n=Kl(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&qn(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&Wl(d(c??(g&&g.props.initial))?.transition);if(Nl.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:vr(d)||!1===d?d:void 0,x=vr(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||yr(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const S=$l(s.prevProp,v);let b=S||x&&(w&&!T||i>f),P=!1;const A=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of A){const{transition:i,transitionEnd:s,...o}=qn(t,n,Hn(t,e))||{};E={...E,...o,...s},M=Wl(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!Ul(n,i)||S:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){b=!0,r=p.get(e)||y,p.delete(e)&&(P=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),b&&(!T||!S||P))for(const n of A){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=qn(a,n)?.transition?.delayChildren;i.delay=Vn(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||ei(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=Kl(),s=!0}}},t.createAxis=yo,t.createAxisDelta=fo,t.createBox=vo,t.createDelta=go,t.createEffect=Bi,t.createGeneratorEasing=ft,t.createProjectionNode=Ko,t.createRenderBatcher=at,t.cubicBezierAsString=Ne,t.defaultEasing=Rt,t.defaultOffset=kt,t.defaultTransformValue=de,t.defaultValueTypes=te,t.degrees=A,t.delay=Os,t.delayInSeconds=function(t,n){return Os(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=di,t.distance=ma,t.distance2D=fa,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=Mi.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=ki(t).map(t=>{i?.track(t);const[s,o]=Ur(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Ua(gr.get(t),()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=za.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return za.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{za.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return Ei(()=>s.forEach(t=>t()))},t.eachAxis=Bo,t.elementDragControls=Ia,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Na(t)&&!!e},t.extractEventInfo=Qr,t.fillOffset=Dt,t.fillWildcards=se,t.findDimensionValueType=pi,t.findEffect=function(t){return wi.find(e=>e.test(t))},t.findValueType=t=>ul.find(hi(t)),t.flushKeyframeResolvers=Ce,t.flushLayoutSnapshots=Hr,t.followValue=function(t,e){const n=Cn(ei(t)?t.get():t);return al(n,t,e),n},t.frame=lt,t.frameData=n,t.frameSteps=ut,t.generateLinearEasing=dt,t.getAnimatableNone=ie,t.getAnimationMap=function(t){let e=En.get(t);return e||(e=new Map,En.set(t,e)),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Be(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=Fn,t.getDefaultValueType=ee,t.getFeatureDefinitions=function(){return Dr},t.getFinalKeyframe=Ot,t.getMixer=tt,t.getOptimisedAppearId=oi,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=rn,t.getValueTransition=Bn,t.getVariableValue=Yn,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<zl;t++){const i=wr[t],s=e.props[i];(vr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=Sl,t.getViewAnimations=bl,t.globalProjectionState=Oo,t.handOffElementState=Vs,t.has2DTranslate=ls,t.hasComplexValues=I,t.hasReducedMotionListener=Ar,t.hasScale=ss,t.hasTransform=rs,t.hex=b,t.hover=function(t,e,n={}){e=Di(e);const[i,s,o]=Ga(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ka())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=C,t.hslaToRgba=z,t.inertia=Et,t.initPrefersReducedMotion=Er,t.interpolate=Vt,t.invisibleValues=Z,t.isAnimationControls=yr,t.isCSSVariableName=l,t.isCSSVariableToken=u,t.isControllingVariants=Tr,t.isDeltaZero=wo,t.isDragActive=ka,t.isDragging=Da,t.isElementKeyboardAccessible=Ma,t.isElementTextInput=Va,t.isForcedMotionValue=js,t.isGenerator=ze,t.isHTMLElement=Pi,t.isKeyframesTarget=Zn,t.isMotionValue=ei,t.isNear=Zs,t.isNodeOrChild=Ya,t.isPrimaryPointer=Jr,t.isSVGElement=Ai,t.isSVGSVGElement=Fs,t.isSVGTag=Ol,t.isTransitionDefined=Un,t.isVariantLabel=vr,t.isVariantNode=Sr,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ue()||!n||"string"==typeof n&&(n in We||Ue())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=ni,t.keyframes=Bt,t.makeAnimationInstant=Je,t.mapEasingToNativeEasing=$e,t.mapValue=function(t,e,n,i){const s=el(e,n,i);return ll(()=>s(t.get()))},t.maxGeneratorDuration=pt,t.measurePageBox=Ss,t.measureViewportBox=Ts,t.microtask=ks,t.mix=ot,t.mixArray=et,t.mixColor=_,t.mixComplex=it,t.mixImmediate=G,t.mixLinearColor=X,t.mixNumber=Y,t.mixObject=nt,t.mixValues=$s,t.mixVisibility=J,t.motionValue=Cn,t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Gl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.number=p,t.numberValueTypes=Qt,t.optimizedAppearDataAttribute=si,t.optimizedAppearDataId="framerAppearId",t.originProps=ji,t.parseAnimateLayoutArgs=Zr,t.parseCSSVariable=Gn,t.parseValueFromTransform=pe,t.percent=M,t.pixelsToPercent=Vo,t.positionalKeys=_n,t.prefersReducedMotion=Pr,t.press=function(t,e,n={}){e=Di(e);const[i,s,o]=Ga(t,n),r=t=>{const i=t.currentTarget;if(!_a(t))return;if(Za.has(t))return;Xa.add(i),n.stopPropagation&&Za.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Xa.has(i)&&Xa.delete(i),_a(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||Ya(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Pi(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=qa(()=>{Xa.has(t)||(n=!0,Ha(t,"down"))}),s=qa(()=>{n&&(n=!1,Ha(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Ha(t,"cancel")},{...e,once:!0})})(t,s),s),Ma(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=o.now())=>{if(n.isProcessing)return;const i=t-n.timestamp;n.delta=e.MotionGlobalConfig.useManualTiming?i:Math.max(Math.min(i,40),1),o.set(n.timestamp=t),n.isProcessing=!0;for(const t in ut)ut[t].process(n);n.isProcessing=!1},t.progressPercentage=k,t.propEffect=Ds,t.propagateDirtyNodes=Yo,t.px=E,t.readSVGValue=_i,t.readStyleValue=Fi,t.readTransformValue=me,t.recordStats=function(){if(Ls.value)throw Ls.value=null,Ls.addProjectionMetrics=null,Ls.countProjection=void 0,new Error("Stats are already being measured");const t=Ls;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)};const e={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0};t.countProjection=n=>{void 0!==n?e[tl[n]]++:(t.addProjectionMetrics(e),e.nodes=e.calculatedTargetDeltas=e.calculatedProjections=0)}},t.releaseElement=Es,t.removeAxisDelta=oo,t.removeAxisTransforms=ro,t.removeBoxTransforms=co,t.removeEffect=Ti,t.removePointDelta=so,t.renderHTML=Rr,t.renderSVG=Fl,t.resize=pa,t.resolveElements=ki,t.resolveMotionValue=Is,t.resolveTransition=Rn,t.resolveVariant=qn,t.resolveVariantFromProps=Xn,t.rgbUnit=w,t.rgba=T,t.rootProjectionNode=mr,t.round=zt,t.sampleDelta=He,t.scale=f,t.scaleCorrectors=Bs,t.scalePoint=us,t.scopeMotion=function(...t){const n="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:ki(n)[0],transition:o,add:t=>(c.push(t),()=>e.removeItem(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{Es(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=Mi.current;Mi.current=t;try{return e()}finally{Mi.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Qa(t[e]));n.addEventListener("change",m),a.push([e,n])}}return Ei(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=Br,t.scrapeSVGMotionValuesFromProps=Il,t.setDragLock=Ca,t.setFeatureDefinitions=function(t){Dr=t},t.setStyle=je,t.setTarget=ti,t.spring=Mt,t.springValue=function(t,e){const n=Cn(ei(t)?t.get():t);return cl(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s,grid:o}={}){const r={};return(a,l)=>{let c=r[l];if(!c){const[t,e]=o||[1/0,1],n=Math.min(t,l)-1,s=Math.max(e,Math.ceil(l/t))-1,a="number"==typeof i,u="first"===i?0:"last"===i?1:.5,h=a?i%t:n*u,d=a?Math.floor(i/t):s*u;c=r[l]=[];for(let e=0;e<l;e++){const o=e%t,r=Math.floor(e/t),a=Math.min(o,n-o),l=Math.min(r,s-r);if("random"===i){const t=Math.random()*(e+1)|0;c[e]=c[t],c[t]=e}else c[e]="edges"===i?Math.min(n?a:l,s?l:a):Math.hypot(o-h,r-d)}c.push(o?Math.max(...c):l)}let u=t*c[a];const h=t*c[l];if(s&&h){u=e.easingDefinitionToFunction(s)(u/h)*h}return n+u}},t.startWaapiAnimation=Ke,t.statsBuffer=Ls,t.styleEffect=Ui,t.styleSubjectEffect=Ii,t.supportedWaapiEasing=We,t.supportsBrowserAnimation=on,t.supportsFlags=Le,t.supportsLinearEasing=Ue,t.supportsPartialKeyframes=xi,t.supportsScrollTimeline=Fe,t.supportsViewTimeline=Ie,t.supportsWaapi=sn,t.svgEffect=Ji,t.svgSubjectEffect=Zi,t.sync=Yl,t.testValueType=hi,t.time=o,t.toMediaQuery=Qa,t.transform=el,t.transformAxis=vs,t.transformBox=ws,t.transformBoxPoints=ns,t.transformPropOrder=fe,t.transformProps=ge,t.transformValue=ll,t.transformValueTypes=Jt,t.translateAxis=ys,t.updateMotionValuesFromProps=br,t.variantPriorityOrder=xr,t.variantProps=wr,t.vh=V,t.visualElementStore=gr,t.vw=D});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n={delta:0,timestamp:0,isProcessing:!1};let i;function s(){i=void 0}const o={now:()=>(void 0===i&&o.set(n.isProcessing||e.MotionGlobalConfig.useManualTiming?n.timestamp:performance.now()),i),set:t=>{i=t,queueMicrotask(s)}},r=t=>Math.round(1e5*t)/1e5,a=t=>e=>"string"==typeof e&&e.startsWith(t),l=a("--"),c=a("var(--"),u=t=>!!c(t)&&h.test(t.split("/*")[0].trim()),h=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function d(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const p={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...p,transform:t=>e.clamp(0,1,t)},f={...p,default:1},g=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v=(t,e)=>n=>Boolean("string"==typeof n&&y.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),x=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(g);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},w={...p,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},T={test:v("rgb","red"),parse:x("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+w.transform(t)+", "+w.transform(e)+", "+w.transform(n)+", "+r(m.transform(i))+")"},S=(t,e,n)=>{const i=t.substring(1+e*n,1+(e+1)*n);return n>1?i:i+i};const b={test:v("#"),parse:function(t){const e=t.length>5?2:1,n=S(t,3,e);return{red:parseInt(S(t,0,e),16),green:parseInt(S(t,1,e),16),blue:parseInt(S(t,2,e),16),alpha:n?parseInt(n,16)/255:1}},transform:T.transform},P=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),A=P("deg"),M=P("%"),E=P("px"),V=P("vh"),D=P("vw"),k=(()=>({...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)}))(),C={test:v("hsl","hue"),parse:x("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+M.transform(r(e))+", "+M.transform(r(n))+", "+r(m.transform(i))+")"},R={test:t=>T.test(t)||b.test(t)||C.test(t),parse:t=>T.test(t)?T.parse(t):C.test(t)?C.parse(t):b.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?T.transform(t):C.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},j=new RegExp(g.source),B=new RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i");const L="number",O="color",F=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function I(t){const e=t.toString();return j.test(e)||B.test(e)}function U(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(F,t=>(R.test(t)?(i.color.push(o),s.push(O),n.push(R.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(L),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function N({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===L?r(i[o]):t===O?R.transform(i[o]):i[o]}return s}}const W=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:R.test(n)?R.getAnimatableNone(n):n;var n};const $={test:function(t){return isNaN(t)&&"string"==typeof t&&(j.test(t)||B.test(t))},parse:function(t){return U(t).values},createTransformer:function(t){return N(U(t))},getAnimatableNone:function(t){const e=U(t);return N(e)(e.values.map((t,n)=>W(t,e.split[n])))}};function K(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function z({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=K(a,i,t+1/3),o=K(a,i,t),r=K(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function G(t,e){return n=>n>0?e:t}const Y=(t,e,n)=>t+(e-t)*n,X=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},q=[b,T,C];function H(t){const e=(n=t,q.find(t=>t.test(n)));var n;if(!e)return!1;let i=e.parse(t);return e===C&&(i=z(i)),i}const _=(t,e)=>{const n=H(t),i=H(e);if(!n||!i)return G(t,e);const s={...n};return t=>(s.red=X(n.red,i.red,t),s.green=X(n.green,i.green,t),s.blue=X(n.blue,i.blue,t),s.alpha=Y(n.alpha,i.alpha,t),T.transform(s))},Z=new Set(["none","hidden"]);function J(t,e){return Z.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Q(t,e){return n=>Y(t,e,n)}function tt(t){return"number"==typeof t?Q:"string"==typeof t?u(t)?G:R.test(t)?_:it:Array.isArray(t)?et:"object"==typeof t?R.test(t)?_:nt:G}function et(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>tt(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function nt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=tt(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const it=(t,n)=>{const i=U(t),s=U(n);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?Z.has(t)&&!s.values.length||Z.has(n)&&!i.values.length?J(t,n):e.pipe(et(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),N(s)):G(t,n)},st=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ot(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Y(t,e,n);if("string"==typeof t&&"string"==typeof e){const n=function(t,e){const n=st.exec(t);if(!n)return;const i=st.exec(e);if(!i||n[2]!==i[2])return;const s=n[2],o=parseFloat(n[1]),a=parseFloat(i[1]);return t=>r(Y(o,a,t))+s}(t,e);if(n)return n}return tt(t)(t,e)}const rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function at(t,n,i={delta:0,timestamp:0,isProcessing:!1}){let s=!1,o=!0;const r=()=>s=!0,a=rt.reduce((t,e)=>(t[e]=function(t){let e,n=new Set,i=new Set,s=!1,o=!1;const r=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function l(n){r.has(n)&&(i.add(n),t()),(e=n)(a)}const c={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?n:i;return o&&r.add(t),l&&t!==e&&c.delete(t),c.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(l),n.clear(),e=void 0,s=!1,o&&(o=!1,c.process(t))}};return c}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,g=()=>{const r=e.MotionGlobalConfig.useManualTiming,a=r?i.timestamp:performance.now();s=!1,r||(i.delta=o?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),p.process(i),m.process(i),f.process(i),i.isProcessing=!1,s&&n&&(o=!1,t(g))};return{schedule:rt.reduce((e,n)=>{const r=a[n];return e[n]=(e,n=!1,a=!1)=>(s||(s=!0,o=!0,i.isProcessing||t(g)),r.schedule(e,n,a)),e},{}),cancel:t=>{for(let e=0;e<rt.length;e++)a[rt[e]].cancel(t)},state:i,steps:a}}const{schedule:lt,cancel:ct,steps:ut}=at("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0,n),ht=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>lt.update(e,t),stop:()=>ct(e),now:()=>n.isProcessing?n.timestamp:o.now()}},dt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},pt=2e4;function mt(t,e=50,n=2e4,i){let s=0,o=t.next(s);for(i?.push(o.value);!o.done&&s<n;)s+=e,o=t.next(s),i?.push(o.value);return s>=n?1/0:s}function ft(t,n=100,i){const{keyframes:s,velocity:o}=t,r=s&&s[s.length-1]-s[0],a=i({...t,velocity:o&&r?o*n/r:o,keyframes:[0,n]}),l=Math.min(mt(a),pt);return{type:"keyframes",ease:t=>a.next(l*t).value/n,duration:e.millisecondsToSeconds(l)}}const gt=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function yt(t,e){if(!(t>1))return 1;const n=Math.sqrt(t*t-1),i=t-n,s=t+n,o=2*n*Math.exp(-e)*(1+e);return wt(t=>s*Math.exp(-i*t)-i*Math.exp(-s*t)-o,t=>Math.exp(-s*t)-Math.exp(-i*t),e)/e}function vt(t,e){return t*Math.sqrt(1-e*e)}const xt=12;function wt(t,e,n){let i=n;for(let n=1;n<xt;n++)i-=t(i)/e(i);return i}const Tt=.001;const St=(t,e)=>(e?t>=0:t>0)&&t<1/0;function bt(t,e){if(St(t,e))return t}function Pt(t){const n=bt(t.stiffness),i=bt(t.damping,!0),s=bt(t.mass),o={...t,stiffness:n??100,damping:i??10,mass:s??1,isResolvedFromDuration:!1,isTimeDefined:void 0===(n??i??s)&&(void 0!==t.duration||void 0!==t.bounce)};if(o.isTimeDefined){if(t.visualDuration){const e=gt(t.bounce||0),n=2*Math.PI/(1.2*t.visualDuration)*yt(e,2*Math.PI/1.2);o.stiffness=n*n,o.damping=2*e*Math.sqrt(o.stiffness)}else Object.assign(o,function({duration:t=800,bounce:n=.3}){let i,s;const o=gt(n);t=e.clamp(.01,10,e.millisecondsToSeconds(t)),o<1?(i=e=>{const n=e*o,i=n*t,s=vt(e,o),r=Math.exp(-i);return Tt-n/s*r},s=e=>{const n=e*o*t,s=o*o*e*e*t,r=Math.exp(-n),a=vt(e*e,o);return(-i(e)+Tt>0?-1:1)*-s*r/a}):(i=e=>Math.exp(-e*t)*(e*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*-e));const r=wt(i,s,5/t),a=r*yt(o,r*t),l=a*a;return{stiffness:l,damping:2*o*Math.sqrt(l),duration:e.secondsToMilliseconds(t)}}(o)),o.isResolvedFromDuration=!0;St(o.stiffness)&&St(o.damping,!0)||(o.stiffness=100,o.damping=10)}return o}function At(t=.3,n=.3){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,isResolvedFromDuration:h,isTimeDefined:d}=Pt({...i}),p=t=>d?0:-e.millisecondsToSeconds(t),m=l/(2*Math.sqrt(a*c)),f=e.millisecondsToSeconds(Math.sqrt(a/c)),g=m*f,y={target:o,delta:o-s,velocity:p(i.velocity||0)||0,restSpeed:0,restDelta:0},v=()=>{const t=Math.abs(y.delta)<5;y.restSpeed=i.restSpeed||(t?.01:2),y.restDelta=i.restDelta||(t?.005:.5)};let x,w,T;if(v(),m<1){const t=vt(f,m),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=()=>{e.A=(y.velocity+g*y.delta)/t,e.sinC=g*e.A+y.delta*t,e.cosC=g*y.delta-e.A*t};const n=n=>{n!==e.t&&(e.t=n,e.env=Math.exp(-g*n),e.sin=Math.sin(t*n),e.cos=Math.cos(t*n))};x=t=>(n(t),y.target-e.env*(e.A*e.sin+y.delta*e.cos)),w=t=>(n(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===m){x=t=>y.target-Math.exp(-f*t)*(y.delta+(y.velocity+f*y.delta)*t);const t={C:0};T=()=>{t.C=y.velocity+f*y.delta},w=e=>Math.exp(-f*e)*(f*t.C*e-y.velocity)}else{const t=f*Math.sqrt(m*m-1),e=g-t,n=g+t,i=t<1||d?1/0:300/t,s=(t,e)=>Math.exp(e>i?(g-t)*i-g*e:-t*e),o={S:0,F:0};T=()=>{const e=(y.velocity+g*y.delta)/t;o.S=(y.delta+e)/2,o.F=(y.delta-e)/2},x=t=>y.target-o.S*s(e,t)-o.F*s(n,t),w=t=>e*o.S*s(e,t)+n*o.F*s(n,t)}T();const S=h&&u||null,b={calculatedDuration:S,retarget:(t,e)=>{y.target=t[t.length-1],y.delta=y.target-t[0],y.velocity=p(e),i.restSpeed&&i.restDelta||v(),b.calculatedDuration=S,r.done=!1,T()},velocity:t=>e.secondsToMilliseconds(w(t)),next:t=>{const n=x(t);if(h)r.done=t>=u;else{const i=e.secondsToMilliseconds(w(t));r.done=Math.abs(i)<=y.restSpeed&&Math.abs(y.target-n)<=y.restDelta}return r.value=r.done?y.target:n,r},toString:()=>{const t=Math.min(mt(b),pt),e=dt(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}const Mt=Object.assign(At,{applyToOptions:t=>{const n=ft(t,100,At);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t}});function Et({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=r?r(f):f;g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>{const e=y(t);d.done=Math.abs(e)<=c,d.value=d.done?g:t?g+e:h};let x,w;const T=t=>{var e;((e=d.value)<a||e>l)&&(x=t,w=Mt({keyframes:[d.value,p(d.value)],velocity:-y(t)/i*1e3,damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==x||(e=!0,v(t),T(t)),void 0!==x&&t>=x?w.next(t-x):(!e&&v(t),d)}}}function Vt(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=e.MotionGlobalConfig.mix||ot,r=t.length-1;for(let a=0;a<r;a++){let r=i?.(t[a],t[a+1])||o(t[a],t[a+1]);if(n){const t=Array.isArray(n)?n[a]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),c=l.length,u=i=>{if(a&&i<t[0])return n[0];let s=0;if(c>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>u(e.clamp(t[0],t[r-1],n)):u}function Dt(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(Y(i,1,o))}}function kt(t){const e=[0];return Dt(e,t.length-1),e}function Ct(t,e){return t.map(t=>t*e)}function Rt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function jt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut",mixer:o}){const r="number"==typeof n[0]?void 0:o,a=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s)||e.easeInOut,l={done:!1,value:n[0]};if(!r&&2===n.length&&!Array.isArray(a)&&(!i||2!==i.length||0===i[0]&&1===i[1])){const[i,s]=n,o=i===s?void 0:(e.MotionGlobalConfig.mix||ot)(i,s);return{calculatedDuration:t,next:n=>(l.value=o?o(a(t>0?e.clamp(0,1,n/t):1)):s,l.done=n>=t,l)}}const c=Vt(Ct(i&&i.length===n.length?i:kt(n),t),n,{ease:Array.isArray(a)?a:Rt(n,a),mixer:r});return{calculatedDuration:t,next:e=>(l.value=c(e),l.done=e>=t,l)}}function Bt(t,n,i=0){return n<=0?i:t.velocity?t.velocity(n):function(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}(e=>t.next(e).value,n,t.next(n).value)}const Lt=t=>null!==t;function Ot(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Lt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ft={decay:Et,inertia:Et,tween:jt,keyframes:jt,spring:Mt};function It(t){"string"==typeof t.type&&(t.type=Ft[t.type])}const Ut=(t,n)=>n-t>40&&!e.MotionGlobalConfig.useManualTiming?n:t;function Nt(t,e){return{kind:t,animation:e,timestamp:o.now(),frameTimestamp:n.timestamp,frameIsProcessing:n.isProcessing}}function Wt(t,e,n){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Nt("animation-start",t),options:n?{...e,...n}:e})}catch{}}class $t{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}const Kt=t=>t/100,zt=t=>Math.round(1e4*t)/1e4;class Gt extends $t{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==o.now()&&this.tick(o.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),Wt(this,this.options)}initAnimation(){const{options:t}=this;It(t);const{type:n=jt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||jt;this.mixKeyframes=void 0,l!==jt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(Kt,t.mixer?.(a[0],a[1])||ot(a[0],a[1])),a=[0,100]);const c=l(a===t.keyframes?t:{...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===c.calculatedDuration&&(c.calculatedDuration=mt(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){const{generator:n,totalDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:o=0,keyframes:r,type:a,onUpdate:l,finalKeyframe:c}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Ut(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const u=this.currentTime-o*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?u<0:u>i;this.currentTime=Math.max(u,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);const d=this.generate(this.currentTime,h);let{done:p}=d;h||(p=this.playbackSpeed>=0?s<1/0?this.currentTime>=i:p:this.currentTime<=0);const m=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return m&&a!==Et&&(d.value=Ot(r,this.options,c,this.speed)),l&&l(d.value),m&&this.finish(),d}at(t){return this.holdTime??zt((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){const{options:n,totalDuration:i}=this,s=this.at(t)-(n.delay||0);return s>=i&&n.type!==Et?Ot(n.keyframes,n,e?void 0:n.finalKeyframe):this.generate(Math.max(s,0),s<0).value}generate(t,n){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a}=this,{keyframes:l,repeat:c,repeatType:u,repeatDelay:h}=this.options;let d,p=t,m=i;if(c){const n=Math.min(t,s)/a;let i=Math.floor(n),o=n%1;!o&&n>=1&&(o=1),1===o&&i--,i=Math.min(i,c+1);Boolean(i%2)&&("reverse"===u?(o=1-o,h&&(o-=h/a)):"mirror"===u&&(m=r)),p=e.clamp(0,1,o)*a}return n?(this.delayState.value=l[0],d=this.delayState):d=m.next(p),o&&!n&&(d.value=o(d.value)),d}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){return this.duration+e.millisecondsToSeconds(this.options.delay??0)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return Bt(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(o.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=n)),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(o.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Yt=new Set(["brightness","contrast","saturate","opacity"]);function Xt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(g)||[];if(!i)return t;const s=n.replace(i,"");let o=Yt.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const qt=/\b([a-z-]*)\(.*?\)/gu,Ht={...$,getAnimatableNone:t=>{const e=t.match(qt);return e?e.map(Xt).join(" "):t}},_t={...$,getAnimatableNone:t=>{const e=$.parse(t);return $.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Zt={...p,transform:Math.round},Jt={rotate:A,pathRotation:A,rotateX:A,rotateY:A,rotateZ:A,scale:f,scaleX:f,scaleY:f,scaleZ:f,skew:A,skewX:A,skewY:A,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:m,originX:k,originY:k,originZ:E},Qt={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...Jt,zIndex:Zt,fillOpacity:m,strokeOpacity:m,numOctaves:Zt},te={...Qt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Ht,WebkitFilter:Ht,mask:_t,WebkitMask:_t},ee=t=>te[t],ne=new Set([Ht,_t]);function ie(t,e){let n=ee(t);return ne.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function se(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const oe=t=>180*t/Math.PI,re=t=>{const e=oe(Math.atan2(t[1],t[0]));return le(e)},ae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:re,rotateZ:re,skewX:t=>oe(Math.atan(t[1])),skewY:t=>oe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},le=t=>((t%=360)<0&&(t+=360),t),ce=t=>Math.hypot(t[0],t[1]),ue=t=>Math.hypot(t[4],t[5]),he={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ce,scaleY:ue,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(ce(t)+ue(t))/2,rotateX:t=>le(oe(Math.atan2(t[6],t[5]))),rotateY:t=>le(oe(Math.atan2(-t[2],t[0]))),rotateZ:re,rotate:re,skewX:t=>oe(Math.atan(t[4])),skewY:t=>oe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function de(t){return t.includes("scale")?1:0}function pe(t,e){if(!t||"none"===t)return de(e);const n=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return de(e);const i=(n[1]?he:ae)[e],s=n[2].split(",").map(t=>parseFloat(t));return"function"==typeof i?i(s):s[i]}const me=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return pe(n,e)},fe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=(()=>new Set([...fe,"pathRotation"]))(),ye=t=>t===p||t===E,ve=new Set(["x","y","z"]),xe=fe.filter(t=>!ve.has(t));const we=new Set(["bottom","right"]);function Te(t,e,n,i,s,o){const r=parseFloat(t);if(!isNaN(r))return r;const{min:a,max:l}=e()[n],c=l-a;return"border-box"===o?c:c-parseFloat(i)-parseFloat(s)}const Se=({transform:t})=>pe(t,"x"),be=({transform:t})=>pe(t,"y"),Pe={width:({width:t,paddingLeft:e="0",paddingRight:n="0",boxSizing:i},s)=>Te(t,s,"x",e,n,i),height:({height:t,paddingTop:e="0",paddingBottom:n="0",boxSizing:i},s)=>Te(t,s,"y",e,n,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:n}=e();return parseFloat(t)+(n.max-n.min)},right:({left:t},e)=>{const{x:n}=e();return parseFloat(t)+(n.max-n.min)},x:Se,y:be,translateX:Se,translateY:be},Ae=new Set;let Me=!1,Ee=!1,Ve=!1;function De(){if(Ee){const t=[],e=new Set,n=new Set;Ae.forEach(i=>{i.needsMeasurement&&(t.push(i),e.add(i.element),we.has(i.name)&&n.add(i.element))});const i=new Map;n.forEach(t=>{const e=function(t){const e=[];return xe.forEach(n=>{const i=t.getValue(n);if(void 0!==i){const t=i.get(),s=n.startsWith("scale")?1:0;if(t===s)return;e.push([n,t]),i.set(s)}}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ee=!1,Me=!1,Ae.forEach(t=>t.complete(Ve)),Ae.clear()}function ke(){Ae.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function Ce(){Ve=!0,ke(),De(),Ve=!1}class Re{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ae.add(this),Me||(Me=!0,lt.read(ke),lt.resolveKeyframes(De))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(null===t[0]){const o=s?.get(),r=t[t.length-1];if(void 0!==o)t[0]=o;else if(i&&n){const s=function(t,n,i){if("string"==typeof t){if(e.isNumericalString(t)||e.isZeroValueString(t))return parseFloat(t);if(!$.test(t)&&$.test(i))return ie(n,i)}return t??void 0}(i.readValue(n,r),n,r);void 0!==s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===o&&s.set(t[0])}se(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ae.delete(this)}cancel(){"scheduled"===this.state&&(Ae.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const je=t=>t.startsWith("--");function Be(t,e,n){je(e)?t.style.setProperty(e,n):t.style[e]=n}const Le={};function Oe(t,n){const i=e.memo(t);return()=>Le[n]??i()}const Fe=Oe(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ie=Oe(()=>void 0!==window.ViewTimeline,"viewTimeline"),Ue=Oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ne=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,We={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ne([0,.65,.55,1]),circOut:Ne([.55,0,1,.45]),backIn:Ne([.31,.01,.66,-.59]),backOut:Ne([.33,1.53,.69,.99])};function $e(t,n){return t?"function"==typeof t?Ue()?dt(t,n):"ease-out":e.isBezierDefinition(t)?Ne(t):Array.isArray(t)?t.map(t=>$e(t,n)||We.easeOut):We[t]:void 0}function Ke(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=$e(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function ze(t){return"function"==typeof t&&"applyToOptions"in t}function Ge({type:t,...e}){return ze(t)&&Ue()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ye extends $t{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t;const l=Ge(t);this.animation=Ke(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!s){const t=Ot(i,this.options,r,this.speed);this.updateMotionValue?.(t),Be(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()},Wt(this,t,l)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch(t){}}stop(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){const n=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=this.onFinish=null,t&&Fe()?(this.animation.timeline=t,n?.(this.animation),e.noop):i(this)}}const Xe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function qe(t){"string"==typeof t.ease&&t.ease in Xe&&(t.ease=Xe[t.ease])}const He=10;class _e extends Ye{constructor(t){qe(t),It(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(o.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){const{motionValue:t,onUpdate:e,onComplete:n,onPlay:i,onStop:s,element:o,...r}=this.options;this.sampler=new Gt({...r,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:n,element:i,name:s}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const{speed:o}=this,r=this.elapsed(),a="running"===this.state&&o?e.clamp(0,10,r):0,l=this.sample(r);i&&s&&Be(i,s,l),n.setWithVelocity(this.sample(r-a*Math.sign(o)),l,a/Math.abs(o||1))}}const Ze=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$.test(t)&&"0"!==t||t.startsWith("url(")));function Je(t){t.duration=0,t.type="keyframes"}const Qe=new Set(["opacity","clipPath","filter","transform"]),tn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const en=({mixer:t,keyframes:e})=>t&&"number"!=typeof e[0]&&e.some((n,i)=>i&&t(e[i-1],n)),nn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sn=()=>!e.MotionGlobalConfig.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function on(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t;if(!n||!Qe.has(n)&&!nn.has(n))return!1;const l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return sn()&&(Qe.has(n)||nn.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&tn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r&&!en(t)}const rn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,an={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ln=fe.length,cn={},un=(t,e,n=rn(e,Jt[t]))=>(cn[t]||(cn[t]=(an[t]||t)+"("))+n+")",hn=(t,e)=>("number"==typeof e?e:parseFloat(e))===(t.startsWith("scale")?1:0);function dn(t,e,n){let i="";for(let s=0;s<ln;s++){const o=fe[s],r=t[o];if(void 0===r)continue;const a=n&&(e[o]=rn(r,Qt[o]));hn(o,r)||(i+=un(o,r,a||void 0)+" ")}const s=t.pathRotation;return s&&(i+=un("rotate",s)),i=i.trim(),n?n(e,i):i||"none"}const pn=new WeakMap,mn=.001,fn=(t,e)=>Math.abs(t-e)<=.001,gn=(t,e)=>t-e,yn=(t,e,n)=>kt(Array(n+1)).map(n=>Y(t,e,n)),vn=t=>t.motionValue.owner,xn=t=>pn.get(t),wn=({state:t})=>"idle"===t||"finished"===t,Tn=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class Sn extends Gt{constructor(t){const e=vn(t).current,{driver:n=ht}=t;let i;const s=function(t){const e=vn(t),{onUpdate:n,transformTemplate:i}=e.getProps();return!(t.isHandoff||n||t.hasOnUpdate||i||"inertia"===t.type||"none"!==(Tn(e,"transform")||"none")||Tn(e,"pathRotation")||e.projection?.isProjecting()||en(t))}(t);t.driver=t=>{const s=n(t);return{js:s,now:s.now,start:(t=!0)=>{const n=xn(e);!n||n.isJS?s.start(t):n.schedule(!1,!t)},stop:()=>{s.stop();const t=xn(e);t&&!t.isFinishing&&t.release(i)}}},super(t),i=this,this.canAccelerate=s;const{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}get group(){return xn(vn(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:t,speed:e,totalDuration:n}=this,{delay:i=0,repeatType:s}=this.options;return null!==this.holdTime?[1/0,0]:n===1/0?[t+i/e,this.resolvedDuration*("loop"===s?1:2)/e||1]:[t+(i+n)/e,0]}isAccelerated(){const{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(o.now()):void 0}tween(){const{keyframes:t,type:n,ease:i,times:s,repeat:o,delay:r=0}=this.options,a=e.isBezierDefinition(i)?Ne(i):(t=>/^(linear|ease(In|Out|InOut))$/.test(t))(i)&&We[i];if(a&&!o&&!s&&2===t.length&&n===jt&&null===this.holdTime){const t=this.startTime+r/this.speed;return[t,t+this.resolvedDuration/this.speed,a]}}boundaries(t,e){const{startTime:n,speed:i,resolvedDuration:s,options:o}=this,{delay:r=0,repeat:a=0,repeatDelay:l=0,repeatType:c,times:u,keyframes:h,type:d}=o,p=(d||jt)===jt?u||kt(h):[0,1],m=n+r/i,f=[];if(null!==this.holdTime||!(s>0))return f;for(let n=Math.max(0,Math.floor((t-m)*i/s));n<=a;n++){const o=m+n*s/i;if(o>e)break;for(const r of p){const a=o+(n%2&&c&&"loop"!==c?1-r:r)*(s-l)/i;a>t&&a<e&&f.push(a)}}return f}numberAt(t){return parseFloat(this.sampleAt(t,!0))}sync(){const t=o.now();this.options.motionValue.setWithVelocity(this.sampleAt(t-10,!0),this.sampleAt(t,!0),10)}play(){this.isStopped||((this.group||function(t){const i=t.current,s=new Set,r=new Map;let a={},l=[],c=new Map,u=[],h=!1,d=!1,p=!1,m=!1,f=-1/0;const g=t=>{for(const e of s)if(e.name===t)return!0},y=(e,n)=>{const i={};for(const s of void 0===e?fe:l){const o=r.get(s),l=void 0===e?Tn(t,s):o?o.sampleAt(n>e&&!o.timing()[1]?n:e):a[s];void 0!==l&&(i[s]=l)}return i},v=(t,e)=>{let n="";for(const i in t){const s=t[i];e&&hn(i,s)||(n+=un(i,s)+" ")}return(e?n.trim():n)||"none"},x=(t,e)=>v(y(t,e)),w=(t=y())=>{i.style.transform=v(t,!0)},T=t=>{t.onfinish=t.oncancel=null,t.cancel()},S=(t=!0)=>{t&&w(),u.forEach(({animation:t})=>T(t)),u=[]},b=(t,e)=>new Animation(new KeyframeEffect(i,t,e)),P=(t,e,n=1/0)=>{const i={animation:t,offset:e,end:n};t.startTime=o.now()+e,n<1/0&&(t.onfinish=()=>{i.isDone=!0,u.some(t=>t.end===1/0)&&(T(t),u=u.filter(t=>t!==i)),B.schedule(!1)}),t.oncancel=()=>u.includes(i)&&B.demote(),u.push(i)},A=(t,e,n)=>{const i=(e,n)=>Math.abs(t(n)-t(e)),s=i(e,n);for(;n-e>.01;){const t=(e+n)/2;i(e,t)>i(t,n)?n=t:e=t}return i(e,n)>s/2?[e,n]:[]},M=(t,n,i,s)=>{const o=Math.min(200,Math.max(2,Math.ceil((i-n)/He)));if(4*s.length>o)return;const r=yn(n,i,o).concat(s).sort(gn),a=t=>e.progress(n,i,t);let l,c;for(const e of t){const t=e.numberAt(n),i=r.map(n=>e.numberAt(n)-t),s=i[i.length-1],o=i.some(t=>Math.abs(t)*mn>Math.abs(s))?0:s,a=i.map(t=>o?t/o:t);if(o&&!l)l=a,c=n=>(e.numberAt(n)-t)/o;else if(a.some((t,e)=>!fn(t,o&&l[e])))return}if(!l||l.every((t,e)=>fn(t,a(r[e]))))return"linear";const u=[],h=(t,e=c(t))=>u.push(zt(e)+" "+zt(100*a(t))+"%");return l.forEach((t,e)=>{e&&Math.abs(t-l[e-1])>.2&&A(c,r[e-1],r[e]).forEach(t=>h(t)),h(r[e],t)}),"linear("+u+")"},E=(t,e,n,i)=>{const s=[e],o=(e,n)=>t.every(t=>!(Math.abs(t.numberAt((e+n)/2)-(t.numberAt(e)+t.numberAt(n))/2)>(t.name.startsWith("scale")?.001:.1))),r=(e,n,i)=>{if(n-e<1||o(e,n))s.push(n);else if(i<4)r(e,(e+n)/2,i+1),r((e+n)/2,n,i+1);else{for(const i of t)s.push(...A(t=>i.numberAt(t),e,n));s.push(n)}},a=yn(e,n,Math.ceil((n-e)/100));for(const t of i)a.push(t,Math.min(t+.01,n));let l=e;for(const t of a.sort(gn))t>l&&r(l,t,0),l=t;return s.sort(gn)},V=t=>{let e;for(const n of t){const t=n.tween();if(!t||e?.some((e,n)=>n<2?Math.abs(t[n]-e)>1:t[n]!==e))return;e=t}return e},D=(t,n,i,s,o={fill:"both"},r)=>{const a=t.flatMap(t=>t.boundaries(n,i)),l=s||M(t,n,i,a),c=l?[n,i]:E(t,n,i,a),u=c.map(t=>x(t,r));let h={transform:u};return l||(h.offset=c.map(t=>e.progress(n,i,t))),u.every(t=>t===u[0])&&(w(y(n,r)),h=null),b(h,{...o,duration:i-n,easing:l||"linear"})},k=e=>{let n=e,i=0,o=0;const h=[],d=[],p=new Set;r.clear(),c=new Map;for(const t of s){r.set(t.name,t);const[s,a]=t.timing(),l=s===1/0;if(c.set(t,[t.at(e),t.speed,l]),l)t.sync();else{if(t.speed<0)return;if(a){if(i){const t=(s-o)/a;if(Math.abs(a-i)>1||Math.abs(t-Math.round(t))*i>1)return}else i=a,o=s;d.push(t)}else p.add(s);h.push(t),n=Math.max(n,s)}}a={},l=fe.filter(e=>{if(r.has(e))return!0;const n=a[e]=Tn(t,e);return void 0!==n&&!hn(e,n)}),S(!1);const m=!i&&V(h);try{if(m&&m[1]>e){const[t,n,i]=m;P(D(h,t,n,i),t-e,n-t)}else n>e&&(P(D(h,e,n),0,n-e),p.forEach(t=>t<n-1&&P(b(null,{duration:t-e}),0,t-e)));if(i){const t=o+Math.floor((n-o)/i)*i;P(D(d,t,t+i,void 0,{iterations:1/0,iterationStart:(n-t)/i,fill:"forwards"},n),n-e)}}catch{return}return u.length||S(),!0},C=t=>{let e,n=0;for(const i of s){const s=c.get(i);if(!s)return!1;const[o,r,a]=s,l=i.at(t),u=i.timing()[0]===1/0;if(a){if(u&&l===o)continue;return!1}const h=(l-o)/r,d=u?0:i.speed/r;if(void 0===e)e=h,n=d;else if(Math.abs(h-e)>1||d!==n)return!1}if(void 0===e)return!0;if(!u.length)return!1;for(const{offset:t,end:n,isDone:i}of u){const s=e-t;if(n<1/0&&(i?s<n-1:s<0||s>=n))return!1}for(const{animation:i,offset:s,isDone:o}of u){if(o)continue;const r=e-s;n&&i.updatePlaybackRate&&"running"===i.playState&&Math.abs(Number(i.currentTime)-r)<20?i.playbackRate!==n&&i.updatePlaybackRate(n):n?(i.playbackRate=n,i.startTime=t-r/n):(i.startTime=null,i.currentTime=r)}return!0},R=()=>!s.size&&(p=!0,xn(i)===B&&pn.delete(i),B.isJS||S(),!0),j=()=>{const e=o.now();if(B.isJS||(B.isFinishing=!0,s.forEach(n=>{const[i,s]=n.timing();"running"===n.state&&n.speed>0&&!s&&i<=e+1&&(n.complete(),a[n.name]=Tn(t,n.name),c.has(n)||(h=!0))}),B.isFinishing=!1),d=!1,p)return;if(s.forEach(t=>wn(t)&&s.delete(t)),R())return;for(const t of s)if(!t.canAccelerate)return B.demote(!0);B.isJS&&(B.isJS=!1,h=!0,s.forEach(t=>t.js?.stop()));const n=h,i=m;if(h=m=!1,n||!C(e)){if(i){if(e-f<100)return B.demote();f=e}if(!k(e))return B.demote()}},B={tracks:s,isJS:!1,isFinishing:!1,schedule(t,e){p||(h||(h=t),m||(m=!!e),d||(d=!0,n.isProcessing?lt.render(j,!1,!0):queueMicrotask(j)))},release(t){wn(t)&&s.delete(t),R()||B.schedule(!0)},check(){if(!B.isJS)for(const e in a)if(Tn(t,e)!==a[e]&&!g(e))return B.schedule(!0,!0)},demote(t){if(!B.isJS&&!p)return s.forEach(e=>{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),B.isJS=!0,c=new Map,S(),s.forEach(t=>"running"===t.state&&t.js?.start()),!0}};return pn.set(i,B),B}(vn(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:t}=this;t&&!t.isJS&&this.tick(o.now())}get time(){return this.isAccelerated()?e.millisecondsToSeconds(e.clamp(0,this.totalDuration,this.at(o.now())-(this.options.delay||0))):super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class bn extends $t{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=o.now();const{keyframes:e,name:n,motionValue:i,element:s}=t,r=t;r.autoplay??(r.autoplay=!0),r.delay??(r.delay=0),r.type??(r.type="keyframes"),r.repeat??(r.repeat=0),r.repeatDelay??(r.repeatDelay=0),r.repeatType??(r.repeatType="loop");const a=s?.KeyframeResolver||Re;this.keyframeResolver=new a(e,(t,e,n)=>this.onKeyframesResolved(t,e,r,!n),n,i,s),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=i;this.resolvedAt=o.now();const d=function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Ze(s,e),a=Ze(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||ze(n))&&i)}(t,r,a,l);d||(!e.MotionGlobalConfig.instantAnimations&&c||h?.(Ot(t,i,n)),t[0]=t[t.length-1],Je(i),i.repeat=0);const{onComplete:p}=i;i.finalKeyframe=n,i.keyframes=t,i.onComplete=()=>{p?.(),this.notifyFinished()};const m=d&&!u&&on(i),f=!m&&(({name:t,motionValue:e})=>t&&fe.includes(t)&&e?.owner?.current instanceof HTMLElement&&sn()&&Ue())(i);let g;if(s&&(m||f||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=Ut(this.createdAt,this.resolvedAt))),m){i.element=i.motionValue?.owner?.current;try{g=new _e(i)}catch{g=new Gt(i)}}else g=f?new Sn(i):new Gt(i);this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ce()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}class Pn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return An(this.animations,"duration")}get iterationDuration(){return An(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function An(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Mn extends Ye{constructor(t){super(),this.animation=t,t.onfinish=this.onFinish=()=>{t.onfinish=null,this.finishedTime=this.time,this.notifyFinished()},Wt(this,{})}}const En=new WeakMap;function Vn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Dn={current:void 0};class kn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=o.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=o.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){var i;return"change"===t?this.onChangeSubscribe(n):((i=this.events)[t]||(i[t]=new e.SubscriptionManager)).add(n)}onChangeSubscribe(t){const{events:n}=this;return n.change||this.changeSubscriber?(n.change||(n.change=new e.SubscriptionManager,n.change.add(this.changeSubscriber),this.changeSubscriber=void 0),n.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:n.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){lt.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){e&&(this.updatedAt=o.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){Dn.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=o.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let n,i=!1;n=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&(this.animation=void 0),e()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Cn(t,e){return new kn(t,e)}function Rn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function jn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Rn(n,t):n}const Bn={type:"spring",stiffness:500,damping:25,restSpeed:10},Ln={type:"keyframes",duration:.8},On={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fn=(t,{keyframes:e})=>e.length>2?Ln:ge.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Bn:On,In=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function Un(t){for(const e in t)if(!In.has(e))return!0;return!1}const Nn=(t,n,i,s={},o,r)=>a=>{const l=jn(s,t)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u-=e.secondsToMilliseconds(c);const h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...l,delay:-u,onUpdate:t=>{n.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:n,element:r?void 0:o,hasOnUpdate:!!l.onUpdate};Un(l)||Object.assign(h,Fn(t,h)),h.duration&&(h.duration=e.secondsToMilliseconds(h.duration)),h.repeatDelay&&(h.repeatDelay=e.secondsToMilliseconds(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Je(h),0===h.delay&&(d=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations||o?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Je(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==n.get()){const t=Ot(h.keyframes,l);if(void 0!==t)return void lt.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Gt(h):new bn(h)};function Wn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function $n(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Kn(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const zn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gn(t){const e=zn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Yn(t,n,i=1){const[s,o]=Gn(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return u(o)?Yn(o,n,i+1):o}function Xn(t,e,n,i){const s=e=>"function"==typeof e?e(void 0!==n?n:t.custom,...function(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}(i)):e;return"string"==typeof(e=s(e))&&(e=t.variants&&t.variants[e]),s(e)}function qn(t,e,n){return Xn(t.getProps(),e,n,t)}const Hn=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0,_n=new Set(["width","height","top","left","right","bottom",...fe]),Zn=t=>Array.isArray(t);function Jn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Cn(n))}function Qn(t){return Zn(t)?t[t.length-1]||0:t}function ti(t,e){const n=qn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Jn(t,e,Qn(o[e]))}}const ei=t=>Boolean(t&&t.getVelocity);function ni(t){return Boolean(ei(t)&&t.add)}function ii(t,n){const i=t.getValue("willChange");if(ni(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}const si="data-framer-appear-id";function oi(t){return t.props[si]}const ri="undefined"!=typeof window;function ai({protectedKeys:t,needsAnimating:e},n){const i=n in t&&!e[n];return e[n]=!1,i}function li(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Rn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState?.getState()[s],p=o?.path;p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),a,o,n,h):p.animateVisualElement?.(t,a,o,n,h));for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&ai(d,e))continue;const r={delay:n,...jn(d?.out[e]||o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){lt.update(()=>i.set(s));continue}let p=!1;if(ri&&window.MotionHandoffAnimation){const n=oi(t);if(n){const t=window.MotionHandoffAnimation(n,e,lt);null!==t&&(r.startTime=t,p=!0)}}ii(t,e);const m=c??t.shouldReduceMotion;i.start(Nn(e,i,s,m&&_n.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>lt.update(()=>{r&&ti(t,r)});h.length?Promise.all(h).then(e):e()}return h}function ci(t,e,n={}){const i=qn(t,e,Hn(t,n.type)),s=n.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),o=()=>Promise.all(i?li(t,i,n):[]),r=(i=0)=>{const{variantChildren:o}=t,{delayChildren:r=0,staggerChildren:a,staggerDirection:l}=s,c=[];return o?.forEach(t=>{t.notify("AnimationStart",e),c.push(ci(t,e,{...n,delay:i+("function"==typeof r?0:r)+Vn(o,t,r,a,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(c)},{when:a}=s;return a?"beforeChildren"===a?o().then(()=>r()):r().then(o):Promise.all([o(),r(n.delay)])}function ui(t,e,n={}){t.notify("AnimationStart",e);return(Array.isArray(e)?Promise.all(e.map(e=>ci(t,e,n))):"string"==typeof e?ci(t,e,n):Promise.all(li(t,qn(t,e,n.custom),n))).then(()=>{t.notify("AnimationComplete",e)})}const hi=t=>e=>e.test(t),di=[p,E,M,A,D,V,{test:t=>"auto"===t,parse:t=>t}],pi=t=>di.find(hi(t));function mi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const fi=new Set(["auto","none","0"]);class gi extends Re{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:t,element:e,motionValue:n}=this,i=t[0]??n?.get();if(!e?.current||void 0===i)return!1;for(let e=0;e<t.length;e++)if(d(e?t[e]:i))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e?.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),u(i))){const s=Yn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!_n.has(n)||2!==t.length)return;const[i,s]=t;if("number"==typeof i&&"number"==typeof s)return;const o=pi(i),r=pi(s);if(d(i)!==d(s)&&Pe[n])this.needsMeasurement=!0;else if(o!==r)if(ye(o)&&ye(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Pe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||mi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!fi.has(e)&&I(e)&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]!==i&&(t[s]=ie(n,i))}(t,n,e)}measure(){const{element:t,name:e}=this;return Pe[e](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t?.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&this.motionValue?.jump(i,!1)}measureEndState(){const{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const n=e.length-1,i=e[n];e[n]=this.measure(),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.resolveNoneKeyframes()}}const yi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],vi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...yi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);const xi=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),wi=[];function Ti(t){e.removeItem(wi,t)}function Si(t,e,n={},i){const s=[],{velocity:o,path:r}=n,a=n.reduceMotion??i?.shouldReduceMotion;r?.animateValues&&i&&(e={...e},r.animateValues(t,e,n,0,s));for(const r in e){if("transition"===r||"transitionEnd"===r)continue;const l=e[r];if(void 0===l)continue;const c=t(r),u=c.get();void 0===u||c.isAnimating()||Array.isArray(l)||l!==u||o?(c.start(Nn(r,c,l,a&&_n.has(r)?{type:!1}:n,i)),c.animation&&s.push(c.animation)):lt.update(()=>c.set(l))}const{transitionEnd:l}=e;if(l){const e=()=>lt.update(()=>{for(const e in l)t(e).set(l[e])});s.length?Promise.all(s).then(e):e()}return s}function bi(t,e,n,i,s){return Si(i=>{let o=t.get(e,i);if(!o){let r;if(!s){const s=n[i];r=function(t){const e=Array.isArray(t)?t[0]:void 0;return null===e?void 0:e}(s)??t.read(e,i,s)}o=Cn(r,{owner:s}),t(e,{[i]:o})}return o},n,i,s)}function Pi(t){return e.isObject(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function Ai(t){return e.isObject(t)&&"ownerSVGElement"in t}const Mi={};function Ei(t){return Mi.current?.add(t),t}function Vi(t){const e=Mi.current;if(!e)return;let n,i=!1;const s=e.add(()=>{i=!0,n?.()});t.then(t=>{t&&(n=()=>t.stop(),i?n():t.finished.then(s))},s)}const Di=t=>Mi.current?Mi.current.bind(t):t;function ki(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const i=e?e.current:Mi.current?.root||document,s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ci(t){const{test:e,read:n,get:i,flush:s,state:o}=t;return Object.assign((e,n)=>{const i=ki(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}},{test:e,read:n,get:i,flush:s,state:o})}class Ri{constructor(t=lt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{const{pending:t,numPending:e}=this;this.numPending=0;for(let n=0;n<e;n++)t[n]()}}set(t,e,n,i){if(this.values.get(t)?.onRemove(),i)for(const t of this.values.values())t.value===i&&(n=t.render);const s=()=>n&&this.schedule(n);void 0!==e.get()&&s();const o=e.on("change",s),r=()=>{o(),n&&!i&&this.cancel(n),this.values.get(t)?.onRemove===r&&this.values.delete(t)};return this.values.set(t,{value:e,render:i?void 0:n,onRemove:r}),r}get(t){return this.values.get(t)?.value}release(){const t=new Map;return this.values.forEach((e,n)=>{t.set(n,e.value),e.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){const{pending:e,numPending:n}=this;for(let i=0;i<n;i++)if(e[i]===t)return;n||this.step(this.flush),e[this.numPending++]=t}cancel(t){const{pending:e}=this;for(let n=0;n<this.numPending;n++)if(e[n]===t)return void(e[n]=e[--this.numPending])}}function ji(t,{step:e,...n}={}){const i=new WeakMap;return Object.assign((n,s)=>{const o=i.get(n)??new Ri(e);i.set(n,o);const r=[];for(const e in s){const i=s[e],a=t(n,o,e,i);r.push(a)}return()=>{for(const t of r)t()}},n,{get:(t,e)=>i.get(t)?.get(e),flush:t=>i.get(t)?.flush(),state:t=>i.get(t)})}const Bi=new Set(["originX","originY","originZ"]),Li=(t,e)=>rn(t.get(e)?.get(),Qt[e]),Oi=(t,e,n,i)=>{let s,o;if(ge.has(n)){if("pathRotation"!==n){const t=e.transformKeys??(e.transformKeys=[]);(e.transformValues??(e.transformValues={}))[n]=i,t.includes(n)||(t.push(n),t.sort((t,e)=>fe.indexOf(t)-fe.indexOf(e)))}e.get("transform")||(Pi(t)||e.get("transformBox")||Oi(t,e,"transformBox",new kn("fill-box")),e.set("transform",new kn("none"),()=>{pn.get(t)?.check(),t.style.transform=function(t){let e="";const{transformKeys:n=[],transformValues:i={}}=t;for(let t=0;t<n.length;t++){const s=n[t],o=i[s].getCurrent();void 0!==o&&(hn(s,o)||(e+=(e&&" ")+un(s,o)))}const s=t.get("pathRotation")?.get();return s&&(e+=(e&&" ")+un("rotate",s)),e||"none"}(e)})),o=e.get("transform")}else Bi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new kn(""),()=>{const n=Li(e,"originX")??"50%",i=Li(e,"originY")??"50%",s=Li(e,"originZ")??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=je(n)?()=>{t.style.setProperty(n,i.getCurrent())}:()=>{t.style[n]=rn(i.getCurrent(),Qt[n])};return e.set(n,i,s,o)},Fi=(t,e)=>{if(ge.has(e))return me(t,e);const n=getComputedStyle(t),i=je(e)?n.getPropertyValue(e):n[e];return"string"==typeof i&&i.trim()||0},Ii=ji(Oi,{test:t=>Pi(t)||Ai(t),read:Fi}),Ui=Ci(Ii);function Ni(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function Wi(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ge.has(t))r=!0;else if(l(t))s[t]=n;else{const e=rn(n,Qt[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=dn(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const $i={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ki={offset:"strokeDashoffset",array:"strokeDasharray"};function zi(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?$i:Ki;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Gi=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yi(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Wi(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of Gi)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&zi(h,s,o,r,!1)}const Xi=(t,e,n,i,s=n)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,s);o||!s.startsWith("data")&&!s.startsWith("aria")||(s=Ni(s));const r=Qt[n]||Qt[s],a=o?()=>{t[s]=rn(i.get(),Qt[n])}:()=>{const e=rn(i.get(),r);null==e?t.removeAttribute(s):t.setAttribute(s,String(e))};return e.set(n,i,a)},qi=Ci(ji(Xi));const Hi=(t,e,n,i)=>{if(n.startsWith("path")&&!ge.has(n))return function(t,e,n,i){return lt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const e=i.get();t.setAttribute("stroke-dashoffset",""+-e)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new kn("1 1"),()=>{const n=e.get("pathLength")?.get()??1,i=e.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Xi(t,e,n,i,Qi(n));if("d"===n)return e.set(n,i,()=>{const e=i.get()?.replace(/path\(|["')]/g,"");void 0===e?t.removeAttribute(n):t.setAttribute(n,e)});return(ge.has(n)||Bi.has(n)||je(n)||n in t.style?Oi:Xi)(t,e,n,i)},_i=(t,e)=>ge.has(e)?Qt[e]?.default||0:je(e)||Gi.includes(e)?Fi(t,e)||t.getAttribute(Ni(e))||0:(e=Qi(e),t.getAttribute(Ni(e))??t.getAttribute(e)??void 0),Zi=ji(Hi,{test:Ai,read:_i}),Ji=Ci(Zi);function Qi(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}function ts({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function es({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ns(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 is(t){return void 0===t||1===t}function ss({scale:t,scaleX:e,scaleY:n}){return!is(t)||!is(e)||!is(n)}const os=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function rs(t){return ss(t)||ls(t)||as(t)}function as(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function ls(t){return cs(t.x)||cs(t.y)}function cs(t){return t&&"0%"!==t}function us(t,e,n){return n+e*(t-n)}function hs(t,e,n,i,s){return void 0!==s&&(t=us(t,s,i)),us(t,n,i)+e}function ds(t,e=0,n=1,i,s){t.min=hs(t.min,e,n,i,s),t.max=hs(t.max,e,n,i,s)}function ps(t,{x:e,y:n}){ds(t.x,e.translate,e.scale,e.originPoint),ds(t.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,fs=1.0000000000001;function gs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++)o=n[a],r=o.projectionDelta,"contents"!==o.options.visualElement?.props.style?.display&&(!0===i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ys(t.x,-o.scroll.offset.x),ys(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ps(t,r)),i&&(i.path?.[a]||i)!==o&&rs(o.latestValues)&&ws(t,o.latestValues,o.layout?.layoutBox));e.x<fs&&e.x>ms&&(e.x=1),e.y<fs&&e.y>ms&&(e.y=1)}function ys(t,e){t.min+=e,t.max+=e}function vs(t,e,n,i,s=.5){ds(t,e,n,Y(t.min,t.max,s),i)}function xs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ws(t,e,n){const i=n??t;vs(t.x,xs(e.x,i.x),e.scaleX,e.scale,e.originX),vs(t.y,xs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Ts(t,e){return ts(ns(t.getBoundingClientRect(),e))}function Ss(t,e,n){const i=Ts(t,n),{scroll:s}=e;return s&&(ys(i.x,s.offset.x),ys(i.y,s.offset.y)),i}const bs=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),Ps={},As=t=>Ai(t)?Zi:Ii;class Ms{constructor(t,e){this.effect=t,this.current=e,this.KeyframeResolver=gi}getValue(t){return this.effect.get(this.current,t)}readValue(t,e){return this.effect.read(this.current,t,e)}render(){this.effect.flush(this.current)}measureViewportBox(){return Ts(this.current)}getProps(){return Ps}}const Es=t=>As(t).state(t)?.release();function Vs(t,e){const n=As(t).state(t);if(!n)return;const i=pn.get(t);i&&(i.demote(),pn.delete(t));const{transformKeys:s}=n;n.release().forEach((t,n)=>{"transformBox"===n||"transform"===n&&s?.length||(t.owner=e,e.addValue(n,t))})}const Ds=ji((t,e,n,i)=>e.set(n,i,()=>{t[n]=i.get()}),{test:t=>e.isObject(t),read:(t,e)=>{const n=t[e];return"string"==typeof n||"number"==typeof n?n:void 0}}),{schedule:ks,cancel:Cs}=at(queueMicrotask,!1);function Rs(t,e,n){const i=ei(t)?t:Cn(t);return i.start(Nn("",i,e,n)),i.animation}const js={};function Bs(t,{layout:e,layoutId:n}){return ge.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!js[t]||"opacity"===t)}const Ls={value:null,addProjectionMetrics:null,countProjection:void 0};function Os(t,e){const n=o.now();t=Di(t);const i=({timestamp:s})=>{const o=s-n;o>=e&&(ct(i),t(o-e))};return lt.setup(i,!0),Ei(()=>ct(i))}function Fs(t){return Ai(t)&&"svg"===t.tagName}function Is(t){return ei(t)?t.get():t}const Us=t=>"number"==typeof t?t:parseFloat(t),Ns=yi.length,Ws=t=>"number"==typeof t||E.test(t);function $s(t,e,n,i,s,o){s?(t.opacity=Y(0,n.opacity??1,zs(i)),t.opacityExit=Y(e.opacity??1,0,Gs(i))):o&&(t.opacity=Y(e.opacity??1,n.opacity??1,i));for(let s=0;s<Ns;s++){const o=yi[s];let r=Ks(e,o),a=Ks(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ws(r)===Ws(a)?(t[o]=Math.max(Y(Us(r),Us(a),i),0),(M.test(a)||M.test(r))&&(t[o]+="%")):t[o]=a}for(let s=0;s<os.length;s++){const o=os[s];(e[o]||n[o])&&(t[o]=Y(e[o]||0,n[o]||0,i))}}function Ks(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const zs=Ys(0,.5,e.circOut),Gs=Ys(.5,.95,e.noop);function Ys(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function Xs(t,e){t.min=e.min,t.max=e.max}function qs(t,e){Xs(t.x,e.x),Xs(t.y,e.y)}function Hs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function _s(t){return t.max-t.min}function Zs(t,e,n){return Math.abs(t-e)<=n}function Js(t,e,n,i=.5){t.origin=i,t.originPoint=Y(e.min,e.max,t.origin),t.scale=_s(n)/_s(e),t.translate=Y(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Qs(t,e,n,i){Js(t.x,e.x,n.x,i?.originX),Js(t.y,e.y,n.y,i?.originY)}function to(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+_s(e)}function eo(t,e,n,i){to(t.x,e.x,n.x,i?.x),to(t.y,e.y,n.y,i?.y)}function no(t,e,n,i=0){const s=i?Y(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+_s(e)}function io(t,e,n,i){no(t.x,e.x,n.x,i?.x),no(t.y,e.y,n.y,i?.y)}function so(t,e,n,i,s){return t=us(t-=e,1/n,i),void 0!==s&&(t=us(t,1/s,i)),t}function oo(t,e=0,n=1,i=.5,s,o=t,r=t){if(M.test(e)){e=parseFloat(e);e=Y(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Y(o.min,o.max,i);t===o&&(a-=e),t.min=so(t.min,e,n,a,s),t.max=so(t.max,e,n,a,s)}function ro(t,e,[n,i,s],o,r){oo(t,e[n],e[i],e[s],e.scale,o,r)}const ao=["x","scaleX","originX"],lo=["y","scaleY","originY"];function co(t,e,n,i){ro(t.x,e,ao,n?.x,i?.x),ro(t.y,e,lo,n?.y,i?.y)}const uo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ho=uo("applewebkit/")&&!uo("chrome/")?Math.round:e.noop;function po(t){t.min=ho(t.min),t.max=ho(t.max)}function mo(t){po(t.x),po(t.y)}const fo=()=>({translate:0,scale:1,origin:0,originPoint:0}),go=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),yo=()=>({min:0,max:0}),vo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xo(t){return 0===t.translate&&1===t.scale}function wo(t){return xo(t.x)&&xo(t.y)}function To(t,e){return t.min===e.min&&t.max===e.max}function So(t,e){return To(t.x,e.x)&&To(t.y,e.y)}function bo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Po(t,e){return bo(t.x,e.x)&&bo(t.y,e.y)}function Ao(t){return _s(t.x)/_s(t.y)}function Mo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Eo{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(e.removeItem(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function Vo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Do={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!E.test(t))return t;t=parseFloat(t)}return`${Vo(t,e.target.x)}% ${Vo(t,e.target.y)}%`}},ko={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$.parse(t);if(s.length>5)return i;const o=$.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Y(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},Co={borderRadius:Object.assign({},Do,{applyTo:yi.slice()}),borderTopLeftRadius:Do,borderTopRightRadius:Do,borderBottomLeftRadius:Do,borderBottomRightRadius:Do,boxShadow:ko};function Ro(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t}=n;t&&(i=`perspective(${t}px) ${i}`);for(let t=0;t<os.length;t++){const e=os[t],s=n[e];s&&(i+=`${e}(${s}deg) `),!t&&n.pathRotation&&(i+=`rotate(${n.pathRotation}deg) `)}}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}function jo(t){return[t("x"),t("y")]}const Bo=(t,e)=>t.depth-e.depth;class Lo{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bo),this.isDirty=!1,this.children.forEach(t)}}const Oo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fo=["z","skew","skewZ"];let Io=0;function Uo(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}const No=t=>t.instance&&pn.get(t.instance)?.demote()&&t.resetSkewAndRotation();function Wo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=oi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Wo(i)}function $o(t){if(t)return!1!==t.options.allowProjection?t.projection:$o(t.parent)}function Ko({attachResizeListener:t,defaultParent:i,measureScroll:s,checkIsScrollRoot:r,resetTransform:a}){return Object.assign(js,{...Co,...js}),class{static create(t,e,n){const{layoutId:i,layout:s,drag:o,dragConstraints:r,layoutScroll:a,layoutRoot:l,layoutAnchor:c,layoutCrossfade:u}=e,h=t.projection=new this(t.latestValues,e["data-framer-portal-id"]?void 0:$o(t.parent));var d;h.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(o)||r&&(d=r,d&&"object"==typeof d&&Object.prototype.hasOwnProperty.call(d,"current")),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:a,layoutRoot:l,layoutAnchor:c});const p=h.getStack()?.lead;p&&!h.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}constructor(t={},e=i?.()){this.id=Io++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Yo),this.nodes.forEach(nr),this.nodes.forEach(ir),this.nodes.forEach(Xo),Ls.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lo)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Ai(e)&&!Fs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;lt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n?.(),n=Os(s,250),Oo.hasAnimatedSinceResize&&(Oo.hasAnimatedSinceResize=!1,this.nodes.forEach(er)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:n,animate:i}=this.options;this.instance&&!this.hasLayoutListener&&!1!==i&&n&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||n.getDefaultTransition()||lr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!Po(this.targetLayout,s),c=!e&&i;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...jn(o,"layout"),onPlay:r,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||er(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=s}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,ct(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(sr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;No(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,No(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(_o),void this.nodes.forEach(Ho)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Zo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jo),this.nodes.forEach(Qo),this.nodes.forEach(tr),this.nodes.forEach(zo),this.nodes.forEach(Go)):this.nodes.forEach(Zo),this.clearAllSnapshots();const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ks.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qo),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||_s(this.snapshot.measuredBox.x)||_s(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:n}=this,{animationId:i}=this.root;if(this.options.layoutScroll&&n&&(!e||e.animationId!==i||e.phase!==t)){const o=r(n);this.scroll={animationId:i,phase:t,isRoot:o,offset:s(n),wasRoot:e?e.isRoot:o}}}resetTransform(){if(!a)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&No(this);const e=this.projectionDelta&&!wo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||rs(this.latestValues)||s)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),mo(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hr))){const{scroll:t}=this.root;t&&(ys(e.x,t.offset.x),ys(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(qs(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&qs(e,t),ys(e.x,s.offset.x),ys(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n,i,s=0){const o=n||{x:{min:0,max:0},y:{min:0,max:0}};qs(o,t);for(let t=s;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ys(o.x,-n.scroll.offset.x),ys(o.y,-n.scroll.offset.y)),rs(n.latestValues)&&ws(o,n.latestValues,n.layout?.layoutBox)}return!i&&rs(this.latestValues)&&ws(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};qs(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!rs(n.latestValues))continue;let i;n.instance&&(ss(n.latestValues)&&n.updateSnapshot(),i=vo(),qs(i,n.measurePageBox())),co(e,n.latestValues,n.snapshot?.layoutBox,i)}return rs(this.latestValues)&&co(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=n.timestamp;const r=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):qs(this.target,this.layout.layoutBox),ps(this.target,this.targetDelta)):qs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&(!r.resumingFrom==!this.resumingFrom||r.options.layoutRoot&&!r.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),Ls.countProjection?.(1))}getClosestProjectingParent(){if(this.parent&&!ss(this.parent.latestValues)&&!ls(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},io(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),qs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===n.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;qs(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;gs(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Hs(this.prevProjectionDelta.x,this.projectionDelta.x),Hs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Qs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&Mo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Mo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Ls.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=i?.source!==this.layout?.source,c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(ar));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,g;or(r.x,t.x,n),or(r.y,t.y,n),i&&(r.x.translate=i.x,r.y.translate=i.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(io(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,rr(c.x,m.x,f.x,g),rr(c.y,m.y,f.y,g),d&&So(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),qs(d,this.relativeTarget)),l&&(this.animationValues=o,$s(o,s,this.latestValues,n,h,u)),void 0!==i?.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Oo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Rs(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),function(t,e){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Nt("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:n,latestValues:i}=t;let{target:s}=t;if(e&&s&&n){if(this!==t&&this.layout&&n&&ur(this.options.animationType,this.layout.layoutBox,n.layoutBox)){const{layoutBox:t}=this.layout,e=s;s=this.target||{x:{min:0,max:0},y:{min:0,max:0}},cr(s.x,e.x,t.x),cr(s.y,e.y,t.y)}qs(e,s),ws(e,i),Qs(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Eo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!as(e))return;const n={};for(let e=0;e<Fo.length;e++)Uo(Fo[e],t,n,this.animationValues);for(let e=0;e<os.length;e++)Uo(os[e],t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const n=this.getLead();if(!this.isVisible&&n!==this)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Is(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!n.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Is(e?.pointerEvents)||""),void(this.hasProjected&&!rs(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=Ro(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in js){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=js[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?Is(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ho),this.root.sharedNodes.clear()}}}function zo(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:n}=t,i=n?.isAnimationBlocked&&n.layout;if(!e||!i||t.resumeFrom||t.isAnimationBlocked)return;const s=n.dragSnapshot;jo(t=>ys(e.layoutBox[t],i.layoutBox[t].min-s.layoutBox[t].min))}(t)}function Go(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source,r=(i,o)=>{if("size"===s)jo(t=>{const e=_s(i[t]);i[t].min=o[t].min,i[t].max=i[t].min+e});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Xs(i[t],o[t])}else ur(s,e.layoutBox,n)&&jo(e=>{const n=_s(o[e]);i[e].max=i[e].min+n,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+n)})},a=o?e.measuredBox:e.layoutBox;r(a,n);const l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Qs(l,n,e.layoutBox);const c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Qs(c,o?t.applyTransform(i,!0):n,a);const u=!wo(l);let h=!1;const d=t.getClosestProjectingParent();if((!o||d?.options.layoutRoot&&t.resumeFrom?.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:i,layout:s}=d;if(i&&s){const a=t.options.layoutAnchor||void 0,l={x:{min:0,max:0},y:{min:0,max:0}};io(l,o?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,i.layoutBox,a);const c={x:{min:0,max:0},y:{min:0,max:0}};io(c,n,s.layoutBox,a),o&&r(l,c),Po(l,c)||(h=!0),d.options.layoutRoot&&(t.relativeTarget=c,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function Yo(t){Ls.countProjection?.(0),t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Xo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function qo(t){t.clearSnapshot()}function Ho(t){t.clearMeasurements()}function _o(t){t.isLayoutDirty=!0,t.updateLayout()}function Zo(t){t.isLayoutDirty=!1}function Jo(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function Qo(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function tr(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function er(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nr(t){t.resolveTargetDelta()}function ir(t){t.calcProjection()}function sr(t){t.resetSkewAndRotation()}function or(t,e,n){t.translate=Y(e.translate,0,n),t.scale=Y(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function rr(t,e,n,i){t.min=Y(e.min,n.min,i),t.max=Y(e.max,n.max,i)}function ar(t){return void 0!==t.animationValues?.opacityExit}const lr={duration:.45,ease:[.4,0,.1,1]};function cr(t,e,n){t.max=_s(n)+(t.min=e.min)}function ur(t,e,n){return"position"===t||"preserve-aspect"===t&&!Zs(Ao(e),Ao(n),.2)}function hr(t){return t!==t.root&&t.scroll?.wasRoot}function dr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const pr=Ko({attachResizeListener:(t,e)=>dr(t,"resize",e),measureScroll:bs,checkIsScrollRoot:()=>!0}),mr={current:void 0},fr=Ko({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!mr.current){const t=new pr({});t.mount(window),t.setOptions({layoutScroll:!0}),mr.current=t}return mr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),gr=new WeakMap;function yr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function vr(t){return"string"==typeof t||Array.isArray(t)}const xr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wr=["initial"].concat(xr);function Tr(t){if(yr(t.animate))return!0;for(let e=0;e<wr.length;e++)if(vr(t[wr[e]]))return!0;return!1}function Sr(t){return Boolean(Tr(t)||t.variants)}function br(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ei(s))t.addValue(i,s);else if(ei(o))t.addValue(i,Cn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Cn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Pr={current:null},Ar={current:!1},Mr="undefined"!=typeof window;function Er(){if(Ar.current=!0,Mr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Pr.current=t.matches;t.addEventListener("change",e),e()}else Pr.current=!1}const Vr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Dr={};class kr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:r,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=Re,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=o.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,lt.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=e.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Tr(e),this.isVariantNode=Sr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==c[t]&&ei(e)&&e.set(c[t])}}mount(t){const e=this.presenceContext;if(this.hasBeenMounted&&!1!==e?.isPresent&&!e?.keepValuesOnRemount)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];if(this.current=t,gr.set(t,this),this.projection?.instance||this.projection?.mount(t),this.isVariantNode&&!this.isControllingVariants){let t=this;do{t=!1!==t.props.inherit&&t.parent}while(t&&!t.isVariantNode);if(t){const{variantChildren:e}=t;e.add(this),this.removeFromVariantTree=()=>e.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ar.current||Er(),this.shouldReduceMotion=Pr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),ct(this.notifyUpdate),ct(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.get(t)?.(),n.accelerate&&Qe.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:s,times:o,ease:r,duration:a}=n.accelerate,l=new Ye({element:this.current,name:t,keyframes:s,times:o,ease:r,duration:e.secondsToMilliseconds(a)}),c=i(l);return void this.valueSubscriptions.set(t,()=>{c(),l.cancel()})}const i=ge.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&<.preRender(this.notifyUpdate),i&&(this.projection&&(this.projection.isTransformDirty=!0),pn.get(this.current)?.check()),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Dr){const e=Dr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){const{transformTemplate:n,onUpdate:i}=this.props;(t.transformTemplate||n)&&this.scheduleRender(),(t.transformTemplate&&!n||t.onUpdate&&!i)&&pn.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Vr.length;e++){const n=Vr[e];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=br(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(t){return this.props.variants?.[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,e){const n=this.values.get(t);if(e!==n){n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e);const i=e.get();void 0!==i&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t),this.valueSubscriptions.get(t)?.(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){let n=this.props.values?.[t];return n||(n=this.values.get(t),void 0===n&&void 0!==e&&(n=Cn(e??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,n)),n)}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):"number"!=typeof i&&!$.test(i)&&$.test(n)&&(i=ie(t,n)),this.setBaseTarget(t,ei(i)?i.get():i)),ei(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}on(t,n){return(this.events[t]||(this.events[t]=new e.SubscriptionManager)).add(n)}notify(t,...e){this.events[t]?.notify(...e)}scheduleRenderMicrotask(){ks.render(this.render)}}class Cr extends kr{constructor(){super(...arguments),this.KeyframeResolver=gi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ei(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Rr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function jr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ei(i[e])||s&&ei(s[e])||Bs(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Br extends Cr{constructor(){super(...arguments),this.type="html",this.renderInstance=Rr}mount(t){super.mount(t)}readValueFromInstance(t,e){if(ge.has(e))return this.projection?.isProjecting?de(e):me(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(l(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ts(t,e)}build(t,e,n){Wi(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return jr(t,e,n)}}function Lr(t){let e=gr.get(t);return e||(e=new Br({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0}),Vs(t,e)),t.style.transform&&!rs(e.latestValues)&&(t.style.transform=""),e}const Or={},Fr={updateScroll:()=>{Fr.scroll||(Fr.scroll={offset:bs()})}},Ir=t=>{const n=Lr(t),i=new e.SubscriptionManager,s={instance:t,root:Fr,path:[Fr],setOptions:e.noop,isProjecting:e.noop,applyProjectionStyles:e.noop,removeElementScroll:t=>t,updateLayout:()=>{const e=Ss(t,Fr,n.getTransformPagePoint());mo(e),s.layout={layoutBox:e},i.notify()},addEventListener:(t,n)=>"measure"===t?i.add(n):e.noop,unmount:()=>{s.instance=void 0,n.projection===s&&(n.projection=void 0)}};return n.projection=s,n.current||n.mount(t),[s,s.unmount]},Ur=t=>{const n=gr.get(t)?.projection;return n?.instance?[n,e.noop]:(Or.create||Ir)(t)},Nr="[data-layout],[data-layout-id]",Wr=new WeakMap;let $r;function Kr(t){const e=[];return t instanceof HTMLElement&&t.matches(Nr)&&e.push(t),t.querySelectorAll(Nr).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function zr(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function Gr(t,e){let n=Wr.get(t);if(n)n.setOptions(zr(t,e));else{const i=Lr(t);n=new fr(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=Wr.get(e);if(t?.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...zr(t,e),visualElement:i}),n.mount(t),Wr.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function Yr(t){const e=Gr(t);return[e,()=>Wr.get(t)===e&&Xr(t,e)]}function Xr(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),Wr.delete(t)}function qr(){const t=$r;if(!t)return;$r=void 0,function(){if(n.isProcessing)return;const t=o.now();n.delta=e.clamp(0,1e3/60,t-n.timestamp),n.timestamp=t,n.isProcessing=!0,ut.update.process(n),ut.preRender.process(n),ut.render.process(n),n.isProcessing=!1}();const i=new Map;for(const e of t)for(const t of e.collectTargets()){const n=i.get(t);n?n.push(e):i.set(t,[e])}const s=new Map;for(const t of(r=i.keys(),[...r].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const e=i.get(t),n=Gr(t,e[e.length-1].transitionFor(t));for(const i of e)i.adopt(t,n);s.set(t,n)}var r;s.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const a=[];for(const e of t){const t=e.runUpdate();t&&a.push(t)}const l=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let n;s.forEach(t=>n||(n=t.root));for(const e of t)n||(n=e.getRoot());n?.didUpdate(),ks.render(()=>{for(const e of t)e.finalize()})};a.length?Promise.all(a).then(l):l()}Or.create=Yr;const Hr=qr;class _r{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),$r||($r=[],queueMicrotask(qr)),$r.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return Kr(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of Kr(this.scope)){if(this.tracked.has(e))continue;const n=Gr(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next?.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),Xr(n,e)}}),e.relegate())return;n.remove()}Xr(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new Pn([...t]))}}function Zr(t,e,n){if("function"==typeof t)return{scope:Mi.current?.root||document,updateDom:t,defaultOptions:e};return{scope:t instanceof Document?t:ki(t)[0]??document,updateDom:e,defaultOptions:n}}const Jr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Qr(t){return{point:{x:t.pageX,y:t.pageY}}}const ta=t=>e=>Jr(e)&&t(e,Qr(e));function ea(t,e,n,i){return dr(t,e,ta(n),i)}const na=new WeakMap;let ia;const sa=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ai(i)&&"getBBox"in i?i.getBBox()[e]:i[n],oa=sa("inline","width","offsetWidth"),ra=sa("block","height","offsetHeight");function aa({target:t,borderBoxSize:e}){na.get(t)?.forEach(n=>{n(t,{get width(){return oa(t,e)},get height(){return ra(t,e)}})})}function la(t){t.forEach(aa)}function ca(t,e){ia||"undefined"!=typeof ResizeObserver&&(ia=new ResizeObserver(la));const n=ki(t);return n.forEach(t=>{let n=na.get(t);n||(n=new Set,na.set(t,n)),n.add(e),ia?.observe(t)}),()=>{n.forEach(t=>{const n=na.get(t);n?.delete(e),n?.size||ia?.unobserve(t)})}}const ua=new Set;let ha;function da(t){return ua.add(t),ha||(ha=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ua.forEach(e=>e(t))},window.addEventListener("resize",ha)),()=>{ua.delete(t),ua.size||"function"!=typeof ha||(window.removeEventListener("resize",ha),ha=void 0)}}function pa(t,e){return Ei("function"==typeof t?da(t):ca(t,e))}const ma=(t,e)=>Math.abs(t-e);function fa(t,e){const n=ma(t.x,e.x),i=ma(t.y,e.y);return Math.sqrt(n**2+i**2)}const ga=new Set(["auto","scroll"]);class ya{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=xa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Ta(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=fa(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t;this.history.push({...i,timestamp:o.now()});const{onStart:s,onMove:r}=this.handlers;e||(s?.(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r?.(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=xa(e,this.transformPagePoint),this.hasPendingMove=!0,lt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s?.(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ta("pointercancel"===t.type?this.lastMoveEventInfo:xa(e,this.transformPagePoint),this.history);this.startEvent&&n?.(t,o),i?.(t,o)},!Jr(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const c=xa(Qr(t),this.transformPagePoint),{point:u}=c;this.history=[{...u,timestamp:o.now()}];const{onSessionStart:h}=n;h&&h(t,Ta(c,this.history));const d={passive:!0,capture:!0};this.removeListeners=e.pipe(ea(this.contextWindow,"pointermove",this.handlePointerMove,d),ea(this.contextWindow,"pointerup",this.handlePointerUp,d),ea(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const t=getComputedStyle(n);(ga.has(t.overflowX)||ga.has(t.overflowY))&&this.scrollPositions.set(n,va(n)),n=n.parentElement}this.scrollPositions.set(window,va(window)),this.removeScrollListeners=e.pipe(dr(window,"scroll",this.onElementScroll,{capture:!0}),dr(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=va(t),s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),lt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),ct(this.updatePoint)}}const va=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function xa(t,e){return e?{point:e(t.point)}:t}function wa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ta({point:t},e){return{point:t,delta:wa(t,ba(e)),offset:wa(t,Sa(e)),velocity:Pa(e,.1)}}function Sa(t){return t[0]}function ba(t){return t[t.length-1]}function Pa(t,n){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=ba(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>e.secondsToMilliseconds(n)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>2*e.secondsToMilliseconds(n)&&(s=t[1]);const r=e.millisecondsToSeconds(o.timestamp-s.timestamp);if(0===r)return{x:0,y:0};const a={x:(o.x-s.x)/r,y:(o.y-s.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const Aa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ma(t){return Aa.has(t.tagName)||!0===t.isContentEditable}const Ea=new Set(["INPUT","SELECT","TEXTAREA"]);function Va(t){return Ea.has(t.tagName)||!0===t.isContentEditable}const Da={x:!1,y:!1};function ka(){return Da.x||Da.y}function Ca(t){return"x"===t||"y"===t?Da[t]?null:(Da[t]=!0,()=>{Da[t]=!1}):Da.x||Da.y?null:(Da.x=Da.y=!0,()=>{Da.x=Da.y=!1})}function Ra(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ja(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Ba=.35;function La(t,e,n){return{min:Oa(t,e),max:Oa(t,n)}}function Oa(t,e){return"number"==typeof t?t:t[e]||0}function Fa(t){let e="";for(const n of t.path){n.scroll=void 0,n.updateScroll();const{scroll:i}=n;n!==t.root&&i&&(e+=i.offset.x+","+i.offset.y+",")}return e}const Ia=new WeakMap;class Ua{constructor(t,e=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){if(!1===this.visualElement.presenceContext?.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ya(t,{onSessionStart:t=>{e&&this.snapToCursor(t),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragConstraints:i,dragPropagation:s,onDragStart:o}=this.getProps();if(n&&!s&&(this.openDragLock?.(),this.openDragLock=Ca(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:r}=this.visualElement;r&&(r.isAnimationBlocked=!0,r.target=void 0),jo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(u(e)&&(e=Yn(e,this.visualElement.current)||0),E.test(e))e=parseFloat(e);else if(M.test(e)){const n=r?.layout?.layoutBox[t];n&&(e=_s(n)*(parseFloat(e)/100))}this.originPoint[t]=e}),this.point="function"==typeof i&&i(this),o&<.update(()=>o(t,e),!1,!0),ii(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection){if(this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),null===this.currentDirection)return;s&&s(this.currentDirection)}this.updateAxis("x",r),this.updateAxis("y",r),this.point&&this.point.move(),this.visualElement.render(),o&<.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints||this.point)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,n){const i=t||this.latestPointerEvent,s=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r,n);const{onDragEnd:a}=this.getProps();a&<.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){const{drag:n}=this.readProps();if(!e||!Ka(t,n,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+e[t];const o=this.constraints&&this.constraints[t];o&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Y(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Y(n,t,i.max):Math.min(t,n)),t}(s,o,this.elastic[t])),this.point?this.point[t]=s:i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:n}=this.visualElement,i=n&&(n.layout||n.measure(!1)),s=this.constraints;Na(t)?this.constraints&&this.scroll===Fa(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i||"object"!=typeof t)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ra(t.x,n,s),y:Ra(t.y,e,i)}}(i.layoutBox,t),this.elastic=function(t=Ba){return!1===t?t=0:!0===t&&(t=Ba),{x:La(t,"left","right"),y:La(t,"top","bottom")}}(e),s!==this.constraints&&!Na(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&jo(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!Na(t))return!1;const n=Wa(t),{projection:i}=this.visualElement;if(!i||!i.layout)return!1;this.scroll=Fa(i);const s=Ss(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ja(t.x,e.x),y:ja(t.y,e.y)}}(i.layout.layoutBox,i.removeElementScroll(s));if(e){const t=e(es(o));this.hasMutatedConstraints=!!t,t&&(o=ts(t))}return o}startAnimation(t,e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l={bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o},c=s=>!i||this.point&&r||!Ka(s,e||n,this.currentDirection)?0:t[s];if(this.point&&!r)return this.point.release({x:c("x"),y:c("y")},l).then(a);const u=this.constraints||{},h=jo(t=>{if(!Ka(t,e||n,this.currentDirection))return;let i=u[t]||{};!0!==r&&r!==t||(i={min:0,max:0});const s={type:"inertia",velocity:c(t),...l,...i};return this.startAxisValueAnimation(t,s)});return Promise.all(h).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return ii(this.visualElement,t),n.start(Nn(t,n,0,e,this.visualElement,!1))}stopAnimation(){jo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.readProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){const{drag:n}=this.getProps(),i={x:t,y:e},s=this.visualElement.getTransformPagePoint()?.(i)||i,o=this.visualElement.measureViewportBox();jo(t=>{if(!Ka(t,n,this.currentDirection))return;const e=this.getAxisMotionValue(t),{min:i,max:r}=o[t];e.set((e.get()||0)+s[t]-Y(i,r,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Na(n)||!i||!this.constraints)return;this.stopAnimation();const s=this.constraints,o={x:0,y:0};jo(t=>{const n=this.getAxisMotionValue(t).get();o[t]=function(t,n){let i=.5;const s=_s(t),o=_s(n);return o>s?i=e.progress(n.min,n.max-s,t.min):s>o&&(i=e.progress(t.min,t.max-o,n.min)),e.clamp(0,1,i)}({min:n,max:n},s[t])});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),jo(e=>{const n=this.getAxisMotionValue(e);if(!Ka(e,t,null)||!n.get())return;const{min:i,max:s}=this.constraints[e];n.set(Y(i,s,o[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ia.set(this.visualElement,this);const t=this.visualElement.current,e=ea(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&Va(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps(),i=Na(e)&&Wa(e);i&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=pa(t,$a(n)),s=pa(e,$a(n));return()=>{i(),s()}}(t,i,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s.layout||(s.root?.updateScroll(),s.updateLayout()),lt.read(i);const r=dr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(jo(e=>{if(!Ka(e,this.getProps().drag,this.currentDirection))return;const n=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate)}),this.visualElement.render())});return()=>{r(),e(),o(),a(),n?.()}}getProps(){const t=this.readProps(),{dragElastic:e=Ba,dragMomentum:n=!0}=t;return{...t,dragElastic:e,dragMomentum:n}}}function Na(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}const Wa=t=>"current"in t?t.current:t;function $a(t){let e=!0;return()=>{e?e=!1:t()}}function Ka(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const za=["user-select","-webkit-user-select","-webkit-touch-callout","touch-action"];function Ga(t,e){const n=ki(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},Ei(()=>i.abort())]}const Ya=(t,e)=>!!e&&(t===e||Ya(t,e.parentElement)),Xa=new WeakSet;function qa(t){return e=>{"Enter"===e.key&&t(e)}}function Ha(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function _a(t){return Jr(t)&&!ka()}const Za=new WeakSet;const Ja={reducedMotion:"(prefers-reduced-motion: reduce)",motion:"(prefers-reduced-motion: no-preference)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",hover:"(hover: hover) and (pointer: fine)",touch:"(pointer: coarse)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Qa(t){return t.includes("(")?t:t.replace(/([<>!]=?)\s+/g,"$1").trim().split(/\s+/).map(t=>{const e="!"===t[0];e&&(t=t.slice(1));const n=/^([<>]=?)([\d.]+)([a-z]*)$/.exec(t),i=n?`(width ${n[1]} ${n[2]}${n[3]||"px"})`:Ja[t]||t;return e?`(not (${i}))`:i}).join(" and ")}const tl=["nodes","calculatedTargetDeltas","calculatedProjections"];function el(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Vt(t[1+n],t[2+n],t[3+n]);return e?s(i):s}const nl=new Set,il=({timestamp:t})=>{nl.forEach(e=>e.tick(t))};class sl extends $t{constructor(t){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.factory=t.type,this.generator=this.factory(t);const{driver:e}=t;e&&(this.driver=e(t=>this.tick(t))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(nl.size||lt.update(il,!0),nl.add(this))}setTarget(t,e){this.nextTarget=t,this.nextVelocity=e,this.hasNextTarget=!0}retarget(t,e){const{options:n,generator:i}=this;n.keyframes=t,n.velocity=e,this.startTime=this.now(),this.currentTime=0,i.retarget?i.retarget(t,e):this.generator=this.factory(n)}tick(t){const{options:e,hasNextTarget:n}=this,{delay:i=0,onUpdate:s,onPlay:o}=e;this.started||(this.startTime=Ut(this.startTime,t));const r=Math.round(t-this.startTime)-i,a=this.currentTime=Math.max(0,r),l=this.generator.next(a),c=r<0?e.keyframes[0]:l.value;if(n){this.hasNextTarget=!1;const{keyframes:t}=e;t[0]=c,t[1]=this.nextTarget,this.retarget(t,this.nextVelocity??this.getGeneratorVelocity())}!n&&this.started||(this.started=!0,o?.()),"running"===this.state&&(s?.(c),l.done&&r>=0&&!n&&!this.hasNextTarget&&"running"===this.state&&(this.notifyFinished(),this.teardown(),this.state="finished",e.onComplete?.()))}getGeneratorVelocity(){return Bt(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():o.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(nl.delete(this),nl.size||ct(il))}}function ol(t,e,n){const i=t.get();let s,o=null;const r="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,a=t=>s(r?t+r:t),l=()=>t.events.animationStart?.notify(),c=()=>{o&&(o.stop(),o=null),t.animation=void 0};if(t.attach((e,i)=>{s=i;const r=Us(e);if("running"===o?.state)return void o.setTarget(r,n.velocity);const u=Us(t.get()),h=o?o.getGeneratorVelocity():t.getVelocity();if(c(),u===r)return;const d={keyframes:[u,r],velocity:h,restDelta:.001,restSpeed:.01,...n,onUpdate:a},p=o=new sl({...d,onPlay:l});t.animation=p,p.then(()=>{o===p&&(o=null,t.animation=void 0,t.events.animationComplete?.notify())})},c),ei(e)){let i=!0===n.skipInitialAnimation;const s=e=>{i?(i=!1,t.jump(rl(e,r),!1)):t.set(rl(e,r))},o=e.on("change",s),a=e.get();Us(a)-Us(t.get())&&s(a);const l=t.on("destroy",o);return()=>{o(),l(),c()}}return c}function rl(t,e){return e?t+e:t}function al(t,e,n={}){const i={type:"spring",...n};return It(i),i.type=i.type||jt,ol(t,e,i)}function ll(t){const e=[];Dn.current=e;const n=t();Dn.current=void 0;const i=Cn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>lt.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),ct(i)})}(e,i,t),i}function cl(t,e,n){return ol(t,e,{...n,type:Mt})}const ul=[...di,R,$];let hl=0;const dl=()=>"motion-view-"+hl++;function pl(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function ml(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function fl(t,e,n,i,s,o=[],r,a=[],l){const c=ki(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??dl();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),pl(t,s,o),ml(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=dl(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),pl(t,s,o),ml(t,d,r,a,l),d})}function gl(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let yl={},vl=null;const xl=(t,e)=>{yl[t]=e},wl=()=>{vl||(vl=document.createElement("style"),vl.id="motion-view");let t="";for(const e in yl){const n=yl[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}vl.textContent=t,document.head.appendChild(vl),yl={}},Tl=()=>{vl&&vl.parentElement&&vl.parentElement.removeChild(vl)};function Sl(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function bl(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const Pl=["layout","enter","exit","new","old"],Al=t=>t.split(" ").every(t=>0===parseFloat(t)),Ml={group:["layout"],new:["new","enter"],old:["old","exit"]},El={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function Vl(t){const{update:n,targets:i,resolveDefs:s,cropOverride:o,pairs:r,classNames:a,flatGroups:l,options:c}=t;if(!document.startViewTransition)return(async()=>(await n(),new Pn([])))();const u=new Map,h=[],d=[],p=[],m=new Set,f=new Map,g=new Set,y=new Map,v=new Map,x=new Map,w=new Map,T=t=>{i.forEach((e,n)=>{const i=a.get(n),c="root"!==n&&s.has(n)?l.has(n)?"none":"contain":void 0;let g;if("root"!==n&&s.has(n))if(r.has(n))if("old"===t)w.set(n,ki(n)),g=fl(n,u,h,void 0,i,d,c,p,m),x.set(n,g);else{for(const t of w.get(n)??[])t.style?.removeProperty("view-transition-name"),u.delete(t);g=fl(r.get(n),u,h,x.get(n),i,d,c,p,m)}else g=fl(n,u,h,void 0,i,d,c,p,m);else g=[n];const T=o.get(n);g.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==T&&y.set(n,T);const o=v.get(n)??{};o[t]=[i,g.length],v.set(n,o)})})},S=(t,e)=>{const n=v.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},b=(t,e,n,i,s)=>{const o=Dl(jn(c,n),jn(function(t,e){for(const n of Ml[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},P=t=>{const[n,i]=S(t,"group"),s=b(f.get(t),"group","layout",-1===n?0:n,i);s.duration&&(s.duration=e.secondsToMilliseconds(s.duration));const{delay:o=0,duration:r,ease:a}=Ge(s);return{delay:e.secondsToMilliseconds(o),duration:r,ease:a}},A=new Map,M=t=>u.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of yi)o[t]=n[t];const r=A.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},A.set(e,r)}}),E=t=>{const e=A.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},V=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||xl(":root",{"view-transition-name":"none"}),xl("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),g.forEach(t=>{xl(`::view-transition-group(${t})`,{overflow:"clip"}),xl(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),m.forEach(t=>{xl(`::view-transition-group-children(${t})`,{overflow:"clip"})}),wl()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(h,d,p),Tl()},k=async()=>{await n(),T("new"),M("new"),(()=>{g.clear();for(const t of v.keys())"root"!==t&&(y.get(t)??E(t))&&g.add(t)})(),V()};let C;try{T("old"),M("old"),V(),C=document.startViewTransition(k)}catch(t){return D(),Promise.reject(t)}return C.finished.finally(D),new Promise((t,n)=>{C.ready.then(()=>{const n=bl(),i=[],s=new Set,o=new Set;f.forEach((t,n)=>{const r=v.get(n),a=!!r?.new&&!r?.old,l=!!r?.old&&!r?.new;for(const r of Pl){if(!t[r])continue;if("enter"===r&&!a)continue;if("exit"===r&&!l)continue;const u=gl(r),[h,d]=S(n,u);if(-1===h)continue;const{keyframes:p,options:m}=t[r];for(let[f,g]of Object.entries(p)){if(null==g)continue;if("x"===f||"y"===f){e.warnOnce(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===r&&a&&null!=t.enter?.keyframes[f])continue;if("old"===r&&l&&null!=t.exit?.keyframes[f])continue;const p=Dl(jn(c,f),jn(m,f));if(!Array.isArray(g)){const e="enter"===r?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===u?a:l),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?El[u]?.[f]:void 0;void 0!==i&&(g=[i,g])}"function"==typeof p.delay&&(p.delay=p.delay(h,d)),p.duration&&(p.duration=e.secondsToMilliseconds(p.duration)),p.delay&&(p.delay=e.secondsToMilliseconds(p.delay)),i.push(new Ye({...p,element:document.documentElement,name:f,pseudoElement:`::view-transition-${u}(${n})`,keyframes:g})),s.add(`${n}:${u}`),"opacity"===f&&o.add(`${n}:${u}`)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=Sl(r);if(!a)continue;const l=f.get(a.layer);if(s.has(`${a.layer}:${a.type}`)){o.has(`${a.layer}:new`)&&o.has(`${a.layer}:old`)&&n.getKeyframes().some(t=>t.mixBlendMode)?i.push(new Mn(t)):t.cancel();continue}const c="old"===a.type?"new":"new"===a.type?"old":void 0;if(c&&s.has(`${a.layer}:${c}`)&&!o.has(`${a.layer}:${c}`)){t.cancel();continue}const u=v.get(a.layer),h=!("old"!==a.type&&"new"!==a.type||!u?.old||!u?.new);let d;if(a.type.startsWith("group")){const{delay:t,duration:e,ease:n}=P(a.layer);d={delay:t,duration:e,easing:$e(n,e)}}else{const t=h?"group":a.type,[n,i]=S(a.layer,t);let s=b(l,t,"group"===t?"layout":"",-1===n?0:n,i);const o=s.visualDuration;s.duration&&(s.duration=e.secondsToMilliseconds(s.duration)),s=Ge(s),d={delay:e.secondsToMilliseconds(s.delay??0),duration:h&&void 0!==o?e.secondsToMilliseconds(o):s.duration,easing:h?"linear":$e(s.ease,s.duration)}}n.updateTiming(d),i.push(new Mn(t))}A.forEach((t,e)=>{if(!g.has(e))return;const{delay:n,duration:s,ease:o}=P(e);for(const r of yi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";Al(a)&&Al(l)||i.push(new Ye({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:n,duration:s,ease:o}))}}),t(new Pn(i))}).catch(()=>C.updateCallbackDone.then(()=>t(new Pn([])),n))})}function Dl(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let kl=[],Cl=null;function Rl(){Cl=null;const[t]=kl;var n;t&&(n=t,e.removeItem(kl,n),Cl=n,Vl(n).then(t=>(n.notifyReady(t),t.finished)).catch(t=>n.notifyReject(t)).finally(Rl))}function jl(){for(let t=kl.length-1;t>=0;t--){const e=kl[t],{interrupt:n}=e.options;if("immediate"===n){const n=kl.slice(0,t+1).map(t=>t.update),i=kl.slice(t+1);e.update=()=>{n.forEach(t=>t())},kl=[e,...i];break}}Cl&&"immediate"!==kl[0]?.options.interrupt||Rl()}class Bl{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=e.noop,this.notifyReject=e.noop,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...n},this.readyPromise.catch(e.noop),i=this,kl.push(i),ks.render(jl)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ll=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"]),Ol=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Fl(t,e,n,i){Rr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ll.has(n)?n:Ni(n),e.attrs[n])}function Il(t,e,n){const i=jr(t,e,n);for(const n in t)if("children"!==n&&(ei(t[n])||ei(e[n]))){i[-1!==fe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function Ul(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Nl=[...xr].reverse(),Wl=t=>!0===t?.out?t:t?.out;function $l(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ul(e,t)}function Kl(){const t={};for(const e of xr)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}const zl=wr.length;const Gl=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Yl=lt,Xl=rt.reduce((t,e)=>(t[e]=t=>ct(t),t),{});t.AsyncMotionValueAnimation=bn,t.DOMKeyframesResolver=gi,t.DOMVisualElement=Cr,t.DocumentProjectionNode=pr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=Lo,t.GroupAnimation=Pn,t.GroupAnimationWithThen=class extends Pn{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=fr,t.HTMLVisualElement=Br,t.JSAnimation=Gt,t.KeyframeResolver=Re,t.LayoutAnimationBuilder=_r,t.MotionValue=kn,t.MotionValueState=Ri,t.NativeAnimation=Ye,t.NativeAnimationExtended=_e,t.NativeAnimationWrapper=Mn,t.NodeStack=Eo,t.ObjectVisualElement=class extends kr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.PanSession=ya,t.SVGVisualElement=class extends Cr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vo}getBaseTargetFromProps(t,e){return ge.has(e)?super.getBaseTargetFromProps(t,e)??de(e):t[e]}getDefaultValue(t){return ge.has(t)?this.latestValues[t]??de(t):void 0}readValueFromInstance(t,e){if(ge.has(e)){const t=ee(e);return t&&t.default||0}if(Gi.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=Ll.has(e)?e:Ni(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Il(t,e,n)}build(t,e,n){Yi(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Fl(t,e,0,i)}mount(t){this.isSVGTag=Ol(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=Bl,t.VisualElement=kr,t.VisualElementDragControls=Ua,t.acceleratedValues=Qe,t.acquireProjectionNode=function(t){const e=Wr.get(t)||gr.get(t)?.projection;return e?.instance?[e,()=>{}]:Yr(t)},t.activeScope=Mi,t.addAttrValue=Xi,t.addBuilderToScope=Vi,t.addDomEvent=dr,t.addEffect=function(t){Ti(t),wi.unshift(t)},t.addPointerEvent=ea,t.addPointerInfo=ta,t.addSVGValue=Hi,t.addScaleCorrector=function(t){for(const e in t)js[e]=t[e],l(e)&&(js[e].isCSSVariable=!0)},t.addStyleValue=Oi,t.addToScope=Ei,t.addValueToWillChange=ii,t.alpha=m,t.analyseComplexValue=U,t.animateEffectSubject=bi,t.animateElement=function(t,e,n,i){if(Mi.current?.track(t),i)return Si(t=>i.getValue(t,null),e,n,i);const s=As(t);return bi(s,t,e,n,new Ms(s,t))},t.animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=Zr(t,e,n),r=new _r(i,s,{...Mi.current?.transition,...o});return Vi(r),r},t.animateMotionValue=Nn,t.animateSingleValue=Rs,t.animateTarget=li,t.animateValue=function(t){return new Gt(t)},t.animateValues=Si,t.animateVariant=ci,t.animateView=function(t,e={}){const n=new Bl(t,e);return Vi(n),n},t.animateVisualElement=ui,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=ds,t.applyBoxDelta=ps,t.applyGeneratorOptions=Ge,t.applyPointDelta=hs,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&vi.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=gs,t.arc=function(t={}){const n=function({strength:t=.5,peak:n=.5,direction:i,rotate:s=!1}={}){const o=!0===s?1:"number"==typeof s?s:0;let r;return(s,a)=>{const l=a.x-s.x,c=a.y-s.y;let u;u="cw"===i?-t:"ccw"===i?t:(Math.abs(l)>=Math.abs(c)?l:c)<0?-t:t;let h=Kn(s.x,s.y,a.x,a.y,u,n);if(void 0===i){const t=Math.abs(l)<Math.abs(c),e=s.x+l*n,i=s.y+c*n,o=t?Math.sign(h.x-e):Math.sign(h.y-i);void 0!==r&&0!==o&&o!==r?(u=-u,h=Kn(s.x,s.y,a.x,a.y,u,n)):0!==o&&(r=o)}const d=o?$n(0,s.x,h.x,a.x,s.y,h.y,a.y):0,p=o?$n(1,s.x,h.x,a.x,s.y,h.y,a.y):0,m=o?e.wrap(-180,180,p-d):0;return t=>{const n={x:Wn(t,s.x,h.x,a.x),y:Wn(t,s.y,h.y,a.y)};if(o){const i=$n(t,s.x,h.x,a.x,s.y,h.y,a.y),r=d+m*t;n.rotate=e.wrap(-180,180,i-r)*o}return n}}}(t),i={interpolateProjection(t){const e=t.x.translate,i=t.y.translate;if(!(Math.sqrt(e*e+i*i)<20))return n({x:e,y:i},{x:0,y:0})},animateValues(t,e,i,s,o){if(!("x"in e)&&!("y"in e))return;const r=t("x"),a=t("y"),l=e.x,c=e.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=n({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t("pathRotation"):void 0,g={delay:s,...jn(i||{},"x")};delete g.path;const y=Cn(0);y.start(Nn("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&o.push(y.animation),delete e.x,delete e.y}};return i},t.aspectRatio=Ao,t.attachFollow=al,t.attachSpring=cl,t.attrEffect=qi,t.axisDeltaEquals=Mo,t.axisEquals=To,t.axisEqualsRounded=bo,t.bindToScope=Di,t.boxEquals=So,t.boxEqualsRounded=Po,t.buildHTMLStyles=Wi,t.buildProjectionTransform=Ro,t.buildSVGAttrs=Yi,t.buildSVGPath=zi,t.buildTransform=dn,t.buildTransformer=N,t.calcAxisDelta=Js,t.calcBoxDelta=Qs,t.calcChildStagger=Vn,t.calcGeneratorDuration=mt,t.calcLength=_s,t.calcRelativeAxis=to,t.calcRelativeAxisPosition=no,t.calcRelativeBox=eo,t.calcRelativePosition=io,t.camelCaseAttributes=Ll,t.camelToDash=Ni,t.cancelFrame=ct,t.cancelMicrotask=Cs,t.cancelSync=Xl,t.checkVariantsDidChange=$l,t.cleanDirtyNodes=Xo,t.collectMotionValues=Dn,t.color=R,t.compareByDepth=Bo,t.complex=$,t.containsCSSVariable=d,t.convertBoundingBoxToBox=ts,t.convertBoxToBoundingBox=es,t.convertOffsetToTimes=Ct,t.copyAxisDeltaInto=Hs,t.copyAxisInto=Xs,t.copyBoxInto=qs,t.correctBorderRadius=Do,t.correctBoxShadow=ko,t.createAnimationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:n})=>ui(t,e,n))),n=Kl(),i=!0,s=!1;function o(o){const{props:r,parent:a,manuallyAnimateOnMount:l}=t,{initial:c}=r,u=i||s,h=[],d=(e=c)=>"boolean"!=typeof e&&qn(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map;let m={},f=1/0,g=t;do{g=!1!==g.props.inherit&&g.parent}while(g&&!g.isControllingVariants);const y=u&&Wl(d(c??(g&&g.props.initial))?.transition);if(Nl.forEach((e,i)=>{const s=n[e],c=r[e],d=g&&g.props[e],v=void 0!==c?c:vr(d)||!1===d?d:void 0,x=vr(v),w=e===o?s.isActive:null,T=x&&void 0===c&&!(u&&l);if(s.protectedKeys={...m},!s.isActive&&null===w||!v&&!s.prevProp||yr(v)||"boolean"==typeof v)return;if(!1===w&&(f=i),"exit"===e&&s.isActive&&!0!==w)return void(m={...m,...s.prevResolvedValues});const S=$l(s.prevProp,v);let b=S||x&&(w&&!T||i>f),P=!1;const A=Array.isArray(v)?v:[v];let M,E={};if(!1!==w)for(const n of A){const{transition:i,transitionEnd:s,...o}=qn(t,n,Hn(t,e))||{};E={...E,...o,...s},M=Wl(i)||M}const{prevResolvedValues:V}=s;for(const e in{...V,...E}){if(e in m)continue;const n=E[e],i=V[e],o=Array.isArray(n)&&Array.isArray(i)?!Ul(n,i)||S:n!==i;let r;if(o&&null==n)p.has(e)||p.set(e,s.prevOut);else if(o||void 0!==n&&p.has(e)){b=!0,r=p.get(e)||y,p.delete(e)&&(P=!0),s.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)}else s.protectedKeys[e]=!0;s.out[e]=r}if(s.prevProp=v,s.prevResolvedValues=E,s.prevOut=M,s.isActive&&(m={...m,...E}),b&&(!T||!S||P))for(const n of A){const i={type:e};if("string"==typeof n&&u&&l&&a?.enteringChildren){const e=qn(a,n)?.transition?.delayChildren;i.delay=Vn(a.enteringChildren,t,e)}h.push({animation:n,options:i})}}),p.size){const e={},n=d();let i=n?.transition;p.forEach((s,o)=>{s&&(i={...i||t.getDefaultTransition(),[o]:s});const a=t.getValue(o);a&&(a.liveStyle=!0);const l=n&&!Array.isArray(c)?n[o]:void 0,u=t.getBaseTargetFromProps(r,o);e[o]=(void 0!==l?l:void 0===u||ei(u)?void 0===t.initialValues[o]?t.baseTarget[o]:void 0:u)??null}),i&&(e.transition=i),h.push({animation:e})}const v=u&&t.blockInitialAnimation||i&&!l&&(!1===r.initial||r.initial===r.animate);return i=s=!1,!v&&h.length?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:n=>{e=n(t)},getState:()=>n,reset:()=>{n=Kl(),s=!0}}},t.createAxis=yo,t.createAxisDelta=fo,t.createBox=vo,t.createDelta=go,t.createEffect=ji,t.createGeneratorEasing=ft,t.createProjectionNode=Ko,t.createRenderBatcher=at,t.cubicBezierAsString=Ne,t.defaultEasing=Rt,t.defaultOffset=kt,t.defaultTransformValue=de,t.defaultValueTypes=te,t.degrees=A,t.delay=Os,t.delayInSeconds=function(t,n){return Os(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=di,t.distance=ma,t.distance2D=fa,t.drag=function(t,e={}){const n=(({axis:t,constraints:e,elastic:n,momentum:i,transition:s,snapToOrigin:o,directionLock:r,propagation:a,onStart:l,onMove:c,onEnd:u,onDirectionLock:h,onTransitionEnd:d,onMeasureConstraints:p})=>({drag:t||!0,dragConstraints:e,dragElastic:n,dragMomentum:i,dragTransition:s,dragSnapToOrigin:o,dragDirectionLock:r,dragPropagation:a,onDragStart:l,onDrag:c,onDragEnd:u,onDirectionLock:h,onDragTransitionEnd:d,onMeasureDragConstraints:p}))(e),i=Mi.current;if(i)for(const t in n){const e=n[t];"function"==typeof e&&(n[t]=i.bind(e))}const s=ki(t).map(t=>{i?.track(t);const[s,o]=Ur(t);s.setOptions({alwaysMeasureLayout:!0});const r=new Ua(gr.get(t),()=>n),a=r.addListeners(),l=function(t,e){const{style:n}=t,i=t.getAttribute("draggable"),s=za.map(t=>n.getPropertyValue(t)),o=e?"pan-"+("x"===e?"y":"x"):"none";return za.forEach((t,e)=>n.setProperty(t,e<3?"none":o)),t.setAttribute("draggable","false"),()=>{za.forEach((t,e)=>n.setProperty(t,s[e])),null===i?t.removeAttribute("draggable"):t.setAttribute("draggable",i)}}(t,e.axis);return()=>{l(),a?.(),r.cancel(),r.stopAnimation(),o()}});return Ei(()=>s.forEach(t=>t()))},t.eachAxis=jo,t.elementDragControls=Ia,t.expectsResolvedDragConstraints=function({dragConstraints:t,onMeasureDragConstraints:e}){return Na(t)&&!!e},t.extractEventInfo=Qr,t.fillOffset=Dt,t.fillWildcards=se,t.findDimensionValueType=pi,t.findEffect=function(t){return wi.find(e=>e.test(t))},t.findValueType=t=>ul.find(hi(t)),t.flushKeyframeResolvers=Ce,t.flushLayoutSnapshots=Hr,t.followValue=function(t,e){const n=Cn(ei(t)?t.get():t);return al(n,t,e),n},t.frame=lt,t.frameData=n,t.frameSteps=ut,t.generateLinearEasing=dt,t.getAnimatableNone=ie,t.getAnimationMap=function(t){let e=En.get(t);return e||(e=new Map,En.set(t,e)),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return je(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=Fn,t.getDefaultValueType=ee,t.getFeatureDefinitions=function(){return Dr},t.getFinalKeyframe=Ot,t.getMixer=tt,t.getOptimisedAppearId=oi,t.getOriginIndex=function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}},t.getValueAsType=rn,t.getValueTransition=jn,t.getVariableValue=Yn,t.getVariantContext=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<zl;t++){const i=wr[t],s=e.props[i];(vr(s)||!1===s)&&(n[i]=s)}return n},t.getViewAnimationLayerInfo=Sl,t.getViewAnimations=bl,t.globalProjectionState=Oo,t.handOffElementState=Vs,t.has2DTranslate=ls,t.hasComplexValues=I,t.hasReducedMotionListener=Ar,t.hasScale=ss,t.hasTransform=rs,t.hex=b,t.hover=function(t,e,n={}){e=Di(e);const[i,s,o]=Ga(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ka())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=C,t.hslaToRgba=z,t.inertia=Et,t.initPrefersReducedMotion=Er,t.interpolate=Vt,t.invisibleValues=Z,t.isAnimationControls=yr,t.isCSSVariableName=l,t.isCSSVariableToken=u,t.isControllingVariants=Tr,t.isDeltaZero=wo,t.isDragActive=ka,t.isDragging=Da,t.isElementKeyboardAccessible=Ma,t.isElementTextInput=Va,t.isForcedMotionValue=Bs,t.isGenerator=ze,t.isHTMLElement=Pi,t.isKeyframesTarget=Zn,t.isMotionValue=ei,t.isNear=Zs,t.isNodeOrChild=Ya,t.isPrimaryPointer=Jr,t.isSVGElement=Ai,t.isSVGSVGElement=Fs,t.isSVGTag=Ol,t.isTransitionDefined=Un,t.isVariantLabel=vr,t.isVariantNode=Sr,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Ue()||!n||"string"==typeof n&&(n in We||Ue())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=ni,t.keyframes=jt,t.makeAnimationInstant=Je,t.mapEasingToNativeEasing=$e,t.mapValue=function(t,e,n,i){const s=el(e,n,i);return ll(()=>s(t.get()))},t.maxGeneratorDuration=pt,t.measurePageBox=Ss,t.measureViewportBox=Ts,t.microtask=ks,t.mix=ot,t.mixArray=et,t.mixColor=_,t.mixComplex=it,t.mixImmediate=G,t.mixLinearColor=X,t.mixNumber=Y,t.mixObject=nt,t.mixValues=$s,t.mixVisibility=J,t.motionValue=Cn,t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Gl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.number=p,t.numberValueTypes=Qt,t.optimizedAppearDataAttribute=si,t.optimizedAppearDataId="framerAppearId",t.originProps=Bi,t.parseAnimateLayoutArgs=Zr,t.parseCSSVariable=Gn,t.parseValueFromTransform=pe,t.percent=M,t.pixelsToPercent=Vo,t.positionalKeys=_n,t.prefersReducedMotion=Pr,t.press=function(t,e,n={}){e=Di(e);const[i,s,o]=Ga(t,n),r=t=>{const i=t.currentTarget;if(!_a(t))return;if(Za.has(t))return;Xa.add(i),n.stopPropagation&&Za.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),Xa.has(i)&&Xa.delete(i),_a(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||Ya(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Pi(t)&&(t.addEventListener("focus",()=>((t,e)=>{let n=!1;const i=qa(()=>{Xa.has(t)||(n=!0,Ha(t,"down"))}),s=qa(()=>{n&&(n=!1,Ha(t,"up"))});t.addEventListener("keydown",i,e),t.addEventListener("keyup",s,e),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",s),n&&Ha(t,"cancel")},{...e,once:!0})})(t,s),s),Ma(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.processFrame=(t=o.now())=>{if(n.isProcessing)return;const i=t-n.timestamp;n.delta=e.MotionGlobalConfig.useManualTiming?i:Math.max(Math.min(i,40),1),o.set(n.timestamp=t),n.isProcessing=!0;for(const t in ut)ut[t].process(n);n.isProcessing=!1},t.progressPercentage=k,t.propEffect=Ds,t.propagateDirtyNodes=Yo,t.px=E,t.readSVGValue=_i,t.readStyleValue=Fi,t.readTransformValue=me,t.recordStats=function(){if(Ls.value)throw Ls.value=null,Ls.addProjectionMetrics=null,Ls.countProjection=void 0,new Error("Stats are already being measured");const t=Ls;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)};const e={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0};t.countProjection=n=>{void 0!==n?e[tl[n]]++:(t.addProjectionMetrics(e),e.nodes=e.calculatedTargetDeltas=e.calculatedProjections=0)}},t.releaseElement=Es,t.removeAxisDelta=oo,t.removeAxisTransforms=ro,t.removeBoxTransforms=co,t.removeEffect=Ti,t.removePointDelta=so,t.renderHTML=Rr,t.renderSVG=Fl,t.resize=pa,t.resolveElements=ki,t.resolveMotionValue=Is,t.resolveTransition=Rn,t.resolveVariant=qn,t.resolveVariantFromProps=Xn,t.rgbUnit=w,t.rgba=T,t.rootProjectionNode=mr,t.round=zt,t.sampleDelta=He,t.scale=f,t.scaleCorrectors=js,t.scalePoint=us,t.scopeMotion=function(...t){const n="function"==typeof t[0]?void 0:t.shift(),[i,s={}]=t,{transition:o,matchMedia:r}=s,a=[],l=new Map;let c=[],u=!1;const h={root:ki(n)[0],transition:o,add:t=>(c.push(t),()=>e.removeItem(c,t)),bind:t=>(...e)=>{const n=y.run(()=>t(...e));return"function"==typeof n?h.bind(n):n},track(t){l.has(t)||l.set(t,t.getAttribute("style"))}},d=t=>{const e=c;c=[];for(let t=e.length-1;t>=0;t--)e[t]();t&&l.forEach((t,e)=>{Es(e),null===t?e.removeAttribute("style"):e.setAttribute("style",t)}),l.clear()},p=()=>{y.state="active";let t=!a.length;y.media={};for(const[e,n]of a)t=(y.media[e]=n.matches)||t;if(t&&i){const t=y.run(()=>i(y));"function"==typeof t&&h.add(t)}},m=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,a.length&&y.refresh()}))},f=t=>{y.state=t?"cancelled":"stopped";for(const[,t]of a)t.removeEventListener("change",m);a.length=0,d(t)},g=(t,e)=>{const n=Mi.current;Mi.current=t;try{return e()}finally{Mi.current=n}},y={state:"active",media:{},run:t=>g(h,t),ignore:t=>g(void 0,t),bind:h.bind,stop:()=>f(),cancel:()=>f(!0),refresh(){d(!0),p()}};if(r&&"undefined"!=typeof window){const t="string"==typeof r?{matches:r}:r;for(const e in t){const n=window.matchMedia(Qa(t[e]));n.addEventListener("change",m),a.push([e,n])}}return Ei(y.cancel),p(),y},t.scrapeHTMLMotionValuesFromProps=jr,t.scrapeSVGMotionValuesFromProps=Il,t.setDragLock=Ca,t.setFeatureDefinitions=function(t){Dr=t},t.setStyle=Be,t.setTarget=ti,t.spring=Mt,t.springValue=function(t,e){const n=Cn(ei(t)?t.get():t);return cl(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s,grid:o}={}){const r={};return(a,l)=>{let c=r[l];if(!c){const[t,e]=o||[1/0,1],n=Math.min(t,l)-1,s=Math.max(e,Math.ceil(l/t))-1,a="number"==typeof i,u="first"===i?0:"last"===i?1:.5,h=a?i%t:n*u,d=a?Math.floor(i/t):s*u;c=r[l]=[];for(let e=0;e<l;e++){const o=e%t,r=Math.floor(e/t),a=Math.min(o,n-o),l=Math.min(r,s-r);if("random"===i){const t=Math.random()*(e+1)|0;c[e]=c[t],c[t]=e}else c[e]="edges"===i?Math.min(n?a:l,s?l:a):Math.hypot(o-h,r-d)}c.push(o?Math.max(...c):l)}let u=t*c[a];const h=t*c[l];if(s&&h){u=e.easingDefinitionToFunction(s)(u/h)*h}return n+u}},t.startWaapiAnimation=Ke,t.statsBuffer=Ls,t.styleEffect=Ui,t.styleSubjectEffect=Ii,t.supportedWaapiEasing=We,t.supportsBrowserAnimation=on,t.supportsFlags=Le,t.supportsLinearEasing=Ue,t.supportsPartialKeyframes=xi,t.supportsScrollTimeline=Fe,t.supportsViewTimeline=Ie,t.supportsWaapi=sn,t.svgEffect=Ji,t.svgSubjectEffect=Zi,t.sync=Yl,t.testValueType=hi,t.time=o,t.toMediaQuery=Qa,t.transform=el,t.transformAxis=vs,t.transformBox=ws,t.transformBoxPoints=ns,t.transformPropOrder=fe,t.transformProps=ge,t.transformValue=ll,t.transformValueTypes=Jt,t.translateAxis=ys,t.updateMotionValuesFromProps=br,t.variantPriorityOrder=xr,t.variantProps=wr,t.vh=V,t.visualElementStore=gr,t.vw=D});
|