"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{7590:function(t,e,i){let r;i.d(e,{E:function(){return nY}});var n,s,o=i(2265);let a=(0,o.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),l=(0,o.createContext)({}),u=(0,o.createContext)(null),h="undefined"!=typeof document,c=h?o.useLayoutEffect:o.useEffect,d=(0,o.createContext)({strict:!1});function p(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function f(t){return"object"==typeof t&&"function"==typeof t.start}let g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],v=["initial",...g];function y(t){return f(t.animate)||v.some(e=>m(t[e]))}function x(t){return!!(y(t)||t.variants)}function P(t){return Array.isArray(t)?t.join(" "):t}let b={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"]},T={};for(let t in b)T[t]={isEnabled:e=>b[t].some(t=>!!e[t])};let w=(0,o.createContext)({}),A=(0,o.createContext)({}),S=Symbol.for("motionComponentSymbol"),V=["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 E(t){if("string"!=typeof t||t.includes("-"));else if(V.indexOf(t)>-1||/[A-Z]/.test(t))return!0;return!1}let C={},M=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],D=new Set(M);function k(t,{layout:e,layoutId:i}){return D.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!C[t]||"opacity"===t)}let R=t=>!!(t&&t.getVelocity),L={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},j=M.length,F=t=>e=>"string"==typeof e&&e.startsWith(t),B=F("--"),O=F("var(--"),I=(t,e)=>e&&"number"==typeof t?e.transform(t):t,U=(t,e,i)=>Math.min(Math.max(i,t),e),N={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},$={...N,transform:t=>U(0,1,t)},W={...N,default:1},H=t=>Math.round(1e5*t)/1e5,z=/(-)?([\d]*\.?[\d])+/g,Y=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,X=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function G(t){return"string"==typeof t}let q=t=>({test:e=>G(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Z=q("deg"),K=q("%"),_=q("px"),J=q("vh"),Q=q("vw"),tt={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(100*t)},te={...N,transform:Math.round},ti={borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,size:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:W,scaleX:W,scaleY:W,scaleZ:W,skew:Z,skewX:Z,skewY:Z,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:$,originX:tt,originY:tt,originZ:_,zIndex:te,fillOpacity:$,strokeOpacity:$,numOctaves:te};function tr(t,e,i,r){let{style:n,vars:s,transform:o,transformOrigin:a}=t,l=!1,u=!1,h=!0;for(let t in e){let i=e[t];if(B(t)){s[t]=i;continue}let r=ti[t],c=I(i,r);if(D.has(t)){if(l=!0,o[t]=c,!h)continue;i!==(r.default||0)&&(h=!1)}else t.startsWith("origin")?(u=!0,a[t]=c):n[t]=c}if(!e.transform&&(l||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:i=!0},r,n){let s="";for(let e=0;e({style:{},transform:{},transformOrigin:{},vars:{}});function ts(t,e,i){for(let r in e)R(e[r])||k(r,i)||(t[r]=e[r])}let to=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ta(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||to.has(t)}let tl=t=>!ta(t);try{(n=require("@emotion/is-prop-valid").default)&&(tl=t=>t.startsWith("on")?!ta(t):n(t))}catch(t){}function tu(t,e,i){return"string"==typeof t?t:_.transform(e+i*t)}let th={offset:"stroke-dashoffset",array:"stroke-dasharray"},tc={offset:"strokeDashoffset",array:"strokeDasharray"};function td(t,{attrX:e,attrY:i,attrScale:r,originX:n,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,c,d){if(tr(t,u,h,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==n||void 0!==s||m.transform)&&(m.transformOrigin=function(t,e,i){let r=tu(e,t.x,t.width),n=tu(i,t.y,t.height);return`${r} ${n}`}(f,void 0!==n?n:.5,void 0!==s?s:.5)),void 0!==e&&(p.x=e),void 0!==i&&(p.y=i),void 0!==r&&(p.scale=r),void 0!==o&&function(t,e,i=1,r=0,n=!0){t.pathLength=1;let s=n?th:tc;t[s.offset]=_.transform(-r);let o=_.transform(e),a=_.transform(i);t[s.array]=`${o} ${a}`}(p,o,a,l,!1)}let tp=()=>({...tn(),attrs:{}}),tm=t=>"string"==typeof t&&"svg"===t.toLowerCase(),tf=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function tg(t,{style:e,vars:i},r,n){for(let s in Object.assign(t.style,e,n&&n.getProjectionStyles(r)),i)t.style.setProperty(s,i[s])}let tv=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 ty(t,e,i,r){for(let i in tg(t,e,void 0,r),e.attrs)t.setAttribute(tv.has(i)?i:tf(i),e.attrs[i])}function tx(t,e){let{style:i}=t,r={};for(let n in i)(R(i[n])||e.style&&R(e.style[n])||k(n,t))&&(r[n]=i[n]);return r}function tP(t,e){let i=tx(t,e);for(let r in t)(R(t[r])||R(e[r]))&&(i[-1!==M.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]);return i}function tb(t,e,i,r={},n={}){return"function"==typeof e&&(e=e(void 0!==i?i:t.custom,r,n)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==i?i:t.custom,r,n)),e}let tT=t=>Array.isArray(t),tw=t=>!!(t&&"object"==typeof t&&t.mix&&t.toValue),tA=t=>tT(t)?t[t.length-1]||0:t;function tS(t){let e=R(t)?t.get():t;return tw(e)?e.toValue():e}let tV=t=>(e,i)=>{let r=(0,o.useContext)(l),n=(0,o.useContext)(u),s=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:i},r,n,s){let o={latestValues:function(t,e,i,r){let n={},s=r(t,{});for(let t in s)n[t]=tS(s[t]);let{initial:o,animate:a}=t,l=y(t),u=x(t);e&&u&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let h=!!i&&!1===i.initial,c=(h=h||!1===o)?a:o;return c&&"boolean"!=typeof c&&!f(c)&&(Array.isArray(c)?c:[c]).forEach(e=>{let i=tb(t,e);if(!i)return;let{transitionEnd:r,transition:s,...o}=i;for(let t in o){let e=o[t];if(Array.isArray(e)){let t=h?e.length-1:0;e=e[t]}null!==e&&(n[t]=e)}for(let t in r)n[t]=r[t]}),n}(r,n,s,t),renderState:e()};return i&&(o.mount=t=>i(r,t,o)),o})(t,e,r,n);return i?s():function(t){let e=(0,o.useRef)(null);return null===e.current&&(e.current=t()),e.current}(s)},tE=t=>t;class tC{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){let e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}let tM=["prepare","read","update","preRender","render","postRender"],{schedule:tD,cancel:tk,state:tR,steps:tL}=function(t,e){let i=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},s=tM.reduce((t,e)=>(t[e]=function(t){let e=new tC,i=new tC,r=0,n=!1,s=!1,o=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{let l=a&&n,u=l?e:i;return s&&o.add(t),u.add(t)&&l&&n&&(r=e.order.length),t},cancel:t=>{i.remove(t),o.delete(t)},process:l=>{if(n){s=!0;return}if(n=!0,[e,i]=[i,e],i.clear(),r=e.order.length)for(let i=0;ii=!0),t),{}),o=t=>s[t].process(n),a=()=>{let s=performance.now();i=!1,n.delta=r?1e3/60:Math.max(Math.min(s-n.timestamp,40),1),n.timestamp=s,n.isProcessing=!0,tM.forEach(o),n.isProcessing=!1,i&&e&&(r=!1,t(a))},l=()=>{i=!0,r=!0,n.isProcessing||t(a)};return{schedule:tM.reduce((t,e)=>{let r=s[e];return t[e]=(t,e=!1,n=!1)=>(i||l(),r.schedule(t,e,n)),t},{}),cancel:t=>tM.forEach(e=>s[e].cancel(t)),state:n,steps:s}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:tE,!0),tj={useVisualState:tV({scrapeMotionValuesFromProps:tP,createRenderState:tp,onMount:(t,e,{renderState:i,latestValues:r})=>{tD.read(()=>{try{i.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}}),tD.render(()=>{td(i,r,{enableHardwareAcceleration:!1},tm(e.tagName),t.transformTemplate),ty(e,i)})}})},tF={useVisualState:tV({scrapeMotionValuesFromProps:tx,createRenderState:tn})};function tB(t,e,i,r={passive:!0}){return t.addEventListener(e,i,r),()=>t.removeEventListener(e,i)}let tO=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function tI(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}let tU=t=>e=>tO(e)&&t(e,tI(e));function tN(t,e,i,r){return tB(t,e,tU(i),r)}let t$=(t,e)=>i=>e(t(i)),tW=(...t)=>t.reduce(t$);function tH(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}let tz=tH("dragHorizontal"),tY=tH("dragVertical");function tX(t){let e=!1;if("y"===t)e=tY();else if("x"===t)e=tz();else{let t=tz(),i=tY();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function tG(){let t=tX(!0);return!t||(t(),!1)}class tq{constructor(t){this.isMounted=!1,this.node=t}update(){}}function tZ(t,e){let i="onHover"+(e?"Start":"End");return tN(t.current,"pointer"+(e?"enter":"leave"),(r,n)=>{if("touch"===r.type||tG())return;let s=t.getProps();t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",e),s[i]&&tD.update(()=>s[i](r,n))},{passive:!t.getProps()[i]})}class tK extends tq{mount(){this.unmount=tW(tZ(this.node,!0),tZ(this.node,!1))}unmount(){}}class t_ extends tq{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=tW(tB(this.node.current,"focus",()=>this.onFocus()),tB(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let tJ=(t,e)=>!!e&&(t===e||tJ(t,e.parentElement));function tQ(t,e){if(!e)return;let i=new PointerEvent("pointer"+t);e(i,tI(i))}class t0 extends tq{constructor(){super(...arguments),this.removeStartListeners=tE,this.removeEndListeners=tE,this.removeAccessibleListeners=tE,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;let i=this.node.getProps(),r=tN(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;let{onTap:i,onTapCancel:r}=this.node.getProps();tD.update(()=>{tJ(this.node.current,t.target)?i&&i(t,e):r&&r(t,e)})},{passive:!(i.onTap||i.onPointerUp)}),n=tN(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=tW(r,n),this.startPress(t,e)},this.startAccessiblePress=()=>{let t=tB(this.node.current,"keydown",t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=tB(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&tQ("up",(t,e)=>{let{onTap:i}=this.node.getProps();i&&tD.update(()=>i(t,e))})}),tQ("down",(t,e)=>{this.startPress(t,e)}))}),e=tB(this.node.current,"blur",()=>{this.isPressing&&tQ("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=tW(t,e)}}startPress(t,e){this.isPressing=!0;let{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&tD.update(()=>i(t,e))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!tG()}cancelPress(t,e){if(!this.checkPressEnd())return;let{onTapCancel:i}=this.node.getProps();i&&tD.update(()=>i(t,e))}mount(){let t=this.node.getProps(),e=tN(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=tB(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=tW(e,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let t1=new WeakMap,t5=new WeakMap,t2=t=>{let e=t1.get(t.target);e&&e(t)},t3=t=>{t.forEach(t2)},t9={some:0,all:1};class t6 extends tq{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:r="some",once:n}=t,s={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof r?r:t9[r]};return function(t,e,i){let r=function({root:t,...e}){let i=t||document;t5.has(i)||t5.set(i,{});let r=t5.get(i),n=JSON.stringify(e);return r[n]||(r[n]=new IntersectionObserver(t3,{root:t,...e})),r[n]}(e);return t1.set(t,i),r.observe(t),()=>{t1.delete(t),r.unobserve(t)}}(this.node.current,s,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,n&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:r}=this.node.getProps(),s=e?i:r;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}function t4(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let r=0;re[i]=t.get()),e}(t),function(t){let e={};return t.values.forEach((t,i)=>e[i]=t.getVelocity()),e}(t))}let t7="data-"+tf("framerAppearId"),et=t=>1e3*t,ee=t=>t/1e3,ei={current:!1},er=t=>Array.isArray(t)&&"number"==typeof t[0],en=([t,e,i,r])=>`cubic-bezier(${t}, ${e}, ${i}, ${r})`,es={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:en([0,.65,.55,1]),circOut:en([.55,0,1,.45]),backIn:en([.31,.01,.66,-.59]),backOut:en([.33,1.53,.69,.99])},eo=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function ea(t,e,i,r){if(t===e&&i===r)return tE;let n=e=>(function(t,e,i,r,n){let s,o;let a=0;do(s=eo(o=e+(i-e)/2,r,n)-t)>0?i=o:e=o;while(Math.abs(s)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:eo(n(t),e,r)}let el=ea(.42,0,1,1),eu=ea(0,0,.58,1),eh=ea(.42,0,.58,1),ec=t=>Array.isArray(t)&&"number"!=typeof t[0],ed=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ep=t=>e=>1-t(1-e),em=t=>1-Math.sin(Math.acos(t)),ef=ep(em),eg=ed(ef),ev=ea(.33,1.53,.69,.99),ey=ep(ev),ex=ed(ey),eP={linear:tE,easeIn:el,easeInOut:eh,easeOut:eu,circIn:em,circInOut:eg,circOut:ef,backIn:ey,backInOut:ex,backOut:ev,anticipate:t=>(t*=2)<1?.5*ey(t):.5*(2-Math.pow(2,-10*(t-1)))},eb=t=>{if(Array.isArray(t)){tE(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,r,n]=t;return ea(e,i,r,n)}return"string"==typeof t?(tE(void 0!==eP[t],`Invalid easing type '${t}'`),eP[t]):t},eT=(t,e)=>i=>!!(G(i)&&X.test(i)&&i.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(i,e)),ew=(t,e,i)=>r=>{if(!G(r))return r;let[n,s,o,a]=r.match(z);return{[t]:parseFloat(n),[e]:parseFloat(s),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},eA=t=>U(0,255,t),eS={...N,transform:t=>Math.round(eA(t))},eV={test:eT("rgb","red"),parse:ew("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:r=1})=>"rgba("+eS.transform(t)+", "+eS.transform(e)+", "+eS.transform(i)+", "+H($.transform(r))+")"},eE={test:eT("#"),parse:function(t){let e="",i="",r="",n="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),r=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),r=t.substring(3,4),n=t.substring(4,5),e+=e,i+=i,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}},transform:eV.transform},eC={test:eT("hsl","hue"),parse:ew("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:r=1})=>"hsla("+Math.round(t)+", "+K.transform(H(e))+", "+K.transform(H(i))+", "+H($.transform(r))+")"},eM={test:t=>eV.test(t)||eE.test(t)||eC.test(t),parse:t=>eV.test(t)?eV.parse(t):eC.test(t)?eC.parse(t):eE.parse(t),transform:t=>G(t)?t:t.hasOwnProperty("red")?eV.transform(t):eC.transform(t)},eD=(t,e,i)=>-i*t+i*e+t;function ek(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}let eR=(t,e,i)=>{let r=t*t;return Math.sqrt(Math.max(0,i*(e*e-r)+r))},eL=[eE,eV,eC],ej=t=>eL.find(e=>e.test(t));function eF(t){let e=ej(t);tE(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let i=e.parse(t);return e===eC&&(i=function({hue:t,saturation:e,lightness:i,alpha:r}){t/=360,i/=100;let n=0,s=0,o=0;if(e/=100){let r=i<.5?i*(1+e):i+e-i*e,a=2*i-r;n=ek(a,r,t+1/3),s=ek(a,r,t),o=ek(a,r,t-1/3)}else n=s=o=i;return{red:Math.round(255*n),green:Math.round(255*s),blue:Math.round(255*o),alpha:r}}(i)),i}let eB=(t,e)=>{let i=eF(t),r=eF(e),n={...i};return t=>(n.red=eR(i.red,r.red,t),n.green=eR(i.green,r.green,t),n.blue=eR(i.blue,r.blue,t),n.alpha=eD(i.alpha,r.alpha,t),eV.transform(n))},eO={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:tE},eI={regex:Y,countKey:"Colors",token:"${c}",parse:eM.parse},eU={regex:z,countKey:"Numbers",token:"${n}",parse:N.parse};function eN(t,{regex:e,countKey:i,token:r,parse:n}){let s=t.tokenised.match(e);s&&(t["num"+i]=s.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...s.map(n)))}function e$(t){let e=t.toString(),i={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return i.value.includes("var(--")&&eN(i,eO),eN(i,eI),eN(i,eU),i}function eW(t){return e$(t).values}function eH(t){let{values:e,numColors:i,numVars:r,tokenised:n}=e$(t),s=e.length;return t=>{let e=n;for(let n=0;n"number"==typeof t?0:t,eY={test:function(t){var e,i;return isNaN(t)&&G(t)&&((null===(e=t.match(z))||void 0===e?void 0:e.length)||0)+((null===(i=t.match(Y))||void 0===i?void 0:i.length)||0)>0},parse:eW,createTransformer:eH,getAnimatableNone:function(t){let e=eW(t);return eH(t)(e.map(ez))}},eX=(t,e)=>i=>`${i>0?e:t}`;function eG(t,e){return"number"==typeof t?i=>eD(t,e,i):eM.test(t)?eB(t,e):t.startsWith("var(")?eX(t,e):eK(t,e)}let eq=(t,e)=>{let i=[...t],r=i.length,n=t.map((t,i)=>eG(t,e[i]));return t=>{for(let e=0;e{let i={...t,...e},r={};for(let n in i)void 0!==t[n]&&void 0!==e[n]&&(r[n]=eG(t[n],e[n]));return t=>{for(let e in r)i[e]=r[e](t);return i}},eK=(t,e)=>{let i=eY.createTransformer(e),r=e$(t),n=e$(e);return r.numVars===n.numVars&&r.numColors===n.numColors&&r.numNumbers>=n.numNumbers?tW(eq(r.values,n.values),i):(tE(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),eX(t,e))},e_=(t,e,i)=>{let r=e-t;return 0===r?1:(i-t)/r},eJ=(t,e)=>i=>eD(t,e,i);function eQ(t,e,{clamp:i=!0,ease:r,mixer:n}={}){let s=t.length;if(tE(s===e.length,"Both input and output ranges must be the same length"),1===s)return()=>e[0];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let r=[],n=i||function(t){if("number"==typeof t);else if("string"==typeof t)return eM.test(t)?eB:eK;else if(Array.isArray(t))return eq;else if("object"==typeof t)return eZ;return eJ}(t[0]),s=t.length-1;for(let i=0;i{let i=0;if(a>1)for(;il(U(t[0],t[s-1],e)):l}function e0({duration:t=300,keyframes:e,times:i,ease:r="easeInOut"}){let n=ec(r)?r.map(eb):eb(r),s={done:!1,value:e[0]},o=eQ((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let r=1;r<=e;r++){let n=e_(0,e,r);t.push(eD(i,1,n))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(n)?n:e.map(()=>n||eh).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}function e1(t,e,i){var r,n;let s=Math.max(e-5,0);return r=i-t(s),(n=e-s)?1e3/n*r:0}function e5(t,e){return t*Math.sqrt(1-e*e)}let e2=["duration","bounce"],e3=["stiffness","damping","mass"];function e9(t,e){return e.some(e=>void 0!==t[e])}function e6({keyframes:t,restDelta:e,restSpeed:i,...r}){let n;let s=t[0],o=t[t.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:h,velocity:c,duration:d,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!e9(t,e3)&&e9(t,e2)){let i=function({duration:t=800,bounce:e=.25,velocity:i=0,mass:r=1}){let n,s;tE(t<=et(10),"Spring duration must be 10 seconds or less");let o=1-e;o=U(.05,1,o),t=U(.01,10,ee(t)),o<1?(n=e=>{let r=e*o,n=r*t;return .001-(r-i)/e5(e,o)*Math.exp(-n)},s=e=>{let r=e*o*t,s=Math.pow(o,2)*Math.pow(e,2)*t,a=e5(Math.pow(e,2),o);return(r*i+i-s)*Math.exp(-r)*(-n(e)+.001>0?-1:1)/a}):(n=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),s=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let r=i;for(let i=1;i<12;i++)r-=t(r)/e(r);return r}(n,s,5/t);if(t=et(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(a,2)*r;return{stiffness:e,damping:2*o*Math.sqrt(r*e),duration:t}}}(t);(e={...e,...i,velocity:0,mass:1}).isResolvedFromDuration=!0}return e}(r),m=c?-ee(c):0,f=u/(2*Math.sqrt(l*h)),g=o-s,v=ee(Math.sqrt(l/h)),y=5>Math.abs(g);if(i||(i=y?.01:2),e||(e=y?.005:.5),f<1){let t=e5(v,f);n=e=>o-Math.exp(-f*v*e)*((m+f*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}else if(1===f)n=t=>o-Math.exp(-v*t)*(g+(m+v*g)*t);else{let t=v*Math.sqrt(f*f-1);n=e=>{let i=Math.exp(-f*v*e),r=Math.min(t*e,300);return o-i*((m+f*v*g)*Math.sinh(r)+t*g*Math.cosh(r))/t}}return{calculatedDuration:p&&d||null,next:t=>{let r=n(t);if(p)a.done=t>=d;else{let s=m;0!==t&&(s=f<1?e1(n,t,r):0);let l=Math.abs(s)<=i,u=Math.abs(o-r)<=e;a.done=l&&u}return a.value=a.done?o:r,a}}}function e4({keyframes:t,velocity:e=0,power:i=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){let c,d;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&tl,g=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)-v*Math.exp(-t/r),b=t=>x+P(t),T=t=>{let e=P(t),i=b(t);m.done=Math.abs(e)<=u,m.value=m.done?x:i},w=t=>{f(m.value)&&(c=t,d=e6({keyframes:[m.value,g(m.value)],velocity:e1(b,t,m.value),damping:n,stiffness:s,restDelta:u,restSpeed:h}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return(d||void 0!==c||(e=!0,T(t),w(t)),void 0!==c&&t>c)?d.next(t-c):(e||T(t),m)}}}let e8=t=>{let e=({timestamp:e})=>t(e);return{start:()=>tD.update(e,!0),stop:()=>tk(e),now:()=>tR.isProcessing?tR.timestamp:performance.now()}};function e7(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}let it={decay:e4,inertia:e4,tween:e0,keyframes:e0,spring:e6};function ie({autoplay:t=!0,delay:e=0,driver:i=e8,keyframes:r,type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:h,onUpdate:c,...d}){let p,m,f,g,v,y=1,x=!1,P=()=>{m=new Promise(t=>{p=t})};P();let b=it[n]||e0;b!==e0&&"number"!=typeof r[0]&&(g=eQ([0,100],r,{clamp:!1}),r=[0,100]);let T=b({...d,keyframes:r});"mirror"===a&&(v=b({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let w="idle",A=null,S=null,V=null;null===T.calculatedDuration&&s&&(T.calculatedDuration=e7(T));let{calculatedDuration:E}=T,C=1/0,M=1/0;null!==E&&(M=(C=E+o)*(s+1)-o);let D=0,k=t=>{if(null===S)return;y>0&&(S=Math.min(S,t)),y<0&&(S=Math.min(t-M/y,S));let i=(D=null!==A?A:Math.round(t-S)*y)-e*(y>=0?1:-1),n=y>=0?i<0:i>M;D=Math.max(i,0),"finished"===w&&null===A&&(D=M);let l=D,u=T;if(s){let t=D/C,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--;let r=!!((e=Math.min(e,s+1))%2);r&&("reverse"===a?(i=1-i,o&&(i-=o/C)):"mirror"===a&&(u=v));let n=U(0,1,i);D>M&&(n="reverse"===a&&r?1:0),l=n*C}let h=n?{done:!1,value:r[0]}:u.next(l);g&&(h.value=g(h.value));let{done:d}=h;n||null===E||(d=y>=0?D>=M:D<=0);let p=null===A&&("finished"===w||"running"===w&&d);return c&&c(h.value),p&&j(),h},R=()=>{f&&f.stop(),f=void 0},L=()=>{w="idle",R(),p(),P(),S=V=null},j=()=>{w="finished",h&&h(),R(),p()},F=()=>{if(x)return;f||(f=i(k));let t=f.now();l&&l(),null!==A?S=t-A:S&&"finished"!==w||(S=t),"finished"===w&&P(),V=S,A=null,w="running",f.start()};t&&F();let B={then:(t,e)=>m.then(t,e),get time(){return ee(D)},set time(newTime){D=newTime=et(newTime),null===A&&f&&0!==y?S=f.now()-newTime/y:A=newTime},get duration(){return ee(null===T.calculatedDuration?e7(T):T.calculatedDuration)},get speed(){return y},set speed(newSpeed){if(newSpeed===y||!f)return;y=newSpeed,B.time=ee(D)},get state(){return w},play:F,pause:()=>{w="paused",A=D},stop:()=>{x=!0,"idle"!==w&&(w="idle",u&&u(),L())},cancel:()=>{null!==V&&k(V),L()},complete:()=>{w="finished"},sample:t=>(S=0,k(t))};return B}let ii=(s=()=>Object.hasOwnProperty.call(Element.prototype,"animate"),()=>(void 0===r&&(r=s()),r)),ir=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),is=(t,e)=>"spring"===e.type||"backgroundColor"===t||!function t(e){return!!(!e||"string"==typeof e&&es[e]||er(e)||Array.isArray(e)&&e.every(t))}(e.ease),io={type:"spring",stiffness:500,damping:25,restSpeed:10},ia=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),il={type:"keyframes",duration:.8},iu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ih=(t,{keyframes:e})=>e.length>2?il:D.has(t)?t.startsWith("scale")?ia(e[1]):io:iu,ic=(t,e)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eY.test(e)||"0"===e)&&!e.startsWith("url(")),id=new Set(["brightness","contrast","saturate","opacity"]);function ip(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[r]=i.match(z)||[];if(!r)return t;let n=i.replace(r,""),s=id.has(e)?1:0;return r!==i&&(s*=100),e+"("+s+n+")"}let im=/([a-z-]*)\(.*?\)/g,ig={...eY,getAnimatableNone:t=>{let e=t.match(im);return e?e.map(ip).join(" "):t}},iv={...ti,color:eM,backgroundColor:eM,outlineColor:eM,fill:eM,stroke:eM,borderColor:eM,borderTopColor:eM,borderRightColor:eM,borderBottomColor:eM,borderLeftColor:eM,filter:ig,WebkitFilter:ig},iy=t=>iv[t];function ix(t,e){let i=iy(t);return i!==ig&&(i=eY),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let iP=t=>/^0[^.\s]+$/.test(t);function ib(t,e){return t[e]||t.default||t}let iT=(t,e,i,r={})=>n=>{let s=ib(r,t)||{},o=s.delay||r.delay||0,{elapsed:a=0}=r;a-=et(o);let l=function(t,e,i,r){let n,s;let o=ic(e,i);n=Array.isArray(i)?[...i]:[null,i];let a=void 0!==r.from?r.from:t.get(),l=[];for(let t=0;t{e.set(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{n(),s.onComplete&&s.onComplete()}};if(!function({when:t,delay:e,delayChildren:i,staggerChildren:r,staggerDirection:n,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(s)&&(p={...p,...ih(t,p)}),p.duration&&(p.duration=et(p.duration)),p.repeatDelay&&(p.repeatDelay=et(p.repeatDelay)),!c||!d||ei.current||!1===s.type)return function({keyframes:t,delay:e,onUpdate:i,onComplete:r}){let n=()=>(i&&i(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:tE,pause:tE,stop:tE,then:t=>(t(),Promise.resolve()),cancel:tE,complete:tE});return e?ie({keyframes:[0,1],duration:0,delay:e,onComplete:n}):n()}(ei.current?{...p,delay:0}:p);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){let i=function(t,e,{onUpdate:i,onComplete:r,...n}){let s,o;if(!(ii()&&ir.has(e)&&!n.repeatDelay&&"mirror"!==n.repeatType&&0!==n.damping&&"inertia"!==n.type))return!1;let a=!1,l=()=>{o=new Promise(t=>{s=t})};l();let{keyframes:u,duration:h=300,ease:c,times:d}=n;if(is(e,n)){let t=ie({...n,repeat:0,delay:0}),e={done:!1,value:u[0]},i=[],r=0;for(;!e.done&&r<2e4;)e=t.sample(r),i.push(e.value),r+=10;d=void 0,u=i,h=r-10,c="linear"}let p=function(t,e,i,{delay:r=0,duration:n,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){let u={[e]:i};l&&(u.offset=l);let h=function t(e){if(e)return er(e)?en(e):Array.isArray(e)?e.map(t):es[e]}(a);return Array.isArray(h)&&(u.easing=h),t.animate(u,{delay:r,duration:n,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"})}(t.owner.current,e,u,{...n,duration:h,ease:c,times:d});n.syncStart&&(p.startTime=tR.isProcessing?tR.timestamp:document.timeline?document.timeline.currentTime:performance.now());let m=()=>p.cancel(),f=()=>{tD.update(m),s(),l()};return p.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:i="loop"}){let r=e&&"loop"!==i&&e%2==1?0:t.length-1;return t[r]}(u,n)),r&&r(),f()},{then:(t,e)=>o.then(t,e),attachTimeline:t=>(p.timeline=t,p.onfinish=null,tE),get time(){return ee(p.currentTime||0)},set time(newTime){p.currentTime=et(newTime)},get speed(){return p.playbackRate},set speed(newSpeed){p.playbackRate=newSpeed},get duration(){return ee(h)},play:()=>{a||(p.play(),tk(m))},pause:()=>p.pause(),stop:()=>{if(a=!0,"idle"===p.playState)return;let{currentTime:e}=p;if(e){let i=ie({...n,autoplay:!1});t.setWithVelocity(i.sample(e-10).value,i.sample(e).value,10)}f()},complete:()=>p.finish(),cancel:f}}(e,t,p);if(i)return i}return ie(p)};function iw(t){return!!(R(t)&&t.add)}let iA=t=>/^\-?\d*\.?\d+$/.test(t);function iS(t,e){-1===t.indexOf(e)&&t.push(e)}function iV(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class iE{constructor(){this.subscriptions=[]}add(t){return iS(this.subscriptions,t),()=>iV(this.subscriptions,t)}notify(t,e,i){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](t,e,i);else for(let n=0;n!isNaN(parseFloat(t)),iM={current:void 0};class iD{constructor(t,e={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;let{delta:i,timestamp:r}=tR;this.lastUpdated!==r&&(this.timeDelta=i,this.lastUpdated=r,tD.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>tD.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=iC(this.current),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new iE);let i=this.events[t].add(e);return"change"===t?()=>{i(),tD.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let 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,i){this.set(e),this.prev=t,this.timeDelta=i}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return iM.current&&iM.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t,e;return this.canTrackVelocity?(t=parseFloat(this.current)-parseFloat(this.prev),(e=this.timeDelta)?1e3/e*t:0):0}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 ik(t,e){return new iD(t,e)}let iR=t=>e=>e.test(t),iL=[N,_,K,Z,Q,J,{test:t=>"auto"===t,parse:t=>t}],ij=t=>iL.find(iR(t)),iF=[...iL,eM,eY],iB=t=>iF.find(iR(t));function iO(t,e,{delay:i=0,transitionOverride:r,type:n}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e),l=t.getValue("willChange");r&&(s=r);let u=[],h=n&&t.animationState&&t.animationState.getState()[n];for(let e in a){let r=t.getValue(e),n=a[e];if(!r||void 0===n||h&&function({protectedKeys:t,needsAnimating:e},i){let r=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,r}(h,e))continue;let o={delay:i,elapsed:0,...s};if(window.HandoffAppearAnimations&&!r.hasAnimated){let i=t.getProps()[t7];i&&(o.elapsed=window.HandoffAppearAnimations(i,e,r,tD),o.syncStart=!0)}r.start(iT(e,r,n,t.shouldReduceMotion&&D.has(e)?{type:!1}:o));let c=r.animation;iw(l)&&(l.add(e),c.then(()=>l.remove(e))),u.push(c)}return o&&Promise.all(u).then(()=>{o&&function(t,e){let i=t8(t,e),{transitionEnd:r={},transition:n={},...s}=i?t.makeTargetAnimatable(i,!1):{};for(let e in s={...s,...r}){let i=tA(s[e]);t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,ik(i))}}(t,o)}),u}function iI(t,e,i={}){let r=t8(t,e,i.custom),{transition:n=t.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(n=i.transitionOverride);let s=r?()=>Promise.all(iO(t,r,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(r=0)=>{let{delayChildren:s=0,staggerChildren:o,staggerDirection:a}=n;return function(t,e,i=0,r=0,n=1,s){let o=[],a=(t.variantChildren.size-1)*r,l=1===n?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(iU).forEach((t,r)=>{t.notify("AnimationStart",e),o.push(iI(t,e,{...s,delay:i+l(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,s+r,o,a,i)}:()=>Promise.resolve(),{when:a}=n;if(!a)return Promise.all([s(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[s,o]:[o,s];return t().then(()=>e())}}function iU(t,e){return t.sortNodePosition(e)}let iN=[...g].reverse(),i$=g.length;function iW(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}class iH extends tq{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e))r=Promise.all(e.map(e=>iI(t,e,i)));else if("string"==typeof e)r=iI(t,e,i);else{let n="function"==typeof e?t8(t,e,i.custom):e;r=Promise.all(iO(t,n,i))}return r.then(()=>t.notify("AnimationComplete",e))})(t,e,i))),i={animate:iW(!0),whileInView:iW(),whileHover:iW(),whileTap:iW(),whileDrag:iW(),whileFocus:iW(),exit:iW()},r=!0,n=(e,i)=>{let r=t8(t,i);if(r){let{transition:t,transitionEnd:i,...n}=r;e={...e,...n,...i}}return e};function s(s,o){let a=t.getProps(),l=t.getVariantContext(!0)||{},u=[],h=new Set,c={},d=1/0;for(let e=0;ed&&x,A=Array.isArray(y)?y:[y],S=A.reduce(n,{});!1===P&&(S={});let{prevResolvedValues:V={}}=v,E={...V,...S},C=t=>{w=!0,h.delete(t),v.needsAnimating[t]=!0};for(let t in E){let e=S[t],i=V[t];c.hasOwnProperty(t)||(e!==i?tT(e)&&tT(i)?!t4(e,i)||T?C(t):v.protectedKeys[t]=!0:void 0!==e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):v.protectedKeys[t]=!0)}v.prevProp=y,v.prevResolvedValues=S,v.isActive&&(c={...c,...S}),r&&t.blockInitialAnimation&&(w=!1),w&&!b&&u.push(...A.map(t=>({animation:t,options:{type:g,...s}})))}if(h.size){let e={};h.forEach(i=>{let r=t.getBaseTarget(i);void 0!==r&&(e[i]=r)}),u.push({animation:e})}let g=!!u.length;return r&&!1===a.initial&&!t.manuallyAnimateOnMount&&(g=!1),r=!1,g?e(u):Promise.resolve()}return{animateChanges:s,setActive:function(e,r,n){var o;if(i[e].isActive===r)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{var i;return null===(i=t.animationState)||void 0===i?void 0:i.setActive(e,r)}),i[e].isActive=r;let a=s(n,e);for(let t in i)i[t].protectedKeys={};return a},setAnimateFunction:function(i){e=i(t)},getState:()=>i}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();this.unmount(),f(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}let iz=0;class iY extends tq{constructor(){super(...arguments),this.id=iz++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let n=this.node.animationState.setActive("exit",!t,{custom:null!=i?i:this.node.getProps().custom});e&&!t&&n.then(()=>e(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}let iX=(t,e)=>Math.abs(t-e);class iG{constructor(t,e,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=iK(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,n=(t=i.offset,e={x:0,y:0},Math.sqrt(iX(t.x,e.x)**2+iX(t.y,e.y)**2)>=3);if(!r&&!n)return;let{point:s}=i,{timestamp:o}=tR;this.history.push({...s,timestamp:o});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=iq(e,this.transformPagePoint),tD.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let{onEnd:i,onSessionEnd:r}=this.handlers,n=iK("pointercancel"===t.type?this.lastMoveEventInfo:iq(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,n),r&&r(t,n)},!tO(t))return;this.handlers=e,this.transformPagePoint=i;let r=iq(tI(t),this.transformPagePoint),{point:n}=r,{timestamp:s}=tR;this.history=[{...n,timestamp:s}];let{onSessionStart:o}=e;o&&o(t,iK(r,this.history)),this.removeListeners=tW(tN(window,"pointermove",this.handlePointerMove),tN(window,"pointerup",this.handlePointerUp),tN(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tk(this.updatePoint)}}function iq(t,e){return e?{point:e(t.point)}:t}function iZ(t,e){return{x:t.x-e.x,y:t.y-e.y}}function iK({point:t},e){return{point:t,delta:iZ(t,i_(e)),offset:iZ(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,r=null,n=i_(t);for(;i>=0&&(r=t[i],!(n.timestamp-r.timestamp>et(.1)));)i--;if(!r)return{x:0,y:0};let s=ee(n.timestamp-r.timestamp);if(0===s)return{x:0,y:0};let o={x:(n.x-r.x)/s,y:(n.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,0)}}function i_(t){return t[t.length-1]}function iJ(t){return t.max-t.min}function iQ(t,e=0,i=.01){return Math.abs(t-e)<=i}function i0(t,e,i,r=.5){t.origin=r,t.originPoint=eD(e.min,e.max,t.origin),t.scale=iJ(i)/iJ(e),(iQ(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=eD(i.min,i.max,t.origin)-t.originPoint,(iQ(t.translate)||isNaN(t.translate))&&(t.translate=0)}function i1(t,e,i,r){i0(t.x,e.x,i.x,r?r.originX:void 0),i0(t.y,e.y,i.y,r?r.originY:void 0)}function i5(t,e,i){t.min=i.min+e.min,t.max=t.min+iJ(e)}function i2(t,e,i){t.min=e.min-i.min,t.max=t.min+iJ(e)}function i3(t,e,i){i2(t.x,e.x,i.x),i2(t.y,e.y,i.y)}function i9(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function i6(t,e){let i=e.min-t.min,r=e.max-t.max;return e.max-e.min({translate:0,scale:1,origin:0,originPoint:0}),rt=()=>({x:i7(),y:i7()}),re=()=>({min:0,max:0}),ri=()=>({x:re(),y:re()});function rr(t){return[t("x"),t("y")]}function rn({top:t,left:e,right:i,bottom:r}){return{x:{min:e,max:i},y:{min:t,max:r}}}function rs(t){return void 0===t||1===t}function ro({scale:t,scaleX:e,scaleY:i}){return!rs(t)||!rs(e)||!rs(i)}function ra(t){return ro(t)||rl(t)||t.z||t.rotate||t.rotateX||t.rotateY}function rl(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function ru(t,e,i,r,n){return void 0!==n&&(t=r+n*(t-r)),r+i*(t-r)+e}function rh(t,e=0,i=1,r,n){t.min=ru(t.min,e,i,r,n),t.max=ru(t.max,e,i,r,n)}function rc(t,{x:e,y:i}){rh(t.x,e.translate,e.scale,e.originPoint),rh(t.y,i.translate,i.scale,i.originPoint)}function rd(t){return Number.isInteger(t)?t:t>1.0000000000001||t<.999999999999?t:1}function rp(t,e){t.min=t.min+e,t.max=t.max+e}function rm(t,e,[i,r,n]){let s=void 0!==e[n]?e[n]:.5,o=eD(t.min,t.max,s);rh(t,e[i],e[r],o,e.scale)}let rf=["x","scaleX","originX"],rg=["y","scaleY","originY"];function rv(t,e){rm(t.x,e,rf),rm(t.y,e,rg)}function ry(t,e){return rn(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}let rx=new WeakMap;class rP{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=ri(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){let{presenceContext:i}=this.visualElement;i&&!1===i.isPresent||(this.panSession=new iG(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(tI(t,"page").point)},onStart:(t,e)=>{let{drag:i,dragPropagation:r,onDragStart:n}=this.getProps();if(i&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=tX(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),rr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(K.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let r=i.layout.layoutBox[t];if(r){let t=iJ(r);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),n&&tD.update(()=>n(t,e),!1,!0);let{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{let{dragPropagation:i,dragDirectionLock:r,onDirectionLock:n,onDrag:s}=this.getProps();if(!i&&!this.openGlobalLock)return;let{offset:o}=e;if(r&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(t,e){let i=this.isDragging;if(this.cancel(),!i)return;let{velocity:r}=e;this.startAnimation(r);let{onDragEnd:n}=this.getProps();n&&tD.update(()=>n(t,e))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:r}=this.getProps();if(!i||!rb(t,r,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:i},r){return void 0!==e&&ti&&(t=r?eD(i,t,r.max):Math.min(t,i)),t}(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;t&&p(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:r,right:n}){return{x:i9(t.x,i,n),y:i9(t.y,e,r)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:i4(t,"left","right"),y:i4(t,"top","bottom")}}(e),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rr(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!p(e))return!1;let r=e.current;tE(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let s=function(t,e,i){let r=ry(t,i),{scroll:n}=e;return n&&(rp(r.x,n.offset.x),rp(r.y,n.offset.y)),r}(r,n.root,this.visualElement.getTransformPagePoint()),o={x:i6((t=n.layout.layoutBox).x,s.x),y:i6(t.y,s.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=rn(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:r,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(rr(o=>{if(!rb(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[o]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return i.start(iT(t,i,0,e))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e="_drag"+t.toUpperCase(),i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){rr(e=>{let{drag:i}=this.getProps();if(!rb(e,i,this.currentDirection))return;let{projection:r}=this.visualElement,n=this.getAxisMotionValue(e);if(r&&r.layout){let{min:i,max:s}=r.layout.layoutBox[e];n.set(t[e]-eD(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!p(e)||!i||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rr(t=>{let e=this.getAxisMotionValue(t);if(e){let i=e.get();r[t]=function(t,e){let i=.5,r=iJ(t),n=iJ(e);return n>r?i=e_(e.min,e.max-r,t.min):r>n&&(i=e_(t.min,t.max-n,e.min)),U(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),rr(e=>{if(!rb(e,t,null))return;let i=this.getAxisMotionValue(e),{min:n,max:s}=this.constraints[e];i.set(eD(n,s,r[e]))})}addListeners(){if(!this.visualElement.current)return;rx.set(this.visualElement,this);let t=tN(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();p(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),e();let n=tB(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(rr(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{n(),t(),r(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:n=!1,dragElastic:s=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:r,dragConstraints:n,dragElastic:s,dragMomentum:o}}}function rb(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class rT extends tq{constructor(t){super(t),this.removeGroupControls=tE,this.removeListeners=tE,this.controls=new rP(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tE}unmount(){this.removeGroupControls(),this.removeListeners()}}let rw=t=>(e,i)=>{t&&tD.update(()=>t(e,i))};class rA extends tq{constructor(){super(...arguments),this.removePointerDownListener=tE}onPointerDown(t){this.session=new iG(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:rw(t),onStart:rw(e),onMove:i,onEnd:(t,e)=>{delete this.session,r&&tD.update(()=>r(t,e))}}}mount(){this.removePointerDownListener=tN(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let rS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rV(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let rE={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!_.test(t))return t;t=parseFloat(t)}let i=rV(t,e.target.x),r=rV(t,e.target.y);return`${i}% ${r}%`}};class rC extends o.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:r}=this.props,{projection:n}=t;Object.assign(C,rD),n&&(e.group&&e.group.add(n),i&&i.register&&r&&i.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),rS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:r,isPresent:n}=this.props,s=i.projection;return s&&(s.isPresent=n,r||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent===n||(n?s.promote():s.relegate()||tD.postRender(()=>{let t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rM(t){let[e,i]=function(){let t=(0,o.useContext)(u);if(null===t)return[!0,null];let{isPresent:e,onExitComplete:i,register:r}=t,n=(0,o.useId)();return(0,o.useEffect)(()=>r(n),[]),!e&&i?[!1,()=>i&&i(n)]:[!0]}(),r=(0,o.useContext)(w);return o.createElement(rC,{...t,layoutGroup:r,switchLayoutGroup:(0,o.useContext)(A),isPresent:e,safeToRemove:i})}let rD={borderRadius:{...rE,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rE,borderTopRightRadius:rE,borderBottomLeftRadius:rE,borderBottomRightRadius:rE,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let r=eY.parse(t);if(r.length>5)return t;let n=eY.createTransformer(t),s="number"!=typeof r[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;r[0+s]/=o,r[1+s]/=a;let l=eD(o,a,.5);return"number"==typeof r[2+s]&&(r[2+s]/=l),"number"==typeof r[3+s]&&(r[3+s]/=l),n(r)}}},rk=["TopLeft","TopRight","BottomLeft","BottomRight"],rR=rk.length,rL=t=>"string"==typeof t?parseFloat(t):t,rj=t=>"number"==typeof t||_.test(t);function rF(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let rB=rI(0,.5,ef),rO=rI(.5,.95,tE);function rI(t,e,i){return r=>re?1:i(e_(t,e,r))}function rU(t,e){t.min=e.min,t.max=e.max}function rN(t,e){rU(t.x,e.x),rU(t.y,e.y)}function r$(t,e,i,r,n){return t-=e,t=r+1/i*(t-r),void 0!==n&&(t=r+1/n*(t-r)),t}function rW(t,e,[i,r,n],s,o){!function(t,e=0,i=1,r=.5,n,s=t,o=t){if(K.test(e)&&(e=parseFloat(e),e=eD(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eD(s.min,s.max,r);t===s&&(a-=e),t.min=r$(t.min,e,i,a,n),t.max=r$(t.max,e,i,a,n)}(t,e[i],e[r],e[n],e.scale,s,o)}let rH=["x","scaleX","originX"],rz=["y","scaleY","originY"];function rY(t,e,i,r){rW(t.x,e,rH,i?i.x:void 0,r?r.x:void 0),rW(t.y,e,rz,i?i.y:void 0,r?r.y:void 0)}function rX(t){return 0===t.translate&&1===t.scale}function rG(t){return rX(t.x)&&rX(t.y)}function rq(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 rZ(t){return iJ(t.x)/iJ(t.y)}class rK{constructor(){this.members=[]}add(t){iS(this.members,t),t.scheduleRender()}remove(t){if(iV(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e;let i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:r}=t.options;!1===r&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function r_(t,e,i){let r="",n=t.x.translate/e.x,s=t.y.translate/e.y;if((n||s)&&(r=`translate3d(${n}px, ${s}px, 0) `),(1!==e.x||1!==e.y)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),i){let{rotate:t,rotateX:e,rotateY:n}=i;t&&(r+=`rotate(${t}deg) `),e&&(r+=`rotateX(${e}deg) `),n&&(r+=`rotateY(${n}deg) `)}let o=t.x.scale*e.x,a=t.y.scale*e.y;return(1!==o||1!==a)&&(r+=`scale(${o}, ${a})`),r||"none"}let rJ=(t,e)=>t.depth-e.depth;class rQ{constructor(){this.children=[],this.isDirty=!1}add(t){iS(this.children,t),this.isDirty=!0}remove(t){iV(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rJ),this.isDirty=!1,this.children.forEach(t)}}let r0=["","X","Y","Z"],r1=0,r5={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function r2({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:r,resetTransform:n}){return class{constructor(t={},i=null==e?void 0:e()){this.id=r1++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{r5.totalNodes=r5.resolvedTargetDeltas=r5.recalculatedProjection=0,this.nodes.forEach(r6),this.nodes.forEach(nr),this.nodes.forEach(nn),this.nodes.forEach(r4),window.MotionDebug&&window.MotionDebug.record(r5)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=performance.now(),r=({timestamp:e})=>{let n=e-i;n>=250&&(tk(r),t(n-250))};return tD.read(r,!0),()=>tk(r)}(r,0),rS.hasAnimatedSinceResize&&(rS.hasAnimatedSinceResize=!1,this.nodes.forEach(ni))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:i,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||s.getDefaultTransition()||nh,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!rq(this.targetLayout,r)||i,u=!e&&i;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);let e={...ib(n,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ni(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tk(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(ns),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;tthis.update()))}clearAllSnapshots(){this.nodes.forEach(r8),this.sharedNodes.forEach(no)}scheduleUpdateProjection(){tD.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){tD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{let r=e/1e3;if(na(o.x,t.x,r),na(o.y,t.y,r),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,d,p,m;i3(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,nl(p.x,m.x,a.x,r),nl(p.y,m.y,a.y,r),i&&(u=this.relativeTarget,d=i,u.x.min===d.x.min&&u.x.max===d.x.max&&u.y.min===d.y.min&&u.y.max===d.y.max)&&(this.isProjectionDirty=!1),i||(i=ri()),rN(i,this.relativeTarget)}l&&(this.animationValues=s,function(t,e,i,r,n,s){n?(t.opacity=eD(0,void 0!==i.opacity?i.opacity:1,rB(r)),t.opacityExit=eD(void 0!==e.opacity?e.opacity:1,0,rO(r))):s&&(t.opacity=eD(void 0!==e.opacity?e.opacity:1,void 0!==i.opacity?i.opacity:1,r));for(let n=0;n{rS.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,i){let r=R(0)?0:ik(0);return r.start(iT("",r,1e3,i)),r.animation}(0,0,{...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);let 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(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:r,latestValues:n}=t;if(e&&i&&r){if(this!==t&&this.layout&&r&&nm(this.options.animationType,this.layout.layoutBox,r.layoutBox)){i=this.target||ri();let e=iJ(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let r=iJ(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+r}rN(e,i),rv(e,n),i1(this.projectionDeltaWithTransform,this.layoutCorrected,e,n)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rK),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){var t;let{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;let{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let r=this.getStack();r&&r.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.rotate||i.rotateX||i.rotateY||i.rotateZ)&&(e=!0),!e)return;let r={};for(let e=0;e{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(r7),this.root.sharedNodes.clear()}}}function r3(t){t.updateLayout()}function r9(t){var e;let i=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){let{layoutBox:e,measuredBox:r}=t.layout,{animationType:n}=t.options,s=i.source!==t.layout.source;"size"===n?rr(t=>{let r=s?i.measuredBox[t]:i.layoutBox[t],n=iJ(r);r.min=e[t].min,r.max=r.min+n}):nm(n,i.layoutBox,e)&&rr(r=>{let n=s?i.measuredBox[r]:i.layoutBox[r],o=iJ(e[r]);n.max=n.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+o)});let o=rt();i1(o,e,i.layoutBox);let a=rt();s?i1(a,t.applyTransform(r,!0),i.measuredBox):i1(a,e,i.layoutBox);let l=!rG(o),u=!1;if(!t.resumeFrom){let r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:n,layout:s}=r;if(n&&s){let o=ri();i3(o,i.layoutBox,n.layoutBox);let a=ri();i3(a,e,s.layoutBox),rq(o,a)||(u=!0),r.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function r6(t){r5.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function r4(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function r8(t){t.clearSnapshot()}function r7(t){t.clearMeasurements()}function nt(t){t.isLayoutDirty=!1}function ne(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ni(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nr(t){t.resolveTargetDelta()}function nn(t){t.calcProjection()}function ns(t){t.resetRotation()}function no(t){t.removeLeadSnapshot()}function na(t,e,i){t.translate=eD(e.translate,0,i),t.scale=eD(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function nl(t,e,i,r){t.min=eD(e.min,i.min,r),t.max=eD(e.max,i.max,r)}function nu(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let nh={duration:.45,ease:[.4,0,.1,1]},nc=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),nd=nc("applewebkit/")&&!nc("chrome/")?Math.round:tE;function np(t){t.min=nd(t.min),t.max=nd(t.max)}function nm(t,e,i){return"position"===t||"preserve-aspect"===t&&!iQ(rZ(e),rZ(i),.2)}let nf=r2({attachResizeListener:(t,e)=>tB(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ng={current:void 0},nv=r2({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ng.current){let t=new nf({});t.mount(window),t.setOptions({layoutScroll:!0}),ng.current=t}return ng.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),ny=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function nx(t,e,i=1){tE(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[r,n]=function(t){let e=ny.exec(t);if(!e)return[,];let[,i,r]=e;return[i,r]}(t);if(!r)return;let s=window.getComputedStyle(e).getPropertyValue(r);if(s){let t=s.trim();return iA(t)?parseFloat(t):t}return O(n)?nx(n,e,i+1):n}let nP=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),nb=t=>nP.has(t),nT=t=>Object.keys(t).some(nb),nw=t=>t===N||t===_,nA=(t,e)=>parseFloat(t.split(", ")[e]),nS=(t,e)=>(i,{transform:r})=>{if("none"===r||!r)return 0;let n=r.match(/^matrix3d\((.+)\)$/);if(n)return nA(n[1],e);{let e=r.match(/^matrix\((.+)\)$/);return e?nA(e[1],t):0}},nV=new Set(["x","y","z"]),nE=M.filter(t=>!nV.has(t)),nC={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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:nS(4,13),y:nS(5,14)};nC.translateX=nC.x,nC.translateY=nC.y;let nM=(t,e,i)=>{let r=e.measureViewportBox(),n=getComputedStyle(e.current),{display:s}=n,o={};"none"===s&&e.setStaticValue("display",t.display||"block"),i.forEach(t=>{o[t]=nC[t](r,n)}),e.render();let a=e.measureViewportBox();return i.forEach(i=>{let r=e.getValue(i);r&&r.jump(o[i]),t[i]=nC[i](a,n)}),t},nD=(t,e,i={},r={})=>{e={...e},r={...r};let n=Object.keys(e).filter(nb),s=[],o=!1,a=[];if(n.forEach(n=>{let l;let u=t.getValue(n);if(!t.hasValue(n))return;let h=i[n],c=ij(h),d=e[n];if(tT(d)){let t=d.length,e=null===d[0]?1:0;c=ij(h=d[e]);for(let i=e;i{let r=t.getValue(i);void 0!==r&&(e.push([i,r.get()]),r.set(i.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),o=!0),a.push(n),r[n]=void 0!==r[n]?r[n]:e[n],u.jump(d))}}),!a.length)return{target:e,transitionEnd:r};{let i=a.indexOf("height")>=0?window.pageYOffset:null,n=nM(e,t,a);return s.length&&s.forEach(([e,i])=>{t.getValue(e).set(i)}),t.render(),h&&null!==i&&window.scrollTo({top:i}),{target:n,transitionEnd:r}}},nk=(t,e,i,r)=>{var n,s;let o=function(t,{...e},i){let r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:i};for(let n in i&&(i={...i}),t.values.forEach(t=>{let e=t.get();if(!O(e))return;let i=nx(e,r);i&&t.set(i)}),e){let t=e[n];if(!O(t))continue;let s=nx(t,r);s&&(e[n]=s,i||(i={}),void 0===i[n]&&(i[n]=t))}return{target:e,transitionEnd:i}}(t,e,r);return e=o.target,r=o.transitionEnd,n=e,s=r,nT(n)?nD(t,n,i,s):{target:n,transitionEnd:s}},nR={current:null},nL={current:!1},nj=new WeakMap,nF=Object.keys(T),nB=nF.length,nO=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],nI=v.length;class nU{constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:r,visualState:n},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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=()=>tD.render(this.render,!1,!0);let{latestValues:o,renderState:a}=n;this.latestValues=o,this.baseTarget={...o},this.initialValues=e.initial?{...o}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.isControllingVariants=y(e),this.isVariantNode=x(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{});for(let t in u){let e=u[t];void 0!==o[t]&&R(e)&&(e.set(o[t],!1),iw(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,nj.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)),nL.current||function(){if(nL.current=!0,h){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>nR.current=t.matches;t.addListener(e),e()}else nR.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||nR.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in nj.delete(this.current),this.projection&&this.projection.unmount(),tk(this.notifyUpdate),tk(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){let i=D.has(t),r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tD.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),n=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{r(),n()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},i,r,n){let s,o;for(let t=0;tthis.scheduleRender(),animationType:"string"==typeof i?i:"both",initialPromotionConfig:n,layoutScroll:a,layoutRoot:l})}return o}updateFeatures(){for(let t in this.features){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ri()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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;ee.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);let 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 i=this.values.get(t);return void 0===i&&void 0!==e&&(i=ik(e,{owner:this}),this.addValue(t,i)),i}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;let{initial:i}=this.props,r="string"==typeof i||"object"==typeof i?null===(e=tb(this.props,i))||void 0===e?void 0:e[t]:void 0;if(i&&void 0!==r)return r;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||R(n)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new iE),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class nN extends nU{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:i}){delete e[t],delete i[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...i},{transformValues:r},n){let s=function(t,e,i){let r={};for(let n in t){let t=function(t,e){if(e)return(e[t]||e.default||e).from}(n,e);if(void 0!==t)r[n]=t;else{let t=i.getValue(n);t&&(r[n]=t.get())}}return r}(i,t||{},this);if(r&&(e&&(e=r(e)),i&&(i=r(i)),s&&(s=r(s))),n){!function(t,e,i){var r,n;let s=Object.keys(e).filter(e=>!t.hasValue(e)),o=s.length;if(o)for(let a=0;a{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(t,e,i,r){tg(t,e,i,r)}}class nW extends nN{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(D.has(e)){let t=iy(e);return t&&t.default||0}return e=tv.has(e)?e:tf(e),t.getAttribute(e)}measureInstanceViewportBox(){return ri()}scrapeMotionValuesFromProps(t,e){return tP(t,e)}build(t,e,i,r){td(t,e,i,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,i,r){ty(t,e,i,r)}mount(t){this.isSVGTag=tm(t.tagName),super.mount(t)}}let nH=(t,e)=>E(t)?new nW(e,{enableHardwareAcceleration:!1}):new n$(e,{enableHardwareAcceleration:!0}),nz={animation:{Feature:iH},exit:{Feature:iY},inView:{Feature:t6},tap:{Feature:t0},focus:{Feature:t_},hover:{Feature:tK},pan:{Feature:rA},drag:{Feature:rT,ProjectionNode:nv,MeasureLayout:rM},layout:{ProjectionNode:nv,MeasureLayout:rM}},nY=function(t){function e(e,i={}){return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:r,Component:n}){t&&function(t){for(let e in t)T[e]={...T[e],...t[e]}}(t);let s=(0,o.forwardRef)(function(s,f){var g;let v;let x={...(0,o.useContext)(a),...s,layoutId:function({layoutId:t}){let e=(0,o.useContext)(w).id;return e&&void 0!==t?e+"-"+t:t}(s)},{isStatic:b}=x,T=function(t){let{initial:e,animate:i}=function(t,e){if(y(t)){let{initial:e,animate:i}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,o.useContext)(l));return(0,o.useMemo)(()=>({initial:e,animate:i}),[P(e),P(i)])}(s),S=r(s,b);if(!b&&h){T.visualElement=function(t,e,i,r){let{visualElement:n}=(0,o.useContext)(l),s=(0,o.useContext)(d),h=(0,o.useContext)(u),p=(0,o.useContext)(a).reducedMotion,m=(0,o.useRef)();r=r||s.renderer,!m.current&&r&&(m.current=r(t,{visualState:e,parent:n,props:i,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:p}));let f=m.current;(0,o.useInsertionEffect)(()=>{f&&f.update(i,h)});let g=(0,o.useRef)(!!window.HandoffAppearAnimations);return c(()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,o.useEffect)(()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,g.current=!1)}),f}(n,S,x,e);let i=(0,o.useContext)(A),r=(0,o.useContext)(d).strict;T.visualElement&&(v=T.visualElement.loadFeatures(x,r,t,i))}return o.createElement(l.Provider,{value:T},v&&T.visualElement?o.createElement(v,{visualElement:T.visualElement,...x}):null,i(n,s,(g=T.visualElement,(0,o.useCallback)(t=>{t&&S.mount&&S.mount(t),g&&(t?g.mount(t):g.unmount()),f&&("function"==typeof f?f(t):p(f)&&(f.current=t))},[g])),S,b,T.visualElement))});return s[S]=n,s}(t(e,i))}if("undefined"==typeof Proxy)return e;let i=new Map;return new Proxy(e,{get:(t,r)=>(i.has(r)||i.set(r,e(r)),i.get(r))})}((t,e)=>(function(t,{forwardMotionProps:e=!1},i,r){return{...E(t)?tj:tF,preloadedFeatures:i,useRender:function(t=!1){return(e,i,r,{latestValues:n},s)=>{let a=(E(e)?function(t,e,i,r){let n=(0,o.useMemo)(()=>{let i=tp();return td(i,e,{enableHardwareAcceleration:!1},tm(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};ts(e,t.style,t),n.style={...e,...n.style}}return n}:function(t,e,i){let r={},n=function(t,e,i){let r=t.style||{},n={};return ts(n,r,t),Object.assign(n,function({transformTemplate:t},e,i){return(0,o.useMemo)(()=>{let r=tn();return tr(r,e,{enableHardwareAcceleration:!i},t),Object.assign({},r.vars,r.style)},[e])}(t,e,i)),t.transformValues?t.transformValues(n):n}(t,e,i);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=n,r})(i,n,s,e),l={...function(t,e,i){let r={};for(let n in t)("values"!==n||"object"!=typeof t.values)&&(tl(n)||!0===i&&ta(n)||!e&&!ta(n)||t.draggable&&n.startsWith("onDrag"))&&(r[n]=t[n]);return r}(i,"string"==typeof e,t),...a,ref:r},{children:u}=i,h=(0,o.useMemo)(()=>R(u)?u.get():u,[u]);return(0,o.createElement)(e,{...l,children:h})}}(e),createVisualElement:r,Component:t}})(t,e,nz,nH))}}]);