framer-motion 11.3.2 → 11.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),f=e.createContext({}),g=e.createContext(null),y="undefined"!=typeof document,v=y?e.useLayoutEffect:e.useEffect,x=e.createContext({strict:!1}),P=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),w="data-"+P("framerAppearId"),T={skipAnimations:!1,useManualTiming:!1};class S{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const b=["read","resolveKeyframes","update","preRender","render","postRender"];function A(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=b.reduce((t,e)=>(t[e]=function(t){let e=new S,n=new S,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&s,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&s&&(i=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let n=0;n<i;n++){const i=e.order[n];r.has(i)&&(a.schedule(i),t()),i(l)}s=!1,o&&(o=!1,a.process(l))}}};return a}(o),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=T.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:b.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<b.length;e++)r[b[e]].cancel(t)},state:s,steps:r}}const{schedule:E,cancel:C}=A(queueMicrotask,!1);function V(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const M=e.createContext({});let R=!1;function D(t,n,i,s,o){const{visualElement:r}=e.useContext(f),a=e.useContext(x),l=e.useContext(g),u=e.useContext(m).reducedMotion,c=e.useRef();s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const h=c.current,d=e.useContext(M);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&V(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(c.current,i,o,d),e.useInsertionEffect(()=>{h&&h.update(i,l)});const p=e.useRef(Boolean(i[w]&&!window.HandoffComplete));return v(()=>{h&&(h.updateFeatures(),E.render(h.render),p.current&&h.animationState&&h.animationState.animateChanges())}),e.useEffect(()=>{h&&(!p.current&&h.animationState&&h.animationState.animateChanges(),p.current&&(p.current=!1,R||(R=!0,queueMicrotask(k))))}),h}function k(){window.HandoffComplete=!0}function L(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):V(i)&&(i.current=e))},[n])}function B(t){return"string"==typeof t||Array.isArray(t)}function F(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const j=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],O=["initial",...j];function I(t){return F(t.animate)||O.some(e=>B(t[e]))}function U(t){return Boolean(I(t)||t.variants)}function W(t){const{initial:n,animate:i}=function(t,e){if(I(t)){const{initial:e,animate:n}=t;return{initial:!1===e||B(e)?e:void 0,animate:B(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(f));return e.useMemo(()=>({initial:n,animate:i}),[N(n),N(i)])}function N(t){return Array.isArray(t)?t.join(" "):t}const z={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$={};for(const t in z)$[t]={isEnabled:e=>z[t].some(t=>!!e[t])};function H(t){for(const e in t)$[e]={...$[e],...t[e]}}const Y=e.createContext({}),K=Symbol.for("motionComponentSymbol"),X=t=>t;let G=X,_=X;function q({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){t&&H(t);const r=e.forwardRef((function(t,r){let a;const l={...e.useContext(m),...t,layoutId:Z(t)},{isStatic:u}=l,c=W(t),h=s(t,u);if(!u&&y){e.useContext(x).strict;const t=function(t){const{drag:e,layout:n}=$;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=D(o,h,l,n,t.ProjectionNode)}return p(f.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,L(h,c.visualElement,r),h,u,c.visualElement)]})}));return r[K]=o,r}function Z({layoutId:t}){const n=e.useContext(Y).id;return n&&void 0!==t?n+"-"+t:t}function J(t){function e(e,n={}){return q(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Q=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function tt(t){return"string"==typeof t&&!t.includes("-")&&!!(Q.indexOf(t)>-1||/[A-Z]/u.test(t))}const et={};function nt(t){Object.assign(et,t)}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],st=new Set(it);function ot(t,{layout:e,layoutId:n}){return st.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!et[t]||"opacity"===t)}const rt=t=>Boolean(t&&t.getVelocity),at={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lt=it.length;function ut(t,e,n){let i="";for(let e=0;e<lt;e++){const n=it[e];if(void 0!==t[n]){i+=`${at[n]||n}(${t[n]}) `}}return i=i.trim(),n?i=n(t,e?"":i):e&&(i="none"),i}const ct=t=>e=>"string"==typeof e&&e.startsWith(t),ht=ct("--"),dt=ct("var(--"),pt=t=>!!dt(t)&&mt.test(t.split("/*")[0].trim()),mt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ft=(t,e)=>e&&"number"==typeof t?e.transform(t):t,gt=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vt={...yt,transform:t=>gt(0,1,t)},xt={...yt,default:1},Pt=t=>Math.round(1e5*t)/1e5,wt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,St=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function bt(t){return"string"==typeof t}const At=t=>({test:e=>bt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Et=At("deg"),Ct=At("%"),Vt=At("px"),Mt=At("vh"),Rt=At("vw"),Dt={...Ct,parse:t=>Ct.parse(t)/100,transform:t=>Ct.transform(100*t)},kt={...yt,transform:Math.round},Lt={borderWidth:Vt,borderTopWidth:Vt,borderRightWidth:Vt,borderBottomWidth:Vt,borderLeftWidth:Vt,borderRadius:Vt,radius:Vt,borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomRightRadius:Vt,borderBottomLeftRadius:Vt,width:Vt,maxWidth:Vt,height:Vt,maxHeight:Vt,size:Vt,top:Vt,right:Vt,bottom:Vt,left:Vt,padding:Vt,paddingTop:Vt,paddingRight:Vt,paddingBottom:Vt,paddingLeft:Vt,margin:Vt,marginTop:Vt,marginRight:Vt,marginBottom:Vt,marginLeft:Vt,rotate:Et,rotateX:Et,rotateY:Et,rotateZ:Et,scale:xt,scaleX:xt,scaleY:xt,scaleZ:xt,skew:Et,skewX:Et,skewY:Et,distance:Vt,translateX:Vt,translateY:Vt,translateZ:Vt,x:Vt,y:Vt,z:Vt,perspective:Vt,transformPerspective:Vt,opacity:vt,originX:Dt,originY:Dt,originZ:Vt,zIndex:kt,backgroundPositionX:Vt,backgroundPositionY:Vt,fillOpacity:vt,strokeOpacity:vt,numOctaves:kt};function Bt(t,e,n){const{style:i,vars:s,transform:o,transformOrigin:r}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(ht(t)){s[t]=n;continue}const c=Lt[t],h=ft(n,c);if(st.has(t)){if(a=!0,o[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,r[t]=h):i[t]=h}if(e.transform||(a||n?i.transform=ut(t.transform,u,n):i.transform&&(i.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;i.transformOrigin=`${t} ${e} ${n}`}}const Ft=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jt(t,e,n){for(const i in e)rt(e[i])||ot(i,n)||(t[i]=e[i])}function Ot(t,n){const i={};return jt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Bt(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function It(t,e){const n={},i=Ot(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Ut=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ut.has(t)}let Nt=t=>!Wt(t);function zt(t){t&&(Nt=e=>e.startsWith("on")?!Wt(e):t(e))}try{zt(require("@emotion/is-prop-valid").default)}catch(t){}function $t(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Nt(s)||!0===n&&Wt(s)||!e&&!Wt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function Ht(t,e,n){return"string"==typeof t?t:Vt.transform(e+n*t)}const Yt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kt={offset:"strokeDashoffset",array:"strokeDasharray"};function Xt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Bt(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Ht(e,t.x,t.width)} ${Ht(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Yt:Kt;t[o.offset]=Vt.transform(-i);const r=Vt.transform(e),a=Vt.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Gt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),_t=t=>"string"==typeof t&&"svg"===t.toLowerCase();function qt(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Xt(e,n,_t(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};jt(e,t.style,t),o.style={...e,...o.style}}return o}function Zt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(tt(n)?qt:It)(i,o,r,n),l=$t(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>rt(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Jt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Qt=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"]);function te(t,e,n,i){Jt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Qt.has(n)?n:P(n),e.attrs[n])}function ee(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(rt(s[r])||e.style&&rt(e.style[r])||ot(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return n&&s&&"string"==typeof s.willChange&&(n.applyWillChange=!1),o}function ne(t,e,n){const i=ee(t,e,n);for(const n in t)if(rt(t[n])||rt(e[n])){i[-1!==it.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ie(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function se(t,e,n,i){if("function"==typeof e){const[s,o]=ie(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ie(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function oe(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const re=t=>Array.isArray(t);function ae(t){const e=rt(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const le=new Set(["opacity","clipPath","filter","transform"]);function ue(t){return st.has(t)?"transform":le.has(t)?P(t):void 0}function ce(t,e){-1===t.indexOf(e)&&t.push(e)}function he(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const de=t=>(n,i)=>{const s=e.useContext(f),o=e.useContext(g),r=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},s,o,r,a){const l={latestValues:fe(s,o,r,!a&&t,e),renderState:n()};return i&&(l.mount=t=>i(s,t,l)),l}(t,n,s,o,i);return i?r():oe(r)};function pe(t,e){const n=ue(e);n&&ce(t,n)}function me(t,e,n){const i=Array.isArray(e)?e:[e];for(let e=0;e<i.length;e++){const s=se(t,i[e]);if(s){const{transitionEnd:t,transition:e,...i}=s;n(i,t)}}}function fe(t,e,n,i,s){var o;const r={},a=[],l=i&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=s(t,{});for(const t in u)r[t]=ae(u[t]);let{initial:c,animate:h}=t;const d=I(t),p=U(t);e&&p&&!d&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===c;const f=m?h:c;return f&&"boolean"!=typeof f&&!F(f)&&me(t,f,(t,e)=>{for(const e in t){let n=t[e];if(Array.isArray(n)){n=n[m?n.length-1:0]}null!==n&&(r[e]=n)}for(const t in e)r[t]=e[t]}),l&&(h&&!1!==c&&!F(h)&&me(t,h,t=>{for(const e in t)pe(a,e)}),a.length&&(r.willChange=a.join(","))),r}const{schedule:ge,cancel:ye,state:ve,steps:xe}=A("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:X,!0),Pe={useVisualState:de({scrapeMotionValuesFromProps:ne,createRenderState:Gt,onMount:(t,e,{renderState:n,latestValues:i})=>{ge.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),ge.render(()=>{Xt(n,i,_t(e.tagName),t.transformTemplate),te(e,n)})}})},we={useVisualState:de({applyWillChange:!0,scrapeMotionValuesFromProps:ee,createRenderState:Ft})};function Te(t,{forwardMotionProps:e=!1},n,i){return{...tt(t)?Pe:we,preloadedFeatures:n,useRender:Zt(e),createVisualElement:i,Component:t}}function Se(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const be=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Ae(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ee=t=>e=>be(e)&&t(e,Ae(e));function Ce(t,e,n,i){return Se(t,e,Ee(n),i)}const Ve=(t,e)=>n=>e(t(n)),Me=(...t)=>t.reduce(Ve);function Re(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const De=Re("dragHorizontal"),ke=Re("dragVertical");function Le(t){let e=!1;if("y"===t)e=ke();else if("x"===t)e=De();else{const t=De(),n=ke();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Be(){const t=Le(!0);return!t||(t(),!1)}class Fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function je(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return Ce(t.current,n,(n,s)=>{if("touch"===n.pointerType||Be())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const r=o[i];r&&ge.postRender(()=>r(n,s))},{passive:!t.getProps()[i]})}const Oe=(t,e)=>!!e&&(t===e||Oe(t,e.parentElement));function Ie(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ae(n))}const Ue=new WeakMap,We=new WeakMap,Ne=t=>{const e=Ue.get(t.target);e&&e(t)},ze=t=>{t.forEach(Ne)};function $e(t,e,n){const i=function({root:t,...e}){const n=t||document;We.has(n)||We.set(n,{});const i=We.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ze,{root:t,...e})),i[s]}(e);return Ue.set(t,n),i.observe(t),()=>{Ue.delete(t),i.unobserve(t)}}const He={some:0,all:1};const Ye={inView:{Feature:class extends Fe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:He[i]};return $e(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Fe{constructor(){super(...arguments),this.removeStartListeners=X,this.removeEndListeners=X,this.removeAccessibleListeners=X,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Ce(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps(),o=s||Oe(this.node.current,t.target)?n:i;o&&ge.update(()=>o(t,e))},{passive:!(n.onTap||n.onPointerUp)}),s=Ce(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Me(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Se(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Se(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&Ie("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&ge.postRender(()=>n(t,e))})}),Ie("down",(t,e)=>{this.startPress(t,e)})}),e=Se(this.node.current,"blur",()=>{this.isPressing&&Ie("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Me(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&ge.postRender(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Be()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&ge.postRender(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Ce(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Se(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Me(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Fe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Me(Se(this.node.current,"focus",()=>this.onFocus()),Se(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Fe{mount(){this.unmount=Me(je(this.node,!0),je(this.node,!1))}unmount(){}}}};function Ke(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}function Xe(t,e,n){const i=t.getProps();return se(i,e,void 0!==n?n:i.custom,t)}const Ge=t=>1e3*t,_e=t=>t/1e3,qe={type:"spring",stiffness:500,damping:25,restSpeed:10},Ze={type:"keyframes",duration:.8},Je={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qe=(t,{keyframes:e})=>e.length>2?Ze:st.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:qe:Je;function tn(t,e){return t[e]||t.default||t}const en={current:!1},nn=t=>null!==t;function sn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(nn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}let on;function rn(){on=void 0}const an={now:()=>(void 0===on&&an.set(ve.isProcessing||T.useManualTiming?ve.timestamp:performance.now()),on),set:t=>{on=t,queueMicrotask(rn)}},ln=t=>/^0[^.\s]+$/u.test(t);const un=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),cn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hn(t,e,n=1){const[i,s]=function(t){const e=cn.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return un(t)?parseFloat(t):t}return pt(s)?hn(s,e,n+1):s}const dn=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),pn=t=>t===yt||t===Vt,mn=(t,e)=>parseFloat(t.split(", ")[e]),fn=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return mn(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?mn(e[1],t):0}},gn=new Set(["x","y","z"]),yn=it.filter(t=>!gn.has(t));const vn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:fn(4,13),y:fn(5,14)};vn.translateX=vn.x,vn.translateY=vn.y;const xn=t=>e=>e.test(t),Pn=[yt,Vt,Ct,Et,Rt,Mt,{test:t=>"auto"===t,parse:t=>t}],wn=t=>Pn.find(xn(t)),Tn=new Set;let Sn=!1,bn=!1;function An(){if(bn){const t=Array.from(Tn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return yn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}bn=!1,Sn=!1,Tn.forEach(t=>t.complete()),Tn.clear()}function En(){Tn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(bn=!0)})}class Cn{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tn.add(this),Sn||(Sn=!0,ge.read(En),ge.resolveKeyframes(An))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Tn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vn=(t,e)=>n=>Boolean(bt(n)&&St.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Mn=(t,e,n)=>i=>{if(!bt(i))return i;const[s,o,r,a]=i.match(wt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Rn={...yt,transform:t=>Math.round((t=>gt(0,255,t))(t))},Dn={test:Vn("rgb","red"),parse:Mn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Rn.transform(t)+", "+Rn.transform(e)+", "+Rn.transform(n)+", "+Pt(vt.transform(i))+")"};const kn={test:Vn("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Dn.transform},Ln={test:Vn("hsl","hue"),parse:Mn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Ct.transform(Pt(e))+", "+Ct.transform(Pt(n))+", "+Pt(vt.transform(i))+")"},Bn={test:t=>Dn.test(t)||kn.test(t)||Ln.test(t),parse:t=>Dn.test(t)?Dn.parse(t):Ln.test(t)?Ln.parse(t):kn.parse(t),transform:t=>bt(t)?t:t.hasOwnProperty("red")?Dn.transform(t):Ln.transform(t)};const Fn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Fn,t=>(Bn.test(t)?(i.color.push(o),s.push("color"),n.push(Bn.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function On(t){return jn(t).values}function In(t){const{split:e,types:n}=jn(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?Pt(t[o]):"color"===e?Bn.transform(t[o]):t[o]}return s}}const Un=t=>"number"==typeof t?0:t;const Wn={test:function(t){var e,n;return isNaN(t)&&bt(t)&&((null===(e=t.match(wt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Tt))||void 0===n?void 0:n.length)||0)>0},parse:On,createTransformer:In,getAnimatableNone:function(t){const e=On(t);return In(t)(e.map(Un))}},Nn=new Set(["brightness","contrast","saturate","opacity"]);function zn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(wt)||[];if(!i)return t;const s=n.replace(i,"");let o=Nn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const $n=/\b([a-z-]*)\(.*?\)/gu,Hn={...Wn,getAnimatableNone:t=>{const e=t.match($n);return e?e.map(zn).join(" "):t}},Yn={...Lt,color:Bn,backgroundColor:Bn,outlineColor:Bn,fill:Bn,stroke:Bn,borderColor:Bn,borderTopColor:Bn,borderRightColor:Bn,borderBottomColor:Bn,borderLeftColor:Bn,filter:Hn,WebkitFilter:Hn},Kn=t=>Yn[t];function Xn(t,e){let n=Kn(t);return n!==Hn&&(n=Wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Gn=new Set(["auto","none","0"]);class _n extends Cn{constructor(t,e,n,i){super(t,e,n,i,null==i?void 0:i.owner,!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(),pt(i))){const s=hn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!dn.has(n)||2!==t.length)return;const[i,s]=t,o=wn(i),r=wn(s);if(o!==r)if(pn(o)&&pn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||ln(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Gn.has(e)&&jn(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Xn(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=vn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function qn(t){let e;return()=>(void 0===e&&(e=t()),e)}const Zn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Wn.test(t)&&"0"!==t||t.startsWith("url(")));class Jn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(En(),An()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!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=Zn(s,e),a=Zn(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&&i)}(t,n,i,s)){if(en.current||!o)return null==a||a(sn(t,this.options,e)),null==r||r(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Qn(t,e){return e?t*(1e3/e):0}function ti(t,e,n){const i=Math.max(e-5,0);return Qn(n-t(i),e-i)}function ei({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o,r=1-e;r=gt(.05,1,r),t=gt(.01,10,_e(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ni(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ni(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Ge(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ni(t,e){return t*Math.sqrt(1-e*e)}const ii=["duration","bounce"],si=["stiffness","damping","mass"];function oi(t,e){return e.some(e=>void 0!==t[e])}function ri({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!oi(t,si)&&oi(t,ii)){const n=ei(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-_e(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=_e(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=ni(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=v(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?ti(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function ai({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=ri({keyframes:[d.value,p(d.value)],velocity:ti(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),T(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const li=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ui(t,e,n,i){if(t===e&&n===i)return X;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=li(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:li(s(t),e,i)}const ci=ui(.42,0,1,1),hi=ui(0,0,.58,1),di=ui(.42,0,.58,1),pi=t=>Array.isArray(t)&&"number"!=typeof t[0],mi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,fi=t=>e=>1-t(1-e),gi=t=>1-Math.sin(Math.acos(t)),yi=fi(gi),vi=mi(gi),xi=ui(.33,1.53,.69,.99),Pi=fi(xi),wi=mi(Pi),Ti=t=>(t*=2)<1?.5*Pi(t):.5*(2-Math.pow(2,-10*(t-1))),Si={linear:X,easeIn:ci,easeInOut:di,easeOut:hi,circIn:gi,circInOut:vi,circOut:yi,backIn:Pi,backInOut:wi,backOut:xi,anticipate:Ti},bi=t=>{if(Array.isArray(t)){_(4===t.length);const[e,n,i,s]=t;return ui(e,n,i,s)}return"string"==typeof t?Si[t]:t},Ai=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Ei=(t,e,n)=>t+(e-t)*n;function Ci(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 Vi(t,e){return n=>n>0?e:t}const Mi=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ri=[kn,Dn,Ln];function Di(t){const e=(n=t,Ri.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Ln&&(i=function({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=Ci(a,i,t+1/3),o=Ci(a,i,t),r=Ci(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}}(i)),i}const ki=(t,e)=>{const n=Di(t),i=Di(e);if(!n||!i)return Vi(t,e);const s={...n};return t=>(s.red=Mi(n.red,i.red,t),s.green=Mi(n.green,i.green,t),s.blue=Mi(n.blue,i.blue,t),s.alpha=Ei(n.alpha,i.alpha,t),Dn.transform(s))},Li=new Set(["none","hidden"]);function Bi(t,e){return n=>Ei(t,e,n)}function Fi(t){return"number"==typeof t?Bi:"string"==typeof t?pt(t)?Vi:Bn.test(t)?ki:Ii:Array.isArray(t)?ji:"object"==typeof t?Bn.test(t)?ki:Oi:Vi}function ji(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Fi(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Oi(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Fi(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Ii=(t,e)=>{const n=Wn.createTransformer(e),i=jn(t),s=jn(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Li.has(t)&&!s.values.length||Li.has(e)&&!i.values.length?function(t,e){return Li.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Me(ji(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Vi(t,e)};function Ui(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ei(t,e,n);return Fi(t)(t,e)}function Wi(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(_(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const i=[],s=n||Ui,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||X:e;o=Me(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Ai(t[n],t[n+1],e);return r[n](i)};return n?e=>l(gt(t[0],t[o-1],e)):l}function Ni(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Ai(0,e,i);t.push(Ei(n,1,s))}}function zi(t){const e=[0];return Ni(e,t.length-1),e}function $i({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=pi(i)?i.map(bi):bi(i),o={done:!1,value:e[0]},r=Wi(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:zi(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||di).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Hi(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const Yi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>ge.update(e,!0),stop:()=>ye(e),now:()=>ve.isProcessing?ve.timestamp:an.now()}},Ki={decay:ai,inertia:ai,tween:$i,keyframes:$i,spring:ri},Xi=t=>t/100;class Gi extends Jn{constructor({KeyframeResolver:t=Cn,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:n,motionValue:i,keyframes:s}=this.options,o=(t,e)=>this.onKeyframesResolved(t,e);n&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(s,o,n,i):this.resolver=new t(s,o,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=Ki[e]||$i;let a,l;r!==$i&&"number"!=typeof t[0]&&(a=Me(Xi,Ui(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=Hi(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=gt(0,1,n)*c}const P=y?{done:!1,value:a[0]}:x.next(v);r&&(P.value=r(P.value));let{done:w}=P;y||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return T&&void 0!==i&&(P.value=sn(a,this.options,i)),f&&f(P.value),T&&this.finish(),P}get duration(){const{resolved:t}=this;return t?_e(t.calculatedDuration):0}get time(){return _e(this.currentTime)}set time(t){t=Ge(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=_e(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Yi,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function _i(t){return new Gi(t)}const qi=t=>Array.isArray(t)&&"number"==typeof t[0];function Zi(t){return Boolean(!t||"string"==typeof t&&t in Qi||qi(t)||Array.isArray(t)&&t.every(Zi))}const Ji=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Qi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ji([0,.65,.55,1]),circOut:Ji([.55,0,1,.45]),backIn:Ji([.31,.01,.66,-.59]),backOut:Ji([.33,1.53,.69,.99])};function ts(t){return es(t)||Qi.easeOut}function es(t){return t?qi(t)?Ji(t):Array.isArray(t)?t.map(ts):Qi[t]:void 0}function ns(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=es(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const is=qn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ss extends Jn{constructor(t){super(t);const{name:e,motionValue:n,keyframes:i}=this.options;this.resolver=new _n(i,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:s,ease:o,type:r,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!Zi(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new Gi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),i=u.duration,s=u.times,o=u.ease,r="keyframes"}var u;const c=ns(a.owner.current,l,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=an.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(sn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:r,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return _e(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return _e(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Ge(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return X;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return X}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new Gi({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),c=Ge(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;return is()&&n&&le.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}function os(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return ge.update(i,!0),()=>ye(i)}const rs=qn(()=>void 0!==window.ScrollTimeline);class as{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}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=>{if(!rs()||!e.attachTimeline)return e.pause(),os(t=>{e.time=e.duration*t},t);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 duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ls=(t,e,n,i={},s,o,r)=>a=>{const l=tn(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=Ge(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),r&&r()},onStop:r,name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...Qe(t,h)}),h.duration&&(h.duration=Ge(h.duration)),h.repeatDelay&&(h.repeatDelay=Ge(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),(en.current||T.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),d&&!o&&void 0!==e.get()){const t=sn(h.keyframes,l);if(void 0!==t)return ge.update(()=>{h.onUpdate(t),h.onComplete()}),new as([])}return!o&&ss.supports(h)?new ss(h):new Gi(h)};class us{constructor(){this.subscriptions=[]}add(t){return ce(this.subscriptions,t),()=>he(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const cs={current:void 0};class hs{constructor(t,e={}){this.version="11.3.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=an.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=an.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new us);const n=this.events[t].add(e);return"change"===t?()=>{n(),ge.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return cs.current&&cs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=an.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Qn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ds(t,e){return new hs(t,e)}function ps(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ds(n))}function ms(t,e){const n=Xe(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ps(t,e,(r=o[e],re(r)?r[r.length-1]||0:r))}var r}function fs(t){return t.getProps()[w]}class gs extends hs{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=ue(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let i=!1;return()=>{if(i)return;i=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(he(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function ys(t,e){var n;if(!t.applyWillChange)return;let i=t.getValue("willChange");return i||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(i=new gs("auto"),t.addValue("willChange",i)),s=i,Boolean(rt(s)&&s.add)?i.add(e):void 0;var s}function vs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function xs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&vs(c,e))continue;const a={delay:n,elapsed:0,...tn(r||{},e)};let h=!1;if(window.HandoffAppearAnimations){const n=fs(t);if(n){const t=window.HandoffAppearAnimations(n,e,i,ge);null!==t&&(a.elapsed=t,h=!0)}}i.start(ls(e,i,s,t.shouldReduceMotion&&st.has(e)?{type:!1}:a,t,h,ys(t,e)));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{ge.update(()=>{a&&ms(t,a)})}),u}function Ps(t,e,n={}){var i;const s=Xe(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(xs(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(ws).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(Ps(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function ws(t,e){return t.sortNodePosition(e)}function Ts(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Ps(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Ps(t,e,n);else{const s="function"==typeof e?Xe(t,e,n.custom):e;i=Promise.all(xs(t,s,n))}return i.then(()=>{ge.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ss=[...j].reverse(),bs=j.length;function As(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ts(t,e,n)))}(t),n=Vs(),i=!0;const s=e=>(n,i)=>{var s;const o=Xe(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<bs;e++){const d=Ss[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=B(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||F(m)||"boolean"==typeof m)continue;let v=Es(p.prevProp,m)||d===o&&p.isActive&&!y&&f||e>h&&f,x=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===g&&(w={});const{prevResolvedValues:T={}}=p,S={...T,...w},b=e=>{v=!0,u.has(e)&&(x=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=w[t],n=T[t];if(c.hasOwnProperty(t))continue;let i=!1;i=re(e)&&re(n)?!Ke(e,n):e!==n,i?null!=e?b(t):u.add(t):void 0!==e&&u.has(t)?b(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),i&&t.blockInitialAnimation&&(v=!1),!v||y&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Vs(),i=!0}}}function Es(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ke(e,t)}function Cs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vs(){return{animate:Cs(!0),whileInView:Cs(),whileHover:Cs(),whileTap:Cs(),whileDrag:Cs(),whileFocus:Cs(),exit:Cs()}}let Ms=0;const Rs={animation:{Feature:class extends Fe{constructor(t){super(t),t.animationState||(t.animationState=As(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();F(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Fe{constructor(){super(...arguments),this.id=Ms++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Ds=(t,e)=>Math.abs(t-e);function ks(t,e){const n=Ds(t.x,e.x),i=Ds(t.y,e.y);return Math.sqrt(n**2+i**2)}class Ls{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=js(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ks(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ve;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Bs(e,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=js("pointercancel"===t.type?this.lastMoveEventInfo:Bs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!be(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Bs(Ae(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=ve;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,js(o,this.history)),this.removeListeners=Me(Ce(this.contextWindow,"pointermove",this.handlePointerMove),Ce(this.contextWindow,"pointerup",this.handlePointerUp),Ce(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ye(this.updatePoint)}}function Bs(t,e){return e?{point:e(t.point)}:t}function Fs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function js({point:t},e){return{point:t,delta:Fs(t,Is(e)),offset:Fs(t,Os(e)),velocity:Us(e,.1)}}function Os(t){return t[0]}function Is(t){return t[t.length-1]}function Us(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Is(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Ge(e)));)n--;if(!i)return{x:0,y:0};const o=_e(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ws(t){return t.max-t.min}function Ns(t,e=0,n=.01){return Math.abs(t-e)<=n}function zs(t,e,n,i=.5){t.origin=i,t.originPoint=Ei(e.min,e.max,t.origin),t.scale=Ws(n)/Ws(e),(Ns(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ei(n.min,n.max,t.origin)-t.originPoint,(Ns(t.translate)||isNaN(t.translate))&&(t.translate=0)}function $s(t,e,n,i){zs(t.x,e.x,n.x,i?i.originX:void 0),zs(t.y,e.y,n.y,i?i.originY:void 0)}function Hs(t,e,n){t.min=n.min+e.min,t.max=t.min+Ws(e)}function Ys(t,e,n){t.min=e.min-n.min,t.max=t.min+Ws(e)}function Ks(t,e,n){Ys(t.x,e.x,n.x),Ys(t.y,e.y,n.y)}function Xs(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 Gs(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 _s=.35;function qs(t,e,n){return{min:Zs(t,e),max:Zs(t,n)}}function Zs(t,e){return"number"==typeof t?t:t[e]||0}const Js=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Qs(t){return[t("x"),t("y")]}function to({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function eo(t){return void 0===t||1===t}function no({scale:t,scaleX:e,scaleY:n}){return!eo(t)||!eo(e)||!eo(n)}function io(t){return no(t)||so(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function so(t){return oo(t.x)||oo(t.y)}function oo(t){return t&&"0%"!==t}function ro(t,e,n){return n+e*(t-n)}function ao(t,e,n,i,s){return void 0!==s&&(t=ro(t,s,i)),ro(t,n,i)+e}function lo(t,e=0,n=1,i,s){t.min=ao(t.min,e,n,i,s),t.max=ao(t.max,e,n,i,s)}function uo(t,{x:e,y:n}){lo(t.x,e.translate,e.scale,e.originPoint),lo(t.y,n.translate,n.scale,n.originPoint)}function co(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function ho(t,e){t.min=t.min+e,t.max=t.max+e}function po(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Ei(t.min,t.max,o);lo(t,e[n],e[i],r,e.scale)}const mo=["x","scaleX","originX"],fo=["y","scaleY","originY"];function go(t,e){po(t.x,e,mo),po(t.y,e,fo)}function yo(t,e){return to(function(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}}(t.getBoundingClientRect(),e))}const vo=({current:t})=>t?t.ownerDocument.defaultView:null,xo=new WeakMap;class Po{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Ls(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ae(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:s,onDragStart:o}=this.getProps();if(i&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Le(i),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Ct.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ws(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&ge.postRender(()=>o(t,e)),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=ys(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Qs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:vo(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&ge.postRender(()=>o(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!wo(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Ei(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Ei(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&V(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Xs(t.x,n,s),y:Xs(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=_s){return!1===t?t=0:!0===t&&(t=_s),{x:qs(t,"left","right"),y:qs(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qs(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(!t||!V(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=yo(t,n),{scroll:s}=e;return s&&(ho(i.x,s.offset.x),ho(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Gs(t.x,e.x),y:Gs(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=to(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Qs(r=>{if(!wo(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ls(t,n,0,e,this.visualElement,!1,ys(this.visualElement,t)))}stopAnimation(){Qs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Qs(e=>{const{drag:n}=this.getProps();if(!wo(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ei(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!V(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Qs(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ws(t),s=Ws(e);return s>i?n=Ai(e.min,e.max-i,t.min):i>s&&(n=Ai(t.min,t.max-s,e.min)),gt(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Qs(e=>{if(!wo(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ei(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;xo.set(this.visualElement,this);const t=Ce(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();V(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ge.read(e);const s=Se(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Qs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=_s,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function wo(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const To=t=>(e,n)=>{t&&ge.postRender(()=>t(e,n))};const So=["TopLeft","TopRight","BottomLeft","BottomRight"],bo=So.length,Ao=t=>"string"==typeof t?parseFloat(t):t,Eo=t=>"number"==typeof t||Vt.test(t);function Co(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Vo=Ro(0,.5,yi),Mo=Ro(.5,.95,X);function Ro(t,e,n){return i=>i<t?0:i>e?1:n(Ai(t,e,i))}function Do(t,e){t.min=e.min,t.max=e.max}function ko(t,e){Do(t.x,e.x),Do(t.y,e.y)}function Lo(t,e,n,i,s){return t=ro(t-=e,1/n,i),void 0!==s&&(t=ro(t,1/s,i)),t}function Bo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(Ct.test(e)){e=parseFloat(e);e=Ei(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ei(o.min,o.max,i);t===o&&(a-=e),t.min=Lo(t.min,e,n,a,s),t.max=Lo(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Fo=["x","scaleX","originX"],jo=["y","scaleY","originY"];function Oo(t,e,n,i){Bo(t.x,e,Fo,n?n.x:void 0,i?i.x:void 0),Bo(t.y,e,jo,n?n.y:void 0,i?i.y:void 0)}function Io(t){return 0===t.translate&&1===t.scale}function Uo(t){return Io(t.x)&&Io(t.y)}function Wo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function No(t){return Ws(t.x)/Ws(t.y)}class zo{constructor(){this.members=[]}add(t){ce(this.members,t),t.scheduleRender()}remove(t){if(he(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){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $o(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0: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,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Ho=(t,e)=>t.depth-e.depth;class Yo{constructor(){this.children=[],this.isDirty=!1}add(t){ce(this.children,t),this.isDirty=!0}remove(t){he(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ho),this.isDirty=!1,this.children.forEach(t)}}const Ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Xo(t,e){const n=an.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ye(i),t(o-e))};return ge.read(i,!0),()=>ye(i)}function Go(t,e,n){var i;if("string"==typeof t){let s=document;e&&(_(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const _o=new WeakMap;function qo(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Zo={current:null},Jo={current:!1};function Qo(){if(Jo.current=!0,y)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Zo.current=t.matches;t.addListener(e),e()}else Zo.current=!1}const tr=[...Pn,Bn,Wn],er=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],nr=O.length;class ir{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,i)=>new this.KeyframeResolver(t,e,n,i,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Cn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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.scheduleRender=()=>ge.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=I(e),this.isVariantNode=U(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&rt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,_o.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Jo.current||Qo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Zo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_o.delete(this.current),this.projection&&this.projection.unmount(),ye(this.notifyUpdate),ye(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,e){const n=st.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&ge.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in $){const e=$[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<er.length;e++){const n=er[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(rt(s))t.addValue(i,s);else if(rt(o))t.addValue(i,ds(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,ds(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<nr;t++){const n=O[t],i=this.props[n];(B(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=ds(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=i&&("string"==typeof i&&(un(i)||ln(i))?i=parseFloat(i):(s=i,!tr.find(xn(s))&&Wn.test(e)&&(i=Xn(t,e))),this.setBaseTarget(t,rt(i)?i.get():i)),rt(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=se(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||rt(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new us),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class sr extends ir{constructor(){super(...arguments),this.KeyframeResolver=_n}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class or extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(st.has(e)){const t=Kn(e);return t&&t.default||0}return e=Qt.has(e)?e:P(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e,n){return ne(t,e,n)}build(t,e,n){Xt(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){te(t,e,0,i)}mount(t){this.isSVGTag=_t(t.tagName),super.mount(t)}}class rr extends sr{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(t,e){if(st.has(e)){const t=Kn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(ht(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return yo(t,e)}build(t,e,n){Bt(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ee(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;rt(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,i){Jt(t,e,n,i)}}function ar(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=qo(t)?new or(e):new rr(e);n.mount(t),_o.set(t,n)}function lr(t,e,n){const i=rt(t)?t:ds(t);return i.start(ls("",i,e,n)),i.animation}function ur(t,e=100){const n=ri({keyframes:[0,e],...t}),i=Math.min(Hi(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:_e(i)}}function cr(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const hr=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function dr(t,e){return pi(t)?t[hr(0,t.length,e)]:t}function pr(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(he(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Ei(s,o,i[r]),easing:dr(n,r)})}function mr(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function fr(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function gr(t,e){return e[t]||(e[t]=[]),e[t]}function yr(t){return Array.isArray(t)?t:[t]}function vr(t,e){return t[e]?{...t,...t[e]}:{...t}}const xr=t=>"number"==typeof t,Pr=t=>t.every(xr);function wr(t,e,n,i){const s=Go(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t];_o.has(i)||ar(i);const a=_o.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...xs(a,{...e,transition:l},{}))}return new as(r)}function Tr(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,cr(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=cr(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=yr(t),{delay:l=0,times:u=zi(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&Pr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Ge(g));const n=ur(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Ni(u,w),1===a.length&&a.unshift(null),pr(i,a,m,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(rt(d)){g(p,m,gr("default",fr(d,r)))}else{const t=Go(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=fr(t[n],r);for(const t in p)g(p[t],vr(m,t),gr(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(mr);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(Ai(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=rt(n)?lr(n,t.default,e.default):wr(n,t,e),i.push(s)}),new as(i)}const Sr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?Tr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?wr(e,n,i,t):lr(e,n,i),t&&t.animations.push(s),s},br=Sr(),Ar=new WeakMap;let Er;function Cr({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Ar.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Vr(t){t.forEach(Cr)}function Mr(t,e){Er||"undefined"!=typeof ResizeObserver&&(Er=new ResizeObserver(Vr));const n=Go(t);return n.forEach(t=>{let n=Ar.get(t);n||(n=new Set,Ar.set(t,n)),n.add(e),null==Er||Er.observe(t)}),()=>{n.forEach(t=>{const n=Ar.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Er||Er.unobserve(t)})}}const Rr=new Set;let Dr;function kr(t){return Rr.add(t),Dr||(Dr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Rr.forEach(t=>t(e))},window.addEventListener("resize",Dr)),()=>{Rr.delete(t),!Rr.size&&Dr&&(Dr=void 0)}}const Lr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Br(t,e,n,i){const s=n[e],{length:o,position:r}=Lr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Ai(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Qn(s.current-a,u)}const Fr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},jr={start:0,center:.5,end:1};function Or(t,e,n=0){let i=0;if(t in jr&&(t=jr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Ir=[0,0];function Ur(t,e,n,i){let s=Array.isArray(t)?t:Ir,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,jr[t]?t:"0"]),o=Or(s[0],n,i),r=Or(s[1],e),o-r}const Wr={x:0,y:0};function Nr(t,e,n){const{offset:i=Fr.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):Wr,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Ur(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Wi(e[o].offset,zi(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function zr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Br(t,"x",e,n),Br(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Nr(t,n,i)},notify:()=>e(n)}}const $r=new WeakMap,Hr=new WeakMap,Yr=new WeakMap,Kr=t=>t===document.documentElement?window:t;function Xr(t,{container:e=document.documentElement,...n}={}){let i=Yr.get(e);i||(i=new Set,Yr.set(e,i));const s=zr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!$r.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(ve.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{ge.read(t,!1,!0),ge.read(n,!1,!0),ge.update(s,!1,!0)};$r.set(e,a);const l=Kr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Hr.set(e,(r=a,"function"==typeof(o=e)?kr(o):Mr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=$r.get(e);return ge.read(a,!1,!0),()=>{var t;ye(a);const n=Yr.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=$r.get(e);$r.delete(e),i&&(Kr(e).removeEventListener("scroll",i),null===(t=Hr.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Gr=new Map;function _r({source:t=document.documentElement,axis:e="y"}={}){Gr.has(t)||Gr.set(t,{});const n=Gr.get(t);return n[e]||(n[e]=rs()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Xr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const qr={some:0,all:1};function Zr(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Go(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:qr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Jr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Wi(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Qr=ge,ta=b.reduce((t,e)=>(t[e]=t=>ye(t),t),{}),ea=["","X","Y","Z"],na={visibility:"hidden"};let ia=0;const sa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function oa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ra({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ia++,this.animationId=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=()=>{var t;this.projectionUpdateScheduled=!1,sa.totalNodes=sa.resolvedTargetDeltas=sa.recalculatedProjection=0,this.nodes.forEach(ua),this.nodes.forEach(ga),this.nodes.forEach(ya),this.nodes.forEach(ca),t=sa,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Yo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new us),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=qo(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Xo(i,250),Ko.hasAnimatedSinceResize&&(Ko.hasAnimatedSinceResize=!1,this.nodes.forEach(fa))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Sa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Wo(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...tn(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||fa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ye(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(va),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.HandoffCancelAllAnimations&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:n}=e.options;return!!n&&(!!fs(n)||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&t(e.parent))}(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(da);this.isUpdating||this.nodes.forEach(pa),this.isUpdating=!1,this.nodes.forEach(ma),this.nodes.forEach(aa),this.nodes.forEach(la),this.clearAllSnapshots();const t=an.now();ve.delta=gt(0,1e3/60,t-ve.timestamp),ve.timestamp=t,ve.isProcessing=!0,xe.update.process(ve),xe.preRender.process(ve),xe.render.process(ve),ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,E.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ha),this.sharedNodes.forEach(xa)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}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={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Uo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||io(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Ea((i=n).x),Ea(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(ho(e.x,n.offset.x),ho(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ko(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){ko(e,t);const{scroll:n}=this.root;n&&(ho(e.x,-n.offset.x),ho(e.y,-n.offset.y))}ho(e.x,s.offset.x),ho(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ko(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&go(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),io(i.latestValues)&&go(n,i.latestValues)}return io(this.latestValues)&&go(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ko(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!io(n.latestValues))continue;no(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};ko(i,n.measurePageBox()),Oo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return io(this.latestValues)&&Oo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=ve.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(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}},Ks(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ko(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Hs(r.x,a.x,l.x),Hs(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ko(this.target,this.layout.layoutBox),uo(this.target,this.targetDelta)):ko(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(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}},Ks(this.relativeTargetOrigin,this.target,t.target),ko(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}sa.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!no(this.parent.latestValues)&&!so(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ve.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;ko(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(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;const s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&go(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,uo(t,r)),i&&io(o.latestValues)&&go(t,o.latestValues))}e.x=co(e.x),e.y=co(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(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}});const u=this.projectionTransform;$s(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=$o(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),sa.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Ta));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Pa(o.x,t.x,n),Pa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ks(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){wa(t.x,e.x,n.x,i),wa(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ko(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ei(0,void 0!==n.opacity?n.opacity:1,Vo(i)),t.opacityExit=Ei(void 0!==e.opacity?e.opacity:1,0,Mo(i))):o&&(t.opacity=Ei(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<bo;s++){const o=`border${So[s]}Radius`;let r=Co(e,o),a=Co(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Eo(r)===Eo(a)?(t[o]=Math.max(Ei(Ao(r),Ao(a),i),0),(Ct.test(a)||Ct.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ei(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Ko.hasAnimatedSinceResize=!0,this.currentAnimation=lr(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ca(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ws(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ws(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ko(e,n),go(e,s),$s(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new zo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&oa("z",t,i,this.animationValues);for(let e=0;e<ea.length;e++)oa("rotate"+ea[e],t,i,this.animationValues),oa("skew"+ea[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return na;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=ae(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ae(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!io(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=$o(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in et){if(void 0===r[t])continue;const{correct:e,applyTo:n}=et[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?ae(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(da),this.root.sharedNodes.clear()}}}function aa(t){t.updateLayout()}function la(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Qs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Ws(i);i.min=e[t].min,i.max=i.min+s}):Ca(s,n.layoutBox,e)&&Qs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Ws(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};$s(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?$s(a,t.applyTransform(i,!0),n.measuredBox):$s(a,e,n.layoutBox);const l=!Uo(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Ks(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Ks(a,e,o.layoutBox),Wo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ua(t){sa.totalNodes++,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 ca(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ha(t){t.clearSnapshot()}function da(t){t.clearMeasurements()}function pa(t){t.isLayoutDirty=!1}function ma(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function fa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ga(t){t.resolveTargetDelta()}function ya(t){t.calcProjection()}function va(t){t.resetSkewAndRotation()}function xa(t){t.removeLeadSnapshot()}function Pa(t,e,n){t.translate=Ei(e.translate,0,n),t.scale=Ei(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function wa(t,e,n,i){t.min=Ei(e.min,n.min,i),t.max=Ei(e.max,n.max,i)}function Ta(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Sa={duration:.45,ease:[.4,0,.1,1]},ba=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Aa=ba("applewebkit/")&&!ba("chrome/")?Math.round:X;function Ea(t){t.min=Aa(t.min),t.max=Aa(t.max)}function Ca(t,e,n){return"position"===t||"preserve-aspect"===t&&!Ns(No(e),No(n),.2)}const Va=ra({attachResizeListener:(t,e)=>Se(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Ra=ra({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Da=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ka(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Da);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}}function La(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ba={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Vt.test(t))return t;t=parseFloat(t)}return`${La(t,e.target.x)}% ${La(t,e.target.y)}%`}},Fa={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Wn.parse(t);if(s.length>5)return i;const o=Wn.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 u=Ei(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function ja(){const t=e.useContext(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class Oa extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;nt(Ua),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ge.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),E.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ia(t){const[n,i]=ja(),s=e.useContext(Y);return d(Oa,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(M),isPresent:n,safeToRemove:i})}const Ua={borderRadius:{...Ba,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:Fa},Wa={pan:{Feature:class extends Fe{constructor(){super(...arguments),this.removePointerDownListener=X}onPointerDown(t){this.session=new Ls(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:To(t),onStart:To(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&ge.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ce(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Fe{constructor(t){super(t),this.removeGroupControls=X,this.removeListeners=X,this.controls=new Po(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||X}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ra,MeasureLayout:Ia}},Na=(t,n)=>tt(t)?new or(n):new rr(n,{allowProjection:t!==e.Fragment}),za={layout:{ProjectionNode:Ra,MeasureLayout:Ia}},$a={...Rs,...Ye,...Wa,...za},Ha=J((t,e)=>Te(t,e,$a,Na));const Ya=J(Te);function Ka(){const t=e.useRef(!1);return v(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Xa(){const t=Ka(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>ge.postRender(s),[s]),n]}class Ga extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _a({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=e.useContext(m);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:l}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),d(Ga,{isPresent:n,childRef:o,sizeRef:r,children:i.cloneElement(t,{ref:o})})}const qa=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l})=>{const u=oe(Za),c=e.useId(),h=e.useMemo(()=>({id:c,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?[Math.random()]:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(t=d(_a,{isPresent:s,children:t})),d(g.Provider,{value:h,children:t})};function Za(){return new Map}function Ja(t){return e.useEffect(()=>()=>t(),[])}const Qa=t=>t.key||"";function tl(t){return"function"==typeof t}const el=e.createContext(null),nl=t=>!0===t,il=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(Y),o=e.useContext(el),[r,a]=Xa(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>nl(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:nl(i)&&s.group||ka()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(Y.Provider,{value:c,children:t})},sl=e.createContext(null);function ol(t){return t.value}function rl(t,e){return t.layout.min-e.layout.min}function al(t){const n=oe(()=>ds(t)),{isStatic:i}=e.useContext(m);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function ll(t,e){const n=al(e()),i=()=>n.set(e());return i(),v(()=>{const e=()=>ge.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ye(i)}}),n}function ul(t,e,n,i){if("function"==typeof t)return function(t){cs.current=[],t();const e=ll(cs.current,t);return cs.current=void 0,e}(t);const s="function"==typeof e?e:Jr(e,n,i);return Array.isArray(t)?cl(t,s):cl([t],([t])=>s(t))}function cl(t,e){const n=oe(()=>[]);return ll(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function hl(t,e=0){return rt(t)?t:al(e)}const dl={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=oe(()=>Ha(n)),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(rl)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Ei(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(ol).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(sl.Provider,{value:h,children:t})})})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=oe(()=>Ha(s)),c=e.useContext(sl),h={x:hl(n.x),y:hl(n.y)},p=ul([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}))},pl={renderer:Na,...Rs,...Ye},ml={...pl,...Wa,...za};function fl(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function gl(t,e){G(Boolean(!e||e.current))}const yl=()=>({scrollX:ds(0),scrollY:ds(0),scrollXProgress:ds(0),scrollYProgress:ds(0)});function vl({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=oe(yl);return(i?v:e.useEffect)(()=>(gl(0,n),gl(0,t),Xr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function xl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(m);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return ge.update(e,!0),()=>ye(e)},[t])}function Pl(){!Jo.current&&Qo();const[t]=e.useState(Zo.current);return t}function wl(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&ms(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{wl(t,e)})})}function Tl(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(Ts(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?wl(t,e):"string"==typeof e?wl(t,[e]):ms(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function Sl(){const t=oe(Tl);return v(t.mount,[]),t}const bl=Sl;class Al{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const El=()=>new Al;function Cl(t){return null!==t&&"object"==typeof t&&K in t}function Vl(){return Ml}function Ml(t){Ma.current&&(Ma.current.isUpdating=!1,Ma.current.blockUpdate(),t&&t())}const Rl=(t,e)=>`${t}: ${e}`,Dl=new Map;let kl,Ll,Bl;function Fl(t,e,n,i){const s=st.has(e)?"transform":e,o=Rl(t,s),r=Dl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{if(Dl.delete(o),i)i.render(()=>i.render(()=>{try{a.cancel()}catch(t){}}));else try{a.cancel()}catch(t){}})(),null):(void 0===kl&&(kl=performance.now()),kl-l||0)}const jl=()=>({});class Ol extends ir{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Il=de({scrapeMotionValuesFromProps:jl,createRenderState:jl});const Ul=t=>t>.001?1/t:1e5;let Wl=0;t.AcceleratedAnimation=ss,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const l=e.useContext(Y).forceRender||Xa()[0],u=Ka(),c=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=c;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,y=e.useRef(!0);if(v(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=Qa(t);e.set(n,t)})}(c,g),f.current=p}),Ja(()=>{y.current=!0,g.clear(),m.clear()}),y.current)return d(h,{children:p.map(t=>d(qa,{isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:r,mode:a,children:t},Qa(t)))});p=[...p];const x=f.current.map(Qa),P=c.map(Qa),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1!==P.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===a&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==P.indexOf(e))return;const i=g.get(e);if(!i)return;const o=x.indexOf(e);let h=t;if(!h){h=d(qa,{isPresent:!1,onExitComplete:()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!P.includes(t));if(t.forEach(t=>g.delete(t)),f.current=c.filter(n=>{const i=Qa(n);return i===e||t.includes(i)}),!m.size){if(!1===u.current)return;l(),s&&s()}},custom:n,presenceAffectsLayout:r,mode:a,children:i},Qa(i)),m.set(e,h)}p.splice(o,0,h)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:d(qa,{isPresent:!0,presenceAffectsLayout:r,mode:a,children:t},Qa(t))}),d(h,{children:m.size?p:p.map(t=>e.cloneElement(t))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(il,{id:oe(()=>"asl-"+Wl++),children:t})),t.DeprecatedLayoutGroupContext=el,t.DragControls=Al,t.FlatTree=Yo,t.LayoutGroup=il,t.LayoutGroupContext=Y,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!tl(n)),o=e.useRef(void 0);if(!tl(n)){const{renderer:t,...e}=n;o.current=t,H(e)}return e.useEffect(()=>{tl(n)&&n().then(({renderer:t,...e})=>{H(e),o.current=t,s(!0)})},[]),d(x.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&zt(n),(i={...e.useContext(m),...i}).isStatic=oe(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(m.Provider,{value:s,children:t})},t.MotionConfigContext=m,t.MotionContext=f,t.MotionGlobalConfig=T,t.MotionValue=hs,t.PresenceContext=g,t.Reorder=dl,t.SwitchLayoutGroupContext=M,t.VisualElement=ir,t.addPointerEvent=Ce,t.addPointerInfo=Ee,t.addScaleCorrector=nt,t.animate=br,t.animateValue=_i,t.animateVisualElement=Ts,t.animationControls=Tl,t.animations=Rs,t.anticipate=Ti,t.backIn=Pi,t.backInOut=wi,t.backOut=xi,t.buildTransform=ut,t.calcLength=Ws,t.cancelFrame=ye,t.cancelSync=ta,t.circIn=gi,t.circInOut=vi,t.circOut=yi,t.clamp=gt,t.color=Bn,t.complex=Wn,t.createBox=Js,t.createDomMotionComponent=function(t){return q(Te(t,{forwardMotionProps:!1},$a,Na))},t.createMotionComponent=q,t.createScopedAnimate=Sr,t.cubicBezier=ui,t.delay=Xo,t.disableInstantTransitions=function(){en.current=!1},t.distance=Ds,t.distance2D=ks,t.domAnimation=pl,t.domMax=ml,t.easeIn=ci,t.easeInOut=di,t.easeOut=hi,t.filterProps=$t,t.frame=ge,t.frameData=ve,t.inView=Zr,t.interpolate=Wi,t.invariant=_,t.isBrowser=y,t.isDragActive=Be,t.isMotionComponent=Cl,t.isMotionValue=rt,t.isValidMotionProp=Wt,t.m=Ya,t.makeUseVisualState=de,t.mirrorEasing=mi,t.mix=Ui,t.motion=Ha,t.motionValue=ds,t.optimizedAppearDataAttribute=w,t.pipe=Me,t.progress=Ai,t.px=Vt,t.resolveMotionValue=ae,t.reverseEasing=fi,t.scroll=function(t,e){const n=_r(e);return"function"==typeof t?os(t,n):t.attachTimeline(n)},t.scrollInfo=Xr,t.spring=ri,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=bi(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Fl;const r=Rl(o,e);Bl||(Bl=ns(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Dl.set(r,{animation:Bl,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{Dl.forEach(({animation:t})=>{t.cancel()}),Dl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{Bl.cancel();const o=ns(t,e,n,i);void 0===Ll&&(Ll=performance.now()),o.startTime=Ll,Dl.set(r,{animation:o,startTime:Ll}),s&&s(o)};Bl.ready?Bl.ready.then(a).catch(X):a()},t.steps=xe,t.sync=Qr,t.transform=Jr,t.unwrapMotionComponent=function(t){if(Cl(t))return t[K]},t.useAnimate=function(){const t=oe(()=>({current:null,animations:[]})),e=oe(()=>Sr(t));return Ja(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=bl,t.useAnimationControls=Sl,t.useAnimationFrame=xl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?hr(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Il({},!1),o=oe(()=>new Ol({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,oe(()=>t=>Ts(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=al(1),i=al(1);const{visualElement:s}=e.useContext(f);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:ul(n,Ul),scaleY:ul(i,Ul)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Se(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return oe(El)},t.useElementScroll=function(t){return vl({container:t})},t.useForceUpdate=Xa,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return Zr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=Vl,t.useInstantTransition=function(){const[t,n]=Xa(),i=Vl(),s=e.useRef();return e.useEffect(()=>{ge.postRender(()=>ge.postRender(()=>{n===s.current&&(en.current=!1)}))},[n]),e=>{i(()=>{en.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(g))||t.isPresent;var t},t.useIsomorphicLayoutEffect=v,t.useMotionTemplate=function(t,...e){const n=t.length;return ll(e.filter(rt),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=rt(n)?n.get():n)}return i}))},t.useMotionValue=al,t.useMotionValueEvent=fl,t.usePresence=ja,t.useReducedMotion=Pl,t.useReducedMotionConfig=function(){const t=Pl(),{reducedMotion:n}=e.useContext(m);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Ma.current;t&&t.resetTree()},[])},t.useScroll=vl,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(m),s=e.useRef(null),o=al(rt(t)?t.get():t),r=e.useRef(o.get()),a=e.useRef(()=>{}),l=()=>{const t=s.current;t&&0===t.time&&t.sample(ve.delta),u(),s.current=_i({keyframes:[o.get(),r.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a.current})},u=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(r.current=t,a.current=e,ge.update(l),o.get()),u),[JSON.stringify(n)]),v(()=>{if(rt(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=al(0);return xl(e=>t.set(e)),t},t.useTransform=ul,t.useUnmountEffect=Ja,t.useVelocity=function(t){const e=al(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&ge.update(n)};return fl(t,"change",()=>{ge.update(n,!1,!0)}),e},t.useViewportScroll=function(){return vl()},t.useWillChange=function(){return oe(()=>new gs("auto"))},t.visualElementStore=_o,t.warning=G,t.wrap=hr}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),f=e.createContext({}),g=e.createContext(null),y="undefined"!=typeof document,v=y?e.useLayoutEffect:e.useEffect,x=e.createContext({strict:!1}),P=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),w="data-"+P("framerAppearId"),T={skipAnimations:!1,useManualTiming:!1};const S=["read","resolveKeyframes","update","preRender","render","postRender"];function b(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=S.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{r=t,i?s=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,s&&(s=!1,l.process(t)))}};return l}(o),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=T.useManualTiming?s.timestamp:performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:S.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<S.length;e++)r[S[e]].cancel(t)},state:s,steps:r}}const{schedule:A,cancel:E}=b(queueMicrotask,!1);function C(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const V=e.createContext({});let M=!1;function R(t,n,i,s,o){const{visualElement:r}=e.useContext(f),a=e.useContext(x),l=e.useContext(g),u=e.useContext(m).reducedMotion,c=e.useRef();s=s||a.renderer,!c.current&&s&&(c.current=s(t,{visualState:n,parent:r,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));const h=c.current,d=e.useContext(V);!h||h.projection||!o||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&C(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(c.current,i,o,d),e.useInsertionEffect(()=>{h&&h.update(i,l)});const p=e.useRef(Boolean(i[w]&&!window.HandoffComplete));return v(()=>{h&&(h.updateFeatures(),A.render(h.render),p.current&&h.animationState&&h.animationState.animateChanges())}),e.useEffect(()=>{h&&(!p.current&&h.animationState&&h.animationState.animateChanges(),p.current&&(p.current=!1,M||(M=!0,queueMicrotask(D))))}),h}function D(){window.HandoffComplete=!0}function k(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):C(i)&&(i.current=e))},[n])}function L(t){return"string"==typeof t||Array.isArray(t)}function B(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const F=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],j=["initial",...F];function O(t){return B(t.animate)||j.some(e=>L(t[e]))}function I(t){return Boolean(O(t)||t.variants)}function U(t){const{initial:n,animate:i}=function(t,e){if(O(t)){const{initial:e,animate:n}=t;return{initial:!1===e||L(e)?e:void 0,animate:L(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(f));return e.useMemo(()=>({initial:n,animate:i}),[W(n),W(i)])}function W(t){return Array.isArray(t)?t.join(" "):t}const N={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},z={};for(const t in N)z[t]={isEnabled:e=>N[t].some(t=>!!e[t])};function $(t){for(const e in t)z[e]={...z[e],...t[e]}}const H=e.createContext({}),Y=Symbol.for("motionComponentSymbol"),K=t=>t;let X=K,G=K;function _({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){t&&$(t);const r=e.forwardRef((function(t,r){let a;const l={...e.useContext(m),...t,layoutId:q(t)},{isStatic:u}=l,c=U(t),h=s(t,u);if(!u&&y){e.useContext(x).strict;const t=function(t){const{drag:e,layout:n}=z;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=R(o,h,l,n,t.ProjectionNode)}return p(f.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,k(h,c.visualElement,r),h,u,c.visualElement)]})}));return r[Y]=o,r}function q({layoutId:t}){const n=e.useContext(H).id;return n&&void 0!==t?n+"-"+t:t}function Z(t){function e(e,n={}){return _(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const J=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Q(t){return"string"==typeof t&&!t.includes("-")&&!!(J.indexOf(t)>-1||/[A-Z]/u.test(t))}const tt={};function et(t){Object.assign(tt,t)}const nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(nt);function st(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!tt[t]||"opacity"===t)}const ot=t=>Boolean(t&&t.getVelocity),rt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},at=nt.length;function lt(t,e,n){let i="";for(let e=0;e<at;e++){const n=nt[e];if(void 0!==t[n]){i+=`${rt[n]||n}(${t[n]}) `}}return i=i.trim(),n?i=n(t,e?"":i):e&&(i="none"),i}const ut=t=>e=>"string"==typeof e&&e.startsWith(t),ct=ut("--"),ht=ut("var(--"),dt=t=>!!ht(t)&&pt.test(t.split("/*")[0].trim()),pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ft=(t,e,n)=>n>e?e:n<t?t:n,gt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},yt={...gt,transform:t=>ft(0,1,t)},vt={...gt,default:1},xt=t=>Math.round(1e5*t)/1e5,Pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function St(t){return"string"==typeof t}const bt=t=>({test:e=>St(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),At=bt("deg"),Et=bt("%"),Ct=bt("px"),Vt=bt("vh"),Mt=bt("vw"),Rt={...Et,parse:t=>Et.parse(t)/100,transform:t=>Et.transform(100*t)},Dt={...gt,transform:Math.round},kt={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:At,rotateX:At,rotateY:At,rotateZ:At,scale:vt,scaleX:vt,scaleY:vt,scaleZ:vt,skew:At,skewX:At,skewY:At,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:yt,originX:Rt,originY:Rt,originZ:Ct,zIndex:Dt,backgroundPositionX:Ct,backgroundPositionY:Ct,fillOpacity:yt,strokeOpacity:yt,numOctaves:Dt};function Lt(t,e,n){const{style:i,vars:s,transform:o,transformOrigin:r}=t;let a=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(ct(t)){s[t]=n;continue}const c=kt[t],h=mt(n,c);if(it.has(t)){if(a=!0,o[t]=h,!u)continue;n!==(c.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,r[t]=h):i[t]=h}if(e.transform||(a||n?i.transform=lt(t.transform,u,n):i.transform&&(i.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;i.transformOrigin=`${t} ${e} ${n}`}}const Bt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ft(t,e,n){for(const i in e)ot(e[i])||st(i,n)||(t[i]=e[i])}function jt(t,n){const i={};return Ft(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Lt(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Ot(t,e){const n={},i=jt(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const It=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ut(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||It.has(t)}let Wt=t=>!Ut(t);function Nt(t){t&&(Wt=e=>e.startsWith("on")?!Ut(e):t(e))}try{Nt(require("@emotion/is-prop-valid").default)}catch(t){}function zt(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Wt(s)||!0===n&&Ut(s)||!e&&!Ut(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function $t(t,e,n){return"string"==typeof t?t:Ct.transform(e+n*t)}const Ht={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yt={offset:"strokeDashoffset",array:"strokeDasharray"};function Kt(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Lt(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${$t(e,t.x,t.width)} ${$t(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ht:Yt;t[o.offset]=Ct.transform(-i);const r=Ct.transform(e),a=Ct.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Xt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Gt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function _t(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Kt(e,n,Gt(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Ft(e,t.style,t),o.style={...e,...o.style}}return o}function qt(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Q(n)?_t:Ot)(i,o,r,n),l=zt(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>ot(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Zt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Jt=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"]);function Qt(t,e,n,i){Zt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Jt.has(n)?n:P(n),e.attrs[n])}function te(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(ot(s[r])||e.style&&ot(e.style[r])||st(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return n&&s&&"string"==typeof s.willChange&&(n.applyWillChange=!1),o}function ee(t,e,n){const i=te(t,e,n);for(const n in t)if(ot(t[n])||ot(e[n])){i[-1!==nt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}function ne(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ie(t,e,n,i){if("function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ne(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function se(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const oe=t=>Array.isArray(t);function re(t){const e=ot(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const ae=new Set(["opacity","clipPath","filter","transform"]);function le(t){return it.has(t)?"transform":ae.has(t)?P(t):void 0}function ue(t,e){-1===t.indexOf(e)&&t.push(e)}function ce(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const he=t=>(n,i)=>{const s=e.useContext(f),o=e.useContext(g),r=()=>function({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:i},s,o,r,a){const l={latestValues:me(s,o,r,!a&&t,e),renderState:n()};return i&&(l.mount=t=>i(s,t,l)),l}(t,n,s,o,i);return i?r():se(r)};function de(t,e){const n=le(e);n&&ue(t,n)}function pe(t,e,n){const i=Array.isArray(e)?e:[e];for(let e=0;e<i.length;e++){const s=ie(t,i[e]);if(s){const{transitionEnd:t,transition:e,...i}=s;n(i,t)}}}function me(t,e,n,i,s){var o;const r={},a=[],l=i&&void 0===(null===(o=t.style)||void 0===o?void 0:o.willChange),u=s(t,{});for(const t in u)r[t]=re(u[t]);let{initial:c,animate:h}=t;const d=O(t),p=I(t);e&&p&&!d&&!1!==t.inherit&&(void 0===c&&(c=e.initial),void 0===h&&(h=e.animate));let m=!!n&&!1===n.initial;m=m||!1===c;const f=m?h:c;return f&&"boolean"!=typeof f&&!B(f)&&pe(t,f,(t,e)=>{for(const e in t){let n=t[e];if(Array.isArray(n)){n=n[m?n.length-1:0]}null!==n&&(r[e]=n)}for(const t in e)r[t]=e[t]}),l&&(h&&!1!==c&&!B(h)&&pe(t,h,t=>{for(const e in t)de(a,e)}),a.length&&(r.willChange=a.join(","))),r}const{schedule:fe,cancel:ge,state:ye,steps:ve}=b("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:K,!0),xe={useVisualState:he({scrapeMotionValuesFromProps:ee,createRenderState:Xt,onMount:(t,e,{renderState:n,latestValues:i})=>{fe.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),fe.render(()=>{Kt(n,i,Gt(e.tagName),t.transformTemplate),Qt(e,n)})}})},Pe={useVisualState:he({applyWillChange:!0,scrapeMotionValuesFromProps:te,createRenderState:Bt})};function we(t,{forwardMotionProps:e=!1},n,i){return{...Q(t)?xe:Pe,preloadedFeatures:n,useRender:qt(e),createVisualElement:i,Component:t}}function Te(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Se=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function be(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ae=t=>e=>Se(e)&&t(e,be(e));function Ee(t,e,n,i){return Te(t,e,Ae(n),i)}const Ce=(t,e)=>n=>e(t(n)),Ve=(...t)=>t.reduce(Ce);function Me(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Re=Me("dragHorizontal"),De=Me("dragVertical");function ke(t){let e=!1;if("y"===t)e=De();else if("x"===t)e=Re();else{const t=Re(),n=De();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Le(){const t=ke(!0);return!t||(t(),!1)}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Fe(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return Ee(t.current,n,(n,s)=>{if("touch"===n.pointerType||Le())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const r=o[i];r&&fe.postRender(()=>r(n,s))},{passive:!t.getProps()[i]})}const je=(t,e)=>!!e&&(t===e||je(t,e.parentElement));function Oe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,be(n))}const Ie=new WeakMap,Ue=new WeakMap,We=t=>{const e=Ie.get(t.target);e&&e(t)},Ne=t=>{t.forEach(We)};function ze(t,e,n){const i=function({root:t,...e}){const n=t||document;Ue.has(n)||Ue.set(n,{});const i=Ue.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ne,{root:t,...e})),i[s]}(e);return Ie.set(t,n),i.observe(t),()=>{Ie.delete(t),i.unobserve(t)}}const $e={some:0,all:1};const He={inView:{Feature:class extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:$e[i]};return ze(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Be{constructor(){super(...arguments),this.removeStartListeners=K,this.removeEndListeners=K,this.removeAccessibleListeners=K,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Ee(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps(),o=s||je(this.node.current,t.target)?n:i;o&&fe.update(()=>o(t,e))},{passive:!(n.onTap||n.onPointerUp)}),s=Ee(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ve(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Te(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Te(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&Oe("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))})}),Oe("down",(t,e)=>{this.startPress(t,e)})}),e=Te(this.node.current,"blur",()=>{this.isPressing&&Oe("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=Ve(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&fe.postRender(()=>n(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Le()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&fe.postRender(()=>n(t,e))}mount(){const t=this.node.getProps(),e=Ee(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Te(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ve(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ve(Te(this.node.current,"focus",()=>this.onFocus()),Te(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Be{mount(){this.unmount=Ve(Fe(this.node,!0),Fe(this.node,!1))}unmount(){}}}};function Ye(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}function Ke(t,e,n){const i=t.getProps();return ie(i,e,void 0!==n?n:i.custom,t)}const Xe=t=>1e3*t,Ge=t=>t/1e3,_e={type:"spring",stiffness:500,damping:25,restSpeed:10},qe={type:"keyframes",duration:.8},Ze={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Je=(t,{keyframes:e})=>e.length>2?qe:it.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_e:Ze;function Qe(t,e){return t[e]||t.default||t}const tn={current:!1},en=t=>null!==t;function nn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(en),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}let sn;function on(){sn=void 0}const rn={now:()=>(void 0===sn&&rn.set(ye.isProcessing||T.useManualTiming?ye.timestamp:performance.now()),sn),set:t=>{sn=t,queueMicrotask(on)}},an=t=>/^0[^.\s]+$/u.test(t);const ln=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cn(t,e,n=1){const[i,s]=function(t){const e=un.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ln(t)?parseFloat(t):t}return dt(s)?cn(s,e,n+1):s}const hn=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===gt||t===Ct,pn=(t,e)=>parseFloat(t.split(", ")[e]),mn=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return pn(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?pn(e[1],t):0}},fn=new Set(["x","y","z"]),gn=nt.filter(t=>!fn.has(t));const yn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:mn(4,13),y:mn(5,14)};yn.translateX=yn.x,yn.translateY=yn.y;const vn=t=>e=>e.test(t),xn=[gt,Ct,Et,At,Mt,Vt,{test:t=>"auto"===t,parse:t=>t}],Pn=t=>xn.find(vn(t)),wn=new Set;let Tn=!1,Sn=!1;function bn(){if(Sn){const t=Array.from(wn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return gn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Sn=!1,Tn=!1,wn.forEach(t=>t.complete()),wn.clear()}function An(){wn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Sn=!0)})}class En{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wn.add(this),Tn||(Tn=!0,fe.read(An),fe.resolveKeyframes(bn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),wn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cn=(t,e)=>n=>Boolean(St(n)&&Tt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vn=(t,e,n)=>i=>{if(!St(i))return i;const[s,o,r,a]=i.match(Pt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Mn={...gt,transform:t=>Math.round((t=>ft(0,255,t))(t))},Rn={test:Cn("rgb","red"),parse:Vn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Mn.transform(t)+", "+Mn.transform(e)+", "+Mn.transform(n)+", "+xt(yt.transform(i))+")"};const Dn={test:Cn("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Rn.transform},kn={test:Cn("hsl","hue"),parse:Vn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Et.transform(xt(e))+", "+Et.transform(xt(n))+", "+xt(yt.transform(i))+")"},Ln={test:t=>Rn.test(t)||Dn.test(t)||kn.test(t),parse:t=>Rn.test(t)?Rn.parse(t):kn.test(t)?kn.parse(t):Dn.parse(t),transform:t=>St(t)?t:t.hasOwnProperty("red")?Rn.transform(t):kn.transform(t)};const Bn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Bn,t=>(Ln.test(t)?(i.color.push(o),s.push("color"),n.push(Ln.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function jn(t){return Fn(t).values}function On(t){const{split:e,types:n}=Fn(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?xt(t[o]):"color"===e?Ln.transform(t[o]):t[o]}return s}}const In=t=>"number"==typeof t?0:t;const Un={test:function(t){var e,n;return isNaN(t)&&St(t)&&((null===(e=t.match(Pt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(wt))||void 0===n?void 0:n.length)||0)>0},parse:jn,createTransformer:On,getAnimatableNone:function(t){const e=jn(t);return On(t)(e.map(In))}},Wn=new Set(["brightness","contrast","saturate","opacity"]);function Nn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Pt)||[];if(!i)return t;const s=n.replace(i,"");let o=Wn.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,$n={...Un,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(Nn).join(" "):t}},Hn={...kt,color:Ln,backgroundColor:Ln,outlineColor:Ln,fill:Ln,stroke:Ln,borderColor:Ln,borderTopColor:Ln,borderRightColor:Ln,borderBottomColor:Ln,borderLeftColor:Ln,filter:$n,WebkitFilter:$n},Yn=t=>Hn[t];function Kn(t,e){let n=Yn(t);return n!==$n&&(n=Un),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Xn=new Set(["auto","none","0"]);class Gn extends En{constructor(t,e,n,i){super(t,e,n,i,null==i?void 0:i.owner,!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(),dt(i))){const s=cn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!hn.has(n)||2!==t.length)return;const[i,s]=t,o=Pn(i),r=Pn(s);if(o!==r)if(dn(o)&&dn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||an(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Xn.has(e)&&Fn(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Kn(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=yn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function _n(t){let e;return()=>(void 0===e&&(e=t()),e)}const qn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Un.test(t)&&"0"!==t||t.startsWith("url(")));class Zn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(An(),bn()),this._resolved}onKeyframesResolved(t,e){this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!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=qn(s,e),a=qn(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&&i)}(t,n,i,s)){if(tn.current||!o)return null==a||a(nn(t,this.options,e)),null==r||r(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Jn(t,e){return e?t*(1e3/e):0}function Qn(t,e,n){const i=Math.max(e-5,0);return Jn(n-t(i),e-i)}function ti({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o,r=1-e;r=ft(.05,1,r),t=ft(.01,10,Ge(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ei(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ei(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Xe(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ei(t,e){return t*Math.sqrt(1-e*e)}const ni=["duration","bounce"],ii=["stiffness","damping","mass"];function si(t,e){return e.some(e=>void 0!==t[e])}function oi({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!si(t,ii)&&si(t,ni)){const n=ti(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Ge(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Ge(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=ei(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=v(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?Qn(v,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function ri({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=oi({keyframes:[d.value,p(d.value)],velocity:Qn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),T(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const ai=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function li(t,e,n,i){if(t===e&&n===i)return K;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=ai(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:ai(s(t),e,i)}const ui=li(.42,0,1,1),ci=li(0,0,.58,1),hi=li(.42,0,.58,1),di=t=>Array.isArray(t)&&"number"!=typeof t[0],pi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,mi=t=>e=>1-t(1-e),fi=t=>1-Math.sin(Math.acos(t)),gi=mi(fi),yi=pi(fi),vi=li(.33,1.53,.69,.99),xi=mi(vi),Pi=pi(xi),wi=t=>(t*=2)<1?.5*xi(t):.5*(2-Math.pow(2,-10*(t-1))),Ti={linear:K,easeIn:ui,easeInOut:hi,easeOut:ci,circIn:fi,circInOut:yi,circOut:gi,backIn:xi,backInOut:Pi,backOut:vi,anticipate:wi},Si=t=>{if(Array.isArray(t)){G(4===t.length);const[e,n,i,s]=t;return li(e,n,i,s)}return"string"==typeof t?Ti[t]:t},bi=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Ai=(t,e,n)=>t+(e-t)*n;function Ei(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 Ci(t,e){return n=>n>0?e:t}const Vi=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Mi=[Dn,Rn,kn];function Ri(t){const e=(n=t,Mi.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===kn&&(i=function({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=Ei(a,i,t+1/3),o=Ei(a,i,t),r=Ei(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}}(i)),i}const Di=(t,e)=>{const n=Ri(t),i=Ri(e);if(!n||!i)return Ci(t,e);const s={...n};return t=>(s.red=Vi(n.red,i.red,t),s.green=Vi(n.green,i.green,t),s.blue=Vi(n.blue,i.blue,t),s.alpha=Ai(n.alpha,i.alpha,t),Rn.transform(s))},ki=new Set(["none","hidden"]);function Li(t,e){return n=>Ai(t,e,n)}function Bi(t){return"number"==typeof t?Li:"string"==typeof t?dt(t)?Ci:Ln.test(t)?Di:Oi:Array.isArray(t)?Fi:"object"==typeof t?Ln.test(t)?Di:ji:Ci}function Fi(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Bi(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ji(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Bi(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Oi=(t,e)=>{const n=Un.createTransformer(e),i=Fn(t),s=Fn(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ki.has(t)&&!s.values.length||ki.has(e)&&!i.values.length?function(t,e){return ki.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ve(Fi(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Ci(t,e)};function Ii(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ai(t,e,n);return Bi(t)(t,e)}function Ui(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(G(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const i=[],s=n||Ii,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||K:e;o=Ve(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=bi(t[n],t[n+1],e);return r[n](i)};return n?e=>l(ft(t[0],t[o-1],e)):l}function Wi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=bi(0,e,i);t.push(Ai(n,1,s))}}function Ni(t){const e=[0];return Wi(e,t.length-1),e}function zi({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=di(i)?i.map(Si):Si(i),o={done:!1,value:e[0]},r=Ui(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ni(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||hi).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function $i(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const Hi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>fe.update(e,!0),stop:()=>ge(e),now:()=>ye.isProcessing?ye.timestamp:rn.now()}},Yi={decay:ri,inertia:ri,tween:zi,keyframes:zi,spring:oi},Ki=t=>t/100;class Xi extends Zn{constructor({KeyframeResolver:t=En,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:n,motionValue:i,keyframes:s}=this.options,o=(t,e)=>this.onKeyframesResolved(t,e);n&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(s,o,n,i):this.resolver=new t(s,o,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=Yi[e]||zi;let a,l;r!==zi&&"number"!=typeof t[0]&&(a=Ve(Ki,Ii(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=$i(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=ft(0,1,n)*c}const P=y?{done:!1,value:a[0]}:x.next(v);r&&(P.value=r(P.value));let{done:w}=P;y||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return T&&void 0!==i&&(P.value=nn(a,this.options,i)),f&&f(P.value),T&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Ge(t.calculatedDuration):0}get time(){return Ge(this.currentTime)}set time(t){t=Xe(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Ge(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Hi,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function Gi(t){return new Xi(t)}const _i=t=>Array.isArray(t)&&"number"==typeof t[0];function qi(t){return Boolean(!t||"string"==typeof t&&t in Ji||_i(t)||Array.isArray(t)&&t.every(qi))}const Zi=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zi([0,.65,.55,1]),circOut:Zi([.55,0,1,.45]),backIn:Zi([.31,.01,.66,-.59]),backOut:Zi([.33,1.53,.69,.99])};function Qi(t){return ts(t)||Ji.easeOut}function ts(t){return t?_i(t)?Zi(t):Array.isArray(t)?t.map(Qi):Ji[t]:void 0}function es(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ts(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const ns=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class is extends Zn{constructor(t){super(t);const{name:e,motionValue:n,keyframes:i}=this.options;this.resolver=new Gn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:s,ease:o,type:r,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!qi(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,...l}=this.options,u=function(t,e){const n=new Xi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,l);1===(t=u.keyframes).length&&(t[1]=t[0]),i=u.duration,s=u.times,o=u.ease,r="keyframes"}var u;const c=es(a.owner.current,l,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=rn.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(nn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:r,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Ge(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Ge(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Xe(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return K;const{animation:n}=e;n.timeline=t,n.onfinish=null}else this.pendingTimeline=t;return K}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,...l}=this.options,u=new Xi({...l,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),c=Xe(this.time);t.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;return ns()&&n&&ae.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}function ss(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return fe.update(i,!0),()=>ge(i)}const os=_n(()=>void 0!==window.ScrollTimeline);class rs{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}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=>{if(!os()||!e.attachTimeline)return e.pause(),ss(t=>{e.time=e.duration*t},t);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 duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const as=(t,e,n,i={},s,o,r)=>a=>{const l=Qe(i,t)||{},u=l.delay||i.delay||0;let{elapsed:c=0}=i;c-=Xe(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),r&&r()},onStop:r,name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...Je(t,h)}),h.duration&&(h.duration=Xe(h.duration)),h.repeatDelay&&(h.repeatDelay=Xe(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),(tn.current||T.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),d&&!o&&void 0!==e.get()){const t=nn(h.keyframes,l);if(void 0!==t)return fe.update(()=>{h.onUpdate(t),h.onComplete()}),new rs([])}return!o&&is.supports(h)?new is(h):new Xi(h)};class ls{constructor(){this.subscriptions=[]}add(t){return ue(this.subscriptions,t),()=>ce(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const us={current:void 0};class cs{constructor(t,e={}){this.version="11.3.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=rn.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=rn.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ls);const n=this.events[t].add(e);return"change"===t?()=>{n(),fe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return us.current&&us.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Jn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hs(t,e){return new cs(t,e)}function ds(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,hs(n))}function ps(t,e){const n=Ke(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ds(t,e,(r=o[e],oe(r)?r[r.length-1]||0:r))}var r}function ms(t){return t.getProps()[w]}class fs extends cs{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const e=le(t);if(!e)return;const n=this.counts.get(e)||0;this.counts.set(e,n+1),0===n&&(this.output.push(e),this.update());let i=!1;return()=>{if(i)return;i=!0;const t=this.counts.get(e)-1;this.counts.set(e,t),0===t&&(ce(this.output,e),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function gs(t,e){var n;if(!t.applyWillChange)return;let i=t.getValue("willChange");return i||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(i=new fs("auto"),t.addValue("willChange",i)),s=i,Boolean(ot(s)&&s.add)?i.add(e):void 0;var s}function ys({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function vs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&ys(c,e))continue;const a={delay:n,elapsed:0,...Qe(r||{},e)};let h=!1;if(window.HandoffAppearAnimations){const n=ms(t);if(n){const t=window.HandoffAppearAnimations(n,e,i,fe);null!==t&&(a.elapsed=t,h=!0)}}i.start(as(e,i,s,t.shouldReduceMotion&&it.has(e)?{type:!1}:a,t,h,gs(t,e)));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{fe.update(()=>{a&&ps(t,a)})}),u}function xs(t,e,n={}){var i;const s=Ke(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(vs(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Ps).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(xs(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function Ps(t,e){return t.sortNodePosition(e)}function ws(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>xs(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=xs(t,e,n);else{const s="function"==typeof e?Ke(t,e,n.custom):e;i=Promise.all(vs(t,s,n))}return i.then(()=>{fe.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ts=[...F].reverse(),Ss=F.length;function bs(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ws(t,e,n)))}(t),n=Cs(),i=!0;const s=e=>(n,i)=>{var s;const o=Ke(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Ss;e++){const d=Ts[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=L(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||B(m)||"boolean"==typeof m)continue;let v=As(p.prevProp,m)||d===o&&p.isActive&&!y&&f||e>h&&f,x=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===g&&(w={});const{prevResolvedValues:T={}}=p,S={...T,...w},b=e=>{v=!0,u.has(e)&&(x=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=w[t],n=T[t];if(c.hasOwnProperty(t))continue;let i=!1;i=oe(e)&&oe(n)?!Ye(e,n):e!==n,i?null!=e?b(t):u.add(t):void 0!==e&&u.has(t)?b(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(c={...c,...w}),i&&t.blockInitialAnimation&&(v=!1),!v||y&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Cs(),i=!0}}}function As(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ye(e,t)}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cs(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}let Vs=0;const Ms={animation:{Feature:class extends Be{constructor(t){super(t),t.animationState||(t.animationState=bs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();B(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Be{constructor(){super(...arguments),this.id=Vs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Rs=(t,e)=>Math.abs(t-e);function Ds(t,e){const n=Rs(t.x,e.x),i=Rs(t.y,e.y);return Math.sqrt(n**2+i**2)}class ks{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Fs(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ds(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ye;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ls(e,this.transformPagePoint),fe.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Fs("pointercancel"===t.type?this.lastMoveEventInfo:Ls(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Se(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ls(be(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=ye;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Fs(o,this.history)),this.removeListeners=Ve(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ge(this.updatePoint)}}function Ls(t,e){return e?{point:e(t.point)}:t}function Bs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Fs({point:t},e){return{point:t,delta:Bs(t,Os(e)),offset:Bs(t,js(e)),velocity:Is(e,.1)}}function js(t){return t[0]}function Os(t){return t[t.length-1]}function Is(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Os(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Xe(e)));)n--;if(!i)return{x:0,y:0};const o=Ge(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Us(t){return t.max-t.min}function Ws(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ns(t,e,n,i=.5){t.origin=i,t.originPoint=Ai(e.min,e.max,t.origin),t.scale=Us(n)/Us(e),(Ws(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ai(n.min,n.max,t.origin)-t.originPoint,(Ws(t.translate)||isNaN(t.translate))&&(t.translate=0)}function zs(t,e,n,i){Ns(t.x,e.x,n.x,i?i.originX:void 0),Ns(t.y,e.y,n.y,i?i.originY:void 0)}function $s(t,e,n){t.min=n.min+e.min,t.max=t.min+Us(e)}function Hs(t,e,n){t.min=e.min-n.min,t.max=t.min+Us(e)}function Ys(t,e,n){Hs(t.x,e.x,n.x),Hs(t.y,e.y,n.y)}function Ks(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 Xs(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 Gs=.35;function _s(t,e,n){return{min:qs(t,e),max:qs(t,n)}}function qs(t,e){return"number"==typeof t?t:t[e]||0}const Zs=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Js(t){return[t("x"),t("y")]}function Qs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function to(t){return void 0===t||1===t}function eo({scale:t,scaleX:e,scaleY:n}){return!to(t)||!to(e)||!to(n)}function no(t){return eo(t)||io(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function io(t){return so(t.x)||so(t.y)}function so(t){return t&&"0%"!==t}function oo(t,e,n){return n+e*(t-n)}function ro(t,e,n,i,s){return void 0!==s&&(t=oo(t,s,i)),oo(t,n,i)+e}function ao(t,e=0,n=1,i,s){t.min=ro(t.min,e,n,i,s),t.max=ro(t.max,e,n,i,s)}function lo(t,{x:e,y:n}){ao(t.x,e.translate,e.scale,e.originPoint),ao(t.y,n.translate,n.scale,n.originPoint)}function uo(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function co(t,e){t.min=t.min+e,t.max=t.max+e}function ho(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Ai(t.min,t.max,o);ao(t,e[n],e[i],r,e.scale)}const po=["x","scaleX","originX"],mo=["y","scaleY","originY"];function fo(t,e){ho(t.x,e,po),ho(t.y,e,mo)}function go(t,e){return Qs(function(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}}(t.getBoundingClientRect(),e))}const yo=({current:t})=>t?t.ownerDocument.defaultView:null,vo=new WeakMap;class xo{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ks(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(be(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:s,onDragStart:o}=this.getProps();if(i&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ke(i),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Js(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Et.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Us(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&fe.postRender(()=>o(t,e)),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=gs(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Js(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:yo(this.visualElement)})}stop(t,e){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&fe.postRender(()=>o(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Po(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Ai(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Ai(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&C(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ks(t.x,n,s),y:Ks(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Gs){return!1===t?t=0:!0===t&&(t=Gs),{x:_s(t,"left","right"),y:_s(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Js(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(!t||!C(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=go(t,n),{scroll:s}=e;return s&&(co(i.x,s.offset.x),co(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Xs(t.x,e.x),y:Xs(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Qs(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Js(r=>{if(!Po(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(as(t,n,0,e,this.visualElement,!1,gs(this.visualElement,t)))}stopAnimation(){Js(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Js(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Js(e=>{const{drag:n}=this.getProps();if(!Po(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Ai(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!C(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Js(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Us(t),s=Us(e);return s>i?n=bi(e.min,e.max-i,t.min):i>s&&(n=bi(t.min,t.max-s,e.min)),ft(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Js(e=>{if(!Po(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Ai(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;vo.set(this.visualElement,this);const t=Ee(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();C(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),fe.read(e);const s=Te(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Js(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Gs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Po(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const wo=t=>(e,n)=>{t&&fe.postRender(()=>t(e,n))};const To=["TopLeft","TopRight","BottomLeft","BottomRight"],So=To.length,bo=t=>"string"==typeof t?parseFloat(t):t,Ao=t=>"number"==typeof t||Ct.test(t);function Eo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Co=Mo(0,.5,gi),Vo=Mo(.5,.95,K);function Mo(t,e,n){return i=>i<t?0:i>e?1:n(bi(t,e,i))}function Ro(t,e){t.min=e.min,t.max=e.max}function Do(t,e){Ro(t.x,e.x),Ro(t.y,e.y)}function ko(t,e,n,i,s){return t=oo(t-=e,1/n,i),void 0!==s&&(t=oo(t,1/s,i)),t}function Lo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(Et.test(e)){e=parseFloat(e);e=Ai(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ai(o.min,o.max,i);t===o&&(a-=e),t.min=ko(t.min,e,n,a,s),t.max=ko(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Bo=["x","scaleX","originX"],Fo=["y","scaleY","originY"];function jo(t,e,n,i){Lo(t.x,e,Bo,n?n.x:void 0,i?i.x:void 0),Lo(t.y,e,Fo,n?n.y:void 0,i?i.y:void 0)}function Oo(t){return 0===t.translate&&1===t.scale}function Io(t){return Oo(t.x)&&Oo(t.y)}function Uo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Wo(t){return Us(t.x)/Us(t.y)}class No{constructor(){this.members=[]}add(t){ue(this.members,t),t.scheduleRender()}remove(t){if(ce(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){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zo(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0: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,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const $o=(t,e)=>t.depth-e.depth;class Ho{constructor(){this.children=[],this.isDirty=!1}add(t){ue(this.children,t),this.isDirty=!0}remove(t){ce(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($o),this.isDirty=!1,this.children.forEach(t)}}const Yo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ko(t,e){const n=rn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ge(i),t(o-e))};return fe.read(i,!0),()=>ge(i)}function Xo(t,e,n){var i;if("string"==typeof t){let s=document;e&&(G(Boolean(e.current)),s=e.current),n?(null!==(i=n[t])&&void 0!==i||(n[t]=s.querySelectorAll(t)),t=n[t]):t=s.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const Go=new WeakMap;function _o(t){return t instanceof SVGElement&&"svg"!==t.tagName}const qo={current:null},Zo={current:!1};function Jo(){if(Zo.current=!0,y)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>qo.current=t.matches;t.addListener(e),e()}else qo.current=!1}const Qo=[...xn,Ln,Un],tr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],er=j.length;class nr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.applyWillChange=!1,this.resolveKeyframes=(t,e,n,i)=>new this.KeyframeResolver(t,e,n,i,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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.scheduleRender=()=>fe.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=O(e),this.isVariantNode=I(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ot(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Go.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Zo.current||Jo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||qo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Go.delete(this.current),this.projection&&this.projection.unmount(),ge(this.notifyUpdate),ge(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,e){const n=it.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&fe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in z){const e=z[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<tr.length;e++){const n=tr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ot(s))t.addValue(i,s);else if(ot(o))t.addValue(i,hs(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,hs(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<er;t++){const n=j[t],i=this.props[n];(L(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=hs(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=i&&("string"==typeof i&&(ln(i)||an(i))?i=parseFloat(i):(s=i,!Qo.find(vn(s))&&Un.test(e)&&(i=Kn(t,e))),this.setBaseTarget(t,ot(i)?i.get():i)),ot(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=ie(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||ot(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new ls),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class ir extends nr{constructor(){super(...arguments),this.KeyframeResolver=Gn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class sr extends ir{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}return e=Jt.has(e)?e:P(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e,n){return ee(t,e,n)}build(t,e,n){Kt(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Qt(t,e,0,i)}mount(t){this.isSVGTag=Gt(t.tagName),super.mount(t)}}class or extends ir{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(t,e){if(it.has(e)){const t=Yn(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(ct(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return go(t,e)}build(t,e,n){Lt(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return te(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ot(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,i){Zt(t,e,n,i)}}function rr(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=_o(t)?new sr(e):new or(e);n.mount(t),Go.set(t,n)}function ar(t,e,n){const i=ot(t)?t:hs(t);return i.start(as("",i,e,n)),i.animation}function lr(t,e=100){const n=oi({keyframes:[0,e],...t}),i=Math.min($i(n),2e4);return{type:"keyframes",ease:t=>n.next(i*t).value/e,duration:Ge(i)}}function ur(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}const cr=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function hr(t,e){return di(t)?t[cr(0,t.length,e)]:t}function dr(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(ce(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Ai(s,o,i[r]),easing:hr(n,r)})}function pr(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function mr(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function fr(t,e){return e[t]||(e[t]=[]),e[t]}function gr(t){return Array.isArray(t)?t:[t]}function yr(t,e){return t[e]?{...t,...t[e]}:{...t}}const vr=t=>"number"==typeof t,xr=t=>t.every(vr);function Pr(t,e,n,i){const s=Xo(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t];Go.has(i)||rr(i);const a=Go.get(i),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...vs(a,{...e,transition:l},{}))}return new rs(r)}function wr(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i){const s=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,ur(c,o.at,u,l));continue}let[d,p,m={}]=o;void 0!==m.at&&(c=ur(c,m.at,u,l));let f=0;const g=(t,n,i,o=0,r=0)=>{const a=gr(t),{delay:l=0,times:u=Ni(a),type:d="keyframes",...p}=n;let{ease:m=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&xr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=Xe(g));const n=lr(e,t);m=n.ease,g=n.duration}null!=g||(g=s);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Wi(u,w),1===a.length&&a.unshift(null),dr(i,a,m,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(ot(d)){g(p,m,fr("default",mr(d,r)))}else{const t=Xo(d,i,a),e=t.length;for(let n=0;n<e;n++){p=p,m=m;const i=mr(t[n],r);for(const t in p)g(p[t],yr(m,t),fr(t,i),n,e)}}u=c,c+=f}return r.forEach((t,i)=>{for(const s in t){const r=t[s];r.sort(pr);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:i}=r[t];a.push(n),l.push(bi(0,h,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const c=o.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let s;s=ot(n)?ar(n,t.default,e.default):Pr(n,t,e),i.push(s)}),new rs(i)}const Tr=t=>function(e,n,i){let s;var o;return o=e,s=Array.isArray(o)&&Array.isArray(o[0])?wr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?Pr(e,n,i,t):ar(e,n,i),t&&t.animations.push(s),s},Sr=Tr(),br=new WeakMap;let Ar;function Er({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=br.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Cr(t){t.forEach(Er)}function Vr(t,e){Ar||"undefined"!=typeof ResizeObserver&&(Ar=new ResizeObserver(Cr));const n=Xo(t);return n.forEach(t=>{let n=br.get(t);n||(n=new Set,br.set(t,n)),n.add(e),null==Ar||Ar.observe(t)}),()=>{n.forEach(t=>{const n=br.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Ar||Ar.unobserve(t)})}}const Mr=new Set;let Rr;function Dr(t){return Mr.add(t),Rr||(Rr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Mr.forEach(t=>t(e))},window.addEventListener("resize",Rr)),()=>{Mr.delete(t),!Mr.size&&Rr&&(Rr=void 0)}}const kr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Lr(t,e,n,i){const s=n[e],{length:o,position:r}=kr[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=bi(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:Jn(s.current-a,u)}const Br={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Fr={start:0,center:.5,end:1};function jr(t,e,n=0){let i=0;if(t in Fr&&(t=Fr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Or=[0,0];function Ir(t,e,n,i){let s=Array.isArray(t)?t:Or,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Fr[t]?t:"0"]),o=jr(s[0],n,i),r=jr(s[1],e),o-r}const Ur={x:0,y:0};function Wr(t,e,n){const{offset:i=Br.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):Ur,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Ir(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ui(e[o].offset,Ni(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function Nr(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Lr(t,"x",e,n),Lr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Wr(t,n,i)},notify:()=>e(n)}}const zr=new WeakMap,$r=new WeakMap,Hr=new WeakMap,Yr=t=>t===document.documentElement?window:t;function Kr(t,{container:e=document.documentElement,...n}={}){let i=Hr.get(e);i||(i=new Set,Hr.set(e,i));const s=Nr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!zr.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(ye.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{fe.read(t,!1,!0),fe.read(n,!1,!0),fe.update(s,!1,!0)};zr.set(e,a);const l=Yr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&$r.set(e,(r=a,"function"==typeof(o=e)?Dr(o):Vr(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=zr.get(e);return fe.read(a,!1,!0),()=>{var t;ge(a);const n=Hr.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=zr.get(e);zr.delete(e),i&&(Yr(e).removeEventListener("scroll",i),null===(t=$r.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Xr=new Map;function Gr({source:t=document.documentElement,axis:e="y"}={}){Xr.has(t)||Xr.set(t,{});const n=Xr.get(t);return n[e]||(n[e]=os()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},i=Kr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:i}}({source:t,axis:e})),n[e]}const _r={some:0,all:1};function qr(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Xo(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:_r[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Zr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=Ui(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}const Jr=fe,Qr=S.reduce((t,e)=>(t[e]=t=>ge(t),t),{}),ta=["","X","Y","Z"],ea={visibility:"hidden"};let na=0;const ia={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function sa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function oa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=na++,this.animationId=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=()=>{var t;this.projectionUpdateScheduled=!1,ia.totalNodes=ia.resolvedTargetDeltas=ia.recalculatedProjection=0,this.nodes.forEach(la),this.nodes.forEach(fa),this.nodes.forEach(ga),this.nodes.forEach(ua),t=ia,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ho)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ls),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_o(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Ko(i,250),Yo.hasAnimatedSinceResize&&(Yo.hasAnimatedSinceResize=!1,this.nodes.forEach(ma))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Ta,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Uo(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Qe(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ge(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ya),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.HandoffCancelAllAnimations&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:n}=e.options;return!!n&&(!!ms(n)||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&t(e.parent))}(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(da),this.isUpdating=!1,this.nodes.forEach(pa),this.nodes.forEach(ra),this.nodes.forEach(aa),this.clearAllSnapshots();const t=rn.now();ye.delta=ft(0,1e3/60,t-ye.timestamp),ye.timestamp=t,ye.isProcessing=!0,ve.update.process(ye),ve.preRender.process(ye),ve.render.process(ye),ye.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,A.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ca),this.sharedNodes.forEach(va)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}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={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Io(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||no(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Aa((i=n).x),Aa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(co(e.x,n.offset.x),co(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Do(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){Do(e,t);const{scroll:n}=this.root;n&&(co(e.x,-n.offset.x),co(e.y,-n.offset.y))}co(e.x,s.offset.x),co(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Do(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&fo(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),no(i.latestValues)&&fo(n,i.latestValues)}return no(this.latestValues)&&fo(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Do(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!no(n.latestValues))continue;eo(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Do(i,n.measurePageBox()),jo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return no(this.latestValues)&&jo(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ye.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=ye.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(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}},Ys(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Do(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,$s(r.x,a.x,l.x),$s(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Do(this.target,this.layout.layoutBox),lo(this.target,this.targetDelta)):Do(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(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}},Ys(this.relativeTargetOrigin,this.target,t.target),Do(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ia.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!eo(this.parent.latestValues)&&!io(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ye.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Do(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(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;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&fo(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,lo(t,r)),i&&no(o.latestValues)&&fo(t,o.latestValues))}e.x=uo(e.x),e.y=uo(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(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}});const u=this.projectionTransform;zs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=zo(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ia.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(wa));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;xa(o.x,t.x,n),xa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ys(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Pa(t.x,e.x,n.x,i),Pa(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Do(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Ai(0,void 0!==n.opacity?n.opacity:1,Co(i)),t.opacityExit=Ai(void 0!==e.opacity?e.opacity:1,0,Vo(i))):o&&(t.opacity=Ai(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<So;s++){const o=`border${To[s]}Radius`;let r=Eo(e,o),a=Eo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ao(r)===Ao(a)?(t[o]=Math.max(Ai(bo(r),bo(a),i),0),(Et.test(a)||Et.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ai(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ge(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{Yo.hasAnimatedSinceResize=!0,this.currentAnimation=ar(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ea(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Us(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Us(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Do(e,n),fo(e,s),zs(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new No);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&sa("z",t,i,this.animationValues);for(let e=0;e<ta.length;e++)sa("rotate"+ta[e],t,i,this.animationValues),sa("skew"+ta[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ea;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=re(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=re(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!no(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=zo(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in tt){if(void 0===r[t])continue;const{correct:e,applyTo:n}=tt[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?re(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function aa(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Js(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Us(i);i.min=e[t].min,i.max=i.min+s}):Ea(s,n.layoutBox,e)&&Js(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Us(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};zs(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?zs(a,t.applyTransform(i,!0),n.measuredBox):zs(a,e,n.layoutBox);const l=!Io(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Ys(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Ys(a,e,o.layoutBox),Uo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function la(t){ia.totalNodes++,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 ua(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ca(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function da(t){t.isLayoutDirty=!1}function pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fa(t){t.resolveTargetDelta()}function ga(t){t.calcProjection()}function ya(t){t.resetSkewAndRotation()}function va(t){t.removeLeadSnapshot()}function xa(t,e,n){t.translate=Ai(e.translate,0,n),t.scale=Ai(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pa(t,e,n,i){t.min=Ai(e.min,n.min,i),t.max=Ai(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ta={duration:.45,ease:[.4,0,.1,1]},Sa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ba=Sa("applewebkit/")&&!Sa("chrome/")?Math.round:K;function Aa(t){t.min=ba(t.min),t.max=ba(t.max)}function Ea(t,e,n){return"position"===t||"preserve-aspect"===t&&!Ws(Wo(e),Wo(n),.2)}const Ca=oa({attachResizeListener:(t,e)=>Te(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Va={current:void 0},Ma=oa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Va.current){const t=new Ca({});t.mount(window),t.setOptions({layoutScroll:!0}),Va.current=t}return Va.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ra=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Da(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Ra);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}}function ka(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const La={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ct.test(t))return t;t=parseFloat(t)}return`${ka(t,e.target.x)}% ${ka(t,e.target.y)}%`}},Ba={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Un.parse(t);if(s.length>5)return i;const o=Un.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 u=Ai(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function Fa(){const t=e.useContext(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class ja extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;et(Ia),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Yo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||fe.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),A.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Oa(t){const[n,i]=Fa(),s=e.useContext(H);return d(ja,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:i})}const Ia={borderRadius:{...La,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:La,borderTopRightRadius:La,borderBottomLeftRadius:La,borderBottomRightRadius:La,boxShadow:Ba},Ua={pan:{Feature:class extends Be{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(t){this.session=new ks(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:wo(t),onStart:wo(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&fe.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Be{constructor(t){super(t),this.removeGroupControls=K,this.removeListeners=K,this.controls=new xo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ma,MeasureLayout:Oa}},Wa=(t,n)=>Q(t)?new sr(n):new or(n,{allowProjection:t!==e.Fragment}),Na={layout:{ProjectionNode:Ma,MeasureLayout:Oa}},za={...Ms,...He,...Ua,...Na},$a=Z((t,e)=>we(t,e,za,Wa));const Ha=Z(we);function Ya(){const t=e.useRef(!1);return v(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ka(){const t=Ya(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>fe.postRender(s),[s]),n]}class Xa extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ga({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=e.useContext(m);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:l}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),d(Xa,{isPresent:n,childRef:o,sizeRef:r,children:i.cloneElement(t,{ref:o})})}const _a=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l})=>{const u=se(qa),c=e.useId(),h=e.useMemo(()=>({id:c,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?[Math.random()]:[s]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(t=d(Ga,{isPresent:s,children:t})),d(g.Provider,{value:h,children:t})};function qa(){return new Map}function Za(t){return e.useEffect(()=>()=>t(),[])}const Ja=t=>t.key||"";function Qa(t){return"function"==typeof t}const tl=e.createContext(null),el=t=>!0===t,nl=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(H),o=e.useContext(tl),[r,a]=Ka(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>el(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:el(i)&&s.group||Da()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(H.Provider,{value:c,children:t})},il=e.createContext(null);function sl(t){return t.value}function ol(t,e){return t.layout.min-e.layout.min}function rl(t){const n=se(()=>hs(t)),{isStatic:i}=e.useContext(m);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function al(t,e){const n=rl(e()),i=()=>n.set(e());return i(),v(()=>{const e=()=>fe.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ge(i)}}),n}function ll(t,e,n,i){if("function"==typeof t)return function(t){us.current=[],t();const e=al(us.current,t);return us.current=void 0,e}(t);const s="function"==typeof e?e:Zr(e,n,i);return Array.isArray(t)?ul(t,s):ul([t],([t])=>s(t))}function ul(t,e){const n=se(()=>[]);return al(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function cl(t,e=0){return ot(t)?t:rl(e)}const hl={Group:e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=se(()=>$a(n)),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(ol)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Ai(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(sl).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(il.Provider,{value:h,children:t})})})),Item:e.forwardRef((function({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=se(()=>$a(s)),c=e.useContext(il),h={x:cl(n.x),y:cl(n.y)},p=ll([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}))},dl={renderer:Wa,...Ms,...He},pl={...dl,...Ua,...Na};function ml(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function fl(t,e){X(Boolean(!e||e.current))}const gl=()=>({scrollX:hs(0),scrollY:hs(0),scrollXProgress:hs(0),scrollYProgress:hs(0)});function yl({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=se(gl);return(i?v:e.useEffect)(()=>(fl(0,n),fl(0,t),Kr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function vl(t){const n=e.useRef(0),{isStatic:i}=e.useContext(m);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return fe.update(e,!0),()=>ge(e)},[t])}function xl(){!Zo.current&&Jo();const[t]=e.useState(qo.current);return t}function Pl(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&ps(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Pl(t,e)})})}function wl(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(ws(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?Pl(t,e):"string"==typeof e?Pl(t,[e]):ps(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function Tl(){const t=se(wl);return v(t.mount,[]),t}const Sl=Tl;class bl{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Al=()=>new bl;function El(t){return null!==t&&"object"==typeof t&&Y in t}function Cl(){return Vl}function Vl(t){Va.current&&(Va.current.isUpdating=!1,Va.current.blockUpdate(),t&&t())}const Ml=(t,e)=>`${t}: ${e}`,Rl=new Map;let Dl,kl,Ll;function Bl(t,e,n,i){const s=it.has(e)?"transform":e,o=Ml(t,s),r=Rl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{if(Rl.delete(o),i)i.render(()=>i.render(()=>{try{a.cancel()}catch(t){}}));else try{a.cancel()}catch(t){}})(),null):(void 0===Dl&&(Dl=performance.now()),Dl-l||0)}const Fl=()=>({});class jl extends nr{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Ol=he({scrapeMotionValuesFromProps:Fl,createRenderState:Fl});const Il=t=>t>.001?1/t:1e5;let Ul=0;t.AcceleratedAnimation=is,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const l=e.useContext(H).forceRender||Ka()[0],u=Ya(),c=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let p=c;const m=e.useRef(new Map).current,f=e.useRef(p),g=e.useRef(new Map).current,y=e.useRef(!0);if(v(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=Ja(t);e.set(n,t)})}(c,g),f.current=p}),Za(()=>{y.current=!0,g.clear(),m.clear()}),y.current)return d(h,{children:p.map(t=>d(_a,{isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:r,mode:a,children:t},Ja(t)))});p=[...p];const x=f.current.map(Ja),P=c.map(Ja),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1!==P.indexOf(e)||m.has(e)||m.set(e,void 0)}return"wait"===a&&m.size&&(p=[]),m.forEach((t,e)=>{if(-1!==P.indexOf(e))return;const i=g.get(e);if(!i)return;const o=x.indexOf(e);let h=t;if(!h){h=d(_a,{isPresent:!1,onExitComplete:()=>{m.delete(e);const t=Array.from(g.keys()).filter(t=>!P.includes(t));if(t.forEach(t=>g.delete(t)),f.current=c.filter(n=>{const i=Ja(n);return i===e||t.includes(i)}),!m.size){if(!1===u.current)return;l(),s&&s()}},custom:n,presenceAffectsLayout:r,mode:a,children:i},Ja(i)),m.set(e,h)}p.splice(o,0,h)}),p=p.map(t=>{const e=t.key;return m.has(e)?t:d(_a,{isPresent:!0,presenceAffectsLayout:r,mode:a,children:t},Ja(t))}),d(h,{children:m.size?p:p.map(t=>e.cloneElement(t))})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(nl,{id:se(()=>"asl-"+Ul++),children:t})),t.DeprecatedLayoutGroupContext=tl,t.DragControls=bl,t.FlatTree=Ho,t.LayoutGroup=nl,t.LayoutGroupContext=H,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Qa(n)),o=e.useRef(void 0);if(!Qa(n)){const{renderer:t,...e}=n;o.current=t,$(e)}return e.useEffect(()=>{Qa(n)&&n().then(({renderer:t,...e})=>{$(e),o.current=t,s(!0)})},[]),d(x.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Nt(n),(i={...e.useContext(m),...i}).isStatic=se(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(m.Provider,{value:s,children:t})},t.MotionConfigContext=m,t.MotionContext=f,t.MotionGlobalConfig=T,t.MotionValue=cs,t.PresenceContext=g,t.Reorder=hl,t.SwitchLayoutGroupContext=V,t.VisualElement=nr,t.addPointerEvent=Ee,t.addPointerInfo=Ae,t.addScaleCorrector=et,t.animate=Sr,t.animateValue=Gi,t.animateVisualElement=ws,t.animationControls=wl,t.animations=Ms,t.anticipate=wi,t.backIn=xi,t.backInOut=Pi,t.backOut=vi,t.buildTransform=lt,t.calcLength=Us,t.cancelFrame=ge,t.cancelSync=Qr,t.circIn=fi,t.circInOut=yi,t.circOut=gi,t.clamp=ft,t.color=Ln,t.complex=Un,t.createBox=Zs,t.createDomMotionComponent=function(t){return _(we(t,{forwardMotionProps:!1},za,Wa))},t.createMotionComponent=_,t.createScopedAnimate=Tr,t.cubicBezier=li,t.delay=Ko,t.disableInstantTransitions=function(){tn.current=!1},t.distance=Rs,t.distance2D=Ds,t.domAnimation=dl,t.domMax=pl,t.easeIn=ui,t.easeInOut=hi,t.easeOut=ci,t.filterProps=zt,t.frame=fe,t.frameData=ye,t.inView=qr,t.interpolate=Ui,t.invariant=G,t.isBrowser=y,t.isDragActive=Le,t.isMotionComponent=El,t.isMotionValue=ot,t.isValidMotionProp=Ut,t.m=Ha,t.makeUseVisualState=he,t.mirrorEasing=pi,t.mix=Ii,t.motion=$a,t.motionValue=hs,t.optimizedAppearDataAttribute=w,t.pipe=Ve,t.progress=bi,t.px=Ct,t.resolveMotionValue=re,t.reverseEasing=mi,t.scroll=function(t,e){const n=Gr(e);return"function"==typeof t?ss(t,n):t.attachTimeline(n)},t.scrollInfo=Kr,t.spring=oi,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=Si(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Bl;const r=Ml(o,e);Ll||(Ll=es(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Rl.set(r,{animation:Ll,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{Rl.forEach(({animation:t})=>{t.cancel()}),Rl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{Ll.cancel();const o=es(t,e,n,i);void 0===kl&&(kl=performance.now()),o.startTime=kl,Rl.set(r,{animation:o,startTime:kl}),s&&s(o)};Ll.ready?Ll.ready.then(a).catch(K):a()},t.steps=ve,t.sync=Jr,t.transform=Zr,t.unwrapMotionComponent=function(t){if(El(t))return t[Y]},t.useAnimate=function(){const t=se(()=>({current:null,animations:[]})),e=se(()=>Tr(t));return Za(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Sl,t.useAnimationControls=Tl,t.useAnimationFrame=vl,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?cr(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ol({},!1),o=se(()=>new jl({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,se(()=>t=>ws(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=rl(1),i=rl(1);const{visualElement:s}=e.useContext(f);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:ll(n,Il),scaleY:ll(i,Il)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Te(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return se(Al)},t.useElementScroll=function(t){return yl({container:t})},t.useForceUpdate=Ka,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return qr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o,s]),r},t.useInstantLayoutTransition=Cl,t.useInstantTransition=function(){const[t,n]=Ka(),i=Cl(),s=e.useRef();return e.useEffect(()=>{fe.postRender(()=>fe.postRender(()=>{n===s.current&&(tn.current=!1)}))},[n]),e=>{i(()=>{tn.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(g))||t.isPresent;var t},t.useIsomorphicLayoutEffect=v,t.useMotionTemplate=function(t,...e){const n=t.length;return al(e.filter(ot),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=ot(n)?n.get():n)}return i}))},t.useMotionValue=rl,t.useMotionValueEvent=ml,t.usePresence=Fa,t.useReducedMotion=xl,t.useReducedMotionConfig=function(){const t=xl(),{reducedMotion:n}=e.useContext(m);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Va.current;t&&t.resetTree()},[])},t.useScroll=yl,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(m),s=e.useRef(null),o=rl(ot(t)?t.get():t),r=e.useRef(o.get()),a=e.useRef(()=>{}),l=()=>{const t=s.current;t&&0===t.time&&t.sample(ye.delta),u(),s.current=Gi({keyframes:[o.get(),r.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:a.current})},u=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(r.current=t,a.current=e,fe.update(l),o.get()),u),[JSON.stringify(n)]),v(()=>{if(ot(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=rl(0);return vl(e=>t.set(e)),t},t.useTransform=ll,t.useUnmountEffect=Za,t.useVelocity=function(t){const e=rl(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&fe.update(n)};return ml(t,"change",()=>{fe.update(n,!1,!0)}),e},t.useViewportScroll=function(){return yl()},t.useWillChange=function(){return se(()=>new fs("auto"))},t.visualElementStore=Go,t.warning=X,t.wrap=cr}));