1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2023],{2023:function(t,e,i){let r;i.d(e,{E:function(){return ed}});var n,s,a=i(7294);let o=(0,a.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),l=(0,a.createContext)({});var u=i(240),h=i(8868);let c=(0,a.createContext)({strict:!1});function isRefObject(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function isVariantLabel(t){return"string"==typeof t||Array.isArray(t)}function isAnimationControls(t){return"object"==typeof t&&"function"==typeof t.start}let d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],m=["initial",...d];function isControllingVariants(t){return isAnimationControls(t.animate)||m.some(e=>isVariantLabel(t[e]))}function isVariantNode(t){return!!(isControllingVariants(t)||t.variants)}function variantLabelsAsDependency(t){return Array.isArray(t)?t.join(" "):t}let p={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"]},f={};for(let t in p)f[t]={isEnabled:e=>p[t].some(t=>!!e[t])};var g=i(1741),y=i(5364);let v=(0,a.createContext)({}),x=Symbol.for("motionComponentSymbol"),P=["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 isSVGComponent(t){if("string"!=typeof t||t.includes("-"));else if(P.indexOf(t)>-1||/[A-Z]/.test(t))return!0;return!1}let V={},T=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],b=new Set(T);function isForcedMotionValue(t,{layout:e,layoutId:i}){return b.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!V[t]||"opacity"===t)}let isMotionValue=t=>!!(t&&t.getVelocity),A={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},S=T.length,checkStringStartsWith=t=>e=>"string"==typeof e&&e.startsWith(t),D=checkStringStartsWith("--"),C=checkStringStartsWith("var(--"),getValueAsType=(t,e)=>e&&"number"==typeof t?e.transform(t):t,clamp=(t,e,i)=>Math.min(Math.max(i,t),e),M={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},E={...M,transform:t=>clamp(0,1,t)},w={...M,default:1},sanitize=t=>Math.round(1e5*t)/1e5,B=/(-)?([\d]*\.?[\d])+/g,k=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,L=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString(t){return"string"==typeof t}let createUnitType=t=>({test:e=>isString(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),R=createUnitType("deg"),F=createUnitType("%"),j=createUnitType("px"),O=createUnitType("vh"),I=createUnitType("vw"),N={...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(100*t)},U={...M,transform:Math.round},W={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,size:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:R,skewX:R,skewY:R,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:E,originX:N,originY:N,originZ:j,zIndex:U,fillOpacity:E,strokeOpacity:E,numOctaves:U};function buildHTMLStyles(t,e,i,r){let{style:n,vars:s,transform:a,transformOrigin:o}=t,l=!1,u=!1,h=!0;for(let t in e){let i=e[t];if(D(t)){s[t]=i;continue}let r=W[t],c=getValueAsType(i,r);if(b.has(t)){if(l=!0,a[t]=c,!h)continue;i!==(r.default||0)&&(h=!1)}else t.startsWith("origin")?(u=!0,o[t]=c):n[t]=c}if(!e.transform&&(l||r?n.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:i=!0}
1,r,n){let s="";for(let e=0;e<S;e++){let i=T[e];if(void 0!==t[i]){let e=A[i]||i;s+=`${e}(${t[i]}) `}}return e&&!t.z&&(s+="translateZ(0)"),s=s.trim(),n?s=n(t,r?"":s):i&&r&&(s="none"),s}(t.transform,i,h,r):n.transform&&(n.transform="none")),u){let{originX:t="50%",originY:e="50%",originZ:i=0}=o;n.transformOrigin=`${t} ${e} ${i}`}}let createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(t,e,i){for(let r in e)isMotionValue(e[r])||isForcedMotionValue(r,i)||(t[r]=e[r])}function useHTMLProps(t,e,i){let r={},n=function(t,e,i){let r=t.style||{},n={};return copyRawValuesOnly(n,r,t),Object.assign(n,function({transformTemplate:t},e,i){return(0,a.useMemo)(()=>{let r=createHtmlRenderState();return buildHTMLStyles(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}let z=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 isValidMotionProp(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||z.has(t)}let shouldForward=t=>!isValidMotionProp(t);try{(n=require("@emotion/is-prop-valid").default)&&(shouldForward=t=>t.startsWith("on")?!isValidMotionProp(t):n(t))}catch(t){}function calcOrigin(t,e,i){return"string"==typeof t?t:j.transform(e+i*t)}let H={offset:"stroke-dashoffset",array:"stroke-dasharray"},G={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGAttrs(t,{attrX:e,attrY:i,attrScale:r,originX:n,originY:s,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...u},h,c,d){if(buildHTMLStyles(t,u,h,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:m,style:p,dimensions:f}=t;m.transform&&(f&&(p.transform=m.transform),delete m.transform),f&&(void 0!==n||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,i){let r=calcOrigin(e,t.x,t.width),n=calcOrigin(i,t.y,t.height);return`${r} ${n}`}(f,void 0!==n?n:.5,void 0!==s?s:.5)),void 0!==e&&(m.x=e),void 0!==i&&(m.y=i),void 0!==r&&(m.scale=r),void 0!==a&&function(t,e,i=1,r=0,n=!0){t.pathLength=1;let s=n?H:G;t[s.offset]=j.transform(-r);let a=j.transform(e),o=j.transform(i);t[s.array]=`${a} ${o}`}(m,a,o,l,!1)}let createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=t=>"string"==typeof t&&"svg"===t.toLowerCase();
1function useSVGProps(t,e,i,r){let n=(0,a.useMemo)(()=>{let i=createSvgRenderState();return buildSVGAttrs(i,e,{enableHardwareAcceleration:!1},isSVGTag(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};copyRawValuesOnly(e,t.style,t),n.style={...e,...n.style}}return n}let camelToDash=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function renderHTML(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 $=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 renderSVG(t,e,i,r){for(let i in renderHTML(t,e,void 0,r),e.attrs)t.setAttribute($.has(i)?i:camelToDash(i),e.attrs[i])}function scrapeMotionValuesFromProps(t,e){let{style:i}=t,r={};for(let n in i)(isMotionValue(i[n])||e.style&&isMotionValue(e.style[n])||isForcedMotionValue(n,t))&&(r[n]=i[n]);return r}function scrape_motion_values_scrapeMotionValuesFromProps(t,e){let i=scrapeMotionValuesFromProps(t,e);for(let r in t)if(isMotionValue(t[r])||isMotionValue(e[r])){let e=-1!==T.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[e]=t[r]}return i}function resolveVariantFromProps(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}var Z=i(6681);let isKeyframesTarget=t=>Array.isArray(t),isCustomValue=t=>!!(t&&"object"==typeof t&&t.mix&&t.toValue),resolveFinalValueInKeyframes=t=>isKeyframesTarget(t)?t[t.length-1]||0:t;function resolveMotionValue(t){let e=isMotionValue(t)?t.get():t;return isCustomValue(e)?e.toValue():e}let makeUseVisualState=t=>(e,i)=>{let r=(0,a.useContext)(l),n=(0,a.useContext)(u.O),make=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:i},r,n,s){let a={latestValues:function(t,e,i,r){let n={},s=r(t,{});for(let t in s)n[t]=resolveMotionValue(s[t]);let{initial:a,animate:o}=t,l=isControllingVariants(t),u=isVariantNode(t);e&&u&&!l&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===o&&(o=e.animate));let h=!!i&&!1===i.initial;h=h||!1===a;let c=h?o:a;if(c&&"boolean"!=typeof c&&!isAnimationControls(c)){let e=Array.isArray(c)?c:[c];e.forEach(e=>{let i=resolveVariantFromProps(t,e);if(!i)return;let{transitionEnd:r,transition:s,...a}=i;for(let t in a){let e=a[t];
1if(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]})}return n}(r,n,s,t),renderState:e()};return i&&(a.mount=t=>i(r,t,a)),a})(t,e,r,n);return i?make():(0,Z.h)(make)};var q=i(2074);let _={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrape_motion_values_scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(t,e,{renderState:i,latestValues:r})=>{q.Wi.read(()=>{try{i.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}}),q.Wi.render(()=>{buildSVGAttrs(i,r,{enableHardwareAcceleration:!1},isSVGTag(e.tagName),t.transformTemplate),renderSVG(e,i)})}})},K={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps,createRenderState:createHtmlRenderState})};function addDomEvent(t,e,i,r={passive:!0}){return t.addEventListener(e,i,r),()=>t.removeEventListener(e,i)}let isPrimaryPointer=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function extractEventInfo(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}let addPointerInfo=t=>e=>isPrimaryPointer(e)&&t(e,extractEventInfo(e));function addPointerEvent(t,e,i,r){return addDomEvent(t,e,addPointerInfo(i),r)}let combineFunctions=(t,e)=>i=>e(t(i)),pipe=(...t)=>t.reduce(combineFunctions);function createLock(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}let X=createLock("dragHorizontal"),Y=createLock("dragVertical");function getGlobalLock(t){let e=!1;if("y"===t)e=Y();else if("x"===t)e=X();else{let t=X(),i=Y();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function isDragActive(){let t=getGlobalLock(!0);return!t||(t(),!1)}let Feature=class Feature{constructor(t){this.isMounted=!1,this.node=t}update(){}};function addHoverEvent(t,e){let i="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End");return addPointerEvent(t.current,i,(i,n)=>{if("touch"===i.type||isDragActive())return;let s=t.getProps();t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",e),s[r]&&q.Wi.update(()=>s[r](i,n))},{passive:!t.getProps()[r]})}let isNodeOrChild=(t,e)=>!!e&&(t===e||isNodeOrChild(t,e.parentElement));var J=i(1662);function fireSyntheticPointerEvent(t,e){if(!e)return;let i=new PointerEvent("pointer"+t);e(i,extractEventInfo(i))}let Q=new WeakMap,tt=new WeakMap,fireObserverCallback=t=>{let e=Q.get(t.target);e&&e(t)},fireAllObserverCallbacks=t=>{t.forEach(fireObserverCallback)},te={some:0,all:1};function shallowCompare(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let r=0;r<i;r++)if(e[r]!==t[r])return!1;return!0}function resolveVariant(t,e,i){let r=t.getProps();return resolveVariantFromProps(r,e,void 0!==i?i:r.custom,function(t){let e={};return t.values.forEach((t,i)=>e[i]=t.get()),e}(t),function(t){let e={};return t.values.forEach((t,i)=>e[i]=t.getVelocity()),e}(t))}let ti="data-"+camelToDash("framerAppearId");var tr=i(5487);let secondsToMilliseconds=t=>1e3*t,millisecondsToSeconds=t=>t/1e3,tn={current:!1},isBezierDefinition=t=>Array.isArray(t)&&"number"==typeof t[0],cubicBezierAsString=([t,e,i,r])=>`cubic-bezier(${t}, ${e}, ${i}, ${r})`,ts={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])},calcBezier=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function cubicBezier(t,e,i,r){if(t===e&&i===r)return J.Z;let getTForX=e=>(function(t,e,i,r,n){let s,a;let o=0;do(s=calcBezier(a=e+(i-e)/2,r,n)-t)>0?i=a:e=a;while(Math.abs(s)>1e-7&&++o<12);return a})(e,0,1,t,i);return t=>0===t||1===t?t:calcBezier(getTForX(t),e,r)}let ta=cubicBezier(.42,0,1,1),to=cubicBezier(0,0,.58,1),tl=cubicBezier(.42,0,.58,1),isEasingArray=t=>Array.isArray(t)&&"number"!=typeof t[0],mirrorEasing=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,reverseEasing=t=>e=>1-t(1-e),circIn=t=>1-Math.sin(Math.acos(t)),tu=reverseEasing(circIn),th=mirrorEasing(tu),tc=cubicBezier(.33,1.53,.69,.99),td=reverseEasing(tc),tm=mirrorEasing(td),tp={linear:J.Z,easeIn:ta,easeInOut:tl,easeOut:to,circIn:circIn,circInOut:th,circOut:tu,backIn:td,backInOut:tm,backOut:tc,anticipate:t=>(t*=2)<1?.5*td(t):.5*(2-Math.pow(2,-10*(t-1)))},easingDefinitionToFunction=t=>{if(Array.isArray(t)){(0,tr.k)(4===t.length,"Cubic bezier arrays must contain four numerical values.");let[e,i,r,n]=t;return cubicBezier(e,i,r,n)}return"string"==typeof t?((0,tr.k)(void 0!==tp[t],`Invalid easing type '${t}'`),tp[t]):t},isColorString=(t,e)=>i=>!!(isString(i)&&L.test(i)&&i.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(i,e)),splitColor=(t,e,i)=>r=>{if(!isString(r))return r;let[n,s,a,o]=r.match(B);return{[t]:parseFloat(n),[e]:parseFloat(s),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},clampRgbUnit=t=>clamp(0,255,t),tf={...M,transform:t=>Math.round(clampRgbUnit(t))},tg={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:r=1})=>"rgba("+tf.transform(t)+", "+tf.transform(e)+", "+tf.transform(i)+", "+sanitize(E.transform(r))+")"},ty={test:isColorString("#"),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),alph
1a:n?parseInt(n,16)/255:1}},transform:tg.transform},tv={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:r=1})=>"hsla("+Math.round(t)+", "+F.transform(sanitize(e))+", "+F.transform(sanitize(i))+", "+sanitize(E.transform(r))+")"},tx={test:t=>tg.test(t)||ty.test(t)||tv.test(t),parse:t=>tg.test(t)?tg.parse(t):tv.test(t)?tv.parse(t):ty.parse(t),transform:t=>isString(t)?t:t.hasOwnProperty("red")?tg.transform(t):tv.transform(t)},mix=(t,e,i)=>-i*t+i*e+t;function hueToRgb(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 mixLinearColor=(t,e,i)=>{let r=t*t;return Math.sqrt(Math.max(0,i*(e*e-r)+r))},tP=[ty,tg,tv],getColorType=t=>tP.find(e=>e.test(t));function asRGBA(t){let e=getColorType(t);(0,tr.k)(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let i=e.parse(t);return e===tv&&(i=function({hue:t,saturation:e,lightness:i,alpha:r}){t/=360,i/=100;let n=0,s=0,a=0;if(e/=100){let r=i<.5?i*(1+e):i+e-i*e,o=2*i-r;n=hueToRgb(o,r,t+1/3),s=hueToRgb(o,r,t),a=hueToRgb(o,r,t-1/3)}else n=s=a=i;return{red:Math.round(255*n),green:Math.round(255*s),blue:Math.round(255*a),alpha:r}}(i)),i}let mixColor=(t,e)=>{let i=asRGBA(t),r=asRGBA(e),n={...i};return t=>(n.red=mixLinearColor(i.red,r.red,t),n.green=mixLinearColor(i.green,r.green,t),n.blue=mixLinearColor(i.blue,r.blue,t),n.alpha=mix(i.alpha,r.alpha,t),tg.transform(n))}
1,tV={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:J.Z},tT={regex:k,countKey:"Colors",token:"${c}",parse:tx.parse},tb={regex:B,countKey:"Numbers",token:"${n}",parse:M.parse};function tokenise(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 analyseComplexValue(t){let e=t.toString(),i={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return i.value.includes("var(--")&&tokenise(i,tV),tokenise(i,tT),tokenise(i,tb),i}function parseComplexValue(t){return analyseComplexValue(t).values}function createTransformer(t){let{values:e,numColors:i,numVars:r,tokenised:n}=analyseComplexValue(t),s=e.length;return t=>{let e=n;for(let n=0;n<s;n++)e=n<r?e.replace(tV.token,t[n]):n<r+i?e.replace(tT.token,tx.transform(t[n])):e.replace(tb.token,sanitize(t[n]));return e}}let convertNumbersToZero=t=>"number"==typeof t?0:t,tA={test:function(t){var e,i;return isNaN(t)&&isString(t)&&((null===(e=t.match(B))||void 0===e?void 0:e.length)||0)+((null===(i=t.match(k))||void 0===i?void 0:i.length)||0)>0},parse:parseComplexValue,createTransformer,getAnimatableNone:function(t){let e=parseComplexValue(t),i=createTransformer(t);return i(e.map(convertNumbersToZero))}},mixImmediate=(t,e)=>i=>`${i>0?e:t}`;function getMixer(t,e){return"number"==typeof t?i=>mix(t,e,i):tx.test(t)?mixColor(t,e):t.startsWith("var(")?mixImmediate(t,e):mixComplex(t,e)}let mixArray=(t,e)=>{let i=[...t],r=i.length,n=t.map((t,i)=>getMixer(t,e[i]));return t=>{for(let e=0;e<r;e++)i[e]=n[e](t);return i}},mixObject=(t,e)=>{let i={...t,...e},r={};for(let n in i)void 0!==t[n]&&void 0!==e[n]&&(r[n]=getMixer(t[n],e[n]));return t=>{for(let e in r)i[e]=r[e](t);return i}},mixComplex=(t,e)=>{let i=tA.createTransformer(e),r=analyseComplexValue(t),n=analyseComplexValue(e),s=r.numVars===n.numVars&&r.numColors===n.numColors&&r.numNumbers>=n.numNumbers;return s?pipe(mixArray(r.values,n.values),i):((0,tr.K)(!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.`),mixImmediate(t,e))},progress=(t,e,i)=>{let r=e-t;return 0===r?1:(i-t)/r},mixNumber=(t,e)=>i=>mix(t,e,i);function interpolate(t,e,{clamp:i=!0,ease:r,mixer:n}={}){let s=t.length;if((0,tr.k)(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 a=function(t,e,i){let r=[],n=i||function(t){if("number"==typeof t);else if("string"==typeof t)return tx.test(t)?mixColor:mixComplex;else if(Array.isArray(t))return mixArray;else if("object"==typeof t)return mixObject;return mixNumber}(t[0]),s=t.length-1;for(let i=0;i<s;i++){let s=n(t[i],t[i+1]);if(e){let t=Array.isArray(e)?e[i]||J.Z:e;s=pipe(t,s)}r.push(s)}return r}(e,r,n),o=a.length,interpolator=e=>{let i=0;if(o>1)for(;i<t.length-2&&!(e<t[i+1]);i++);let r=progress(t[i],t[i+1],e);return a[i](r)};return i?e=>interpolator(clamp(t[0],t[s-1],e)):interpolator}function keyframes({duration:t=300,keyframes:e,times:i,ease:r="easeInOut"}){let n=isEasingArray(r)?r.map(easingDefinitionToFunction):easingDefinitionToFunction(r),s={done:!1,value:e[0]},a=(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=progress(0,e,r);t.push(mix(i,1,n))}}(e,t.length-1),e}(e)).map(e=>e*t),o=interpolate(a,e,{ease:Array.isArray(n)?n:e.map(()=>n||tl).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}function calcGeneratorVelocity(t,e,i){var r,n;let s=Math.max(e-5,0);return r=i-t(s),(n=e-s)?r*(1e3/n):0}function calcAngularFreq(t,e){return t*Math.sqrt(1-e*e)}let tS=["duration","bounce"],tD=["stiffness","damping","mass"];function isSpringType(t,e){return e.some(e=>void 0!==t[e])}function spring({keyframes:t,restDelta:e,restSpeed:i,...r}){let n;let s=t[0],a=t[t.length-1],o={done:!1,value:s},{stiffness:l,damping:u,mass:h,velocity:c,duration:d,isResolvedFromDuration:m}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!isSpringType(t,tD)&&isSpringType(t,tS)){let i=function({duration:t=800,bounce:e=.25,velocity:i=0,mass:r=1}){let n,s;(0,tr.K)(t<=secondsToMilliseconds(10),"Spring duration must be 10 seconds or less");let a=1-e;a=clamp(.05,1,a),t=clamp(.01,10,millisecondsToSeconds(t)),a<1?(n=e=>{let r=e*a,n=r*t,s=calcAngularFreq(e,a);return .001-(r-i)/s*Math.exp(-n)},s=e=>{let r=e*a,s=r*t,o=Math.pow(a,2)*Math.pow(e,2)*t,l=calcAngularFreq(Math.pow(e,2),a),u=-n(e)+.001>0?-1:1;return u*((s*i+i-o)*Math.exp(-s))/l}):(n=e=>
1{let r=Math.exp(-e*t),n=(e-i)*t+1;return -.001+r*n},s=e=>{let r=Math.exp(-e*t),n=(i-e)*(t*t);return r*n});let o=5/t,l=function(t,e,i){let r=i;for(let i=1;i<12;i++)r-=t(r)/e(r);return r}(n,s,o);if(t=secondsToMilliseconds(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(l,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}(t);(e={...e,...i,velocity:0,mass:1}).isResolvedFromDuration=!0}return e}(r),p=c?-millisecondsToSeconds(c):0,f=u/(2*Math.sqrt(l*h)),g=a-s,y=millisecondsToSeconds(Math.sqrt(l/h)),v=5>Math.abs(g);if(i||(i=v?.01:2),e||(e=v?.005:.5),f<1){let t=calcAngularFreq(y,f);n=e=>{let i=Math.exp(-f*y*e);return a-i*((p+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)n=t=>a-Math.exp(-y*t)*(g+(p+y*g)*t);else{let t=y*Math.sqrt(f*f-1);n=e=>{let i=Math.exp(-f*y*e),r=Math.min(t*e,300);return a-i*((p+f*y*g)*Math.sinh(r)+t*g*Math.cosh(r))/t}}return{calculatedDuration:m&&d||null,next:t=>{let r=n(t);if(m)o.done=t>=d;else{let s=p;0!==t&&(s=f<1?calcGeneratorVelocity(n,t,r):0);let l=Math.abs(s)<=i,u=Math.abs(a-r)<=e;o.done=l&&u}return o.value=o.done?a:r,o}}}function inertia({keyframes:t,velocity:e=0,power:i=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let c,d;let m=t[0],p={done:!1,value:m},isOutOfBounds=t=>void 0!==o&&t<o||void 0!==l&&t>l,nearestBoundary=t=>void 0===o?l:void 0===l?o:Math.abs(o-t)<Math.abs(l-t)?o:l,f=i*e,g=m+f,y=void 0===a?g:a(g);y!==g&&(f=y-m);let calcDelta=t=>-f*Math.exp(-t/r),calcLatest=t=>y+calcDelta(t),applyFriction=t=>{let e=calcDelta(t),i=calcLatest(t);p.done=Math.abs(e)<=u,p.value=p.done?y:i},checkCatchBoundary=t=>{isOutOfBounds(p.value)&&(c=t,d=spring({keyframes:[p.value,nearestBoundary(p.value)],velocity:calcGeneratorVelocity(calcLatest,t,p.value),damping:n,stiffness:s,restDelta:u,restSpeed:h}))};return checkCatchBoundary(0),{calculatedDuration:null,next:t=>{let e=!1;return(d||void 0!==c||(e=!0,applyFriction(t),checkCatchBoundary(t)),void 0!==c&&t>c)?d.next(t-c):(e||applyFriction(t),p)}}}let frameloopDriver=t=>{let passTimestamp=({timestamp:e})=>t(e);return{start:()=>q.Wi.update(passTimestamp,!0),stop:()=>(0,q.Pn)(passTimestamp),now:()=>q.frameData.isProcessing?q.frameData.timestamp:performance.now()}};function calcGeneratorDuration(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 tC={decay:inertia,inertia:inertia,tween:keyframes,keyframes:keyframes,spring:spring};function animateValue({autoplay:t=!0,delay:e=0,driver:i=frameloopDriver,keyframes:r,type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",onPlay:l,onStop:u,onComplete:h,onUpdate:c,...d}){let m,p,f,g,y,v=1,x=!1,updateFinishedPromise=()=>{p=new Promise(t=>{m=t})};updateFinishedPromise();let P=tC[n]||keyframes;P!==keyframes&&"number"!=typeof r[0]&&(g=interpolate([0,100],r,{clamp:!1}),r=[0,100]);let V=P({...d,keyframes:r});"mirror"===o&&(y=P({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let T="idle",b=null,A=null,S=null;null===V.calculatedDuration&&s&&(V.calculatedDuration=calcGeneratorDuration(V));let{calculatedDuration:D}=V,C=1/0,M=1/0;null!==D&&(M=(C=D+a)*(s+1)-a);let E=0,tick=t=>{if(null===A)return;v>0&&(A=Math.min(A,t)),v<0&&(A=Math.min(t-M/v,A)),E=null!==b?b:Math.round(t-A)*v;let i=E-e*(v>=0?1:-1),n=v>=0?i<0:i>M;E=Math.max(i,0),"finished"===T&&null===b&&(E=M);let l=E,u=V;if(s){let t=E/C,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,s+1);let r=!!(e%2);r&&("reverse"===o?(i=1-i,a&&(i-=a/C)):"mirror"===o&&(u=y));let n=clamp(0,1,i);E>M&&(n="reverse"===o&&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===D||(d=v>=0?E>=M:E<=0);let m=null===b&&("finished"===T||"running"===T&&d);return c&&c(h.value),m&&finish(),h},stopAnimationDriver=()=>{f&&f.stop(),f=void 0},cancel=()=>{T="idle",stopAnimationDriver(),m(),updateFinishedPromise(),A=S=null},finish=()=>{T="finished",h&&h(),stopAnimationDriver(),m()},play=()=>{if(x)return;f||(f=i(tick));let t=f.now();l&&l(),null!==b?A=t-b:A&&"finished"!==T||(A=t),"finished"===T&&updateFinishedProm
1ise(),S=A,b=null,T="running",f.start()};t&&play();let w={then:(t,e)=>p.then(t,e),get time(){return millisecondsToSeconds(E)},set time(newTime){E=newTime=secondsToMilliseconds(newTime),null===b&&f&&0!==v?A=f.now()-newTime/v:b=newTime},get duration(){let t=null===V.calculatedDuration?calcGeneratorDuration(V):V.calculatedDuration;return millisecondsToSeconds(t)},get speed(){return v},set speed(newSpeed){if(newSpeed===v||!f)return;v=newSpeed,w.time=millisecondsToSeconds(E)},get state(){return T},play,pause:()=>{T="paused",b=E},stop:()=>{x=!0,"idle"!==T&&(T="idle",u&&u(),cancel())},cancel:()=>{null!==S&&tick(S),cancel()},complete:()=>{T="finished"},sample:t=>(A=0,tick(t))};return w}let tM=(s=()=>Object.hasOwnProperty.call(Element.prototype,"animate"),()=>(void 0===r&&(r=s()),r)),tE=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),requiresPregeneratedKeyframes=(t,e)=>"spring"===e.type||"backgroundColor"===t||!function isWaapiSupportedEasing(t){return!!(!t||"string"==typeof t&&ts[t]||isBezierDefinition(t)||Array.isArray(t)&&t.every(isWaapiSupportedEasing))}(e.ease),tw={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),tB={type:"keyframes",duration:.8},tk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(t,{keyframes:e})=>e.length>2?tB:b.has(t)?t.startsWith("scale")?criticallyDampedSpring(e[1]):tw:tk,isAnimatable=(t,e)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(tA.test(e)||"0"===e)&&!e.startsWith("url(")),tL=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[r]=i.match(B)||[];if(!r)return t;let n=i.replace(r,""),s=tL.has(e)?1:0;return r!==i&&(s*=100),e+"("+s+n+")"}let tR=/([a-z-]*)\(.*?\)/g,tF={...tA,getAnimatableNone:t=>{let e=t.match(tR);return e?e.map(applyDefaultFilter).join(" "):t}},tj={...W,color:tx,backgroundColor:tx,outlineColor:tx,fill:tx,stroke:tx,borderColor:tx,borderTopColor:tx,borderRightColor:tx,borderBottomColor:tx,borderLeftColor:tx,filter:tF,WebkitFilter:tF},getDefaultValueType=t=>tj[t];function animatable_none_getAnimatableNone(t,e){let i=getDefaultValueType(t);return i!==tF&&(i=tA),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let isZeroValueString=t=>/^0[^.\s]+$/.test(t);function getValueTransition(t,e){return t[e]||t.default||t}let animateMotionValue=(t,e,i,r={})=>n=>{let s=getValueTransition(r,t)||{},a=s.delay||r.delay||0,{elapsed:o=0}=r;o-=secondsToMilliseconds(a);let l=function(t,e,i,r){let n,s;let a=isAnimatable(e,i);n=Array.isArray(i)?[...i]:[null,i];let o=void 0!==r.from?r.from:t.get(),l=[];for(let t=0;t<n.length;t++){var u;null===n[t]&&(n[t]=0===t?o:n[t-1]),("number"==typeof(u=n[t])?0===u:null!==u?"none"===u||"0"===u||isZeroValueString(u):void 0)&&l.push(t),"string"==typeof n[t]&&"none"!==n[t]&&"0"!==n[t]&&(s=n[t])}if(a&&l.length&&s)for(let t=0;t<l.length;t++){let i=l[t];n[i]=animatable_none_getAnimatableNone(e,s)}return n}(e,t,i,s),u=l[0],h=l[l.length-1],c=isAnimatable(t,u),d=isAnimatable(t,h);(0,tr.K)(c===d,`You are trying to animate ${t} from "${u}" to "${h}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${h} via the \`style\` property.`);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-o,onUpdate: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:a,repeatDelay:o,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(s)&&(m={...m,...getDefaultTransition(t,m)}),m.duration&&(m.duration=secondsToMilliseconds(m.duration)),m.repeatDelay&&(m.repeatDelay=secondsToMilliseconds(m.repeatDelay)),!c||!d||tn.current||!1===s.type)return function({keyframes:t,delay:e,onUpdate:i,onComplete:r}){let setValue=()=>(i&&i(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:J.Z,pause:J.Z,stop:J.Z,then:t=>(t(),Promise.resolve()),cancel:J.Z,complete:J.Z});return e?animateValue({keyframes:[0,1],duration:0,delay:e,onComplete:setValue}):setValue()}(tn.current?{...m,delay:0}:m);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUp
1date){let i=function(t,e,{onUpdate:i,onComplete:r,...n}){let s,a;let o=tM()&&tE.has(e)&&!n.repeatDelay&&"mirror"!==n.repeatType&&0!==n.damping&&"inertia"!==n.type;if(!o)return!1;let l=!1,updateFinishedPromise=()=>{a=new Promise(t=>{s=t})};updateFinishedPromise();let{keyframes:u,duration:h=300,ease:c,times:d}=n;if(requiresPregeneratedKeyframes(e,n)){let t=animateValue({...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 m=function(t,e,i,{delay:r=0,duration:n,repeat:s=0,repeatType:a="loop",ease:o,times:l}={}){let u={[e]:i};l&&(u.offset=l);let h=function mapEasingToNativeEasing(t){if(t)return isBezierDefinition(t)?cubicBezierAsString(t):Array.isArray(t)?t.map(mapEasingToNativeEasing):ts[t]}(o);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"===a?"alternate":"normal"})}(t.owner.current,e,u,{...n,duration:h,ease:c,times:d});n.syncStart&&(m.startTime=q.frameData.isProcessing?q.frameData.timestamp:document.timeline?document.timeline.currentTime:performance.now());let cancelAnimation=()=>m.cancel(),safeCancel=()=>{q.Wi.update(cancelAnimation),s(),updateFinishedPromise()};return m.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(),safeCancel()},{then:(t,e)=>a.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,J.Z),get time(){return millisecondsToSeconds(m.currentTime||0)},set time(newTime){m.currentTime=secondsToMilliseconds(newTime)},get speed(){return m.playbackRate},set speed(newSpeed){m.playbackRate=newSpeed},get duration(){return millisecondsToSeconds(h)},play:()=>{l||(m.play(),(0,q.Pn)(cancelAnimation))},pause:()=>m.pause(),stop:()=>{if(l=!0,"idle"===m.playState)return;let{currentTime:e}=m;if(e){let i=animateValue({...n,autoplay:!1});t.setWithVelocity(i.sample(e-10).value,i.sample(e).value,10)}safeCancel()},complete:()=>m.finish(),cancel:safeCancel}}(e,t,m);if(i)return i}return animateValue(m)};function isWillChangeMotionValue(t){return!!(isMotionValue(t)&&t.add)}let isNumericalString=t=>/^\-?\d*\.?\d+$/.test(t);function addUniqueItem(t,e){-1===t.indexOf(e)&&t.push(e)}function removeItem(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}let SubscriptionManager=class SubscriptionManager{constructor(){this.subscriptions=[]}add(t){return addUniqueItem(this.subscriptions,t),()=>removeItem(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<r;n++){let r=this.subscriptions[n];r&&r(t,e,i)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};let isFloat=t=>!isNaN(parseFloat(t)),tO={current:void 0};let MotionValue=class MotionValue{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}=q.frameData;this.lastUpdated!==r&&(this.timeDelta=i,this.lastUpdated=r,q.Wi.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=()=>q.Wi.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=isFloat(this.current),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new SubscriptionManager);let i=this.events[t].add(e);return"change"===t?()=>{i(),q.Wi.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 tO.current&&tO.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)?t*(1e3/e):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 motionValue(t,e){return new MotionValue(t,e)}let testValueType=t=>e=>e.test(t),tI=[M,j,F,R,I,O,{test:t=>"auto"===t,parse:t=>t}],findDimensionValueType=t=>tI.find(testValueType(t)),tN=[...tI,tx,tA],findValueType=t=>tN.find(testValueType(t));function animateTarget(t,e,{delay:i=0,transitionOverride:r,type:n}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:a,...o}=t.makeTargetAnimatable(e),l=t.getValue("willChange");r&&(s=r);let u=[],h=n&&t.animationState&&t.animationState.getState()[n];for(let e in o){let r=t.getValue(e),n=o[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 a={delay:i,elapsed:0,...s};if(window.HandoffAppearAnimations&&!r.hasAnimated){let i=t.getProps()[ti];i&&(a.elapsed=window.HandoffAppearAnimations(i,e,r,q.Wi),a.syncStart=!0)}r.start(animateMotionValue(e,r,n,t.shouldReduceMotion&&b.has(e)?{type:!1}:a));let c=r.animation;isWillChangeMotionValue(l)&&(l.add(e),c.then(()=>l.remove(e))),u.push(c)}return a&&Promise.all(u).then(()=>{a&&function(t,e){let i=resolveVariant(t,e),{transitionEnd:r={},transition:n={},...s}=i?t.makeTargetAnimatable(i,!1):{};for(let e in s={...s,...r}){let i=resolveFinalValueInKeyframes(s[e]);t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,motionValue(i))}}(t,a)}),u}function animateVariant(t,e,i={}){let r=resolveVariant(t,e,i.custom),{transition:n=t.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(n=i.transitionOverride);let s=r?()=>Promise.all(animateTarget(t,r,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(r=0)=>{let{delayChildren:s=0,staggerChildren:a,staggerDirection:o}=n;
1return function(t,e,i=0,r=0,n=1,s){let a=[],o=(t.variantChildren.size-1)*r,l=1===n?(t=0)=>t*r:(t=0)=>o-t*r;return Array.from(t.variantChildren).sort(sortByTreeOrder).forEach((t,r)=>{t.notify("AnimationStart",e),a.push(animateVariant(t,e,{...s,delay:i+l(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(a)}(t,e,s+r,a,o,i)}:()=>Promise.resolve(),{when:o}=n;if(!o)return Promise.all([s(),a(i.delay)]);{let[t,e]="beforeChildren"===o?[s,a]:[a,s];return t().then(()=>e())}}function sortByTreeOrder(t,e){return t.sortNodePosition(e)}let tU=[...d].reverse(),tW=d.length;function createTypeState(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let tz=0,distance=(t,e)=>Math.abs(t-e);let PanSession=class PanSession{constructor(t,e,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=getPanInfo(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){let i=distance(t.x,e.x),r=distance(t.y,e.y);return Math.sqrt(i**2+r**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!i)return;let{point:r}=t,{timestamp:n}=q.frameData;this.history.push({...r,timestamp:n});let{onStart:s,onMove:a}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=transformPoint(e,this.transformPagePoint),q.Wi.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let{onEnd:i,onSessionEnd:r}=this.handlers,n=getPanInfo("pointercancel"===t.type?this.lastMoveEventInfo:transformPoint(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,n),r&&r(t,n)},!isPrimaryPointer(t))return;this.handlers=e,this.transformPagePoint=i;let r=extractEventInfo(t),n=transformPoint(r,this.transformPagePoint),{point:s}=n,{timestamp:a}=q.frameData;this.history=[{...s,timestamp:a}];let{onSessionStart:o}=e;o&&o(t,getPanInfo(n,this.history)),this.removeListeners=pipe(addPointerEvent(window,"pointermove",this.handlePointerMove),addPointerEvent(window,"pointerup",this.handlePointerUp),addPointerEvent(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),(0,q.Pn)(this.updatePoint)}};function transformPoint(t,e){return e?{point:e(t.point)}:t}function subtractPoint(t,e){return{x:t.x-e.x,y:t.y-e.y}}function getPanInfo({point:t},e){return{point:t,delta:subtractPoint(t,lastDevicePoint(e)),offset:subtractPoint(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,r=null,n=lastDevicePoint(t);for(;i>=0&&(r=t[i],!(n.timestamp-r.timestamp>secondsToMilliseconds(.1)));)i--;if(!r)return{x:0,y:0};let s=millisecondsToSeconds(n.timestamp-r.timestamp);if(0===s)return{x:0,y:0};let a={x:(n.x-r.x)/s,y:(n.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(e,0)}}function lastDevicePoint(t){return t[t.length-1]}function calcLength(t){return t.max-t.min}function isNear(t,e=0,i=.01){return Math.abs(t-e)<=i}function calcAxisDelta(t,e,i,r=.5){t.origin=r,t.originPoint=mix(e.min,e.max,t.origin),t.scale=calcLength(i)/calcLength(e),(isNear(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=mix(i.min,i.max,t.origin)-t.originPoint,(isNear(t.translate)||isNaN(t.translate))&&(t.translate=0)}function calcBoxDelta(t,e,i,r){calcAxisDelta(t.x,e.x,i.x,r?r.originX:void 0),calcAxisDelta(t.y,e.y,i.y,r?r.originY:void 0)}function calcRelativeAxis(t,e,i){t.min=i.min+e.min,t.max=t.min+calcLength(e)}function calcRelativeAxisPosition(t,e,i){t.min=e.min-i.min,t.max=t.min+calcLength(e)}function calcRelativePosition(t,e,i){calcRelativeAxisPosition(t.x,e.x,i.x),calcRelativeAxisPosition(t.y,e.y,i.y)}function calcRelativeAxisConstraints(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 calcViewportAxisConstraints(t,e){let i=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,r]=[r,i]),{min:i,max:r}}function resolveAxisElastic(t,e,i){return{min:resolvePointElastic(t,e),max:resolvePointElastic(t,i)}}function resolvePointElastic(t,e){return"number"==typeof t?t:t[e]||0}let createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(t){return[t("x"),t("y")]}function convertBoundingBoxToBox({top:t,left:e,right:i,bottom:r}){return{x:{min:e,max:i},y:{min:t,max:r}}}function isIdentityScale(t){return void 0===t||1===t}function hasScale({scale:t,scaleX:e,scaleY:i}){return!isIdentityScale(t)||!isIdentityScale(e)||!isIdentityScale(i)}function hasTransform(t){return hasScale(t)||has2DTranslate(t)||t.z||t.rotate||t.rotateX||t.rotateY}function has2DTranslate(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function applyPointDelta(t,e,i,r,n){return void 0!==n&&(t=r+n*(t-r)),r+i*(t-r)+e}function applyAxisDelta(t,e=0,i=1,r,n){t.min=applyPointDelta(t.min,e,i,r,n),t.max=applyPointDelta(t.max,e,i,r,n)}function applyBoxDelta(t,{x:e,y:i}){applyAxisDelta(t.x,e.translate,e.scale,e.originPoint),applyAxisDelta(t.y,i.translate,i.scale,i.originPoint)}function snapToDefault(t){return Number.isInteger(t)?t:t>1.0000000000001||t<.999999999999?t:1}function translateAxis(t,e){t.min=t.min+e,t.max=t.max+e}function transformAxis(t,e,[i,r,n]){let s=void 0!==e[n]?e[n]:.5,a=mix(t.min,t.max,s);applyAxisDelta(t,e[i],e[r],a,e.scale)}let tH=["x","scaleX","originX"],tG=["y","scaleY","originY"];function transformBox(t,e){transformAxis(t.x,e,tH),transformAxis(t.y,e,tG)}function measureViewportBox(t,e){return convertBoundingBoxToBox(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))}
1let t$=new WeakMap;let VisualElementDragControls=class VisualElementDragControls{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=createBox(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){let{presenceContext:i}=this.visualElement;i&&!1===i.isPresent||(this.panSession=new PanSession(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(extractEventInfo(t,"page").point)},onStart:(t,e)=>{let{drag:i,dragPropagation:r,onDragStart:n}=this.getProps();if(i&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(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),eachAxis(t=>{let e=this.getAxisMotionValue(t).get()||0;if(F.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let r=i.layout.layoutBox[t];if(r){let t=calcLength(r);e=t*(parseFloat(e)/100)}}}this.originPoint[t]=e}),n&&q.Wi.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:a}=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}(a),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),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&&q.Wi.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||!shouldDrag(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&&t<e?t=r?mix(e,t,r.min):Math.max(t,e):void 0!==i&&t>i&&(t=r?mix(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&&isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:r,right:n}){return{x:calcRelativeAxisConstraints(t.x,i,n),y:calcRelativeAxisConstraints(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:resolveAxisElastic(t,"left","right"),y:resolveAxisElastic(t,"top","bottom")}}(e),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(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||!isRefObject(e))return!1;let r=e.current;(0,tr.k)(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=measureViewportBox(t,i),{scroll:n}=e;return n&&(translateAxis(r.x,n.offset.x),translateAxis(r.y,n.offset.y)),r}(r,n.root,this.visualElement.getTransformPagePoint()),a={x:calcViewportAxisConstraints((t=n.layout.layoutBox).x,s.x),y:calcViewportAxisConstraints(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}}(a));this.hasMutatedConstraints=!!t,t&&(a=convertBoundingBoxToBox(t))}return a}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:r,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{},l=eachAxis(a=>
1{if(!shouldDrag(a,e,this.currentDirection))return;let l=o&&o[a]||{};s&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(a,u)});return Promise.all(l).then(a)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return i.start(animateMotionValue(t,i,0,e))}stopAnimation(){eachAxis(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e="_drag"+t.toUpperCase(),i=this.visualElement.getProps(),r=i[e];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){eachAxis(e=>{let{drag:i}=this.getProps();if(!shouldDrag(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]-mix(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!isRefObject(e)||!i||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};eachAxis(t=>{let e=this.getAxisMotionValue(t);if(e){let i=e.get();r[t]=function(t,e){let i=.5,r=calcLength(t),n=calcLength(e);return n>r?i=progress(e.min,e.max-r,t.min):r>n&&(i=progress(t.min,t.max-n,e.min)),clamp(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(),eachAxis(e=>{if(!shouldDrag(e,t,null))return;let i=this.getAxisMotionValue(e),{min:n,max:s}=this.constraints[e];i.set(mix(n,s,r[e]))})}addListeners(){if(!this.visualElement.current)return;t$.set(this.visualElement,this);let t=this.visualElement.current,e=addPointerEvent(t,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),measureDragConstraints=()=>{let{dragConstraints:t}=this.getProps();isRefObject(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",measureDragConstraints);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),measureDragConstraints();let n=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(eachAxis(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(),e(),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:a=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:r,dragConstraints:n,dragElastic:s,dragMomentum:a}}};function shouldDrag(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let asyncHandler=t=>(e,i)=>{t&&q.Wi.update(()=>t(e,i))},tZ={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let tq={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!j.test(t))return t;t=parseFloat(t)}let i=pixelsToPercent(t,e.target.x),r=pixelsToPercent(t,e.target.y);return`${i}% ${r}%`}};let MeasureLayoutWithContext=class MeasureLayoutWithContext extends a.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:r}=this.props,{projection:n}=t;Object.assign(V,t_),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()})),tZ.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()||q.Wi.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 MeasureLayout(t){let[e,i]=function(){let t=(0,a.useContext)(u.O);if(null===t)return[!0,null];let{isPresent:e,onExitComplete:i,register:r}=t,n=(0,a.useId)();return(0,a.useEffect)(()=>r(n),[]),!e&&i?[!1,()=>i&&i(n)]:[!0]}(),r=(0,a.useContext)(y.p);return a.createElement(MeasureLayoutWithContext,{...t,layoutGroup:r,switchLayoutGroup:(0,a.useContext)(v),isPresent:e,safeToRemove:i})}let t_={borderRadius:{...tq,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tq,borderTopRightRadius:tq,borderBottomLeftRadius:tq,borderBottomRightRadius:tq,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let r=tA.parse(t);if(r.length>5)return t;let n=tA.createTransformer(t),s="number"!=typeof r[0]?1:0,a=i.x.scale*e.x,o=i.y.scale*e.y;r[0+s]/=a,r[1+s]/=o;let l=mix(a,o,.5);return"number"==typeof r[2+s]&&(r[2+s]/=l),"number"==typeof r[3+s]&&(r[3+s]/=l),n(r)}}},tK=["TopLeft","TopRight","BottomLeft","BottomRight"],tX=tK.length,asNumber=t=>"string"==typeof t?parseFloat(t):t,isPx=t=>"number"==typeof t||j.test(t);function getRadius(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let tY=compress(0,.5,tu),tJ=compress(.5,.95,J.Z);function compress(t,e,i){return r=>r<t?0:r>e?1:i(progress(t,e,r))}function copyAxisInto(t,e){t.min=e.min,t.max=e.max}function copyBoxInto(t,e){copyAxisInto(t.x,e.x),copyAxisInto(t.y,e.y)}function removePointDelta(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 removeAxisTransforms(t,e,[i,r,n],s,a){!function(t,e=0,i=1,r=.5,n,s=t,a=t){if(F.test(e)){e=parseFloat(e);let t=mix(a.min,a.max,e/100);e=t-a.min}if("number"!=typeof e)return;let o=mix(s.min,s.max,r);t===s&&(o-=e),t.min=removePointDelta(t.min,e,i,o,n),t.max=removePointDelta(t.max,e,i,o,n)}(t,e[i],e[r],e[n],e.scale,s,a)}let tQ=["x","scaleX","originX"],t0=["y","scaleY","originY"];function removeBoxTransforms(t,e,i,r){removeAxisTransforms(t.x,e,tQ,i?i.x:void 0,r?r.x:void 0),removeAxisTransforms(t.y,e,t0,i?i.y:void 0,r?r.y:void 0)}function isAxisDeltaZero(t){return 0===t.translate&&1===t.scale}function isDeltaZero(t){return isAxisDeltaZero(t.x)&&isAxisDeltaZero(t.y)}function boxEqualsRounded(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 aspectRatio(t){return calcLength(t.x)/calcLength(t.y)}let NodeStack=class NodeStack{constructor(){this.members=[]}add(t){addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(removeItem(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)}
1}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 buildProjectionTransform(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 a=t.x.scale*e.x,o=t.y.scale*e.y;return(1!==a||1!==o)&&(r+=`scale(${a}, ${o})`),r||"none"}let compareByDepth=(t,e)=>t.depth-e.depth;let FlatTree=class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(t){addUniqueItem(this.children,t),this.isDirty=!0}remove(t){removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(t)}};let t1=["","X","Y","Z"],t5=0,t2={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function createProjectionNode({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:r,resetTransform:n}){return class{constructor(t={},i=null==e?void 0:e()){this.id=t5++,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=()=>{t2.totalNodes=t2.resolvedTargetDeltas=t2.recalculatedProjection=0,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),window.MotionDebug&&window.MotionDebug.record(t2)},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;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,i=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;let{layoutId:r,layout:n,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(n||r)&&(this.isLayoutDirty=!0),t){let i;let resizeUnblockUpdate=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=performance.now(),checkElapsed=({timestamp:r})=>{let n=r-i;n>=e&&((0,q.Pn)(checkElapsed),t(n-e))};return q.Wi.read(checkElapsed,!0),()=>(0,q.Pn)(checkElapsed)}(resizeUnblockUpdate,250),tZ.hasAnimatedSinceResize&&(tZ.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}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()||t3,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!boxEqualsRounded(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={...getValueTransition(n,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||finishAnimation(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,(0,q.Pn)(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.forEac
1h(resetRotation),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;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;let t=this.isUpdateBlocked();if(t){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();let e=performance.now();q.frameData.delta=clamp(0,1e3/60,e-q.frameData.timestamp),q.frameData.timestamp=e,q.frameData.isProcessing=!0,q.S6.update.process(q.frameData),q.S6.preRender.process(q.frameData),q.S6.render.process(q.frameData),q.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){q.Wi.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){q.Wi.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<this.path.length;t++){let e=this.path[t];e.updateScroll()}let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(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:r(this.instance),offset:i(this.instance)})}resetTransform(){if(!n)return;let t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!isDeltaZero(this.projectionDelta),i=this.getTransformTemplate(),r=i?i(this.latestValues,""):void 0,s=r!==this.prevTransformTemplateValue;t&&(e||hasTransform(this.latestValues)||s)&&(n(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),r=this.removeElementScroll(i);return t&&(r=this.removeTransform(r)),roundAxis((e=r).x),roundAxis(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return createBox();let e=t.measureViewportBox(),{scroll:i}=this.root;return i&&(translateAxis(e.x,i.offset.x),translateAxis(e.y,i.offset.y)),e}removeElementScroll(t){let e=createBox();copyBoxInto(e,t);for(let i=0;i<this.path.length;i++){let r=this.path[i],{scroll:n,options:s}=r;if(r!==this.root&&n&&s.layoutScroll){if(n.isRoot){copyBoxInto(e,t);let{scroll:i}=this.root;i&&(translateAxis(e.x,-i.offset.x),translateAxis(e.y,-i.offset.y))}translateAxis(e.x,n.offset.x),translateAxis(e.y,n.offset.y)}}return e}applyTransform(t,e=!1){let i=createBox();copyBoxInto(i,t);for(let t=0;t<this.path.length;t++){let r=this.path[t];!e&&r.options.layoutScroll&&r.scroll&&r!==r.root&&transformBox(i,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),hasTransform(r.latestValues)&&transformBox(i,r.latestValues)}return hasTransform(this.latestValues)&&transformBox(i,this.latestValues),i}removeTransform(t){let e=createBox();copyBoxInto(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!hasTransform(i.latestValues))continue;hasScale(i.latestValues)&&i.updateSnapshot();let r=createBox(),n=i.measurePageBox();copyBoxInto(r,n),removeBoxTransforms(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,r)}return hasTransform(this.latestValues)&&removeBoxTransforms(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!==q.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e,i,r,n;let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isS
1haredProjectionDirty);let a=!!this.resumingFrom||this!==s,o=!(t||a&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget);if(o)return;let{layout:l,layoutId:u}=this.options;if(this.layout&&(l||u)){if(this.resolvedRelativeTargetAt=q.frameData.timestamp,!this.targetDelta&&!this.relativeTarget){let t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),i=this.target,r=this.relativeTarget,n=this.relativeParent.target,calcRelativeAxis(i.x,r.x,n.x),calcRelativeAxis(i.y,r.y,n.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,t.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}t2.resolvedTargetDeltas++}}}getClosestProjectingParent(){return!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;let e=this.getLead(),i=!!this.resumingFrom||this!==e,r=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(r=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===q.frameData.timestamp&&(r=!1),r)return;let{layout:n,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||s))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;!function(t,e,i,r=!1){let n,s;let a=i.length;if(a){e.x=e.y=1;for(let o=0;o<a;o++){s=(n=i[o]).projectionDelta;let a=n.instance;(!a||!a.style||"contents"!==a.style.display)&&(r&&n.options.layoutScroll&&n.scroll&&n!==n.root&&transformBox(t,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,applyBoxDelta(t,s)),r&&hasTransform(n.latestValues)&&transformBox(t,n.latestValues))}e.x=snapToDefault(e.x),e.y=snapToDefault(e.y)}}(this.layoutCorrected,this.treeScale,this.path,i),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox);let{target:l}=e;if(!l){this.projectionTransform&&(this.projectionDelta=createDelta(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta());let u=this.projectionTransform;calcBoxDelta(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=buildProjectionTransform(this.projectionDelta,this.treeScale),(this.projectionTransform!==u||this.treeScale.x!==a||this.treeScale.y!==o)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),t2.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){let i;let r=this.snapshot,n=r?r.latestValues:{},s={...this.latestValues},a=createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let o=createBox(),l=r?r.source:void 0,u=this.layout?this.layout.source:void 0,h=l!==u,c=this.getStack(),d=!c||c.members.length<=1,m=!!(h&&!d&&!0===this.options.crossfade&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0,this.mixTargetDelta=e=>{let r=e/1e3;if(mixAxisDelta(a.x,t.x,r),mixAxisDelta(a.y,t.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var l,u,c,p;calcRelativePosition(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,p=this.relativeTargetOrigin,mixAxis(c.x,p.x,o.x,r),mixAxis(c.y,p.y,o.y,r),i&&(l=this.relativeTarget,u=i,l.x.min===u.x.min&&l.x.max===u.x.max&&l.y.min===u.y.min&&l.y.max===u.y.max)&&(this.isProjectionDirty=!1),i||(i=createBox()),copyBoxInto(i,this.relativeTarget)}
1h&&(this.animationValues=s,function(t,e,i,r,n,s){n?(t.opacity=mix(0,void 0!==i.opacity?i.opacity:1,tY(r)),t.opacityExit=mix(void 0!==e.opacity?e.opacity:1,0,tJ(r))):s&&(t.opacity=mix(void 0!==e.opacity?e.opacity:1,void 0!==i.opacity?i.opacity:1,r));for(let n=0;n<tX;n++){let s=`border${tK[n]}Radius`,a=getRadius(e,s),o=getRadius(i,s);if(void 0===a&&void 0===o)continue;a||(a=0),o||(o=0);let l=0===a||0===o||isPx(a)===isPx(o);l?(t[s]=Math.max(mix(asNumber(a),asNumber(o),r),0),(F.test(o)||F.test(a))&&(t[s]+="%")):t[s]=o}(e.rotate||i.rotate)&&(t.rotate=mix(e.rotate||0,i.rotate||0,r))}(s,n,this.latestValues,r,m,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},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&&((0,q.Pn)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=q.Wi.update(()=>{tZ.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,i){let r=isMotionValue(t)?t:motionValue(t);return r.start(animateMotionValue("",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&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,r.layoutBox)){i=this.target||createBox();let e=calcLength(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let r=calcLength(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+r}copyBoxInto(e,i),transformBox(e,n),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,n)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new NodeStack);let i=this.sharedNodes.get(t);i.add(e);let r=e.options.initialPromotionConfig;e.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.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<t1.length;e++){let n="rotate"+t1[e];i[n]&&(r[n]=i[n],t.setStaticValue(n,0))}for(let e in t.render(),r)t.setStaticValue(e,r[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,i;let r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";let n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=resolveMotionValue(t.pointerEvents)||"",r.transform=n?n(this.latestValues,""):"none",r;let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){let e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=resolveMotionValue(t.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}let a=s.animationValues||s.latestValues;this.applyTransformsToTarget(),r.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,a),n&&(r.transform=n(a,r.transform));let{x:o,y:l}=this.projectionDelta;for(let t in r.transformOrigin=`${100*o.origin}% ${100*l.origin}% 0`,s.animationValues?r.opacity=s===this?null!==(i=null!==(e=a.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=s===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0,V){if(void 0===a[t])continue;let{correct:e,applyTo:i}=V[t],n="none"===r.transform?a[t]:e(a[t],s);if(i){let t=i.length;for(let e=0;e<t;e++)r[i[e]]=n}else r[t]=n}return this.options.layoutId&&(r.pointerEvents=s===this?resolveMotionValue(t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}
1resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(t){t.updateLayout()}function notifyLayoutUpdate(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?eachAxis(t=>{let r=s?i.measuredBox[t]:i.layoutBox[t],n=calcLength(r);r.min=e[t].min,r.max=r.min+n}):shouldAnimatePositionOnly(n,i.layoutBox,e)&&eachAxis(r=>{let n=s?i.measuredBox[r]:i.layoutBox[r],a=calcLength(e[r]);n.max=n.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+a)});let a=createDelta();calcBoxDelta(a,e,i.layoutBox);let o=createDelta();s?calcBoxDelta(o,t.applyTransform(r,!0),i.measuredBox):calcBoxDelta(o,e,i.layoutBox);let l=!isDeltaZero(a),u=!1;if(!t.resumeFrom){let r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:n,layout:s}=r;if(n&&s){let a=createBox();calcRelativePosition(a,i.layoutBox,n.layoutBox);let o=createBox();calcRelativePosition(o,e,s.layoutBox),boxEqualsRounded(a,o)||(u=!0),r.options.layoutRoot&&(t.relativeTarget=o,t.relativeTargetOrigin=a,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function propagateDirtyNodes(t){t2.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 cleanDirtyNodes(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function clearSnapshot(t){t.clearSnapshot()}function clearMeasurements(t){t.clearMeasurements()}function clearIsLayoutDirty(t){t.isLayoutDirty=!1}function resetTransformStyle(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function finishAnimation(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function resolveTargetDelta(t){t.resolveTargetDelta()}function calcProjection(t){t.calcProjection()}function resetRotation(t){t.resetRotation()}function removeLeadSnapshots(t){t.removeLeadSnapshot()}function mixAxisDelta(t,e,i){t.translate=mix(e.translate,0,i),t.scale=mix(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function mixAxis(t,e,i,r){t.min=mix(e.min,i.min,r),t.max=mix(e.max,i.max,r)}function hasOpacityCrossfade(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let t3={duration:.45,ease:[.4,0,.1,1]},userAgentContains=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),t6=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:J.Z;function roundAxis(t){t.min=t6(t.min),t.max=t6(t.max)}function shouldAnimatePositionOnly(t,e,i){return"position"===t||"preserve-aspect"===t&&!isNear(aspectRatio(e),aspectRatio(i),.2)}let t9=createProjectionNode({attachResizeListener:(t,e)=>addDomEvent(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),t4={current:void 0},t8=createProjectionNode({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!t4.current){let t=new t9({});t.mount(window),t.setOptions({layoutScroll:!0}),t4.current=t}return t4.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),t7=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function getVariableValue(t,e,i=1){(0,tr.k)(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=t7.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 isNumericalString(t)?parseFloat(t):t}return C(n)?getVariableValue(n,e,i+1):n}let et=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isPositionalKey=t=>et.has(t),hasPositionalKey=t=>Object.keys(t).some(isPositionalKey),isNumOrPxType=t=>
1t===M||t===j,getPosFromMatrix=(t,e)=>parseFloat(t.split(", ")[e]),getTranslateFromMatrix=(t,e)=>(i,{transform:r})=>{if("none"===r||!r)return 0;let n=r.match(/^matrix3d\((.+)\)$/);if(n)return getPosFromMatrix(n[1],e);{let e=r.match(/^matrix\((.+)\)$/);return e?getPosFromMatrix(e[1],t):0}},ee=new Set(["x","y","z"]),ei=T.filter(t=>!ee.has(t)),er={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:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};er.translateX=er.x,er.translateY=er.y;let convertChangedValueTypes=(t,e,i)=>{let r=e.measureViewportBox(),n=e.current,s=getComputedStyle(n),{display:a}=s,o={};"none"===a&&e.setStaticValue("display",t.display||"block"),i.forEach(t=>{o[t]=er[t](r,s)}),e.render();let l=e.measureViewportBox();return i.forEach(i=>{let r=e.getValue(i);r&&r.jump(o[i]),t[i]=er[i](l,s)}),t},checkAndConvertChangedValueTypes=(t,e,i={},r={})=>{e={...e},r={...r};let n=Object.keys(e).filter(isPositionalKey),s=[],a=!1,o=[];if(n.forEach(n=>{let l;let u=t.getValue(n);if(!t.hasValue(n))return;let h=i[n],c=findDimensionValueType(h),d=e[n];if(isKeyframesTarget(d)){let t=d.length,e=null===d[0]?1:0;c=findDimensionValueType(h=d[e]);for(let i=e;i<t&&null!==d[i];i++)l?(0,tr.k)(findDimensionValueType(d[i])===l,"All keyframes must be of the same type"):(l=findDimensionValueType(d[i]),(0,tr.k)(l===c||isNumOrPxType(c)&&isNumOrPxType(l),"Keyframes must be of the same dimension as the current value"))}else l=findDimensionValueType(d);if(c!==l){if(isNumOrPxType(c)&&isNumOrPxType(l)){let t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof d?e[n]=parseFloat(d):Array.isArray(d)&&l===j&&(e[n]=d.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==l?void 0:l.transform)&&(0===h||0===d)?0===h?u.set(l.transform(h)):e[n]=c.transform(d):(a||(s=function(t){let e=[];return ei.forEach(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),a=!0),o.push(n),r[n]=void 0!==r[n]?r[n]:e[n],u.jump(d))}}),!o.length)return{target:e,transitionEnd:r};{let i=o.indexOf("height")>=0?window.pageYOffset:null,n=convertChangedValueTypes(e,t,o);return s.length&&s.forEach(([e,i])=>{t.getValue(e).set(i)}),t.render(),g.j&&null!==i&&window.scrollTo({top:i}),{target:n,transitionEnd:r}}},parseDomVariant=(t,e,i,r)=>{var n,s;let a=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(!C(e))return;let i=getVariableValue(e,r);i&&t.set(i)}),e){let t=e[n];if(!C(t))continue;let s=getVariableValue(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=a.target,r=a.transitionEnd,n=e,s=r,hasPositionalKey(n)?checkAndConvertChangedValueTypes(t,n,i,s):{target:n,transitionEnd:s}},en={current:null},es={current:!1},ea=new WeakMap,eo=Object.keys(f),el=eo.length,eu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eh=m.length;let VisualElement=class VisualElement{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=()=>q.Wi.render(this.render,!1,!0);let{latestValues:a,renderState:o}=n;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=o,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.isControllingVariants=isControllingVariants(e),this.isVariantNode=isVariantNode(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!==a[t]&&isMotionValue(e)&&(e.set(a[t],!1),isWillChangeMotionValue(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,ea.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.forEac
1h((t,e)=>this.bindToMotionValue(e,t)),es.current||function(){if(es.current=!0,g.j){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),setReducedMotionPreferences=()=>en.current=t.matches;t.addListener(setReducedMotionPreferences),setReducedMotionPreferences()}else en.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||en.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in ea.delete(this.current),this.projection&&this.projection.unmount(),(0,q.Pn)(this.notifyUpdate),(0,q.Pn)(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=b.has(t),r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&q.Wi.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,a;for(let t=0;t<el;t++){let i=eo[t],{isEnabled:r,Feature:n,ProjectionNode:o,MeasureLayout:l}=f[i];o&&(s=o),r(e)&&(!this.features[i]&&n&&(this.features[i]=new n(this)),l&&(a=l))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);let{layoutId:t,layout:i,drag:r,dragConstraints:a,layoutScroll:o,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:i,alwaysMeasureLayout:!!r||a&&isRefObject(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof i?i:"both",initialPromotionConfig:n,layoutScroll:o,layoutRoot:l})}return a}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):createBox()}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;e<eu.length;e++){let i=eu[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let r=t["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=function(t,e,i){let{willChange:r}=e;for(let n in e){let s=e[n],a=i[n];if(isMotionValue(s))t.addValue(n,s),isWillChangeMotionValue(r)&&r.add(n);else if(isMotionValue(a))t.addValue(n,motionValue(s,{owner:t})),isWillChangeMotionValue(r)&&r.remove(n);else if(a!==s){if(t.hasValue(n)){let e=t.getValue(n);e.hasAnimated||e.set(s)}else{let e=t.getStaticValue(n);t.addValue(n,motionValue(void 0!==e?e:s,{owner:t}))}}}for(let r in i)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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){let t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}let e={};for(let t=0;t<eh;t++){let i=m[t],r=this.props[i];(isVariantLabel(r)||!1===r)&&(e[i]=r)}return e}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.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=motionValue(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=resolveVariantFromProps(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||isMotionValue(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 SubscriptionManager),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}};let DOMVisualElement=class DOMVisualElement extends VisualElement{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}
1,n){let s=function(t,e,i){let r={};for(let n in t){let t=function(t,e){if(!e)return;let i=e[t]||e.default||e;return i.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)),a=s.length;if(a)for(let o=0;o<a;o++){let a=s[o],l=e[a],u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(n=null!==(r=i[a])&&void 0!==r?r:t.readValue(a))&&void 0!==n?n:e[a]),null!=u&&("string"==typeof u&&(isNumericalString(u)||isZeroValueString(u))?u=parseFloat(u):!findValueType(u)&&tA.test(l)&&(u=animatable_none_getAnimatableNone(a,l)),t.addValue(a,motionValue(u,{owner:t})),void 0===i[a]&&(i[a]=u),null!==u&&t.setBaseTarget(a,u))}}(this,i,s);let t=parseDomVariant(this,i,s,e);e=t.transitionEnd,i=t.target}return{transition:t,transitionEnd:e,...i}}};let HTMLVisualElement=class HTMLVisualElement extends DOMVisualElement{readValueFromInstance(t,e){if(b.has(e)){let t=getDefaultValueType(e);return t&&t.default||0}{let i=window.getComputedStyle(t),r=(D(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:e}){return measureViewportBox(t,e)}build(t,e,i,r){buildHTMLStyles(t,e,i,r.transformTemplate)}scrapeMotionValuesFromProps(t,e){return scrapeMotionValuesFromProps(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;isMotionValue(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(t,e,i,r){renderHTML(t,e,i,r)}};let SVGVisualElement=class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(b.has(e)){let t=getDefaultValueType(e);return t&&t.default||0}return e=$.has(e)?e:camelToDash(e),t.getAttribute(e)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(t,e){return scrape_motion_values_scrapeMotionValuesFromProps(t,e)}build(t,e,i,r){buildSVGAttrs(t,e,i,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,i,r){renderSVG(t,e,i,r)}mount(t){this.isSVGTag=isSVGTag(t.tagName),super.mount(t)}};let create_visual_element_createDomVisualElement=(t,e)=>isSVGComponent(t)?new SVGVisualElement(e,{enableHardwareAcceleration:!1}):new HTMLVisualElement(e,{enableHardwareAcceleration:!0}),ec={animation:{Feature:class extends Feature{constructor(t){super(t),t.animationState||(t.animationState=function(t){let animate=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){let n=e.map(e=>animateVariant(t,e,i));r=Promise.all(n)}else if("string"==typeof e)r=animateVariant(t,e,i);else{let n="function"==typeof e?resolveVariant(t,e,i.custom):e;r=Promise.all(animateTarget(t,n,i))}return r.then(()=>t.notify("AnimationComplete",e))})(t,e,i))),e={animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()},i=!0,buildResolvedTypeValues=(e,i)=>{let r=resolveVariant(t,i);if(r){let{transition:t,transitionEnd:i,...n}=r;e={...e,...n,...i}}return e};function animateChanges(r,n){let s=t.getProps(),a=t.getVariantContext(!0)||{},o=[],l=new Set,u={},h=1/0;for(let d=0;d<tW;d++){var c;let m=tU[d],p=e[m],f=void 0!==s[m]?s[m]:a[m],g=isVariantLabel(f),y=m===n?p.isActive:null;!1===y&&(h=d);let v=f===a[m]&&f!==s[m]&&g;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...u},!p.isActive&&null===y||!f&&!p.prevProp||isAnimationControls(f)||"boolean"==typeof f)continue;let x=(c=p.prevProp,"string"==typeof f?f!==c:!!Array.isArray(f)&&!shallowCompare(f,c)),P=x||m===n&&p.isActive&&!v&&g||d>h&&g,V=Array.isArray(f)?f:[f],T=V.reduce(buildResolvedTypeValues,{});!1===y&&(T={});let{prevResolvedValues:b={}}=p,A={...b,...T},markToAnimate=t=>{P=!0,l.delete(t),p.needsAnimating[t]=!0};for(let t in A){let e=T[t],i=b[t];u.hasOwnProperty(t)||(e!==i?isKeyframesTarget(e)&&isKeyframesTarget(i)?!shallowCompare(e,i)||x?markToAnimate(t):p.protectedKeys[t]=!0:void 0!==e?markToAnimate(t):l.add(t):void 0!==e&&l.has(t)?markToAnimate(t):p.protectedKeys[t]=!0)}p.prevProp=f,p.prevResolvedValues=T,p.isActive&&(u={...u,...T}),i&&t.blockInitialAnimation&&(P=!1),P&&!v&&o.push(...V.map(t=>({animation:t,options:{type:m,...r}})))}if(l.size){let e={};l.forEach(i=>
1{let r=t.getBaseTarget(i);void 0!==r&&(e[i]=r)}),o.push({animation:e})}let d=!!o.length;return i&&!1===s.initial&&!t.manuallyAnimateOnMount&&(d=!1),i=!1,d?animate(o):Promise.resolve()}return{animateChanges,setActive:function(i,r,n){var s;if(e[i].isActive===r)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var e;return null===(e=t.animationState)||void 0===e?void 0:e.setActive(i,r)}),e[i].isActive=r;let a=animateChanges(n,i);for(let t in e)e[t].protectedKeys={};return a},setAnimateFunction:function(e){animate=e(t)},getState:()=>e}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();this.unmount(),isAnimationControls(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(){}}},exit:{Feature:class extends Feature{constructor(){super(...arguments),this.id=tz++}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(){}}},inView:{Feature:class extends Feature{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:te[r]};return function(t,e,i){let r=function({root:t,...e}){let i=t||document;tt.has(i)||tt.set(i,{});let r=tt.get(i),n=JSON.stringify(e);return r[n]||(r[n]=new IntersectionObserver(fireAllObserverCallbacks,{root:t,...e})),r[n]}(e);return Q.set(t,i),r.observe(t),()=>{Q.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,i=["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e));i&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Feature{constructor(){super(...arguments),this.removeStartListeners=J.Z,this.removeEndListeners=J.Z,this.removeAccessibleListeners=J.Z,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;let i=this.node.getProps(),r=addPointerEvent(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;let{onTap:i,onTapCancel:r}=this.node.getProps();q.Wi.update(()=>{isNodeOrChild(this.node.current,t.target)?i&&i(t,e):r&&r(t,e)})},{passive:!(i.onTap||i.onPointerUp)}),n=addPointerEvent(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=pipe(r,n),this.startPress(t,e)},this.startAccessiblePress=()=>{let t=addDomEvent(this.node.current,"keydown",t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&fireSyntheticPointerEvent("up",(t,e)=>{let{onTap:i}=this.node.getProps();i&&q.Wi.update(()=>i(t,e))})}),fireSyntheticPointerEvent("down",(t,e)=>{this.startPress(t,e)}))}),e=addDomEvent(this.node.current,"blur",()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=pipe(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&&q.Wi.update(()=>i(t,e))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;let t=this.node.getProps();return t.whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(t,e){if(!this.checkPressEnd())return;let{onTapCancel:i}=this.node.getProps();i&&q.Wi.update(()=>i(t,e))}mount(){let t=this.node.getProps(),e=addPointerEvent(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(e,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Feature{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=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHover
1Event(this.node,!1))}unmount(){}}},pan:{Feature:class extends Feature{constructor(){super(...arguments),this.removePointerDownListener=J.Z}onPointerDown(t){this.session=new PanSession(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:asyncHandler(t),onStart:asyncHandler(e),onMove:i,onEnd:(t,e)=>{delete this.session,r&&q.Wi.update(()=>r(t,e))}}}mount(){this.removePointerDownListener=addPointerEvent(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 Feature{constructor(t){super(t),this.removeGroupControls=J.Z,this.removeListeners=J.Z,this.controls=new VisualElementDragControls(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||J.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:t8,MeasureLayout:MeasureLayout},layout:{ProjectionNode:t8,MeasureLayout:MeasureLayout}},ed=function(t){function custom(e,i={}){return function({preloadedFeatures:t,createVisualElement:e,useRender:i,useVisualState:r,Component:n}){t&&function(t){for(let e in t)f[e]={...f[e],...t[e]}}(t);let s=(0,a.forwardRef)(function(s,d){var m;let p;let f={...(0,a.useContext)(o),...s,layoutId:function({layoutId:t}){let e=(0,a.useContext)(y.p).id;return e&&void 0!==t?e+"-"+t:t}(s)},{isStatic:x}=f,P=function(t){let{initial:e,animate:i}=function(t,e){if(isControllingVariants(t)){let{initial:e,animate:i}=t;return{initial:!1===e||isVariantLabel(e)?e:void 0,animate:isVariantLabel(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,a.useContext)(l));return(0,a.useMemo)(()=>({initial:e,animate:i}),[variantLabelsAsDependency(e),variantLabelsAsDependency(i)])}(s),V=r(s,x);if(!x&&g.j){P.visualElement=function(t,e,i,r){let{visualElement:n}=(0,a.useContext)(l),s=(0,a.useContext)(c),d=(0,a.useContext)(u.O),m=(0,a.useContext)(o).reducedMotion,p=(0,a.useRef)();r=r||s.renderer,!p.current&&r&&(p.current=r(t,{visualState:e,parent:n,props:i,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m}));let f=p.current;(0,a.useInsertionEffect)(()=>{f&&f.update(i,d)});let g=(0,a.useRef)(!!window.HandoffAppearAnimations);return(0,h.L)(()=>{f&&(f.render(),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,a.useEffect)(()=>{f&&(f.updateFeatures(),!g.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,g.current=!1)}),f}(n,V,f,e);let i=(0,a.useContext)(v),r=(0,a.useContext)(c).strict;P.visualElement&&(p=P.visualElement.loadFeatures(f,r,t,i))}return a.createElement(l.Provider,{value:P},p&&P.visualElement?a.createElement(p,{visualElement:P.visualElement,...f}):null,i(n,s,(m=P.visualElement,(0,a.useCallback)(t=>{t&&V.mount&&V.mount(t),m&&(t?m.mount(t):m.unmount()),d&&("function"==typeof d?d(t):isRefObject(d)&&(d.current=t))},[m])),V,x,P.visualElement))});return s[x]=n,s}(t(e,i))}if("undefined"==typeof Proxy)return custom;let e=new Map;return new Proxy(custom,{get:(t,i)=>(e.has(i)||e.set(i,custom(i)),e.get(i))})}((t,e)=>(function(t,{forwardMotionProps:e=!1},i,r){let n=isSVGComponent(t)?_:K;return{...n,preloadedFeatures:i,useRender:function(t=!1){return(e,i,r,{latestValues:n},s)=>{let o=isSVGComponent(e)?useSVGProps:useHTMLProps,l=o(i,n,s,e),u=function(t,e,i){let r={};for(let n in t)("values"!==n||"object"!=typeof t.values)&&(shouldForward(n)||!0===i&&isValidMotionProp(n)||!e&&!isValidMotionProp(n)||t.draggable&&n.startsWith("onDrag"))&&(r[n]=t[n]);return r}(i,"string"==typeof e,t),h={...u,...l,ref:r},{children:c}=i,d=(0,a.useMemo)(()=>isMotionValue(c)?c.get():c,[c]);return(0,a.createElement)(e,{...h,children:d})}}(e),createVisualElement:r,Component:t}})(t,e,ec,create_visual_element_createDomVisualElement))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.